Message forwarding method and device based on unified scheduling gateway, equipment and medium

By introducing a message forwarding method based on a unified scheduling gateway into the cloud computing architecture, the problem that public network IP cannot switch between different uses is solved, unified scheduling and distribution of traffic is realized, and the efficiency and flexibility of network resources are improved.

CN120017591APending Publication Date: 2025-05-16BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510183983.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-19
Publication Date
2025-05-16

AI Technical Summary

Technical Problem

In the existing cloud computing architecture, public network IP cannot be switched arbitrarily between three uses, and public network IPs under more than two types of gateways cannot be placed in a shared broadband package.

Method used

The message forwarding method based on the unified scheduling gateway is adopted, and the target message from the sending end is received through the public IP unified scheduling gateway, the public IP configuration information is determined, and the target message is limited based on the bandwidth packet configuration information, so as to realize the unified scheduling and distribution of traffic.

Benefits of technology

It realizes the random switching of public network IP between different types of gateways, and places different types of gateways into a unified shared bandwidth packet, improving the efficiency and flexibility of network resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120017591A_ABST
    Figure CN120017591A_ABST
Patent Text Reader

Abstract

The invention relates to a message forwarding method and device based on a unified scheduling gateway, equipment and a medium. The message forwarding method based on the unified scheduling gateway is applied to a public network IP unified scheduling gateway and comprises the steps that a target message sent by a sending end is received, and the sending end comprises any one of a public network, an nat gateway, a load balancer gateway and an elastic public network IP gateway; public network IP configuration information is determined based on the target message, speed limiting processing is performed on the target message based on bandwidth packet configuration information in the public network IP configuration information, and a binding relationship exists between the bandwidth packet configuration information and the nat gateway, the load balancer gateway and the elastic public network IP gateway; and when it is determined that the speed limit does not lose the packet, the target message is sent to the target receiving end based on the target tunnel information corresponding to the target message, so that random switching among different types of gateways is realized by uniformly scheduling the gateways through the public network IP, and the different types of gateways are placed in a uniform shared bandwidth packet.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of cloud computing, and in particular to a message forwarding method, device, equipment and medium based on a unified scheduling gateway. Background Art

[0002] In the existing cloud computing vendor architecture, there are generally three ways to bind public IP resources. The first is to bind elastic IP one-to-one to the network card instance under the virtual private cloud (VPC); the second is NAT IP for multiple instances under VPC to share the Internet, that is, multiple instances are bound to the same NAT IP to achieve shared network access; the third is the public network load balancer (LB) IP address to provide services to the outside world and distribute requests to multiple service resources attached to the VPC as real servers. These binding methods generally correspond to different physical gateway resources in the public cloud vendor architecture, using gateway instances independently developed and built based on different architectures and hardware structures.

[0003] Since the purposes achieved by the above three binding methods differ greatly in processing logic, three different physical gateways are generally used to implement their respective functions when designing the public cloud architecture. This will result in the public IP being unable to switch between the three purposes at will, and the public IPs under more than two types of gateways cannot be placed in a shared broadband package. Summary of the invention

[0004] In order to solve the above technical problems, the present disclosure provides a message forwarding method, device, equipment and medium based on a unified scheduling gateway.

[0005] A first aspect of an embodiment of the present disclosure provides a message forwarding method based on a unified scheduling gateway, which is applied to a public network IP unified scheduling gateway, including:

[0006] Receive the target message sent by the sender, which includes any one of the public network, NAT gateway, load balancer gateway, and elastic public IP gateway;

[0007] Determine the public IP configuration information based on the target message, and perform speed limit processing on the target message based on the bandwidth package configuration information in the public IP configuration information. There is a binding relationship between the bandwidth package configuration information and the NAT gateway, load balancer gateway, and elastic public IP gateway;

[0008] When it is determined that the rate limit does not cause packet loss, the target message is sent to the target receiving end based on the target tunnel information corresponding to the target message.

[0009] A second aspect of the embodiments of the present disclosure provides a message forwarding device based on a unified scheduling gateway, which is applied to a public network IP unified scheduling gateway, including:

[0010] A message receiving module is used to receive a target message sent by a sender, where the sender includes any one of a public network, a NAT gateway, a load balancer gateway, and an elastic public IP gateway;

[0011] The speed limit processing module is used to determine the public IP configuration information based on the target message, and perform speed limit processing on the target message based on the bandwidth package configuration information in the public IP configuration information. There is a binding relationship between the bandwidth package configuration information and the NAT gateway, the load balancer gateway and the elastic public IP gateway;

[0012] The message sending module is used to send the target message to the target receiving end based on the target tunnel information corresponding to the target message when it is determined that the speed limit does not cause packet loss.

[0013] A third aspect of the embodiments of the present disclosure provides an electronic device, including:

[0014] processor;

[0015] A memory for storing executable instructions;

[0016] The processor is used to read executable instructions from the memory and execute the executable instructions to implement the message forwarding method based on the unified scheduling gateway provided in the first aspect above.

[0017] A fourth aspect of an embodiment of the present disclosure provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the processor implements the message forwarding method based on a unified scheduling gateway provided in the first aspect above.

[0018] A fifth aspect of an embodiment of the present disclosure provides a computer program product, which includes a computer program or instructions. When the computer program or instructions are executed by a processor, the method for forwarding messages based on a unified scheduling gateway as described in the first aspect above is implemented.

[0019] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:

[0020] The message forwarding method, apparatus, device and medium based on the unified scheduling gateway provided by the embodiments of the present disclosure can receive the target message sent by the sender through the public IP unified scheduling gateway, the sender includes any one of the public network, NAT gateway, load balancer gateway and elastic public IP gateway, determine the public IP configuration information based on the target message, and perform speed limit processing on the target message based on the bandwidth package configuration information in the public IP configuration information. There is a binding relationship between the bandwidth package configuration information and the NAT gateway, the load balancer gateway and the elastic public IP gateway. When it is determined that the speed limit does not cause packet loss, the target message is sent to the target receiving end based on the target tunnel information corresponding to the target message. Therefore, by setting the public IP unified scheduling gateway, all the traffic of the public IP can be introduced into the public IP unified scheduling gateway, and the public IP unified scheduling gateway distributes the traffic to different types of gateways, thereby realizing arbitrary switching between different types of gateways and placing different types of gateways into a unified shared bandwidth package. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0022] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0023] Figure 1 It is a flow chart of a message forwarding method based on a unified scheduling gateway provided in an embodiment of the present disclosure;

[0024] Figure 2 is a schematic diagram of an application scenario provided by an embodiment of the present disclosure;

[0025] Figure 3 is a flowchart of another message forwarding method based on a unified scheduling gateway provided in an embodiment of the present disclosure;

[0026] Figure 4 It is a flowchart of another message forwarding method based on a unified scheduling gateway provided in an embodiment of the present disclosure;

[0027] Figure 5 It is a structural diagram of a message forwarding device based on a unified scheduling gateway provided in an embodiment of the present disclosure;

[0028] Figure 6 It is a structural schematic diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0029] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0030] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0031] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0032] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0033] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0034] Generally, there are three binding methods for public IP resources. However, since the uses of the three binding methods are too different in processing logic, three different physical gateways are generally used to implement their respective functions when designing the public cloud architecture. This will result in the problem that the public IP cannot be switched between the three uses at will, and the public IPs under more than two types of gateways cannot be placed in a shared broadband package. To address this problem, the embodiments of the present disclosure provide a message forwarding method based on a unified scheduling gateway, which is described below in conjunction with specific embodiments.

[0035] Figure 1The present invention provides a flowchart of a message forwarding method based on a unified scheduling gateway, which can be performed by a message forwarding device based on a unified scheduling gateway. The message forwarding device based on a unified scheduling gateway can be implemented in software and / or hardware. The message forwarding device based on a unified scheduling gateway can be configured in an electronic device, such as a server or a terminal, wherein the terminal specifically includes a mobile phone, a computer or a tablet computer, etc. In addition, the method can be applied to Figure 2 The application scenario shown includes the public network (Internet), a public IP unified scheduling gateway 10, a NAT gateway 20, a load balancer gateway 30, and an elastic public IP gateway 40. It can be understood that the message forwarding method based on the unified scheduling gateway provided in the embodiment of the present disclosure can also be applied in other scenarios.

[0036] like Figure 2 As shown, the three types of public IPs are uniformly routed and distributed by the public IP unified dispatching gateway 10. The public IP unified dispatching gateway 10 can save the tunnel information corresponding to each public IP, and guide the public IP to be sent to the gateway of a specific service for processing. At the same time, the public IP unified dispatching gateway 10 can perform unified bandwidth packet processing on the public IP, such as speed limit processing, QMS scheduling, etc. The public IP can be switched to three different types of services at will.

[0037] The traffic of the public network (Internet) flows uniformly into the public network IP unified dispatching gateway 10, which performs speed limit processing on the traffic data, and uniformly distributes the traffic data when there is no packet loss during speed limit, and distributes the traffic data to various types of gateways, such as the NAT gateway 20, the load balancer gateway 30, and the elastic public network IP gateway 40, and then the NAT gateway 20, the load balancer gateway 30, and the elastic public network IP gateway 40 perform further traffic data distribution. At the same time, when the NAT gateway 20, the load balancer gateway 30, and the elastic public network IP gateway 40 receive the traffic data, they will also send it uniformly to the public network IP unified dispatching gateway 10, which will perform speed limit processing and distribute it to the public network when there is no packet loss during speed limit.

[0038] Combine the following Figure 2 The application scenario shown is Figure 1 The message forwarding method based on the unified scheduling gateway is introduced as shown, for example, Figure 2 The public network IP unified dispatching gateway 10 in the embodiment can execute the method. Figure 1 As shown, the message forwarding method based on the unified scheduling gateway provided in this embodiment includes the following steps.

[0039] S110, receiving a target message sent by a sending end, where the sending end includes any one of a public network, a NAT gateway, a load balancer gateway, and an elastic public IP gateway.

[0040] In the disclosed embodiment, NAT Gateway is a network service that supports IP address translation and allows resources in a virtual private cloud (VPC) to securely access the public Internet. Resource instances under the VPC can be accessed through the public network after SNAT conversion through the NAT Gateway.

[0041] A load balancer gateway is a network service that distributes traffic from the public Internet to public servers to multiple servers to improve application availability and scalability.

[0042] The elastic public IP gateway is mainly used to bind the network card instance under the virtual private cloud (VPC) to the public IP, perform one-to-one conversion on the public network traffic IP, and then send it to the network card instance under the bound virtual private cloud (VPC).

[0043] In some embodiments of the present disclosure, the public IP unified scheduling gateway can receive the target message sent by the public network in real time. At this time, the target message can be a message sent by the client to the load balancer gateway through the public network, that is, a message that the client accesses the load balancer gateway through the public network.

[0044] In some other embodiments of the present disclosure, the public network IP unified scheduling gateway can receive the target message sent by the NAT gateway in real time. At this time, the target message can be the message obtained by the NAT gateway after tunnel packaging the first original message after receiving the first original message sent by the client. The first original message is the message sent by the client when it wants to access the public network through the NAT gateway.

[0045] In some other embodiments of the present disclosure, the public IP unified scheduling gateway can receive the target message sent by the elastic public IP gateway in real time. At this time, the target message can be the message obtained by the elastic public IP gateway after tunneling the third original message after receiving the third original message sent by the client. The third original message is the message sent by the client when it wants to access the public network through the elastic public IP gateway.

