Data sending method, data receiving method, switch and gateway server

By setting up a switch cluster in an edge node and processing and forwarding service packets based on service type, the problem of low utilization of gateway servers in non-large traffic scenarios is solved, and efficient resource utilization and service requirements are achieved.

CN115996185BActive Publication Date: 2025-04-15TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111208819.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-18
Publication Date
2025-04-15
Estimated Expiration
2041-10-18

AI Technical Summary

Technical Problem

In non-large traffic transmission scenarios, only a small number of gateway servers in the gateway server cluster are in the working state, resulting in low utilization of gateway servers and wasted resources on edge nodes.

Method used

By setting up a switch cluster in the edge node, the service data packets are sent to the corresponding device for processing and forwarding based on the service type, thereby improving the resource utilization rate of the edge node.

Benefits of technology

It realizes the need for large traffic bandwidth and high security in different business scenarios, and at the same time reduces the number of gateway servers in the gateway server cluster, improves the utilization rate of gateway servers, and reduces the resource waste of edge nodes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115996185B_ABST
    Figure CN115996185B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a data sending method, a data receiving method, a switch and a gateway server, which relate to the field of edge computing. It includes: receiving a service data packet sent by a first service server in a first edge node; determining the next hop device of the service data packet based on the service type of the service data packet, the next hop device including the first gateway server in the first edge node or the second switch in the second edge node; sending the service data packet to the next hop device; when the next hop device is the first gateway server, receiving the processed service data packet sent by the first gateway server; sending the processed service data packet to the second switch. The solution of the embodiment of the present application can meet both the high-traffic bandwidth requirements and the security requirements, and can reduce the number of gateway servers in the gateway server cluster and improve the utilization rate of the gateway servers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of edge computing, and in particular to a data sending method, a data receiving method, a switch, and a gateway server. Background Art

[0002] Edge computing refers to providing the nearest service near the data source using an open platform that integrates network, computing, storage, and application core capabilities. Common edge computing scenarios include online education, live broadcasting, and so on.

[0003] In order to meet the high-traffic and high-security communication requirements between edge nodes in edge computing scenarios, gateway server solutions are usually used in related technologies to realize data transmission between edge nodes. In some implementations, a gateway server cluster is set in each edge node, so that the gateway server cluster is used to process and transmit business data. For example, in an online education scenario, the gateway server cluster encrypts the business data and sends the encrypted business data to the gateway server cluster of other edge nodes through the public network, thereby improving the security of business data transmission in the public network. In addition, since the bandwidth of the gateway server is limited, the gateway server cluster set in the edge node usually needs to include a large number of gateway servers to meet the large-traffic transmission requirements (such as live broadcast scenarios).

[0004] However, in non-large-traffic transmission scenarios, only a small number of gateway servers in the gateway server cluster are in working order, resulting in low utilization of the gateway servers and waste of edge node resources. Summary of the invention

[0005] The embodiment of the present application provides a data sending method, a data receiving method, a switch and a gateway server, which can transfer service data to corresponding devices for processing and forwarding based on service types, thereby improving the resource utilization of edge nodes. The technical solution is as follows:

[0006] On the one hand, an embodiment of the present application provides a data sending method, which is used for a first switch in a first edge node, and the method includes:

[0007] Receiving a service data packet sent by a first service server in the first edge node;

[0008] Based on the service type of the service data packet, determine the next hop device of the service data packet, the next hop device includes a first gateway server in the first edge node or a second switch in the second edge node, and the first gateway server is used to perform service processing on the service data packet;

[0009] Sending the service data packet to the next hop device;

[0010] In a case where the next-hop device is the first gateway server, receiving the processed service data packet sent by the first gateway server;

[0011] Send the processed service data packet to the second switch.

[0012] On the other hand, an embodiment of the present application provides a data sending method, which is used for a first gateway server in a first edge node, and the method includes:

[0013] receiving a service data packet sent by a first switch in the first edge node, where the service data packet is sent by the first switch when determining that a next hop device of the service data packet is the first gateway server based on a service type of the service data packet;

[0014] Performing business processing on the business data packet;

[0015] The processed service data packet is sent to the first switch, so that the first switch sends the processed service data packet to the second switch in the second edge node.

[0016] On the other hand, an embodiment of the present application provides a data receiving method, which is used for a second switch in a second edge node, and includes:

[0017] Receiving a service data packet sent by a first switch in a first edge node;

[0018] Determine a next-hop device of the service data packet, wherein the next-hop device includes a second service server or a second gateway server in the second edge node, and the second gateway server is used to perform service processing on the service data packet and send the processed service data packet to the second service server;

[0019] Send the service data packet to the next hop device.

[0020] Optionally, determining the next hop device of the service data packet includes:

[0021] Decapsulating the second quintuple of the service data packet to determine the first quintuple in the service data packet, where the second quintuple is added when the first switch encapsulates the service data packet;

[0022] The next hop device is determined based on the first quintuple.

[0023] Optionally, determining the next hop device based on the first quintuple includes:

[0024] Querying a next hop address in a routing table based on the first quintuple;

[0025] When the next hop address is queried, determining that the next hop device is the second service server;

[0026] When the next hop address is not found, the next hop device is determined to be the second gateway server.

[0027] On the other hand, an embodiment of the present application provides a data receiving method, which is used for a second gateway server in a second edge node, and the method includes:

[0028] receiving a service data packet sent by a second switch in the second edge node, wherein the service data packet is sent when the second switch determines that the next hop device is the second gateway server;

[0029] Performing business processing on the business data packet to obtain the processed business data packet;

[0030] Send the processed service data packet to the second service server in the second edge node.

[0031] Optionally, performing service processing on the service data packet to obtain the processed service data packet includes:

[0032] Determining the service type of the service data packet;

[0033] When the service type of the service data packet is a secure communication service, decrypting the service data packet to obtain the decrypted service data packet;

[0034] When the service type of the service data packet is an address conversion service, address conversion processing is performed on the service data packet to obtain the service data packet after address conversion.

[0035] Optionally, performing address conversion processing on the service data packet to obtain the service data packet after address conversion includes:

[0036] Obtaining the first five-tuple of the service data packet;

[0037] Based on the address conversion relationship, convert the destination public network address in the first quintuple into a destination intranet address to obtain the service data packet after the address conversion;

[0038] The sending the processed service data packet to the second service server in the second edge node includes:

[0039] Based on the destination intranet address, the service data packet after address conversion is sent to the second service server.

[0040] On the other hand, an embodiment of the present application provides a data sending device, the device comprising:

[0041] A receiving module, used to receive a service data packet sent by a first service server in a first edge node;

[0042] A determination module, configured to determine a next-hop device of the service data packet based on a service type of the service data packet, wherein the next-hop device includes a first gateway server in the first edge node or a second switch in the second edge node, and the first gateway server is configured to perform service processing on the service data packet;

[0043] A sending module, used for sending the service data packet to the next hop device;

[0044] The receiving module is further configured to receive the processed service data packet sent by the first gateway server when the next-hop device is the first gateway server;

[0045] The sending module is further configured to send the processed service data packet to the second switch.

[0046] Optionally, the determining module is used to:

[0047] When the service type of the service data packet belongs to the traffic forwarding service, determining that the next hop device of the service data packet is the second switch;

[0048] When the service type of the service data packet does not belong to the traffic forwarding service, it is determined that the next hop device of the service data packet is the first gateway server.

[0049] Optionally, when the next hop device is the second switch, the sending module is configured to:

[0050] Obtaining the first five-tuple of the service data packet;

[0051] Querying a next hop address from a routing table based on the first quintuple;

[0052] Generate a second quintuple based on the queried next hop address and the switch address of the first switch;

[0053] Encapsulating the service data packet by using the second quintuple;

[0054] Send the encapsulated service data packet to the second switch.

[0055] Optionally, when the next hop device is the first gateway server, the sending module is further used to:

[0056] Determining a target port of the first gateway server based on a service type of the service data packet, wherein different service types correspond to different ports;

[0057] The service data packet is sent to the target port of the first gateway server, so that the first gateway server determines the service type of the service data packet based on the target port.

[0058] Optionally, when determining the target port of the first gateway server based on the service type of the service data packet, the sending module is further used to:

[0059] When the service type of the service data packet is a secure communication service, the first port is determined as the target port, and the first gateway server is used to encrypt the service data packet received through the first port;

[0060] When the service type of the service data packet is an address conversion service, the second port is determined as the target port, and the first gateway server is used to perform address conversion processing on the service data packet received through the second port.

[0061] Optionally, when the next hop device is the first gateway server, the sending module is further used to:

[0062] Based on the processed quintuple of the service data packet, query the next hop address from the routing table;

[0063] generating a second quintuple based on the next hop address and the switch address of the first switch;

[0064] The service data packet after encapsulation and processing by the second quintuple;

[0065] Send the encapsulated service data packet to the second switch.

[0066] On the other hand, an embodiment of the present application provides a data sending device, the device comprising:

[0067] A receiving module, configured to receive a service data packet sent by a first switch in a first edge node, wherein the service data packet is sent by the first switch when determining that a next hop device of the service data packet is a first gateway server based on a service type of the service data packet;

[0068] A processing module, used for performing service processing on the service data packet;

[0069] The sending module is used to send the processed service data packet to the first switch, so that the first switch sends the processed service data packet to the second switch in the second edge node.

[0070] Optionally, a processing module is used to:

[0071] Determining a service type of the service data packet based on a target port for receiving the service data packet;

[0072] Performing service processing on the service data packet based on the service type of the service data packet.

[0073] Optionally, a processing module is used to:

[0074] When the target port is the first port, determining that the service type of the service data packet is a secure communication service;

[0075] When the service type of the service data packet is a secure communication service, encrypting the service data packet;

[0076] When the target port is the second port, determining that the service type of the service data packet is an address translation service;

[0077] When the service type of the service data packet is an address conversion service, the service data packet is subjected to address conversion processing.

[0078] On the other hand, an embodiment of the present application provides a data receiving device, the device comprising:

[0079] A receiving module, configured to receive a service data packet sent by a first switch in a first edge node;

[0080] A determination module, used to determine a next-hop device of the service data packet, wherein the next-hop device includes a second service server or a second gateway server in the second edge node, and the second gateway server is used to perform service processing on the service data packet and send the processed service data packet to the second service server;

[0081] A sending module is used to send the service data packet to the next hop device.

[0082] Optionally, determine the module for:

[0083] Decapsulating the second quintuple of the service data packet to determine the first quintuple in the service data packet, where the second quintuple is added when the first switch encapsulates the service data packet, and the second quintuple is located in an outer layer of the first quintuple;

[0084] The next hop device is determined based on the first quintuple.

[0085] Optionally, when determining the next hop device based on the first quintuple, the determination module is configured to:

[0086] Querying a next hop address in a routing table based on the first quintuple;

[0087] When the next hop address is queried, determining that the next hop device is the second service server;

[0088] When the next hop address is not found, the next hop device is determined to be the second gateway server.

[0089] On the other hand, an embodiment of the present application provides a data receiving device, the device comprising:

[0090] A receiving module, configured to receive a service data packet sent by a second switch in a second edge node, wherein the service data packet is sent when the second switch determines that the next hop device is a second gateway server;

[0091] A processing module, used for performing service processing on the service data packet to obtain the processed service data packet;

[0092] A sending module is used to send the processed service data packet to the second service server in the second edge node.

[0093] Optionally, a processing module is used to:

[0094] Determining the service type of the service data packet;

[0095] When the service type of the service data packet is a secure communication service, decrypting the service data packet to obtain the decrypted service data packet;

[0096] When the service type of the service data packet is an address conversion service, address conversion processing is performed on the service data packet to obtain the service data packet after address conversion.

[0097] Optionally, when performing address conversion processing on the service data packet to obtain the service data packet after address conversion, the processing module is used to:

[0098] Obtaining the first five-tuple of the service data packet;

[0099] Based on the address conversion relationship, convert the destination public network address in the first quintuple into a destination intranet address to obtain the service data packet after the address conversion;

[0100] The sending module is used for:

[0101] Based on the destination intranet address, the service data packet after address conversion is sent to the second service server.

[0102] On the other hand, an embodiment of the present application provides a communication system, the communication system comprising a first edge node and a second edge node, the first edge node being provided with a first service server cluster, a first gateway server cluster and a first switch cluster, the second edge node being provided with a second service server cluster, a second gateway server cluster and a second switch cluster;

[0103] The first switch in the first switch cluster is used to implement the data sending method described in the above aspect;

[0104] The first gateway server in the first gateway server cluster is used to implement the data sending method described in the above aspect;

[0105] The second switch in the second switch cluster is used to implement the data receiving method described in the above aspect;

[0106] The second gateway server in the second gateway server cluster is used to implement the data receiving method described in the above aspect.

[0107] On the other hand, an embodiment of the present application provides a switch, comprising a processor and a memory, wherein the memory stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the data sending method or the data receiving method as described in the above aspects.

[0108] On the other hand, an embodiment of the present application provides a gateway server, which includes a processor and a memory, wherein the memory stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the data sending method or the data receiving method as described in the above aspects.

[0109] On the other hand, an embodiment of the present application provides a computer-readable storage medium, in which at least one instruction is stored, and the at least one instruction is loaded and executed by a processor to implement the data sending method or the data receiving method as described in the above aspects.

[0110] On the other hand, an embodiment of the present application provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the data sending method or the data receiving method provided in the above aspects.

[0111] In an embodiment of the present application, after the switch in the edge node receives the business data packet sent by the business server, it sends the business data packet to the next-hop device based on the business type of the business data packet. When the next-hop device is the gateway server in the edge node, the business data packet is processed by the gateway server, and the processed business data packet is further transmitted through the switch, which can not only meet the large-flow bandwidth requirements during data transmission, but also meet the security requirements; in addition, using switches to achieve large-flow data transmission can reduce the number of gateway servers in the gateway server cluster, improve the utilization rate of gateway servers, and avoid wasting resources of edge nodes. BRIEF DESCRIPTION OF THE DRAWINGS

[0112] Figure 1 A schematic diagram showing an implementation environment provided by an exemplary embodiment of the present application is shown;

[0113] Figure 2 A flow chart of a data sending method provided by an exemplary embodiment of the present application is shown;

[0114] Figure 3 A flow chart of a data sending method provided by another exemplary embodiment of the present application is shown;

[0115] Figure 4 A flow chart of a data sending method provided by another exemplary embodiment of the present application is shown;

[0116] Figure 5 is a schematic diagram of an implementation of a data sending process shown in an exemplary embodiment of the present application;

[0117] Figure 6 A flow chart of a data receiving method provided by an exemplary embodiment of the present application is shown;

[0118] Figure 7 A flow chart of a data receiving method provided by another exemplary embodiment of the present application is shown;

[0119] Figure 8 is a schematic diagram of an implementation of a data receiving process shown in an exemplary embodiment of the present application;

[0120] Fig. 9 is a structural block diagram of a data sending device provided by an exemplary embodiment of the present application;

[0121] Fig.10 is a structural block diagram of a data sending device provided by another exemplary embodiment of the present application;

[0122] Fig.11 is a structural block diagram of a data receiving device provided by an exemplary embodiment of the present application;

[0123] Fig.12 is a structural block diagram of a data receiving device provided by another exemplary embodiment of the present application;

[0124] Fig.13 is a schematic diagram of the structure of a switch provided by an exemplary embodiment of the present application;

[0125] Fig.14 It is a schematic diagram of the structure of a gateway server provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0126] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0127] In the related art, when a gateway server solution is used to realize data transmission between edge nodes, a gateway server cluster needs to be set up in each edge node. When the business has a high security requirement, the gateway server in the gateway server cluster first encrypts the business data packet, and then transmits the encrypted business data packet to avoid information leakage caused by interception of the business data packet during public network transmission. Since the bandwidth capacity of the gateway server is limited, and it is necessary to consider traffic disaster recovery and master-slave reliability characteristics, a large number of gateway servers need to be included in the gateway server cluster.

[0128] For example, when the transmission bandwidth of a single gateway server is 100Gbps, considering 50% traffic disaster recovery and the master-slave setting, 4 gateway servers are actually required to provide 100Gbps transmission capacity. For large traffic scenarios, such as live video broadcasting, the required transmission capacity can often reach 10Tbps, and 400 gateway servers are needed to meet the demand.

