Data processing method, device and equipment and computer readable storage medium
By constructing a hash table in the cloud gateway to find the tunnel interface index of concurrent messages, the problem of limited high-concurrency access of the home cloud gateway is solved, efficient data forwarding and processing is achieved, and high-concurrency access requirements are met.
Patent Information
- Application Number
- CN202311359785.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-19
- Publication Date
- 2024-10-18
AI Technical Summary
In the existing technology, when the home cloud gateway handles high concurrent access, the CPU resources are limited and cannot meet the high-level number of concurrent access requirements. Moreover, the processing efficiency of L2TP packets is low, which affects the processing of other protocol packets.
By building a preset hash table in the cloud gateway, searching for the target tunnel interface index based on the source IP address and source port number of the negotiation message, and sending the negotiation message to the target server through the target logical tunnel for data processing, the cloud gateway is only responsible for Data forwarding reduces CPU resource usage.
It realizes high-level concurrent access requirements, improves the processing efficiency of L2TP messages, avoids the restoration of L2TP sessions, and reduces equipment deployment costs.
Smart Images

Figure CN118802415A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of information technology, and in particular, relates to a data processing method, device, equipment and computer-readable storage medium. Background Art
[0002] At present, in order to realize the one-hop cloud of home broadband services, the home cloud gateway is deployed on the broadband remote access server (BRAS), and the home broadband traffic is directed to the cloud gateway for data processing through the Layer 2 Tunneling Protocol (L2TP), so as to realize the sinking of computing power of home terminal devices. After the computing power is sunk to the home cloud gateway, the cloud gateway needs to carry the 10W-level home cloud gateway L2TP high-concurrency access processing.
[0003] However, in the prior art, in order to achieve high-performance data forwarding, the data plane of the cloud gateway occupies most of the central processing unit (CPU) resources, resulting in limited CPU resources reserved for L2TP access processing. Therefore, the cloud gateway in the prior art can only meet the requirements of low-level concurrent access, but cannot meet the requirements of high-level concurrent access, resulting in the problem of limited high-concurrency access of the home cloud gateway. Summary of the invention
[0004] The embodiments of the present application provide a data processing method, apparatus, device and computer-readable storage medium, which can solve the problem of limited high-concurrency access to home cloud gateways.
[0005] In the first aspect, an embodiment of the present application provides a data processing method, which is applied to a cloud gateway. The data processing method includes: receiving a negotiation message sent by a client through a first interface of a broadband access server, a second interface of a core router, and a third interface of a cloud gateway; when the negotiation message is a protocol message, searching a preset hash table for a target tunnel interface index corresponding to a source IP address and a source port number of the negotiation message, wherein the preset hash table is constructed by a controller according to a correspondence between the source IP address and the source port number of the negotiation message and the tunnel interface index; sending the negotiation message to a fourth interface of a target server through a target logical tunnel, wherein the target logical tunnel is a logical tunnel corresponding to the target tunnel interface index, and the target server is used to perform data processing on the negotiation message; receiving a negotiation message after data processing sent by the target server through the target logical tunnel; and sending the negotiation message after data processing to the client through the fifth interface of the core router and the sixth interface of the broadband access server.
[0006] According to the implementation scheme of the first aspect of the present application, the first IP address and the first MAC address of the fourth interface are configured by the controller based on the second IP address and the second MAC address of the third interface, the first IP address is the same as the second IP address, and the first MAC address is the same as the second MAC address.
[0007] According to any of the aforementioned implementations of the first aspect of the present application, the static address resolution protocol table of the fourth interface is configured by the controller based on the third IP address of the sixth interface and the third MAC address of the fifth interface.
[0008] According to any of the aforementioned implementations of the first aspect of the present application, after searching the preset hash table for the target tunnel interface index corresponding to the source IP address and source port number of the negotiation message, the data processing method also includes: when there is no target tunnel interface index corresponding to the source IP address and source port number of the negotiation message in the preset hash table, performing a hash operation on the source IP address and source port number of the negotiation message to obtain a first tunnel interface index corresponding to the source IP address and source port number of the negotiation message; adding the correspondence between the source IP address and source port number of the negotiation message and the first tunnel interface index to the preset hash table; and determining the default tunnel interface index corresponding to the source IP address and source port number of the negotiation message as the target tunnel interface index.
[0009] In the second aspect, an embodiment of the present application provides a data processing method, which is applied to a server, and the data processing method includes: receiving a negotiation message sent by a cloud gateway through a target logical tunnel through a fourth interface; performing data processing on the negotiation message; and sending the data-processed negotiation message to the cloud gateway through the target logical tunnel.
[0010] According to the implementation scheme of the second aspect of the present application, after sending the data-processed negotiation message to the cloud gateway through the target logical tunnel, the data processing method also includes: after obtaining a message that the negotiation between the client and the cloud gateway is successful, sending the first session information to the cloud gateway through a controller, so that the cloud gateway creates an interface for data forwarding according to the first session information; after obtaining a message that the negotiation between the client and the cloud gateway is disconnected, sending the second session information to the cloud gateway through the controller, so that the cloud gateway deletes the interface for data forwarding according to the second session information.
[0011] In a third aspect, an embodiment of the present application provides a data processing device, which is applied to a cloud gateway, and the data processing device includes: a first receiving module, which is used to receive a negotiation message sent by a client through a first interface of a broadband access server, a second interface of a core router, and a third interface of a cloud gateway; a search module, which is used to search a preset hash table for a target tunnel interface index corresponding to a source IP address and a source port number of the negotiation message when the negotiation message is a protocol message, and the preset hash table is constructed by a controller according to the correspondence between the source IP address and the source port number of the negotiation message and the tunnel interface index; a first sending module, which is used to send the negotiation message to a fourth interface of a target server through a target logical tunnel, and the target logical tunnel is a logical tunnel corresponding to the target tunnel interface index, and the target server is used to perform data processing on the negotiation message; a second receiving module, which is used to receive a negotiation message after data processing sent by the target server through the target logical tunnel; and a second sending module, which is used to send the negotiation message after data processing to the client through the fifth interface of the core router and the sixth interface of the broadband access server.
[0012] In a fourth aspect, an embodiment of the present application provides a data processing device, which is applied to a server, and the data processing device includes: a third receiving module, which is used to receive a negotiation message sent by the cloud gateway through a target logical tunnel through a fourth interface; a data processing module, which is used to perform data processing on the negotiation message; and a third sending module, which is used to send the negotiation message after data processing to the cloud gateway through the target logical tunnel.
[0013] In a fifth aspect, an embodiment of the present application provides an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the steps of the data processing method provided in the first and second aspects are implemented.
[0014] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the data processing method provided in the first and second aspects are implemented.
[0015] The data processing method, device, equipment and computer-readable storage medium of the embodiment of the present application, when the negotiation message received by the cloud gateway is a protocol message, searches the preset hash table for the target tunnel interface index corresponding to the source IP address and source port number of the negotiation message, and then sends the negotiation message to the fourth interface of the target server through the target logical tunnel corresponding to the target tunnel interface index, so that the target server processes the negotiation message. In this way, when the cloud gateway receives the negotiation messages sent by different clients, it can determine the logical tunnels used to transmit different negotiation messages by looking up the table, and then send the negotiation messages sent by different clients to different servers through each logical tunnel for data processing. In this way, the cloud gateway only needs to be responsible for the data forwarding service, and even if the data plane occupies most of the CPU resources, it does not affect the cloud gateway to achieve high concurrent access of the negotiation message. Therefore, through the embodiment of the present application, it can meet the concurrent access requirements of a high level of quantity and solve the problem of limited high concurrent access of the home cloud gateway. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0017] Figure 1 It is a schematic diagram of the topology deployment structure of home broadband services;
[0018] Figure 2 It is a flowchart of L2TP protocol processing;
[0019] Figure 3 It is a flowchart of a data processing method provided in an embodiment of the present application;
[0020] Figure 4 This is a schematic diagram of a cloud gateway topology deployment structure provided in an embodiment of the present application;
[0021] Figure 5 It is a flowchart of another data processing method provided in an embodiment of the present application;
[0022] Figure 6 It is a flowchart of another data processing method provided in an embodiment of the present application;
[0023] Figure 7 It is a flowchart of another data processing method provided in an embodiment of the present application;
[0024] Figure 8 It is a flowchart of another data processing method provided in an embodiment of the present application;
[0025] Fig. 9 It is a communication interaction diagram of a data processing method provided in an embodiment of the present application;
[0026] Fig.10 is a structural schematic diagram of a data processing device provided in an embodiment of the present application;
[0027] Fig.11 is a structural schematic diagram of another data processing device provided in an embodiment of the present application;
[0028] Fig.12 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0029] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.
[0030] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0031] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0032] It is obvious to those skilled in the art that various modifications and changes can be made in the present application without departing from the spirit or scope of the present application. Therefore, the present application is intended to cover modifications and changes of the present application that fall within the scope of the corresponding claims (technical solutions for protection) and their equivalents. It should be noted that the implementation methods provided in the embodiments of the present application can be combined with each other without contradiction.
[0033] Before describing the technical solutions provided by the embodiments of the present application, in order to facilitate the understanding of the embodiments of the present application, the present application first specifically describes the problems existing in the prior art:
[0034] like Figure 1 As shown in the figure, in order to realize the one-hop cloud of home broadband services, the home cloud gateway is deployed on the BRAS, and the home broadband traffic is directed to the cloud gateway for data processing through the L2TP protocol, so as to realize the sinking of computing power of home terminal devices. After the service processing is completed, the data will enter the value-added service network or directly enter the Internet through the Generic Routing Encapsulation (GRE) tunnel. After the computing power is sunk to the home cloud gateway, the cloud gateway needs to carry the 10W-level home cloud gateway L2TP high-concurrency access processing.
[0035] like Figure 2 As shown, in the prior art, after receiving the L2TP message sent by the client, the data plane of the cloud gateway enters the local message processing flow after the route search at the Ip4-lookup node, and after identifying that the data packet is a User Datagram Protocol (UDP) message and the destination port is a preset port, it enters the L2TP splitter, identifies whether the message is an L2TP protocol message or an L2TP forwarding message, and if it is an L2TP protocol message, it enters the L2TP network server (L2TP Network Server, LNS) for processing. LNS can interact with the data plane of the cloud gateway through a local socket.
[0036] After the client and cloud gateway successfully negotiate a session, the LNS will send L2TP session information to the control plane of the cloud gateway. The control plane will use the session information to create an L2TP interface and data plane L2TP session to guide the data plane to perform L2TP data forwarding.
[0037] As mentioned above, in order to achieve high-performance data forwarding, the prior art makes the data plane of the cloud gateway occupy most of the CPU resources, resulting in limited CPU resources reserved for L2TP access processing. Since the performance of LNS in processing L2TP protocol messages is limited, if the number of concurrent accesses of L2TP messages is too large, then LNS will need to occupy too many CPU resources for processing, and the CPU resources reserved by the operating system for it are limited, so the cloud gateway in the prior art can only meet the concurrent access requirements of a low level, but cannot meet the concurrent access requirements of a high level, and if LNS occupies too many CPU resources, it will also affect the processing of other protocol messages.
[0038] In addition, the prior art uses the full network address translation (FULL-NAT) method in the above L2TP access processing, which will change the IP address and port of the original message. Therefore, after the client negotiates the session with the cloud gateway, the local IP address (local IP) and remote IP address (remote IP) of the L2TP session will change, resulting in different IP addresses of the cloud gateway interface and the LNS interface, and the L2TP message cannot reach the LNS. Therefore, in order for the LNS to process the L2TP message normally, the prior art also needs to restore the L2TP session, resulting in low processing efficiency of the LNS.
[0039] In order to solve the problems of the prior art, the embodiments of the present application provide a data processing method, apparatus, device and computer-readable storage medium.
[0040] The following first introduces the data processing method provided in the embodiment of the present application.
[0041] Figure 3 1 is a flow chart of a data processing method provided in an embodiment of the present application, and the data processing method can be applied to a cloud gateway. Figure 3 As shown, the data processing method may include the following steps S301 to S305.
[0042] S301. Receive a negotiation message sent by a client through a first interface of a broadband access server, a second interface of a core router, and a third interface of a cloud gateway.
[0043] S302: When the negotiation message is a protocol message, search a preset hash table for a target tunnel interface index corresponding to the source IP address and source port number of the negotiation message.
[0044] S303: Send the negotiation message to the fourth interface of the target server through the target logical tunnel.
[0045] S304: Receive the negotiation message after data processing sent by the target server through the target logical tunnel.
[0046] S305 . Send the negotiation message after data processing to the client through the fifth interface of the core router and the sixth interface of the broadband access server.
[0047] The specific implementation of the above steps will be described in detail below.
[0048] The data processing method of the embodiment of the present application, when the negotiation message received by the cloud gateway is a protocol message, searches the preset hash table for the target tunnel interface index corresponding to the source IP address and source port number of the negotiation message, and then sends the negotiation message to the fourth interface of the target server through the target logical tunnel corresponding to the target tunnel interface index, so that the target server processes the negotiation message. In this way, when the cloud gateway receives negotiation messages sent by different clients, it can determine the logical tunnels used to transmit different negotiation messages by looking up the table, and then send the negotiation messages sent by different clients to different servers through each logical tunnel for data processing. In this way, the cloud gateway only needs to be responsible for the data forwarding service, and even if the data plane occupies most of the CPU resources, it does not affect the cloud gateway to achieve high concurrent access of the negotiation message. Therefore, through the embodiment of the present application, it can meet the concurrent access requirements of a high level of quantity and solve the problem of limited high concurrent access of the home cloud gateway.
[0049] like Figure 4 As shown, before the client sends a negotiation message to the cloud gateway and starts the negotiation process, it is necessary to configure static routes in advance to establish a communication connection between the broadband access server, the core router (Core Router, CR) and the cloud gateway. Specifically, a static route to the cloud gateway can be configured on the broadband access server, and a static route to the broadband access server can be configured on the cloud gateway.
[0050] When the broadband access server, the core router and the cloud gateway can communicate with each other, the broadband access server, the core router and the cloud gateway report the device information to the controller. Exemplarily, the device information may include the IP address of the sixth interface BR-GE0 of the broadband access server, the IP address and MAC address of the third interface VS-GE1 of the cloud gateway, and the next hop of the cloud gateway, the MAC address of the fifth interface CR-GE1 of the core router.
[0051] The controller will determine the number of logical tunnels between the cloud gateway and the server that need to be built in advance according to the number of client accesses, and configure the IP address of the tunnel interface for the built logical tunnel, wherein the number of logical tunnels can be increased with the expansion of access services, and will not affect the operation of the original data forwarding services. Exemplarily, the logical tunnel can be a virtual eXtensible Local Area Network (VxLAN) tunnel.
[0052] Since the message received by the broadband access server is a message after source address translation (Source Network Address Translation, SNAT), the source IP address and source port of the negotiation message sent by each client are different, but the destination IP address and destination port are the same. Therefore, after the controller builds the logical tunnel between the cloud gateway and the server, the source IP address and source port number of the negotiation message can be used as keywords for hash operation, and the hash operation result is used as the tunnel interface index, that is, the number of the logical tunnel, and then the tunnel interface index if_index of each logical tunnel is recorded in the global information of VxLAN_Tunnle_ifindex[] = [vx0_ifindex0, vx0_ifindex1, ..., vx_if_indexn]. In this way, the controller can construct a preset hash table in advance based on the correspondence between the source IP address and source port number of the negotiation message and the tunnel interface index before the client and the cloud gateway start the negotiation process.
[0053] The controller also pre-configures the server by creating a bridge on the server. Figure 4 br1 shown in the figure, and the virtual network card interface (VirtualEthernet, VETH), that is Figure 4 The VETH0 and VETH1 shown in the figure add the server's logical tunnel interface LNS-vxi and a virtual network card interface VETH0 to the same bridge br1, and use another virtual network card interface VETH1 as the server's receiving interface. Packets are received through LNS-vxi, br1 and VETH0. VETH1 is the fourth interface of the server.
[0054] After the controller completes the configuration of the server, in order to ensure that the negotiation message sent by the client to the cloud gateway can be transmitted to the server through the cloud gateway and the logical tunnel, it is also necessary to pre-configure the first IP address and the first MAC address of the fourth interface VETH1 of the server to the second IP address and the second MAC address of the third interface VS-GE1 of the cloud gateway, so that the first IP address is the same as the second IP address, and the first MAC address is the same as the second MAC address, so that the negotiation message can be smoothly sent to the server. In addition, by configuring the fourth interface VETH1 of the server, the IP address and MAC address of the fourth interface VETH1 of the server are kept consistent with the IP address and MAC address of the third interface VS-GE1 of the cloud gateway, which can avoid changes in the session obtained by subsequent server negotiation. Therefore, compared with the prior art, the embodiment of the present application does not need to restore the session, which effectively improves the processing efficiency of the server.
[0055] In addition, to ensure that the negotiation message processed by the server can be sent to the client through the logical tunnel and the cloud gateway, it is also necessary to close the learning of the Address Resolution Protocol (ARP) of the server's fourth interface VETH1, and statically configure the ARP of the server's fourth interface VETH1 according to the third IP address of the sixth interface BR-GE0 of the broadband access server and the third MAC address of the fifth interface CR-GE1 of the core router. In this way, it can be ensured that the negotiation message after data processing can be smoothly transmitted down to the client.
[0056] In S301, combined Figure 4 As shown, after the above pre-configuration work is completed, the client can initiate dialing, and the cloud gateway can receive the negotiation message sent by the client through the first interface of the broadband access server (not shown in the figure), the second interface CR-GE0 of the core router, and the third interface VS-GE1 of the cloud gateway to start the negotiation process. Exemplarily, the negotiation message can be an L2TP message, and the server can be an L2TP network server.
[0057] In S302, the cloud gateway receives the negotiation message and enters the diverter for identification after routing lookup. If the negotiation message is identified as a protocol message, the tunnel interface index corresponding to the source IP address and source port number of the negotiation message is searched from the preset hash table pre-built by the controller, that is, the target tunnel interface index; if the negotiation message is identified as a forwarding message, the message decapsulation process is entered to perform data forwarding processing.
[0058] In S303, combined Figure 4 and Figure 5As shown, the cloud gateway can determine the logical tunnel used to transmit the negotiation message, that is, the target logical tunnel, according to the target tunnel interface index. After determining the target logical tunnel, the cloud gateway can send the negotiation message through the logical tunnel interface VS-vxi of the cloud gateway at one end of the target logical tunnel to the logical tunnel interface LNS-vxi of the server at the other end of the target logical tunnel, and then transmit it to the fourth interface VETH1 of the target server through br1 and VETH0, so that the target server can process the negotiation message.
[0059] In this way, the cloud gateway can send the received negotiation messages to different servers for data processing through the target logical tunnels corresponding to each negotiation message, thereby achieving server load balancing. Compared with the existing technology, which requires the separate deployment of additional load balancing devices to achieve server load balancing, the deployment cost of the equipment is effectively reduced.
[0060] In S304, combined Figure 4 and Figure 5 As shown, after the target server processes the negotiation message, it sends the processed negotiation message to the cloud gateway through the target logical tunnel, and the cloud gateway receives the processed negotiation message.
[0061] In S305 , the cloud gateway sends the negotiation message after data processing to the client through the fifth interface CR-GE1 of the core router and the sixth interface BR-GE0 of the broadband access server.
[0062] As another implementation of the data processing method of this application, Figure 6 As shown, after S302, the data processing method may further include the following steps S601 to S603.
[0063] S601. If there is no target tunnel interface index corresponding to the source IP address and source port number of the negotiation message in the preset hash table, a hash operation is performed on the source IP address and source port number of the negotiation message to obtain a first tunnel interface index corresponding to the source IP address and source port number of the negotiation message.
[0064] If the target tunnel interface index corresponding to the source IP address and source port number of the negotiation message does not exist in the preset hash table pre-built by the controller, the source IP address and source port number of the negotiation message are used as keywords for a hash operation, and the calculated hash operation result is used as the tunnel interface index corresponding to the source IP address and source port number of the negotiation message, that is, the first tunnel interface index.
[0065] S602: Add the correspondence between the source IP address and source port number of the negotiation message and the first tunnel interface index to a preset hash table.
[0066] The corresponding relationship between the source IP address and source port number of the newly determined negotiation message and the first tunnel interface index is added to the preset hash table for subsequent search and use.
[0067] S603: Determine the default tunnel interface index corresponding to the source IP address and source port number of the negotiation message as the target tunnel interface index.
[0068] For a negotiation message for which no target tunnel interface index is found, the original default tunnel interface index corresponding to the source IP address and source port number of the negotiation message is determined as the target tunnel interface index.
[0069] Figure 7 FIG. 1 is a flow chart of another data processing method provided in an embodiment of the present application, and the data processing method can be applied to a server. Figure 7 As shown, the data processing method may include the following steps S701 to S703.
[0070] S701. Receive a negotiation message sent by the cloud gateway through the target logical tunnel through the fourth interface.
[0071] When each server serves as a target server, it can receive the negotiation message sent by the cloud gateway through the target logical tunnel through its respective fourth interface VETH1.
[0072] S702: Perform data processing on the negotiation message.
[0073] The server needs to first decapsulate the received negotiation message to obtain the original negotiation message, then perform data processing on the original negotiation message, and then re-capsulate the negotiation message after the data processing.
[0074] S703. Send the negotiation message after data processing to the cloud gateway through the target logical tunnel.
[0075] The server sends the encapsulated negotiation message to the cloud gateway through the target logical tunnel. After receiving the negotiation message after data processing, the cloud gateway will decapsulate it and send it to the corresponding client after routing lookup.
[0076] The data processing method of the embodiment of the present application, when the negotiation message received by the cloud gateway is a protocol message, searches the preset hash table for the target tunnel interface index corresponding to the source IP address and source port number of the negotiation message, and then sends the negotiation message to the fourth interface of the target server through the target logical tunnel corresponding to the target tunnel interface index, so that the target server processes the negotiation message. In this way, when the cloud gateway receives negotiation messages sent by different clients, it can determine the logical tunnels used to transmit different negotiation messages by looking up the table, and then send the negotiation messages sent by different clients to different servers through each logical tunnel for data processing. In this way, the cloud gateway only needs to be responsible for the data forwarding service, and even if the data plane occupies most of the CPU resources, it does not affect the cloud gateway to achieve high concurrent access of the negotiation message. Therefore, through the embodiment of the present application, it can meet the concurrent access requirements of a high level of quantity and solve the problem of limited high concurrent access of the home cloud gateway.
[0077] As another implementation of the data processing method of this application, Figure 8 As shown, after S703, the data processing method may further include the following steps S801 and S802.
[0078] S801. After obtaining a message indicating successful negotiation between the client and the cloud gateway, send first session information to the cloud gateway through a controller, so that the cloud gateway creates an interface for data forwarding according to the first session information.
[0079] S802: After obtaining a message that the client and the cloud gateway have negotiated to disconnect, send the second session information to the cloud gateway through the controller, so that the cloud gateway deletes the interface used for data forwarding according to the second session information.
[0080] Combination Figure 5 As shown, after the server obtains the message that the client and the cloud gateway have successfully negotiated or disconnected, the session information, that is, the first session information or the second session information, is sent to the controller, and the controller sends the session information to the cloud gateway. The cloud gateway creates an interface for data forwarding used by the data plane according to the first session information, or deletes the interface for data forwarding used by the data plane according to the second session information.
[0081] Fig. 9 Schematic diagram of communication interaction of a data processing method provided in an embodiment of the present application. Fig. 9 As shown, the data processing method may include the following steps S901 to S908.
[0082] S901. The cloud gateway receives a negotiation message sent by the client through the first interface of the broadband access server, the second interface of the core router, and the third interface of the cloud gateway.
[0083] S902: When the negotiation message is a protocol message, the cloud gateway searches a preset hash table for a target tunnel interface index corresponding to the source IP address and source port number of the negotiation message.
[0084] S903. The cloud gateway sends the negotiation message to the fourth interface of the target server through the target logical tunnel.
[0085] S904. The server receives, through the fourth interface, a negotiation message sent by the cloud gateway through the target logical tunnel.
[0086] S905: The server processes the negotiation message.
[0087] S906. The server sends the negotiation message after data processing to the cloud gateway through the target logical tunnel.
[0088] S907. The cloud gateway receives the negotiation message after data processing sent by the target server through the target logical tunnel.
[0089] S908. The cloud gateway sends the negotiation message after data processing to the client through the fifth interface of the core router and the sixth interface of the broadband access server.
[0090] Fig. 9 The specific implementation methods of each step shown have been described in detail in the above embodiments and will not be repeated here for the sake of brevity.
[0091] The data processing method of the embodiment of the present application, when the negotiation message received by the cloud gateway is a protocol message, searches the preset hash table for the target tunnel interface index corresponding to the source IP address and source port number of the negotiation message, and then sends the negotiation message to the fourth interface of the target server through the target logical tunnel corresponding to the target tunnel interface index, so that the target server processes the negotiation message. In this way, when the cloud gateway receives negotiation messages sent by different clients, it can determine the logical tunnels used to transmit different negotiation messages by looking up the table, and then send the negotiation messages sent by different clients to different servers through each logical tunnel for data processing. In this way, the cloud gateway only needs to be responsible for the data forwarding service, and even if the data plane occupies most of the CPU resources, it does not affect the cloud gateway to achieve high concurrent access of the negotiation message. Therefore, through the embodiment of the present application, it can meet the concurrent access requirements of a high level of quantity and solve the problem of limited high concurrent access of the home cloud gateway.
[0092] Based on the data processing method provided in the above embodiment, the present application also provides a specific implementation of a data processing device, which can be applied to a cloud gateway. Please refer to the following embodiments.
[0093] like Fig.10As shown, the data processing device 1000 provided in the embodiment of the present application includes the following modules:
[0094] The first receiving module 1001 is used to receive the negotiation message sent by the client through the first interface of the broadband access server, the second interface of the core router, and the third interface of the cloud gateway;
[0095] A search module 1002 is used to search for a target tunnel interface index corresponding to a source IP address and a source port number of the negotiation message from a preset hash table when the negotiation message is a protocol message, wherein the preset hash table is constructed by the controller according to a correspondence between the source IP address and the source port number of the negotiation message and the tunnel interface index;
[0096] The first sending module 1003 is used to send the negotiation message to the fourth interface of the target server through the target logical tunnel, where the target logical tunnel is a logical tunnel corresponding to the target tunnel interface index, and the target server is used to perform data processing on the negotiation message;
[0097] The second receiving module 1004 is used to receive the negotiation message after data processing sent by the target server through the target logical tunnel;
[0098] The second sending module 1005 is used to send the negotiation message after data processing to the client through the fifth interface of the core router and the sixth interface of the broadband access server.
[0099] The data processing device of the embodiment of the present application, when the negotiation message received by the cloud gateway is a protocol message, searches the preset hash table for the target tunnel interface index corresponding to the source IP address and source port number of the negotiation message, and then sends the negotiation message to the fourth interface of the target server through the target logical tunnel corresponding to the target tunnel interface index, so that the target server processes the negotiation message. In this way, when the cloud gateway receives negotiation messages sent by different clients, it can determine the logical tunnels used to transmit different negotiation messages by looking up the table, and then send the negotiation messages sent by different clients to different servers through each logical tunnel for data processing. In this way, the cloud gateway only needs to be responsible for the data forwarding service, and even if the data plane occupies most of the CPU resources, it does not affect the cloud gateway to achieve high concurrent access of the negotiation message. Therefore, through the embodiment of the present application, it is possible to meet the concurrent access requirements of a high level of quantity and solve the problem of limited high concurrent access of the home cloud gateway.
[0100] In some embodiments, the first IP address and the first MAC address of the fourth interface are configured by the controller according to the second IP address and the second MAC address of the third interface, and the first IP address is the same as the second IP address, and the first MAC address is the same as the second MAC address.
[0101] In some embodiments, the static address resolution protocol table of the fourth interface is configured by the controller according to the third IP address of the sixth interface and the third MAC address of the fifth interface.
[0102] In some embodiments, the above-mentioned data processing device 1000 may also include: an operation module, which is used to perform a hash operation on the source IP address and source port number of the negotiation message when there is no target tunnel interface index corresponding to the source IP address and source port number of the negotiation message in the preset hash table, so as to obtain a first tunnel interface index corresponding to the source IP address and source port number of the negotiation message; add the correspondence between the source IP address and source port number of the negotiation message and the first tunnel interface index to the preset hash table; and determine the default tunnel interface index corresponding to the source IP address and source port number of the negotiation message as the target tunnel interface index.
[0103] Fig.10 Each module in the device shown has the function of realizing Figure 3 The functions of each step in the process can achieve the corresponding technical effects, which will not be described in detail here for the sake of brevity.
[0104] Based on the data processing method provided in the above embodiment, the present application also provides another specific implementation of a data processing device, which can be applied to a server. Please refer to the following embodiment.
[0105] like Fig.11 As shown, the data processing device 1100 provided in the embodiment of the present application includes the following modules:
[0106] The third receiving module 1101 is used to receive a negotiation message sent by the cloud gateway through the target logical tunnel through the fourth interface;
[0107] The data processing module 1102 is used to process the negotiation message;
[0108] The third sending module 1103 is used to send the negotiation message after data processing to the cloud gateway through the target logical tunnel.
[0109] The data processing device of the embodiment of the present application, when the negotiation message received by the cloud gateway is a protocol message, searches the preset hash table for the target tunnel interface index corresponding to the source IP address and source port number of the negotiation message, and then sends the negotiation message to the fourth interface of the target server through the target logical tunnel corresponding to the target tunnel interface index, so that the target server processes the negotiation message. In this way, when the cloud gateway receives negotiation messages sent by different clients, it can determine the logical tunnels used to transmit different negotiation messages by looking up the table, and then send the negotiation messages sent by different clients to different servers through each logical tunnel for data processing. In this way, the cloud gateway only needs to be responsible for the data forwarding service, and even if the data plane occupies most of the CPU resources, it does not affect the cloud gateway to achieve high concurrent access of the negotiation message. Therefore, through the embodiment of the present application, it is possible to meet the concurrent access requirements of a high level of quantity and solve the problem of limited high concurrent access of the home cloud gateway.
[0110] In some embodiments, the above-mentioned data processing device 1100 may also include: a fourth sending module, which is used to send the first session information to the cloud gateway through the controller after obtaining the message that the negotiation between the client and the cloud gateway is successful, so that the cloud gateway creates an interface for data forwarding according to the first session information; after obtaining the message that the negotiation between the client and the cloud gateway is disconnected, send the second session information to the cloud gateway through the controller, so that the cloud gateway deletes the interface for data forwarding according to the second session information.
[0111] Fig.11 Each module in the device shown has the function of realizing Figure 7 The functions of each step in the process can achieve the corresponding technical effects, which will not be described in detail here for the sake of brevity.
[0112] Based on the data processing method provided in the above embodiment, the present application also provides a specific implementation of the electronic device. Please refer to the following embodiment.
[0113] Fig.12 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application.
[0114] The electronic device may include a processor 1201 and a memory 1202 storing computer program instructions.
[0115] Specifically, the processor 1201 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0116] The memory 1202 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 1202 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In one example, the memory 1202 may include a removable or non-removable (or fixed) medium, or the memory 1202 is a non-volatile solid-state memory. The memory 1202 may be inside or outside the integrated gateway disaster recovery device.
[0117] In one example, the memory 1202 may be a read-only memory (ROM). In one example, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM), or a flash memory, or a combination of two or more of these.
[0118] The memory 1202 may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Thus, typically, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present application.
[0119] The processor 1201 reads and executes the computer program instructions stored in the memory 1202 to implement Figure 3 The method / steps S301 to S305 in the embodiment shown in the figure are achieved. Figure 3 The examples shown in the figure perform the corresponding technical effects achieved by the methods / steps thereof, and / or realize Figure 7 The method / steps S701 to S703 in the embodiment shown in the figure are achieved Figure 7 The corresponding technical effects achieved by executing the methods / steps in the example shown are not repeated here for the sake of brevity.
[0120] In one example, the electronic device may further include a communication interface 1203 and a bus 1210. Fig.12 As shown, the processor 1201, the memory 1202, and the communication interface 1203 are connected via a bus 1210 and communicate with each other.
[0121] The communication interface 1203 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0122] Bus 1210 includes hardware, software or both, and the parts of electronic equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (Accelerated Graphics Port, AGP) or other graphics bus, enhanced industry standard architecture (Extended Industry Standard Architecture, EISA) bus, front side bus (Front Side Bus, FSB), Hyper Transport (Hyper Transport, HT) interconnection, industry standard architecture (Industry Standard Architecture, ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 1210 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the application considers any suitable bus or interconnection.
[0123] In addition, in combination with the data processing method in the above embodiment, the embodiment of the present application may provide a computer-readable storage medium for implementation. The computer-readable storage medium stores computer program instructions; when the computer program instructions are executed by the processor, any one of the data processing methods in the above embodiment is implemented. Examples of computer-readable storage media include non-transitory computer-readable storage media, such as electronic circuits, semiconductor memory devices, ROM, random access memory, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, and hard disks.
[0124] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0125] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), appropriate firmware, plug-in, function card, etc. When implemented in software, the elements of the present application are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or communication link by a data signal carried in a carrier. "Machine-readable medium" may include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (Radio Frequency, RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0126] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0127] The above reference is according to the method of the embodiment of the present application, the flow chart of the device (system) and the computer program product and / or the block diagram described various aspects of the present application.It should be understood that each square box in the flow chart and / or the block diagram and the combination of each square box in the flow chart and / or the block diagram can be realized by computer program instructions.These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the realization of the function / action specified in one or more square boxes of the flow chart and / or the block diagram.Such a processor can be but is not limited to a general-purpose processor, a special-purpose processor, a special application processor or a field programmable logic circuit.It can also be understood that each square box in the block diagram and / or the flow chart and the combination of the square boxes in the block diagram and / or the flow chart can also be realized by the dedicated hardware that performs the specified function or action, or can be realized by the combination of dedicated hardware and computer instructions.
[0128] The above is only a specific implementation of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
Claims
1. A data processing method, characterized in that: Applied to a cloud gateway, the method includes: Receiving a negotiation message sent by the client through the first interface of the broadband access server, the second interface of the core router, and the third interface of the cloud gateway; In the case where the negotiation message is a protocol message, searching a preset hash table for a target tunnel interface index corresponding to a source IP address and a source port number of the negotiation message, wherein the preset hash table is constructed by a controller according to a correspondence between a source IP address and a source port number of the negotiation message and a tunnel interface index; Sending the negotiation message to a fourth interface of a target server through a target logical tunnel, where the target logical tunnel is a logical tunnel corresponding to the target tunnel interface index, and the target server is used to perform data processing on the negotiation message; Receiving a negotiation message after data processing sent by the target server through the target logical tunnel; The negotiation message after the data processing is sent to the client through the fifth interface of the core router and the sixth interface of the broadband access server.
2. The method according to claim 1, characterized in that: The first IP address and the first MAC address of the fourth interface are configured by the controller according to the second IP address and the second MAC address of the third interface, the first IP address is the same as the second IP address, and the first MAC address is the same as the second MAC address.
3. The method according to claim 1, characterized in that The static address resolution protocol table of the fourth interface is configured by the controller according to the third IP address of the sixth interface and the third MAC address of the fifth interface.
4. The method according to claim 1, characterized in that: After searching the preset hash table for the target tunnel interface index corresponding to the source IP address and the source port number of the negotiation message, the method further includes: If there is no target tunnel interface index corresponding to the source IP address and source port number of the negotiation message in the preset hash table, a hash operation is performed on the source IP address and source port number of the negotiation message to obtain a first tunnel interface index corresponding to the source IP address and source port number of the negotiation message; Adding the correspondence between the source IP address and source port number of the negotiation message and the first tunnel interface index to the preset hash table; The default tunnel interface index corresponding to the source IP address and source port number of the negotiation message is determined as the target tunnel interface index.
5. A data processing method, characterized in that: Applied to a server, the method comprises: receiving, through the fourth interface, a negotiation message sent by the cloud gateway through the target logical tunnel; Performing data processing on the negotiation message; The negotiation message after data processing is sent to the cloud gateway through the target logical tunnel.
6. The method according to claim 5, characterized in that After sending the negotiation message after data processing to the cloud gateway through the target logical tunnel, the method further includes: After obtaining a message that the client and the cloud gateway have successfully negotiated, sending the first session information to the cloud gateway through the controller, so that the cloud gateway creates an interface for data forwarding according to the first session information; After obtaining the message that the client and the cloud gateway have negotiated to disconnect, the second session information is sent to the cloud gateway through the controller, so that the cloud gateway deletes the interface used for data forwarding according to the second session information.
7. A data processing device, characterized in that: Applied to a cloud gateway, the device comprises: A first receiving module, used to receive a negotiation message sent by a client through a first interface of a broadband access server, a second interface of a core router, and a third interface of the cloud gateway; A search module, used for searching a target tunnel interface index corresponding to a source IP address and a source port number of the negotiation message from a preset hash table when the negotiation message is a protocol message, wherein the preset hash table is constructed by the controller according to a correspondence between the source IP address and the source port number of the negotiation message and the tunnel interface index; a first sending module, configured to send the negotiation message to a fourth interface of a target server through a target logical tunnel, wherein the target logical tunnel is a logical tunnel corresponding to the target tunnel interface index, and the target server is configured to perform data processing on the negotiation message; A second receiving module, configured to receive a negotiation message after data processing sent by the target server through the target logical tunnel; The second sending module is used to send the negotiation message after the data processing to the client through the fifth interface of the core router and the sixth interface of the broadband access server.
8. A data processing device, characterized in that: Applied to a server, the device comprises: A third receiving module, used to receive, through a fourth interface, a negotiation message sent by the cloud gateway through a target logical tunnel; A data processing module, used for performing data processing on the negotiation message; The third sending module is used to send the negotiation message after data processing to the cloud gateway through the target logical tunnel.
9. An electronic device, characterized in that: The electronic device comprises: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the steps of the data processing method according to any one of claims 1 to 6 when executed by the processor.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the data processing method according to any one of claims 1 to 6 are implemented.
Citation Information
Cited By
Message sending method and electronic equipment
CN121547412A