[0046] S120. Determine the public IP configuration information based on the target message, and perform speed limit processing on the target message based on the bandwidth package configuration information in the public IP configuration information. There is a binding relationship between the bandwidth package configuration information and the NAT gateway, the load balancer gateway, and the elastic public IP gateway.

[0047] In the embodiment of the present disclosure, the public IP configuration information includes IP addresses and tunnel names of different types of public IPs, and bandwidth package configuration information corresponding to the IP addresses of different types of public IPs, wherein the bandwidth package configuration information includes the bandwidth package name and maximum bandwidth information.

[0048] Specifically, after receiving the target message, the public IP unified scheduling gateway can determine the public IP configuration information based on the IP address carried in the target message, and then after determining the public IP configuration information, it can limit the speed of the target message based on the bandwidth package configuration information in the public IP configuration information to determine whether the packet is lost.

[0049] S130: When it is determined that the speed limit does not cause packet loss, the target message is sent to the target receiving end based on the target tunnel information corresponding to the target message.

[0050] In the embodiment of the present disclosure, the tunnel information includes the tunnel name, the source IP address corresponding to the tunnel, the destination IP address and the tunnel description information.

[0051] Specifically, when determining that the speed limit does not cause packet loss, the public network IP unified dispatching gateway determines the target receiving end based on the target tunnel information corresponding to the target message, and sends the target message to the target receiving end. Among them, when the receiving end is the public network, the target receiving end can be a load balancer gateway; when the receiving end is any one of a NAT gateway, a load balancer gateway, and an elastic public network IP gateway, the target receiving end is the public network.

[0052] In the disclosed embodiment, a target message sent by a sender can be received through a public IP unified scheduling gateway, and the sender includes any one of a public network, a NAT gateway, a load balancer gateway, and an elastic public IP gateway. The public IP configuration information is determined based on the target message, and the target message is speed-limited based on the bandwidth package configuration information in the public IP configuration information. There is a binding relationship between the bandwidth package configuration information and the NAT gateway, the load balancer gateway, and the elastic public IP gateway. When it is determined that the speed limit does not cause packet loss, the target message is sent to the target receiving end based on the target tunnel information corresponding to the target message. Therefore, by setting a public IP unified scheduling gateway, all public IP traffic can be introduced into the public IP unified scheduling gateway, and the public IP unified scheduling gateway distributes the traffic to different types of gateways, thereby realizing arbitrary switching between different types of gateways and placing different types of gateways into a unified shared bandwidth package.

[0053] On the basis of the above-mentioned embodiments of the present disclosure, a unified scheduling gateway of a public IP is introduced to perform unified scheduling and distribution of traffic data. The implementation logic is simple. It only needs to perform simple tunnel packet pointing to the gateway for specific business processing, such as a NAT gateway, a load balancer gateway or an elastic public IP gateway. It is possible to realize arbitrary switching of the public IP between the three uses. There is no need to make major changes to the business code of the three different types of business gateways, and the performance is relatively stable.

[0054] In an embodiment of the present disclosure, before receiving the target message sent by the sender, the message forwarding method based on the unified scheduling gateway may also include: performing bandwidth package configuration operations, tunnel configuration operations and public IP configuration operations respectively based on bandwidth package configuration information, tunnel configuration information and public IP configuration information to perform bandwidth package configuration, tunnel configuration and public IP configuration, wherein the bandwidth package configuration information includes a bandwidth package name and maximum bandwidth information, the tunnel configuration information includes a tunnel name, a source IP address corresponding to the tunnel, a destination IP address and tunnel description information, and the public IP configuration information includes IP addresses, tunnel names and bandwidth package names corresponding to different types of gateways.

[0055] Among them, the bandwidth package configuration operation can be understood as binding different types of gateways to the same shared bandwidth package; the public network IP configuration operation can be understood as binding the IP addresses, tunnel information and bandwidth package information of different types of gateways respectively.

[0056] Specifically, before receiving the target message sent by the sender, the public IP unified scheduling gateway publishes the route and obtains the configuration information to perform a series of configurations, which may include bandwidth package configuration, tunnel configuration, and public IP configuration, etc., to ensure the normal forwarding of traffic data.

[0057] The following is a specific example:

[0058] For example, if a customer has three public IPs, IP1, and IP2, IP3, IP1 is used as the public IP of the NAT gateway and is used on the public network of instances under the public virtual private cloud; IP2 is used as the IP of the load balancer gateway and provides access services to the external Internet; IP3 is bound to a bare metal server as the IP of the elastic public IP gateway and is used as a springboard for the customer's cloud resources.

[0059] The tunnel packet IP address of the public IP unified scheduling gateway is VIP1, the tunnel packet IP address of the NAT gateway is VIP2, the tunnel packet IP address of the elastic public IP gateway is VIP3, and the tunnel packet IP address of the load balancer gateway is VIP4.

[0060] First, the public IP unified dispatching gateway and various types of gateways publish routes to distribute their own IP addresses and tunnel packet IP addresses. Second, the public IP unified dispatching gateway configures bandwidth packages, tunnels, and public IPs.

[0061] For example, the bandwidth package is configured as:

[0062] Name: Speed ​​limit instance 1; Maximum bandwidth: 100 MB / s.

[0063] The tunnel configuration is:

[0064] Tunnel 1: Tunnel name: tunnel1; Source IP: VIP1; Destination IP: VIP2; Description: Tunnel packet information to NAT gateway.

[0065] Tunnel 2: Tunnel name: tunnel2; Source IP: VIP1; Destination IP: VIP3; Description: Tunnel packet information to the elastic public IP gateway.

[0066] Tunnel 3: Tunnel name: tunnel3; Source IP: VIP1; Destination IP: VIP4; Description: Tunnel packet information to the load balancer gateway.