[0129] Obviously, in order to adapt to different business scenarios, under the gateway server solution, it is necessary to deploy a gateway server cluster consisting of a large number of gateway servers (and performing a single function) at each edge node, which has a high deployment cost. Moreover, in non-high-traffic scenarios, only a small number of gateway servers in the gateway server cluster are in working state, resulting in low utilization of the gateway servers and waste of edge node resources.

[0130] In order to be applicable to different business scenarios and improve the resource utilization of edge nodes, the embodiment of the present application provides a solution that combines software and hardware to achieve communication between edge nodes. Under this solution, in addition to the gateway server cluster, the edge node is also provided with a switch cluster, wherein the gateway server cluster is used to implement the software solution, and the switch cluster is used to implement the hardware solution; the switch has a stronger bandwidth capability than the gateway server and can meet the needs of large traffic, while the gateway server has a stronger chip processing capability than the switch, which can meet the needs of encryption and decryption, address conversion, etc., and the two cooperate with each other to be applicable to various business scenarios.

[0131] During the data transmission process, the business server first sends the business data packet to the switch. In the high-traffic scenario, with the help of the high-throughput characteristics of the switch, the business data packet can be directly sent to the switches of other edge nodes through the switch; in the secure communication scenario, the switch forwards the business data packet to the gateway server, and the gateway server further processes the business data packet and sends the processed business data packet to the switch. Finally, the switch sends the processed business data packet to the switches of other edge nodes.

[0132] The use of "switch + gateway server" can meet both high-bandwidth business needs and high-security business needs. After setting up a switch cluster in the edge node, the number of gateway servers in the gateway server cluster can be reduced, which helps to improve the utilization of the gateway server and reduce the deployment cost of the edge node.

[0133] Figure 1 A schematic diagram of an implementation environment provided by an exemplary embodiment of the present application is shown. The implementation environment includes a first edge node 110 and a second edge node 120, wherein the first edge node 110 is provided with a first service server cluster 111, a first gateway server cluster 112 and a first switch cluster 113, and the second edge node 120 is provided with a second service server cluster 121, a second gateway server cluster 122 and a second switch cluster 123. Among them, the devices in the edge nodes communicate data through a communication network, and optionally, the communication network can be a wired network or a wireless network, and the communication network can be at least one of a local area network, a metropolitan area network and a wide area network; the edge nodes communicate data through switches, and the switches communicate data through a public network.

[0134] The first edge node 110 and the second edge node 120 may be edge computing sites located in different geographical locations, and the edge nodes provide services for devices in the nearby area. For example, the first edge node 110 is an edge computing site located in Shanghai, and the second edge node 120 is an edge computing site located in Beijing. The first edge node 110 provides services for devices in the East China region, and the second edge node 120 provides services for devices in the North China region.

[0135] The first service server cluster 111 and the second service server cluster 121 are clusters composed of a plurality of service servers, and are used to provide corresponding services for connected devices. For example, the services provided by the service servers may include live video broadcasting, online education, etc., and the embodiments of the present application do not limit the services provided by the service servers.

[0136] In some scenarios, the business data between different edge nodes needs to interact to ensure the consistency of business data between different edge nodes. For example, in the live video scenario, the video interaction data (such as barrage data) received by the business servers in different edge nodes needs to interact to ensure the consistency of the video interaction data seen by live viewers in different areas.

[0137] The first gateway server cluster 112 and the second gateway server cluster 122 are clusters composed of several gateway servers. In some embodiments, the gateway server is used to process business data based on business needs. For example, when the business has security requirements, the gateway server encrypts and decrypts the business data; when the business needs to implement Network Address Translation (NAT) access, the gateway server performs address conversion on the business data. Of course, in addition to the above functions, the gateway server can also implement other functions according to business needs, which is not limited in this embodiment.

[0138] The first switch cluster 113 and the second switch cluster 123 are clusters composed of a plurality of switches, and the switches are used to realize data communication between edge nodes. Optionally, the switch is a programmable switch, and different routes are configured on the programmable switch according to different services. Further, when sending data, the switch can directly transmit the service data packet to other switches based on the service type of the service data packet, or forward the service data packet to the gateway server for processing, so as to transmit the processed service data packet to other switches.

[0139] In a possible application scenario, such as Figure 1As shown, when the first service server cluster 111 needs to transmit service data to the second service server cluster 121, the first service server in the first service server cluster 111 first sends the service data packet to the first switch in the first switch cluster 113. The first switch determines the next hop device based on the service type of the service data packet. When the next hop device is the second switch in the second edge node 120, the first switch performs tunnel encapsulation on the service data packet and transmits the service data packet to the second switch; when the next hop device is the first gateway server in the first gateway server cluster 112, the first switch forwards the service data packet to the first gateway server for processing, and sends the processed service data packet to the second switch.

[0140] After the second switch in the second switch cluster 123 receives the service data packet from the first edge node 110, if the next-hop address is matched, the service data packet is sent to the second service server cluster 121 based on the next-hop address; if the next-hop address is not matched, the service data packet is forwarded to the second gateway server in the second gateway server cluster 122, and the second gateway server processes the service data packet and finally sends the processed service data packet to the second service server cluster 121.

[0141] It should be noted that the above embodiment is only described by the transmission of business data from the first edge node 110 to the second edge node 120. In actual applications, when the second edge node 120 needs to transmit business data to the first edge node 110, the second switch cluster 123 and the second gateway server cluster 122 in the second edge node 120 cooperate to implement data sending, and the first switch cluster 113 and the first gateway server cluster 112 in the first edge node 110 cooperate to implement data reception. This embodiment will not be elaborated here.

[0142] Figure 2 A flowchart of a data transmission method provided by an exemplary embodiment of the present application is shown. Figure 1 Taking the first switch and the first gateway server in the implementation environment as an example, the method may include:

[0143] 201. A first switch receives a service data packet sent by a first service server in a first edge node.

[0144] Because the switch has stronger data forwarding capabilities and larger bandwidth than the gateway server, when the first edge node needs to transmit business data to the second edge node, the first business server in the first edge node sends the business data packet to the first switch, and the first switch implements external access to various types of services, avoiding the situation in which the business server directly sends the business data packet to the gateway server in a high-traffic scenario, and the gateway server needs to forward the business data packet to the switch, causing unnecessary transmission consumption.

[0145] Optionally, the service data packet is composed of service data and an Internet Protocol (IP) header, and the IP header is used to characterize the source, destination and adopted protocol of the service data packet. In some embodiments, the IP header indicates the above information through a quintuple.

[0146] 202. The first switch determines a next-hop device of the service data packet based on a service type of the service data packet. The next-hop device includes a first gateway server in the first edge node or a second switch in the second edge node. The first gateway server is used to perform service processing on the service data packet.

[0147] In a possible implementation, different routes are pre-configured on the switch for different types of services. After receiving the service data packet, the first switch first determines the service type of the service data packet and determines the next hop device of the service data packet.

[0148] In this embodiment, the next hop device of the service data packet may be the second switch in the second edge node, or may be the first gateway server in the first edge node. Optionally, when the service data packet does not need to be further processed by the gateway server, the first switch determines the second switch as the next hop device; and when the service data packet needs to be further processed by the gateway server, the first switch determines the first gateway server as the next hop device, so that the service data packet to be sent is processed by the first gateway server.

[0149] 203. The first switch sends the service data packet to the next-hop device.

[0150] In a possible implementation, the first switch sends the service data packet to the second switch through the public network, or the first switch sends the service data packet to the first gateway server through the internal network of the edge site.

[0151] 204. The first gateway server receives a service data packet sent by the first switch in the first edge node.

[0152] When the service type of the service data packet is a service type that needs to be processed by the gateway server, the first gateway server can receive the service data packet sent by the first switch.

[0153] 205. The first gateway server performs service processing on the service data packet.

[0154] Further, the first gateway server performs service processing on the service data packet based on the service processing requirement of the service data packet. Optionally, the first gateway server performs service processing on the service data packet based on the service type of the service data.

[0155] In some embodiments, when the service to which the service data packet belongs has encryption requirements, the first gateway server encrypts the service data packet, such as performing Internet Protocol Security (IPSec) encryption on the service data packet; when the service to which the service data packet belongs has NAT access requirements, the first gateway server performs address translation on the service data packet. The embodiments of the present application do not limit the service processing method of the first gateway server.