[0067] The public IP configuration is:

[0068] Configuration 1: IP: IP1; Tunnel name: tunnel1; Bandwidth package: rate limit instance 1.

[0069] Configuration 2: IP: IP2; Tunnel name: tunnel3; Bandwidth package: rate limit instance 1.

[0070] Configuration 3: IP: IP3; Tunnel name: tunnel2; Bandwidth package: rate limit instance 1.

[0071] In the disclosed embodiment, when the sending end is a NAT gateway, the target message is obtained by tunneling the first original message sent by the client to the NAT gateway based on the first tunnel information corresponding to the public network IP unified scheduling gateway and the second tunnel information corresponding to the NAT gateway. The first tunnel information may be the tunnel packet IP address corresponding to the public network unified scheduling gateway, such as VIP1; the second tunnel information may be the tunnel packet IP address of the NAT gateway, such as VIP2. Exemplarily, the source IP address of the target message is VIP2, and the destination IP address is VIP1.

[0072] Figure 3 is a flowchart of another message forwarding method based on a unified scheduling gateway provided by an embodiment of the present disclosure; Figure 3As shown, when the sending end is a NAT gateway, the message forwarding method based on the unified scheduling gateway specifically includes the following steps:

[0073] S310: Receive a target message sent by a sending end.

[0074] Specifically, the public network IP unified scheduling gateway can receive the target message sent by the sender in real time.

[0075] S320: When the sending end is a NAT gateway, when it is determined that the target message is an uplink message based on the outer destination IP address corresponding to the target message, the target message is parsed according to a preset tunnel message format to obtain a first original message.

[0076] Specifically, after receiving the target message, the public network IP unified scheduling gateway determines the outer destination IP address corresponding to the target message. If the outer destination IP address is VIP1, it determines that the target message is a message sent uplink to the public network Internet. Then, according to the preset tunnel message format, it broadcasts the outer tunnel header, parses the original message, and obtains the first original message.

[0077] S330: Determine the public network IP configuration information based on the first original message, and perform speed limit processing on the first original message based on the bandwidth package configuration information in the public network IP configuration information.

[0078] Specifically, after obtaining the first original message, the public network IP unified dispatching gateway obtains the target source IP address corresponding to the first original message, and searches for the public network IP configuration information corresponding to the target source IP address according to the target source IP address, wherein the target source IP address corresponding to the first original message is the IP address corresponding to the NAT gateway. Then, the first original message is speed-limited according to the bandwidth package configuration information in the public network IP configuration information, that is, it is determined whether the maximum bandwidth in the bandwidth package configuration information is reached. If so, it is determined that the packet is lost, otherwise, it is determined that the speed is limited without packet loss.

[0079] S340: When it is determined that the speed limit does not cause packet loss, the first original message is sent to the public network.

[0080] Specifically, when the public network IP unified scheduling gateway determines that the speed limit does not cause packet loss, it directly sends the first original message to the public network based on the destination IP address of the first original message, so that the public network returns the first reply message after receiving the first original message, and directs the first reply message to the public network IP unified scheduling gateway according to the destination IP address of the first reply message.

[0081] S350, receiving the first reply message returned by the public network, and determining the public network IP configuration information based on the first reply message, and performing speed limit processing on the first reply message based on the bandwidth package configuration information in the public network IP configuration information, wherein the destination IP address of the first reply message is the IP address corresponding to the NAT gateway.

[0082] Specifically, the public IP unified scheduling gateway receives the first reply message returned by the public network, searches for the corresponding public IP configuration information based on the destination IP address of the first reply message, and performs speed limit processing on the first reply message based on the bandwidth package configuration information in the public IP configuration information.

[0083] S360. When it is determined that the speed limit does not cause packet loss, tunnel packet processing is performed on the first reply message based on the second tunnel information corresponding to the NAT gateway, and the first reply message after packet processing is sent to the NAT gateway, so that after receiving the first reply message after packet processing, the NAT gateway parses the first reply message after packet processing to obtain the first reply message, and sends the first reply message to the target network card corresponding to the client based on the first session.

[0084] The second tunnel information corresponding to the NAT gateway may be the tunnel packet IP address corresponding to the NAT gateway.

[0085] The first session is established by the NAT gateway after receiving the first original message sent by the client based on the message source IP address and destination IP address corresponding to the first original message. The first session includes forward five-tuple information and reverse five-tuple information.

[0086] Specifically, when the public network IP unified scheduling gateway determines that the speed limit does not cause packet loss after speed limit processing, it performs tunnel packet processing on the first reply message based on the second tunnel information corresponding to the NAT gateway, and sends the first reply message after packet processing to the NAT gateway, so that after receiving the first reply message after packet processing, the NAT gateway parses the first reply message after packet processing to obtain the first reply message, and sends the first reply message to the target network card corresponding to the client based on the first session.

[0087] The following is a detailed description using a specific example:

[0088] 1. When the VPC on the cloud wants to access the public network through the NAT gateway (i.e. IP1), for example, the traffic of IPx in the private cloud network vpc1 accessing Internet8.8.8.8, such as the first original message passing through the NAT gateway, after the NAT gateway receives the first original message, it modifies the message source IP address IPx of the first original message to the public network IP address IP1 of the NAT gateway; and creates a first session, wherein the first session includes forward five-tuple information and reverse five-tuple information, wherein the forward five-tuple information includes the source IP address of the first original message, i.e. VPC IPx, and the destination IP address is Internet8.8.8.8, and the forward five-tuple information includes the VPC1 tag; the reverse five-tuple information includes the source IP address, i.e. Internet8.8.8.8, and the destination IP address is IP1, so that the IP address mapping relationship between the first original message and the reply message of the first original message can be determined through the first session to ensure that the first reply message is returned to the client.