[0156] 206. The first gateway server sends the processed service data packet to the first switch.

[0157] Since the edge node implements external service access through the switch, after completing the service processing, the first gateway server feeds back the processed service data packet to the first switch, and the first switch further transmits the service data packet to the second edge node.

[0158] 207 , when the next-hop device is the first gateway server, the first switch receives the processed service data packet sent by the first gateway server.

[0159] When the next hop device is the first gateway server, after sending the service data packet, the first switch waits for the first gateway server to feedback the processed service data packet. It should be noted that the actual content of the service data in the service data packet does not change before and after the processing.

[0160] In a possible implementation, if the service data packet fed back by the first gateway server is not received within a preset time after sending the service data, the first switch can instruct the gateway server cluster to switch the active and standby gateway servers, so that other gateway servers can re-process the service data packet.

[0161] 208. The first switch sends the processed service data packet to the second switch.

[0162] Furthermore, the first switch sends the processed service data packet to the second switch to implement the sending of the current service data packet and continue to execute the sending of the next service data packet.

[0163] To summarize, in the embodiments of the present application, after the switch in the edge node receives the business data packet sent by the business server, it sends the business data packet to the next-hop device based on the business type of the business data packet. When the next-hop device is a switch in other edge nodes, high-traffic business data transmission is performed directly through the switch. When the next-hop device is a gateway server in the edge node, the business data packet is processed by the gateway server, and the processed business data packet is further transmitted through the switch, which can meet both the high-traffic bandwidth requirements and the security requirements during data transmission. In addition, using switches to achieve high-traffic data transmission can reduce the number of gateway servers in the gateway server cluster, improve the utilization rate of gateway servers, and avoid wasting resources of edge nodes.

[0164] In a possible business scenario, when it is necessary to forward high-volume business data between edge nodes, such as in a live video broadcast scenario, when an edge node needs to transmit the anchor's live broadcast data to other edge nodes, since such business scenarios have low security requirements for business data and do not require transmission encryption (i.e., no gateway server is required to process business data), the switch can directly encapsulate and forward business data packets from the business server. Figure 3 As shown, the process of sending a service data packet may include:

[0165] 301. Receive a service data packet sent by a first service server in a first edge node.

[0166] 302: When the service type of the service data packet belongs to the traffic forwarding service, determine that the next hop device of the service data packet is a second switch.

[0167] When the service type of the service data packet is identified as a traffic forwarding service, the first switch determines that it has the ability to independently transmit service data without processing the service through the first gateway server, and determines the second switch as the next hop device.

[0168] Among them, traffic forwarding service refers to a service with large-volume data forwarding requirements, or a service with a traffic peak greater than a threshold (such as 10Tbps), such as live video service, barrage synchronization service, etc., and the traffic forwarding service can be pre-configured, which is not limited in this embodiment.

[0169] Optionally, the first switch determines the service type of the service data packet based on the service identifier, or determines the service type of the service data packet based on the server identifier of the service server.

[0170] 303. Obtain the first five-tuple of the service data packet.

[0171] In this embodiment, the service data packet includes a first quintuple, which includes a source address (asrc_addr) and a source port (asrc_port) of a service server, a destination address (adst_addr) and a destination port (adst_port) of a destination service server (i.e., a second service server), and a protocol (aprotocol). When sending data, the first switch determines the second switch based on the first quintuple.

[0172] 304. Query the next hop address from the routing table based on the first quintuple.

[0173] In a possible implementation, a routing table is pre-configured at the switch, and the routing table contains a correspondence between a five-tuple and a next-hop address. After the first switch obtains the first five-tuple, it queries the corresponding next-hop address in the routing table according to the first five-tuple. The next-hop address contains a next-hop IP address and a next-hop port. In an illustrative example, the routing table is shown in Table 1.

[0174] Table 1

[0175]

[0176] For example, when the first quintuple obtained is (asrc_addr, asrc_port, adst_addr, adst_port, aprotocol1), the first switch determines that the next hop address is next_addr1 (next hop IP address) and next_port1 (next hop port).

[0177] 305 : Generate a second quintuple based on the queried next hop address and the switch address of the first switch.

[0178] Since the service data packet needs to be tunnel encapsulated before being sent, the first switch generates a second quintuple for encapsulating the service data packet based on its own switch address (including the switch IP address and the switch port) and the queried next hop address.

[0179] Optionally, the protocol in the second quintuple is consistent with the protocol in the first quintuple.

[0180] In an illustrative example, when the switch IP address of the first switch itself is ssrc_addr, the switch port is ssrc_port, the queried next-hop IP address is next_addr, and the next-hop port is next_port, the generated second quintuple is (ssrc_addr, ssrc_port, next_addr, next_port, aprotocol).

[0181] 306 , encapsulate the service data packet through the second quintuple, wherein the second quintuple in the encapsulated service data packet is located at an outer layer of the first quintuple.

[0182] Further, the first switch encapsulates the second quintuple in the outer layer of the first quintuple to obtain a service data packet containing two consecutive headers. In combination with the above example, the header of the encapsulated service data packet is (ssrc_addr, ssrc_port, next_addr, next_port, aprotocol)+(asrc_addr, asrc_port, adst_addr, adst_port, aprotocol).

[0183] 307: Send the encapsulated service data packet to the second switch.

[0184] After completing the tunnel encapsulation, the first switch sends the encapsulated service data packet to the second switch based on the next hop address, thereby completing the sending of the current service data packet.

[0185] In another possible business scenario, when secure data transmission or NAT access is required between edge nodes, for example, when edge node A needs to transmit video data of a paid video to edge node B, or when NAT access is required between edge node A and edge nodes, due to the limited processing power of the switch chip, the switch first needs to use the gateway server to process the service data packet before it can further encapsulate and forward the processed service data packet. Figure 4 As shown, the process of sending a service data packet may include:

[0186] 401. A first switch receives a service data packet sent by a first service server.

[0187] 402: When the service type of the service data packet does not belong to the traffic forwarding service, the first switch determines that the next hop device of the service data packet is the first gateway server.

[0188] In a possible implementation, since business data that requires encryption, decryption, address translation, and other business processing usually does not require large-volume forwarding, when the first switch identifies that the business type of the business data packet does not belong to the traffic forwarding business, the first switch determines the first gateway server located at the same edge node as the next-hop device.

[0189] Optionally, the next-hop route of services other than the large-volume forwarding service is configured as a gateway server, and the first switch sends the service data packet to the first gateway server according to the routing information corresponding to the first gateway server.

[0190] 403. The first switch determines a target port of the first gateway server based on the service type of the service data packet.

[0191] Since different service types of service data packets require different service processing methods, in one possible implementation, the first gateway server is provided with multiple ports, and different ports are used to receive service data packets of different service types (i.e., different service types correspond to different ports), so that the first gateway server determines the service type based on the receiving port of the service data packet, and then determines the service processing method of the service data packet. Before sending the service data packet to the first gateway server, the first switch determines the target port through which the service data packet is sent based on the service type. In an illustrative example, the correspondence between the port and the service type is shown in Table 2.

[0192] Table 2

[0193] port Business Type 50 Address conversion service 80 Secure communication services

[0194] Optionally, in response to the service type of the service data packet being a secure communication service, the first switch determines the first port as the target port, and accordingly, when the first gateway server receives the service data packet sent by the first switch through the first port, it can be determined that the service data packet needs to be encrypted;

[0195] In response to the service type of the service data packet being an address conversion service, the first switch determines the second port as the target port. Accordingly, when the first gateway server receives the service data packet sent by the first switch through the second port, it can be determined that the service data packet needs to be processed by address conversion.

[0196] It should be noted that the embodiment of the present application only takes the above two business types and ports as examples for illustration. In other possible implementations, the first gateway server may also set other ports for receiving business data packets of other business types, and this embodiment does not constitute a limitation on this.

[0197] 404. The first switch sends a service data packet to a target port of the first gateway server.

[0198] Optionally, when the service type is a secure communication service, the first switch sends a service data packet to the first gateway server based on the server address and the first port of the first gateway server; when the service type is an address translation service, the first switch sends a service data packet to the first gateway server based on the server address and the second port of the first gateway server.