[0089] 2. Further, the NAT gateway performs tunnel packet processing on the first original message, wherein the source IP address during the tunnel packet processing is the tunnel IP address VIP2 of the NAT gateway, and the destination IP address is the tunnel IP address VIP1 of the public network IP unified scheduling gateway, thereby obtaining the first original message after packet processing and sending it to the public network IP unified scheduling gateway.

[0090] 3. After receiving the first original message after the packet is encapsulated, the public network IP unified dispatching gateway determines that the outer destination IP of the message is VIP1, and confirms that it is a message from the upstream Internet. Then, according to the preset tunnel message format, it broadcasts the outer tunnel header, parses the original message, and obtains the first original message.

[0091] 4. After obtaining the first original message, the public network IP unified dispatching gateway searches for the public network IP configuration information based on the source IP address IP1 and the destination IP address Internet8.8.8.8 of the five-tuple information of the first original message.

[0092] 5. After searching, the public network IP unified dispatching gateway determines that the bandwidth package configuration information corresponding to the public network IP configuration information is speed limit instance 1, and then performs speed limit processing according to speed limit instance 1. If it is determined that the speed limit does not cause packet loss, the first original message is directly sent to the public network.

[0093] 6. The public network Internet8.8.8.8 server responds to the first original message and generates a first reply message. The source IP address of the first reply message is Internet8.8.8.8, and the destination IP address is IP1. The traffic based on IP1 is directed to the public network IP unified scheduling gateway.

[0094] 7. The public network IP unified dispatching gateway receives the first reply message and searches for the public network IP configuration information according to the destination IP address IP1 of the first reply message.

[0095] 8. After searching, the public network IP unified dispatching gateway determines that the bandwidth package configuration information corresponding to the public network IP configuration information is speed limit instance 1, and then performs speed limit processing according to speed limit instance 1. If it is determined that the speed limit does not lose packets, the first reply message is tunneled, the source IP address of the tunneled packet processing is VIP1, the destination IP address is VIP2, and the first reply message after packet processing is sent to the NAT gateway.

[0096] 9. After the NAT gateway receives the first reply message after packet processing, it checks that the destination IP address is VIP2, indicating that it is traffic from the public network to the VPC. Then, it decompresses the first reply message according to the preset tunnel message format.

[0097] 10. The NAT gateway performs a session search based on the quintuple information of the first reply message, hits the first session, and modifies the IP address of the first reply message according to the forward quintuple information and the reverse quintuple information in the first session, and then sends the first reply message to the target network card of the client on the VPC1 side.

[0098] In the disclosed embodiment, traffic can be distributed to the NAT gateway through the public IP unified scheduling gateway, thereby achieving intercommunication of upstream and downstream traffic based on the NAT gateway.

[0099] In the embodiment of the present disclosure, the load balancer gateway only supports active access from the public network, and will not actively access the external network from within the vpc. When the sending end is the public network and the target message is the second original message sent by the client based on the public network to access the load balancer gateway, the gateway is uniformly dispatched based on the public network IP to forward the message, and the steps for achieving the interconnection of upstream and downstream traffic are as follows: Figure 4 As shown, the specific steps include:

[0100] S410: Receive a target message sent by a sending end.

[0101] S420: When the sending end is a public network and the target message is a second original message sent by the client based on the public network for accessing the load balancer gateway, the public network IP configuration information is determined based on the second original message, and the second original message is speed-limited based on the bandwidth package configuration information in the public network IP configuration information.

[0102] Specifically, after receiving the target message, i.e., the second original message, the public IP unified scheduling gateway can search for the public IP configuration information according to the destination IP address corresponding to the second original message, i.e., the public IP address corresponding to the load balancer gateway, and perform speed limit processing on the second original message based on the bandwidth package configuration information in the found public IP configuration information.

[0103] S430: When it is determined that the speed limit does not cause packet loss, tunnel packet processing is performed on the second original message based on the third tunnel information corresponding to the load balancer gateway to obtain the second original message after packet processing.

[0104] The third tunnel information may be a tunnel IP address corresponding to the load balancer gateway.

[0105] Specifically, when the public network IP unified scheduling gateway determines that the second original message is speed-limited without packet loss, it can perform tunnel packet processing on the second original message based on the third tunnel information corresponding to the load balancer gateway, wherein the source IP address corresponding to the tunnel packet processing is the tunnel IP address of the public network IP unified scheduling gateway, and the destination IP address is the tunnel IP address corresponding to the load balancer gateway, to obtain the second original message after packet processing.

[0106] S440. Send the second original message after packet processing to the load balancer gateway, so that the load balancer gateway determines the target backend server based on the preset load balancing rule, creates a second session based on the IP address of the target backend server, receives the second reply message sent by the target backend server for the second original message, performs tunnel packet processing on the second reply message based on the second session, and sends the packetized second reply message to the public network IP unified scheduling gateway.

[0107] Specifically, after obtaining the second original message after packet processing, the public network IP unified scheduling gateway can send the second original message after packet processing to the load balancer gateway, so that the load balancer gateway follows the load balancing processing flow after receiving the second original message after packet processing, performs subsequent message processing, and returns a reply message.

[0108] S450, receiving the second reply message after the packet returned by the load balancer gateway, and determining that the second reply message after the packet is an uplink message based on the outer destination IP address corresponding to the second reply message after the packet, parse the second reply message after the packet according to the preset tunnel message format to obtain the second reply message.

[0109] Specifically, when the public network IP unified scheduling gateway receives the second reply message after the packet returned by the load balancer gateway, and determines based on the outer destination IP address corresponding to the second reply message after the packet that the second reply message after the packet is a message sent uplink to the public network Internet, the second reply message after the packet is parsed according to the preset tunnel message format, and the outer tunnel header is stripped to obtain the second reply message.

[0110] S460: Determine the public network IP configuration information based on the second reply message, perform speed limit processing on the second reply message based on the bandwidth package configuration information in the public network IP configuration information, and when it is determined that the speed limit does not cause packet loss, send the second reply message to the public network.

[0111] Specifically, after receiving the second reply message, the public network IP unified scheduling gateway searches for the public network IP configuration information based on the source IP address of the second reply message, and performs speed limit processing on the second reply message based on the bandwidth package configuration information in the found public network IP configuration information. When it is determined that the speed limit does not cause packet loss, the second reply message is sent to the public network.

[0112] The following is a detailed description using a specific example:

[0113] 1. When the traffic of the public network IPY accessing the public network IP (IP2) of the load balancer gateway, that is, the second original message arrives, the public network IP unified scheduling gateway receives the second original message, wherein the destination IP address of the second original message is IP2, and searches for the corresponding public network IP configuration information based on the destination IP address IP2 of the second original message, and performs speed limit processing on the second original message based on the bandwidth package configuration information in the found public network IP configuration information, that is, speed limit instance 1.

[0114] 2. When the public network IP unified dispatching gateway determines that the speed limit does not cause packet loss, it performs tunnel packet processing on the second original message based on the tunnel information tunnel3 sent to the load balancer gateway to obtain the second original message after packet processing, and sends the second original message after packet processing to the load balancer gateway.

[0115] 3. The load balancer gateway receives the second original message after packet processing, and unpacks the second original message after packet processing to obtain the second original message.

[0116] 4. After receiving the second original message, the load balancer gateway executes the load balancing process, selects a real target backend server such as RS_IP1 under VPC1, sends the second original message to the target backend server, and creates a second session. The forward five-tuple information of the second session is that the source IP address is IPY and the destination IP address is IP2; the source IP address of the reverse five-tuple information is RS_IP1 under VPC1, the destination IP address is LB localIP in fullnat mode, and the destination IP address is the client's IP address in normal mode. The specific implementation method of creating the second session is similar to the specific implementation method of the NAT gateway creating the first session in the above-mentioned embodiment of the present disclosure, and will not be repeated here.

[0117] 5. The target backend server processes the second original message and sends a second reply message to the load balancer gateway.

[0118] 6. After the load balancer gateway receives the second reply message, it performs a session search based on the five-tuple information of the second reply message, hits the second session, and then modifies the destination IP address of the second reply message based on the second session, and performs tunnel packet processing. The source IP address of the tunnel packet processing is VIP4, and the destination IP address is VIP1. Then, the second reply message after packet processing is sent to the public network IP unified scheduling gateway.

[0119] 7. After receiving the second reply message after packet processing, the public network IP unified dispatching gateway determines that the outer destination IP address of the message is VIP1, confirms that it is a message sent uplink to the Internet, unpacks the second reply message, and obtains the second reply message.

[0120] 8. After receiving the second reply message, the public IP unified scheduling gateway searches for the public IP configuration information based on the source IP address of the second reply message, and performs speed limit processing on the second reply message based on the bandwidth package configuration information in the found public IP configuration information. When it is determined that the speed limit does not cause packet loss, the second reply message is sent to the public network.

[0121] In the disclosed embodiment, traffic can be distributed to the load balancer gateway through the public IP unified scheduling gateway, thereby achieving interconnection of upstream and downstream traffic based on the load balancer gateway.

[0122] In an embodiment of the present disclosure, when the sending end is an elastic public IP gateway, the target message is the message obtained by the elastic public IP gateway after tunnel packaging the third original message after receiving the third original message sent by the client. The specific implementation method of the public IP unified scheduling gateway after receiving the target message is similar to the processing method of the public IP unified scheduling gateway after receiving the target message sent by the NAT gateway in the above embodiment of the present disclosure, and will not be repeated here.

[0123] Figure 5 It is a structural diagram of a message forwarding device based on a unified scheduling gateway provided in an embodiment of the present disclosure.

[0124] In the embodiments of the present disclosure, the message forwarding device based on the unified scheduling gateway can be set in an electronic device, which is understood as a part of the functional modules in the above electronic device. Specifically, the electronic device can be a server or a terminal, wherein the terminal specifically includes a mobile phone, a computer or a tablet computer, etc., which is not limited here.

[0125] like Figure 5 As shown, the message forwarding device 500 based on the unified scheduling gateway can be applied to the public network IP unified scheduling gateway, and can specifically include a message receiving module 510 , a rate limit processing module 520 and a message sending module 530 .

[0126] The message receiving module 510 can be used to receive a target message sent by a sender, where the sender includes any one of a public network, a NAT gateway, a load balancer gateway, and an elastic public IP gateway.

[0127] The speed limit processing module 520 can be used to determine the public IP configuration information based on the target message, and perform speed limit processing on the target message based on the bandwidth package configuration information in the public IP configuration information. There is a binding relationship between the bandwidth package configuration information and the NAT gateway, load balancer gateway and elastic public IP gateway.

[0128] The message sending module 530 may be configured to send the target message to the target receiving end based on the target tunnel information corresponding to the target message when it is determined that the rate limit does not cause packet loss.

[0129] In the disclosed embodiment, a target message sent by a sender can be received through a public IP unified scheduling gateway, and the sender includes any one of a public network, a NAT gateway, a load balancer gateway, and an elastic public IP gateway. The public IP configuration information is determined based on the target message, and the target message is speed-limited based on the bandwidth package configuration information in the public IP configuration information. There is a binding relationship between the bandwidth package configuration information and the NAT gateway, the load balancer gateway, and the elastic public IP gateway. When it is determined that the speed limit does not cause packet loss, the target message is sent to the target receiving end based on the target tunnel information corresponding to the target message. Therefore, by setting a public IP unified scheduling gateway, all public IP traffic can be introduced into the public IP unified scheduling gateway, and the public IP unified scheduling gateway distributes the traffic to different types of gateways, thereby realizing arbitrary switching between different types of gateways and placing different types of gateways into a unified shared bandwidth package.