[0199] 405. The first gateway server receives a service data packet sent by the first switch.

[0200] Correspondingly, the first gateway server receives the service data packet sent by the first switch through the target port.

[0201] 406. The first gateway server determines the service type of the service data packet based on the target port of the received service data packet.

[0202] Since service data packets of different service types are received through different ports, the first gateway server can determine the service type of the service data packet according to the target port through which the service data packet is received, and further determine the service processing method of the service data packet.

[0203] Optionally, in response to the target port being the first port, the first gateway server determines that the service type of the service data packet is a secure communication service; in response to the target port being the second port, the first gateway server determines that the service type of the service data packet is an address translation service.

[0204] 407 , the first gateway server performs service processing on the service data packet based on the service type of the service data packet.

[0205] Furthermore, the first gateway server processes the service data packet based on the service type and in a service processing manner corresponding to the service type.

[0206] Optionally, in response to the service type of the service data packet being a secure communication service, the first gateway server encrypts the service data packet.

[0207] In some embodiments, the first gateway server performs IPSec encryption on the service data packet to obtain an encrypted service data packet, wherein the encrypted service data packet includes an IPSec header in addition to the original header. Of course, in other possible implementations, the first gateway server may also use other methods to encrypt the service data packet, which is not limited in this embodiment.

[0208] Optionally, in response to the service type of the service data packet being an address conversion service, the first gateway server performs address conversion processing on the service data packet.

[0209] In the NAT access scenario, in the original five-tuple of the service data packet, the source address is the intranet address of the service server, and the switch cannot find the next hop address from the routing table based on the original five-tuple. In order to ensure the correct transmission of the service data packet, the first gateway server needs to convert the source address from the intranet address to the public network address. In a possible implementation, a mapping relationship between the intranet address and the public network address is set in the first gateway server. When receiving a service data packet of the address conversion service, the first gateway server converts the source intranet address in the service data packet to the public network address based on the mapping relationship to obtain the source public network address.

[0210] In an illustrative example, the original five-tuple obtained by the first gateway server in the service data packet is (asrc_addr, asrc_port, adst_addr, adst_port, aprotocol), and the original five-tuple is converted based on the mapping relationship between the intranet IP address and the public IP address. The converted five-tuple is (gwsrc_addr, asrc_port, adst_addr, adst_port, aprotocol), where gwsrc_addr is the converted public IP address.

[0211] 408. The first gateway server sends the processed service data packet to the first switch.

[0212] After completing the service processing, the first gateway server retransmits the service data packet to the first switch, which then transmits the service data packet to the first switch.

[0213] 409. The first switch receives the processed service data packet sent by the first gateway server.

[0214] 410. The first switch sends the processed service data packet to the second switch.

[0215] Before transmitting the processed service data packet to the second switch, the first switch needs to perform tunnel encapsulation processing on the processed service data packet, so as to transmit the encapsulated service data packet. In a possible implementation, the first switch queries the next hop address from the routing table based on the quintuple of the processed service data packet, and generates a second quintuple based on the next hop address and the switch address of the first switch, so as to encapsulate the processed service data packet through the second quintuple, and send the encapsulated service data packet to the second switch.

[0216] The first switch queries the next hop address based on the outermost five-tuple of the processed service data packet. For example, when the processed service data packet is a service data packet encrypted by IPSec, the first switch queries the next hop address based on the five-tuple in the IPSec header; when the processed service data packet is a service data packet after address conversion, the first switch queries the next hop address based on the five-tuple after the public network address is converted.

[0217] The process of the first switch generating the second quintuple and performing tunnel encapsulation based on the second quintuple can refer to the above embodiment, which will not be described in detail in this embodiment.

[0218] In an illustrative example, in different business scenarios, the switch and the gateway server cooperate to implement the process of sending business data packets as follows: Figure 5 As shown. After receiving the service data packet, the switch in the first switch cluster 51 determines the service type of the service data packet. When the service type is a traffic forwarding service, the switch directly performs tunnel encapsulation on the service data packet and sends it to the opposite switch; when the service type is a secure communication service, the switch sends the service data packet to the gateway server in the first gateway server cluster 52, and the gateway server encrypts the service data packet and feeds the encrypted service data packet back to the switch, which further performs tunnel encapsulation before sending; when the service type is an address conversion service, the switch sends the service data packet to the gateway server, and the gateway server performs address conversion on the service data packet based on the mapping relationship between the intranet and public network addresses, and feeds the service data packet after address conversion back to the switch, which further performs tunnel encapsulation before sending.

[0219] In this embodiment, in a high-traffic business scenario, the switch directly performs tunnel encapsulation on the business data packet sent by the business server, and sends the encapsulated business data packet to the opposite switch. Compared with the related technology of using a large number of gateway servers to achieve high-traffic business data transmission, it helps to reduce deployment costs; in a non-high-traffic business scenario, the switch forwards the business data packet to the gateway server for business processing, and further transmits the business data packet processed by the gateway server, which is suitable for business scenarios such as secure communication and NAT access, and helps to improve the utilization rate of the gateway server.

[0220] The above embodiment describes the process of implementing data transmission by cooperating with the switch and the gateway server. The following exemplary embodiment describes the process of implementing data reception by cooperating with the switch and the gateway server.

[0221] Figure 6 A flowchart of a data receiving method provided by an exemplary embodiment of the present application is shown. Figure 1Taking the second switch and the second gateway server in the implementation environment as an example, the method may include:

[0222] 601. A second switch receives a service data packet sent by a first switch in a first edge node.

[0223] In a possible implementation manner, the second switch located at the second edge node receives the service data packet sent by the first switch through the public network.

[0224] 602. The second switch determines a next-hop device of the service data packet, where the next-hop device includes a second service server or a second gateway server in a second edge node.

[0225] For service data packets that have not been processed by the first gateway server, the second switch can forward the service data packets to the second service server after processing the service data packets; however, for service data packets that have been processed by the second gateway server, the second switch may not be able to further forward the service data packets to the second service server after processing the service data packets. In this case, the second switch needs to send the service data packets to the second gateway server located in the same edge node, and the second gateway server further processes the service data packets and sends the processed service data packets to the second service server.

[0226] Therefore, after receiving the service data packet, the second switch device first needs to determine the next hop device of the service data packet.

[0227] 603: The second switch sends the service data packet to the next-hop device.

[0228] In some embodiments, when the received service data packet is tunnel-encapsulated, the second switch first needs to decapsulate the service data packet through the tunnel, and then send the decapsulated service data packet to the next-hop device.

[0229] 604, when the next hop device is the second gateway server, the second gateway server receives the service data packet sent by the second switch in the second edge node, and the service data packet is sent when the second switch determines that the next hop device is the second gateway server.

[0230] 605. The second gateway server performs service processing on the service data packet to obtain a processed service data packet.

[0231] In a possible implementation, when the second gateway server receives a service data packet sent by the second switch and is in a data packet receiving state, the second gateway server determines a service processing method for the service data packet, thereby processing the service data packet to obtain a processed service data packet. The method in which the second gateway server processes the service data packet corresponds to the method in which the first gateway server processes the service data packet.

[0232] For example, if the first gateway server encrypts the business data packets to be sent, the second gateway server needs to decrypt the received business data packets; if the first gateway server performs address conversion on the business data packets to be sent (converts the intranet address into the public network address), the second gateway server needs to perform reverse address conversion on the received business data packets (converts the external network address into the intranet address).

[0233] In some embodiments, the second gateway server determines the service processing method of the service data packet by identifying the service type of the service data packet.

[0234] 606. The second gateway server sends the processed service data packet to the second service server in the second edge node.

[0235] Furthermore, the second gateway server sends the processed service data packet to the second service server to implement reception of the current service data packet and continue to execute reception of the next service data packet.

[0236] To summarize, in the embodiments of the present application, after the switch in the edge node receives the business data packet sent by the business server, it sends the business data packet to the next-hop device based on the business type of the business data packet. When the next-hop device is a switch in other edge nodes, high-traffic business data transmission is performed directly through the switch. When the next-hop device is a gateway server in the edge node, the business data packet is processed by the gateway server, and the processed business data packet is further transmitted through the switch, which can meet both the high-traffic bandwidth requirements and the security requirements during data transmission. In addition, using switches to achieve high-traffic data transmission can reduce the number of gateway servers in the gateway server cluster, improve the utilization rate of gateway servers, and avoid wasting resources of edge nodes.

[0237] Figure 7 A flow chart of a data receiving method provided by another exemplary embodiment of the present application is shown. The method may include:

[0238] 701. The second switch receives a service data packet sent by the first switch.

[0239] 702. The second switch decapsulates the second quintuple of the service data packet to determine the first quintuple in the service data packet.

[0240] In one possible implementation, the first switch performs tunnel encapsulation on the service data packet before sending it to the second switch, and during the tunnel encapsulation process, a quintuple is added to the outer layer of the original service data packet (i.e., the received service data packet includes the second quintuple of the outer layer and the first quintuple of the inner layer). Therefore, during the receiving process, the second switch needs to unpack the quintuple of the outer layer of the service data packet.

[0241] In an illustrative example, if the header of the received service data packet includes (ssrc_addr, ssrc_port, next_addr, next_port, aprotocol)+(asrc_addr, asrc_port, adst_addr, adst_port, aprotocol), the second switch decapsulates the header (ssrc_addr, ssrc_port, next_addr, next_port, aprotocol), and the decapsulated service data packet includes the header (asrc_addr, asrc_port, adst_addr, adst_port, aprotocol).

[0242] 703. The second switch determines a next-hop device based on the first quintuple.

[0243] In a possible implementation, a routing table (corresponding to the routing table configured in the first switch) is pre-configured in the second switch. After the service data packet is unsealed, the second switch further determines the next hop address of the next hop device based on the first five-tuple of the unsealed service data packet. Optionally, the process of determining the next hop device may include:

[0244] 1. Query the next hop address in the routing table based on the first quintuple.

[0245] Optionally, the routing table includes a correspondence between a quintuple and a next address, and the second switch device performs route matching based on the first quintuple in the routing table to query whether there is a next hop address corresponding to the first quintuple.

[0246] 2. In response to the query of the next hop address, determine that the next hop device is the second service server.

[0247] Optionally, the routing table of the second switch is configured with a next-hop address corresponding to the traffic forwarding service. Accordingly, when the next-hop address is queried based on the first five-tuple, the second switch determines the traffic forwarding service of the service type of the service data packet, and then determines the next-hop device as the second service server. Since the service data packet is only tunnel-encapsulated by the first switch during the traffic forwarding service transmission process, the second switch decapsulates the service data packet and can prepare to forward the service data packet to the second service server based on the first five-tuple, and the second service server can correctly identify the service data packet.

[0248] 3. In response to not finding the next hop address, determining that the next hop device is a second gateway server.

[0249] If the next hop address is not found in the routing table based on the first quintuple, it indicates that the business data packet sent by the first switch is processed by the first gateway server. Accordingly, before the business data packet is sent to the second business server, it needs to be processed by the second gateway server. Therefore, the second switch determines the next hop device as the second gateway server.

[0250] 704. The second switch sends the service data packet to the next-hop device.

[0251] In a possible implementation, when the next-hop device is the second service server, the first switch sends the service data packet to the second service server based on the queried next-hop address; when the next-hop device is the second gateway server, the first switch sends the service data packet to the second gateway server based on the pre-configured server address of the second gateway server.

[0252] 705. When the next-hop device is the second gateway server, the second gateway server receives the service data packet sent by the second switch.

[0253] 706. The second gateway server determines the service type of the service data packet.

[0254] Since the first gateway server uses different service processing methods to process service data packets of different service types, the second gateway server also needs to use different service processing methods to process the service data packets based on the service types of the service data packets.

[0255] In a possible implementation, when the gateway server supports the service processing of the secure communication service and the address translation service, if it is detected that the service data packet has a decryption protocol, the second gateway server determines the service type as the secure communication service, and if it is detected that the service data does not contain the decryption protocol, the second gateway server determines the service type as the address translation service. It should be noted that this embodiment is schematically described by taking the above service type and service type detection method as an example, but does not constitute a limitation thereto.

[0256] 707, when the service type of the service data packet is a secure communication service, the second gateway server decrypts the service data packet to obtain a decrypted service data packet.

[0257] When the service type of the service data packet is a secure communication service, the second gateway server uses a decryption method corresponding to the decryption method in the first gateway server to decrypt the service data packet to obtain a decrypted service data packet, thereby ensuring that the subsequent second service server can recognize the service data in the service data packet.

[0258] In some embodiments, when the first gateway server performs IPSec encryption on the service data packet, the second gateway server performs IPSec decryption on the service data packet.

[0259] 708. When the service type of the service data packet is an address conversion service, the second gateway server performs address conversion processing on the service data packet to obtain an address-converted service data packet.

[0260] Since the destination address in the service data packet is a public network address, the second gateway server needs to convert the destination public network address in the service data packet into a destination intranet address based on the mapping relationship between the public network address and the intranet address, and then accurately send the service data packet to the second service server based on the destination intranet address. In a possible implementation, the second gateway server obtains the first quintuple of the service data packet, and then converts the destination public network address in the first quintuple into a target intranet address based on the address conversion relationship, to obtain the service data packet after the address conversion.

[0261] 709. The second gateway server sends the processed service data packet to the second service server in the second edge node.

[0262] In a possible implementation, when the service data packet is an address conversion service, the second gateway server sends the service data packet after the address conversion to the second service server based on the destination intranet address obtained by conversion.

[0263] In an illustrative example, in different business scenarios, the switch and the gateway server cooperate to implement the process of sending business data packets as follows: Figure 8As shown. After receiving the service data packet, the second switch in the second switch cluster 81 first performs tunnel decapsulation on the service data packet, and then performs route matching based on the inner five-tuple of the decapsulated service data packet. If the next-hop address is matched, the service data packet is sent to the second service server in the second service server cluster; if the next-hop address is not matched, the second switch sends the service data packet to the second gateway server in the second gateway server cluster 82. After receiving the service data packet, the second gateway server detects whether there is a decryption protocol in the service data packet. If so, the service data packet is decrypted and the decrypted service data packet is sent to the second service server; if not, the service data packet is address converted and the service data packet is sent to the second service server based on the converted intranet address.

[0264] Fig. 9 900 is a structural block diagram of a data sending device provided by an exemplary embodiment of the present application, the device comprising:

[0265] A receiving module 901 is used to receive a service data packet sent by a first service server in a first edge node;

[0266] A determination module 902 is used to determine a next-hop device of the service data packet based on the service type of the service data packet, wherein the next-hop device includes a first gateway server in the first edge node or a second switch in the second edge node, and the first gateway server is used to perform service processing on the service data packet;

[0267] A sending module 903 is used to send the service data packet to the next hop device;

[0268] The receiving module 901 is further configured to receive the processed service data packet sent by the first gateway server when the next-hop device is the first gateway server;

[0269] The sending module 903 is further configured to send the processed service data packet to the second switch.

[0270] Optionally, the determining module 902 is used to:

[0271] When the service type of the service data packet belongs to the traffic forwarding service, determining that the next hop device of the service data packet is the second switch;

[0272] When the service type of the service data packet does not belong to the traffic forwarding service, it is determined that the next hop device of the service data packet is the first gateway server.

[0273] Optionally, when the next hop device is the second switch, the sending module 903 is configured to:

[0274] Obtaining the first five-tuple of the service data packet;

[0275] Querying a next hop address from a routing table based on the first quintuple;

[0276] Generate a second quintuple based on the queried next hop address and the switch address of the first switch;

[0277] Encapsulating the service data packet by using the second quintuple;

[0278] Send the encapsulated service data packet to the second switch.

[0279] Optionally, when the next hop device is the first gateway server, the sending module 903 is further configured to:

[0280] Determining a target port of the first gateway server based on a service type of the service data packet, wherein different service types correspond to different ports;

[0281] The service data packet is sent to the target port of the first gateway server, so that the first gateway server determines the service type of the service data packet based on the target port.

[0282] Optionally, when determining the target port of the first gateway server based on the service type of the service data packet, the sending module 903 is further used to:

[0283] When the service type of the service data packet is a secure communication service, the first port is determined as the target port, and the first gateway server is used to encrypt the service data packet received through the first port;