[0130] In some embodiments of the present disclosure, when the sending end is a NAT gateway, the target message is obtained by tunneling the first original message sent by the client by the NAT gateway based on the first tunnel information corresponding to the public IP unified scheduling gateway and the second tunnel information corresponding to the NAT gateway.

[0131] The message forwarding device 500 based on the unified scheduling gateway may further include a message unpacking module.

[0132] The message unpacking module can be used to parse the target message according to the preset tunnel message format to obtain the first original message after receiving the target message sent by the sending end and determining that the target message is an uplink message based on the outer destination IP address corresponding to the target message.

[0133] The message sending module 530 may be specifically configured to send the first original message to the public network when it is determined that the speed limit does not cause packet loss.

[0134] In some embodiments of the present disclosure, the message forwarding device 500 based on the unified scheduling gateway may further include a reply message processing module.

[0135] The reply message processing module can be used to, when it is determined that the speed limit does not cause packet loss, send the first original message to the public network, receive the first reply message returned by the public network, determine the public network IP configuration information based on the first reply message, and perform speed limit processing on the first reply message based on the bandwidth package configuration information in the public network IP configuration information, wherein the destination IP address of the first reply message is the IP address corresponding to the NAT gateway;

[0136] When it is determined that the speed limit does not cause packet loss, the first reply message is tunnel packetized based on the second tunnel information corresponding to the NAT gateway, and the first reply message after packet processing is sent to the NAT gateway, so that after receiving the first reply message after packet processing, the NAT gateway parses the first reply message after packet processing to obtain the first reply message, and sends the first reply message to the target network card corresponding to the client based on the first session.

[0137] In some embodiments of the present disclosure, the first session is established by the NAT gateway after receiving the first original message sent by the client based on the message source IP address and destination IP address corresponding to the first original message, and the first session includes forward quintuple information and reverse quintuple information.

[0138] In some embodiments of the present disclosure, the rate limit processing module 520 can be specifically used to determine the public network IP configuration information based on the target source IP address corresponding to the first original message, and the target source IP address corresponding to the first original message is the IP address corresponding to the NAT gateway.

[0139] In some embodiments of the present disclosure, the message forwarding device 500 based on the unified scheduling gateway may further include a configuration module.

[0140] The configuration module can be used to perform bandwidth package configuration operations, tunnel configuration operations and public IP configuration operations respectively based on bandwidth package configuration information, tunnel configuration information and public IP configuration information before receiving the target message sent by the sending end, so as to perform bandwidth package configuration, tunnel configuration and public IP configuration, wherein the bandwidth package configuration information includes the bandwidth package name and maximum bandwidth information, the tunnel configuration information includes the tunnel name, the source IP address corresponding to the tunnel, the destination IP address and the tunnel description information, and the public IP configuration information includes the IP addresses corresponding to different types of gateways, the tunnel names and the bandwidth package names.

[0141] In some embodiments of the present disclosure, the message sending module 530 may also be specifically used to perform tunnel packet processing on the second original message based on the third tunnel information corresponding to the load balancer gateway when the sending end is a public network and the target message is a second original message sent by the client based on the public network for accessing the load balancer gateway, and when it is determined that the speed limit does not lose packets, obtain the second original message after packet processing based on the third tunnel information corresponding to the load balancer gateway;

[0142] The second original message after packet processing is sent to the load balancer gateway, so that the load balancer gateway determines the target backend server based on the preset load balancing rules, and creates a second session based on the IP address of the target backend server, receives the second reply message sent by the target backend server for the second original message, performs tunnel packet processing on the second reply message based on the second session, and sends the packetized second reply message to the public network IP unified scheduling gateway.

[0143] It should be noted that Figure 5 The message forwarding device 500 based on the unified scheduling gateway shown can execute each step in the above method embodiment and realize each process and effect in the above method embodiment, which will not be described in detail here.

[0144] Figure 6 It is a structural schematic diagram of an electronic device provided by an embodiment of the present disclosure.

[0145] In the disclosed embodiment, Figure 6 The electronic device shown may be a server or a terminal, wherein the terminal specifically includes a mobile phone, a computer or a tablet computer, etc., which is not limited here.

[0146] like Figure 6 As shown, the electronic device may include a processor 610 and a memory 620 storing computer program instructions.

[0147] Specifically, the processor 610 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present disclosure.

[0148] The memory 620 may include a large capacity memory for information or instructions. By way of example and not limitation, the memory 620 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a tape, or a universal serial bus (USB) drive or a combination of two or more of these. Where appropriate, the memory 620 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 620 may be inside or outside the integrated gateway device. In a particular embodiment, the memory 620 is a non-volatile solid-state memory. In a particular embodiment, the memory 620 includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (Electrically Erasable Programmable ROM, EEPROM), an electrically rewritable ROM (EAROM) or a flash memory, or a combination of two or more of these.

[0149] The processor 610 reads and executes the computer program instructions stored in the memory 620 to perform the steps of the message forwarding method based on the unified scheduling gateway provided in the embodiment of the present disclosure.

[0150] In one example, the electronic device may further include a transceiver 630 and a bus 640. Figure 6 As shown, the processor 610, the memory 620 and the transceiver 630 are connected via a bus 640 and communicate with each other.

[0151] The bus 640 includes hardware, software, or both. For example, but not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industrial Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, the bus 640 may include one or more buses.

[0152] The embodiment of the present disclosure further provides a computer-readable storage medium, which may store a computer program. When the computer program is executed by a processor, the processor implements the message forwarding method based on a unified scheduling gateway provided by the embodiment of the present disclosure.