[0284] When the service type of the service data packet is an address conversion service, the second port is determined as the target port, and the first gateway server is used to perform address conversion processing on the service data packet received through the second port.

[0285] Optionally, when the next hop device is the first gateway server, the sending module 903 is further configured to:

[0286] Based on the processed quintuple of the service data packet, query the next hop address from the routing table;

[0287] generating a second quintuple based on the next hop address and the switch address of the first switch;

[0288] The service data packet after encapsulation and processing by the second quintuple;

[0289] Send the encapsulated service data packet to the second switch.

[0290] Fig.10 1000 is a structural block diagram of a data sending device provided by another exemplary embodiment of the present application, the device comprising:

[0291] A receiving module 1001 is configured to receive a service data packet sent by a first switch in a first edge node, wherein the service data packet is sent by the first switch when determining that a next hop device of the service data packet is a first gateway server based on a service type of the service data packet;

[0292] The processing module 1002 is used to perform service processing on the service data packet;

[0293] The sending module 1003 is configured to send the processed service data packet to the first switch, so that the first switch sends the processed service data packet to the second switch in the second edge node.

[0294] Optionally, the processing module 1002 is used to:

[0295] Determining a service type of the service data packet based on a target port for receiving the service data packet;

[0296] The service data packet is subjected to service processing based on the service type of the service data packet.

[0297] Optionally, the processing module 1002 is used to:

[0298] When the target port is the first port, determining that the service type of the service data packet is a secure communication service;

[0299] When the service type of the service data packet is a secure communication service, the service data packet is encrypted.

[0300] When the target port is the second port, determining that the service type of the service data packet is an address translation service;

[0301] When the service type of the service data packet is an address conversion service, the service data packet is subjected to address conversion processing.

[0302] Fig.11 1100 is a structural block diagram of a data receiving device provided by an exemplary embodiment of the present application, the device comprising:

[0303] The receiving module 1101 is configured to receive a service data packet sent by a first switch in a first edge node;

[0304] A determination module 1102 is used to determine a next-hop device of the service data packet, where the next-hop device includes a second service server or a second gateway server in the second edge node, where the second gateway server is used to perform service processing on the service data packet and send the processed service data packet to the second service server;

[0305] The sending module 1103 is used to send the service data packet to the next-hop device.

[0306] Optionally, the determining module 1102 is used to:

[0307] Decapsulating the second quintuple of the service data packet to determine the first quintuple in the service data packet, where the second quintuple is added when the first switch encapsulates the service data packet, and the second quintuple is located in an outer layer of the first quintuple;

[0308] The next hop device is determined based on the first quintuple.

[0309] Optionally, when determining the next hop device based on the first quintuple, the determination module 1102 is configured to:

[0310] Querying a next hop address in a routing table based on the first quintuple;

[0311] When the next hop address is queried, determining that the next hop device is the second service server;

[0312] When the next hop address is not found, the next hop device is determined to be the second gateway server.

[0313] Fig.12 1200 is a structural block diagram of a data receiving device provided by an exemplary embodiment of the present application, the device comprising:

[0314] A receiving module 1201 is configured to receive a service data packet sent by a second switch in a second edge node, wherein the service data packet is sent when the second switch determines that the next hop device is a second gateway server;

[0315] A processing module 1202 is used to perform service processing on the service data packet based on the service type of the service data packet to obtain the processed service data packet;

[0316] The sending module 1203 is configured to send the processed service data packet to the second service server in the second edge node.

[0317] Optionally, the processing module 1202 is used to:

[0318] Determining the service type of the service data packet;

[0319] When the service type of the service data packet is a secure communication service, decrypting the service data packet to obtain the decrypted service data packet;

[0320] When the service type of the service data packet is an address conversion service, address conversion processing is performed on the service data packet to obtain the service data packet after address conversion.

[0321] Optionally, when performing address conversion processing on the service data packet to obtain the service data packet after address conversion, the processing module 1202 is used to:

[0322] Obtaining the first five-tuple of the service data packet;

[0323] Based on the address conversion relationship, convert the destination public network address in the first quintuple into a destination intranet address to obtain the service data packet after the address conversion;

[0324] The sending module 1203 is used to:

[0325] Based on the destination intranet address, the service data packet after address conversion is sent to the second service server.

[0326] It should be noted that: the device provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiment belong to the same concept, and the implementation process thereof is detailed in the method embodiment, which will not be repeated here.

[0327] Fig.13 1 is a schematic diagram of the structure of a switch provided by an exemplary embodiment of the present application. The switch includes a memory 1301, a processor 1302, a switching chip 1303 and other components, such as a power supply, etc. In some embodiments, the controller can be deployed on the operating system of the switch and run by the processor 1302. The controller can control the switching chip 1303 through a high-speed serial computer expansion bus standard (Peripheral Component Interconnect express, PCIe) interface.

[0328] At least one instruction is stored in the memory 1301 , and the at least one instruction is loaded and executed by the processor 1302 to implement the data sending method or data receiving method at the switch side in the above embodiment.

[0329] In some embodiments, when the switch is a programmable switch, the switch chip 1303 is a programmable switch chip. Different from the fixed network processing functions in traditional switches, programmable switches can customize various network processing functions through programming.

[0330] The switching chip 1303 can be implemented in a variety of ways, including but not limited to a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a network processor (NP) and a combination thereof. It should be understood that Fig.13 Only one example structure of a switch is shown, and any other switch currently available or developed in the future may be used in conjunction with the embodiments of the present disclosure.

[0331] Please refer to Fig.14 , which shows a structural block diagram of a gateway server provided by an exemplary embodiment of the present application. Specifically:

[0332] The gateway server 1400 includes a central processing unit (CPU) 1401, a system memory 1404 including a random access memory (RAM) 1402 and a read-only memory (ROM) 1403, and a system bus 1405 connecting the system memory 1404 and the central processing unit 1401. The gateway server 1400 also includes a basic input / output system (I / O system) 1406 for facilitating information transmission between various components in the server, and a large-capacity storage device 1407 for storing an operating system 1413, application programs 1414, and other program modules 1415.

[0333] The basic input / output system 1406 includes a display 1408 for displaying information and an input device 1409 such as a mouse and a keyboard for user inputting information. The display 1408 and the input device 1409 are connected to the central processing unit 1401 through an input / output controller 1410 connected to the system bus 1405. The basic input / output system 1406 may also include an input / output controller 1410 for receiving and processing inputs from a plurality of other devices such as a keyboard, a mouse, or an electronic stylus. Similarly, the input / output controller 1410 also provides output to a display screen, a printer, or other types of output devices.

[0334] The mass storage device 1407 is connected to the central processing unit 1401 via a mass storage controller (not shown) connected to the system bus 1405. The mass storage device 1407 and its associated computer-readable storage medium provide non-volatile storage for the gateway server 1400. That is, the mass storage device 1407 may include a computer-readable storage medium (not shown) such as a hard disk or a compact disc read-only memory (CD-ROM) drive.

[0335] Without loss of generality, the computer-readable storage medium may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer-readable storage instructions, data structures, program modules or other data. Computer storage media include RAM, ROM, Erasable Programmable Read Only Memory (EPROM), Electronically Erasable Programmable Read-Only Memory (EEPROM), flash memory or other solid-state storage technology, CD-ROM, Digital Versatile Disc (DVD) or other optical storage, cassette, tape, disk storage or other magnetic storage devices. Of course, those skilled in the art will know that the computer storage medium is not limited to the above. The above-mentioned system memory 1404 and mass storage device 1407 can be collectively referred to as memory.

[0336] The memory stores one or more programs, and the one or more programs are configured to be executed by one or more central processing units 1401. The one or more programs include instructions for implementing the above-mentioned method embodiments. The central processing unit 1401 executes the one or more programs to implement the data sending method or the data receiving method on the gateway server side provided by the above-mentioned method embodiments.

[0337] According to various embodiments of the present application, the gateway server 1400 can also be connected to a remote server on the network through a network such as the Internet. That is, the gateway server 1400 can be connected to the network 1412 through the network interface unit 1411 connected to the system bus 1405, or the network interface unit 1411 can be used to connect to other types of networks or remote server systems (not shown).

[0338] The memory also includes one or more programs, which are stored in the memory, and the one or more programs include steps executed by the gateway server in the method provided in the embodiment of the present application.