[0153] The above-mentioned storage medium may, for example, include a memory 620 of computer program instructions, and the above-mentioned instructions may be executed by the processor 610 of the electronic device to complete the message forwarding method based on the unified scheduling gateway provided in the embodiment of the present disclosure. Optionally, the storage medium may be a non-temporary computer-readable storage medium, for example, the non-temporary computer-readable storage medium may be a ROM, a random access memory (Random Access Memory, RAM), a compact disc read-only memory (CompactDiscROM, CD-ROM), a magnetic tape, a floppy disk, and an optical data storage device, etc.

[0154] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A message forwarding method based on a unified scheduling gateway, characterized in that: Applied to the public network IP unified dispatching gateway, including: Receive a target message sent by a sender, wherein the sender includes any one of a public network, a NAT gateway, a load balancer gateway, and an elastic public IP gateway; Determine the public IP configuration information based on the target message, and perform speed limit processing on the target message based on the bandwidth package configuration information in the public IP configuration information, wherein there is a binding relationship between the bandwidth package configuration information and the NAT gateway, the load balancer gateway, and the elastic public IP gateway; When it is determined that the speed limit does not cause packet loss, the target message is sent to the target receiving end based on the target tunnel information corresponding to the target message.

2. The method according to claim 1, characterized in that When the sending end is the NAT gateway, the target message is obtained by the NAT gateway performing tunnel encapsulation on the first original message sent by the client based on the first tunnel information corresponding to the public network IP unified scheduling gateway and the second tunnel information corresponding to the NAT gateway; After receiving the target message sent by the transmitting end, the method further includes: When determining that the target message is an uplink message based on the outer destination IP address corresponding to the target message, the target message is parsed according to a preset tunnel message format to obtain a first original message; When determining that the speed limit does not cause packet loss, sending the target message to the target receiving end based on the target tunnel information corresponding to the target message includes: When it is determined that the speed limit does not cause packet loss, the first original message is sent to the public network.

3. The method according to claim 2, characterized in that When it is determined that the rate limit does not cause packet loss, after sending the first original message to the public network, the method further includes: Receive a first reply message returned by the public network, determine the public network IP configuration information based on the first reply message, and perform speed limit processing on the first reply message based on the bandwidth package configuration information in the public network IP configuration information, wherein the destination IP address of the first reply message is the IP address corresponding to the NAT gateway; When it is determined that the speed limit does not cause packet loss, the first reply message is tunnel packetized based on the second tunnel information corresponding to the NAT gateway, and the first reply message after packet processing is sent to the NAT gateway, so that after receiving the first reply message after packet processing, the NAT gateway parses the first reply message after packet processing to obtain the first reply message, and sends the first reply message to the target network card corresponding to the client based on the first session.

4. The method according to claim 3, characterized in that The first session is established by the NAT gateway after receiving the first original message sent by the client based on the message source IP address and destination IP address corresponding to the first original message. The first session includes forward five-tuple information and reverse five-tuple information.

5. The method according to claim 2, characterized in that: The determining the public network IP configuration information based on the target message includes: The public network IP configuration information is determined based on the target source IP address corresponding to the first original message, where the target source IP address corresponding to the first original message is the IP address corresponding to the NAT gateway.

6. The method according to claim 1, characterized in that Before receiving the target message sent by the transmitting end, the method further includes: Based on the bandwidth package configuration information, tunnel configuration information and public IP configuration information, bandwidth package configuration operation, tunnel configuration operation and public IP configuration operation are respectively performed to perform bandwidth package configuration, tunnel configuration and public IP configuration, wherein the bandwidth package configuration information includes a bandwidth package name and maximum bandwidth information, the tunnel configuration information includes a tunnel name, a source IP address corresponding to the tunnel, a destination IP address and tunnel description information, and the public IP configuration information includes IP addresses corresponding to different types of gateways, tunnel names and bandwidth package names.

7. The method according to claim 1, characterized in that When the sending end is the public network and the target message is a second original message sent by the client based on the public network for accessing the load balancer gateway, when determining that the speed limit does not cause packet loss, sending the target message to the target receiving end based on the target tunnel information corresponding to the target message includes: When it is determined that the speed limit does not cause packet loss, tunnel packet processing is performed on the second original message based on the third tunnel information corresponding to the load balancer gateway to obtain the second original message after packet processing; The second original message after packet processing is sent to the load balancer gateway, so that the load balancer gateway determines the target back-end server based on the preset load balancing rule, and creates a second session based on the IP address of the target back-end server, receives the second reply message sent by the target back-end server for the second original message, performs tunnel packet processing on the second reply message based on the second session, and sends the packetized second reply message to the public network IP unified scheduling gateway.

8. A message forwarding device based on a unified scheduling gateway, characterized in that: Applied to the public network IP unified dispatching gateway, including: A message receiving module, used to receive a target message sent by a sender, wherein the sender includes any one of a public network, a NAT gateway, a load balancer gateway, and an elastic public IP gateway; A speed limit processing module, used to determine the public IP configuration information based on the target message, and perform speed limit processing on the target message based on the bandwidth package configuration information in the public IP configuration information, wherein there is a binding relationship between the bandwidth package configuration information and the NAT gateway, the load balancer gateway and the elastic public IP gateway; The message sending module is used to send the target message to the target receiving end based on the target tunnel information corresponding to the target message when it is determined that the speed limit does not cause packet loss.

9. An electronic device, characterized in that: include: processor; A memory for storing executable instructions; The processor is used to read the executable instructions from the memory and execute the executable instructions to implement the message forwarding method based on the unified scheduling gateway as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program. When the computer program is executed by the processor, the processor implements the message forwarding method based on the unified scheduling gateway as described in any one of claims 1 to 7.