[0339] An embodiment of the present application also provides a computer-readable storage medium, in which at least one instruction is stored. The at least one instruction is loaded and executed by a processor to implement the data sending method or the data receiving method described in any of the above embodiments.

[0340] Optionally, the computer readable storage medium may include: ROM, RAM, solid state drives (SSD) or optical disks, etc. Among them, RAM may include resistance random access memory (ReRAM) and dynamic random access memory (DRAM).

[0341] The embodiment of the present application provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the data sending method or the data receiving method described in the above embodiment.

[0342] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

Claims

1. A data transmission method, characterized in that: The method is used for a first switch in a first edge node, and the method comprises: Receiving a service data packet sent by a first service server in the first edge node; When the service type of the service data packet belongs to the traffic forwarding service, determining that the next hop device of the service data packet is a second switch in the second edge node; When the service type of the service data packet does not belong to the traffic forwarding service, determining that the next hop device of the service data packet is a first gateway server in the first edge node, and the first gateway server is used to perform service processing on the service data packet; Sending the service data packet to the next hop device; In a case where the next-hop device is the first gateway server, receiving the processed service data packet sent by the first gateway server; Send the processed service data packet to the second switch.

2. The method according to claim 1, characterized in that In a case where the next-hop device is the second switch, sending the service data packet to the next-hop device includes: Obtaining the first five-tuple of the service data packet; Querying a next hop address from a routing table based on the first quintuple; Generate a second quintuple based on the queried next hop address and the switch address of the first switch; Encapsulating the service data packet by using the second quintuple; Send the encapsulated service data packet to the second switch.

3. The method according to claim 1, characterized in that In a case where the next hop device is the first gateway server, sending the service data packet to the next hop device includes: Determining a target port of the first gateway server based on a service type of the service data packet, wherein different service types correspond to different ports; The service data packet is sent to the target port of the first gateway server, so that the first gateway server determines the service type of the service data packet based on the target port.

4. The method according to claim 3, characterized in that The determining, based on the service type of the service data packet, a target port of the first gateway server includes: When the service type of the service data packet is a secure communication service, the first port is determined as the target port, and the first gateway server is used to encrypt the service data packet received through the first port; When the service type of the service data packet is an address conversion service, the second port is determined as the target port, and the first gateway server is used to perform address conversion processing on the service data packet received through the second port.

5. The method according to any one of claims 1 to 4, characterized in that: In a case where the next-hop device is the first gateway server, sending the processed service data packet to the second switch includes: Based on the processed quintuple of the service data packet, query the next hop address from the routing table; generating a second quintuple based on the next hop address and the switch address of the first switch; The service data packet after encapsulation and processing by the second quintuple; Send the encapsulated service data packet to the second switch.

6. A data transmission method, characterized in that: The method is used for a first gateway server in a first edge node, and the method comprises: receiving a service data packet sent by a first switch in the first edge node, the service data packet being sent by the first switch when determining that the next hop device of the service data packet is the first gateway server based on the service type of the service data packet; wherein when the service type of the service data packet belongs to a traffic forwarding service, the first switch determines the second switch in the second edge node as the next hop device, and when the service type of the service data packet belongs to a non-traffic forwarding service, the first switch determines the first gateway server as the next hop device; Performing business processing on the business data packet; The processed service data packet is sent to the first switch, so that the first switch sends the processed service data packet to the second switch in the second edge node.

7. The method according to claim 6, characterized in that The performing service processing on the service data packet includes: Determining a service type of the service data packet based on a target port for receiving the service data packet; The service data packet is subjected to service processing based on the service type of the service data packet.

8. The method according to claim 7, characterized in that The determining the service type of the service data packet based on the target port for receiving the service data packet comprises: When the target port is the first port, determining that the service type of the service data packet is a secure communication service; When the target port is the second port, determining that the service type of the service data packet is an address translation service; The performing service processing on the service data packet based on the service type of the service data packet includes: When the service type of the service data packet is a secure communication service, encrypting the service data packet; When the service type of the service data packet is an address conversion service, address conversion processing is performed on the service data packet.

9. A data receiving method, characterized in that: The method is used for a second switch in a second edge node, and the method includes: receiving a service data packet sent by a first switch in a first edge node, wherein the service data packet is sent by the first switch using the data sending method according to any one of claims 1 to 5; Determine a next-hop device of the service data packet, wherein the next-hop device includes a second service server or a second gateway server in the second edge node, and the second gateway server is used to perform service processing on the service data packet and send the processed service data packet to the second service server; Send the service data packet to the next hop device.

10. A data receiving method, characterized in that: The method is used for a second gateway server in a second edge node, and the method comprises: receiving a service data packet sent by a second switch in the second edge node, wherein the service data packet is sent by the second switch when determining that the next hop device is the second gateway server, and the service data packet is sent by the first switch to the second switch using the data sending method according to any one of claims 1 to 5; Performing service processing on the service data packet to obtain the processed service data packet; Send the processed service data packet to the second service server in the second edge node.

11. A data sending device, characterized in that: The device comprises: A receiving module, used to receive a service data packet sent by a first service server in a first edge node; A determination module, configured to determine that the next hop device of the service data packet is a second switch in the second edge node when the service type of the service data packet belongs to a traffic forwarding service; When the service type of the service data packet does not belong to the traffic forwarding service, determining that the next hop device of the service data packet is a first gateway server in the first edge node, and the first gateway server is used to perform service processing on the service data packet; A sending module, used for sending the service data packet to the next hop device; The receiving module is further configured to receive the processed service data packet sent by the first gateway server when the next-hop device is the first gateway server; The sending module is further configured to send the processed service data packet to the second switch.

12. A data sending device, characterized in that: The device comprises: A receiving module, configured to receive a service data packet sent by a first switch in a first edge node, wherein the service data packet is sent by the first switch when determining that the next hop device of the service data packet is a first gateway server based on the service type of the service data packet; wherein when the service type of the service data packet belongs to a traffic forwarding service, the first switch determines the second switch in the second edge node as the next hop device, and when the service type of the service data packet belongs to a non-traffic forwarding service, the first switch determines the first gateway server as the next hop device; A processing module, used for performing service processing on the service data packet; The sending module is used to send the processed service data packet to the first switch, so that the first switch sends the processed service data packet to the second switch in the second edge node.

13. A data receiving device, characterized in that: The device comprises: a receiving module, configured to receive a service data packet sent by a first switch in a first edge node, wherein the service data packet is sent by the data sending device according to claim 11; A determination module, used to determine a next-hop device of the service data packet, wherein the next-hop device includes a second service server or a second gateway server in the second edge node, and the second gateway server is used to perform service processing on the service data packet and send the processed service data packet to the second service server; A sending module is used to send the service data packet to the next hop device.

14. A data receiving device, characterized in that: The device comprises: a receiving module, configured to receive a service data packet sent by a second switch in a second edge node, wherein the service data packet is sent by the second switch when determining that the next hop device is a second gateway server, and the service data packet is sent by the data sending device according to claim 11; A processing module, configured to perform service processing on the service data packet based on the service type of the service data packet to obtain the processed service data packet; A sending module is used to send the processed service data packet to the second service server in the second edge node.

15. A switch, characterized in that: The switch includes a processor and a memory, wherein the memory stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the data sending method according to any one of claims 1 to 5, or to implement the data receiving method according to claim 9.

16. A gateway server, characterized in that: The gateway server includes a processor and a memory, wherein the memory stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the data sending method as described in any one of claims 6 to 8, or to implement the data receiving method as described in claim 10.

17. A computer-readable storage medium, characterized in that: The readable storage medium stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the data sending method as described in any one of claims 1 to 5, or, to implement the data sending method as described in any one of claims 6 to 8, or, to implement the data receiving method as described in claim 9, or, to implement the data receiving method as described in claim 10.

18. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the data sending method as described in any one of claims 1 to 5, or, executes the data sending method as described in any one of claims 6 to 8, or, executes the data receiving method as described in claim 9, or, executes the data receiving method as described in claim 10.

Citation Information

Patent Citations

  • Gateway determination method and device, server, distributor, gateway determination system and storage medium

    CN112333135A

  • Method, switch, and sites for data transmission

    WO2020258302A1