Host network communication data transmission method and device
By establishing a preset data transmission channel between the cloud node and the edge node, the problem of network blockage between the host network pods in the cloud node and the host network pods in the edge node is solved, and stable data transmission is achieved.
Patent Information
- Application Number
- CN202211680578.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-27
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2042-12-27
AI Technical Summary
In the edge computing scenario, the host network pods in the cloud nodes have a problem of network disconnection between the host network pods in the edge nodes.
By pre-establishing a preset data transmission channel, the first communication component in the cloud node sends the first communication data to the gateway node, which determines the second communication data based on the first communication data, and transmits the second communication data to the second communication component in the edge node through the preset data transmission channel.
The transmission between the host network pod in the cloud node and the host network pod in the edge node is realized, which solves the problem of network blockage, and ensures the stability of data transmission through specially set preset data transmission channels.
Smart Images

Figure CN115955502B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network communication technology, and in particular to a host network communication data transmission method and device. Background Art
[0002] In order to improve the processing rate of the service, the application service is deployed in the pod of the edge node where the user is located through the container orchestration system (Kubernetes, k8s). However, in the edge computing scenario, the native k8s system does not support cross-domain communication, resulting in network unavailability on the cloud-edge data plane.
[0003] In related technologies, in order to solve the problem of cloud-edge data plane network disconnection in edge computing scenarios, Fabedge was proposed, which is an open source secure edge network solution based on k8s. It supports cloud-edge and edge-edge collaboration, and solves complex configuration management, network isolation, lack of topology-aware routing and other problems. By selecting a node with a public network address in the cloud as the cloud gateway and combining IPSec security encryption technology to encrypt and forward cloud-edge communication traffic, the problem of cloud-edge network disconnection in edge computing scenarios is solved. However, Fabedge only solves the container network communication of the cloud-edge K8S cluster. However, if Figure 1 As shown, the host network pod in the cloud node and the host network pod in the edge node in the above method still have the problem of host network disconnection. Summary of the invention
[0004] The present application provides a host network communication data transmission method and device to solve the problem of host network disconnection between the host network pod in the cloud node and the host network pod in the edge node in the edge scenario.
[0005] A first aspect of the present application provides a host network communication data transmission method, in which a preset data transmission channel is pre-established, and the preset data transmission channel is used to exchange host network communication data between a cloud node and an edge node. The method includes:
[0006] Obtaining first communication data of a first communication component in the cloud node, wherein the first communication component is used to implement transmission of host network communication data in the cloud node;
[0007] Determine whether the first communication component and the second communication component in the edge node meet the preset communication condition;
[0008] When the first communication component and the second communication component meet preset communication conditions, the first communication data is sent to a gateway node; wherein the gateway node is used to determine second communication data based on the first communication data, and send the second communication data to the second communication component through the preset data transmission channel.
[0009] A second aspect of the present application provides a host network communication data transmission device, comprising:
[0010] A first processing module, used to pre-establish a preset data transmission channel, wherein the preset data transmission channel is used to exchange host network communication data between the cloud node and the edge node;
[0011] A second processing module, used to obtain first communication data of a first communication component in a cloud node, wherein the first communication component is used to realize the transmission of host network communication data in the cloud node;
[0012] A third processing module, used to determine whether the first communication component and the second communication component in the edge node meet the preset communication condition;
[0013] A fourth processing module is used to send the first communication data to a gateway node when the first communication component and the second communication component meet preset communication conditions; wherein the gateway node is used to determine the second communication data based on the first communication data, and send the second communication data to the second communication component through a preset data transmission channel.
[0014] A third aspect of the present application provides an electronic device, comprising: a processor; and a memory, on which executable code is stored, and when the executable code is executed by the processor, the processor executes the host network communication data transmission method as described above.
[0015] A fourth aspect of the present application provides a non-temporary machine-readable storage medium having executable code stored thereon. When the executable code is executed by a processor of an electronic device, the processor executes the host network communication data transmission method as described above.
[0016] The technical solution provided by this application may have the following beneficial effects:
[0017] The technical solution of the present application pre-establishes a preset data transmission channel, which is used to interact with the host network communication data between the cloud node and the edge node. The method includes: obtaining the first communication data of the first communication component in the cloud node, and the first communication component is used to realize the transmission of the host network communication data in the cloud node; determining whether the first communication component and the second communication component in the edge node meet the preset communication conditions; when the first communication component and the second communication component meet the preset communication conditions, sending the first communication data to the gateway node; wherein the gateway node is used to determine the second communication data based on the first communication data, and send the second communication data to the second communication component through the preset data transmission channel. In this way, the first communication component in the cloud node can first send the first communication data to the gateway node, and then the gateway node sends the first communication data to the second communication component in the edge node through the preset data transmission channel, so as to realize the transmission between the first communication component in the cloud node and the second communication component in the edge node, which solves the problem of network disconnection between the host network pod in the cloud node and the host network pod in the edge node in the related technology.
[0018] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The above and other objects, features and advantages of the present application will become more apparent through a more detailed description of exemplary embodiments of the present application in conjunction with the accompanying drawings, wherein the same reference numerals generally represent the same components in the exemplary embodiments of the present application.
[0020] Figure 1 It is a schematic diagram of data transmission between cloud gateway nodes and edge nodes shown in the related art;
[0021] Figure 2 It is a flowchart of a host network communication data transmission method shown in an embodiment of the present application;
[0022] Figure 3 This is a schematic diagram of data transmission between a cloud gateway node and an edge node shown in an embodiment of the present application;
[0023] Figure 4 It is a flowchart of another host network communication data transmission method shown in an embodiment of the present application;
[0024] Figure 5 It is a schematic diagram of a process for determining whether a first communication component and a second communication component meet a preset communication condition according to an embodiment of the present application;
[0025] Figure 6This is a schematic diagram of data transmission between a cloud gateway node and an edge node shown in an embodiment of the present application;
[0026] Figure 7 It is a structural schematic diagram of a host network communication data transmission device shown in an embodiment of the present application;
[0027] Figure 8 It is a schematic diagram of the structure of an electronic device shown in an embodiment of the present application. DETAILED DESCRIPTION
[0028] The preferred embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the preferred embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to make the present application more thorough and complete, and to fully convey the scope of the present application to those skilled in the art.
[0029] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0030] It should be understood that although the terms "first", "second", "third", etc. may be used in this application to describe various information, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.
[0031] In related technologies, cloud nodes are the center of cloud computing, and edge nodes are the edge of cloud computing; cloud nodes can control edge nodes; Figure 1As shown in the figure, the k8s cluster can be divided into the cloud and the edge. The upper side of the figure is the cloud, and the lower side of the figure is the edge. The cloud can include multiple cloud nodes, and the edge can include multiple edge nodes. Both the cloud node and the edge node include a host network pod and a container network pod. The container network pod can correspond to the container network interface (Container Network Interface, CNI). CNI focuses on the network connection of the container and allocates network resources to the container. However, since both the cloud node and the edge node are in the intranet, the network of the host network pod of the cloud node and the host network pod of the edge node cannot be connected.
[0032] The technical solution of the embodiments of the present application is described in detail below with reference to the accompanying drawings.
[0033] Figure 2 The flowchart of the host network communication data transmission method shown in the embodiment of the present application is as follows. Figure 2 As shown, the present application provides a host network communication data transmission method, which pre-establishes a preset data transmission channel, and the preset data transmission channel is used to exchange host network communication data between a cloud node and an edge node. The method specifically includes the following steps:
[0034] S201: Obtain first communication data of a first communication component in a cloud node, where the first communication component is used to implement transmission of host network communication data in the cloud node.
[0035] In normal business processes, applications deployed on pods in k8s are called services. Each business can correspond to one or more services, that is, each business can be executed by one or more pods. Since services are deployed on the host network pods of edge nodes in k8s, when the host network pods of edge nodes execute a certain business, they need to obtain the data required for this business from the cloud nodes. At this time, the host network pods of edge nodes need to interact with the host network pods of cloud nodes for host network communication data.
[0036] In a specific feasible implementation, when it is determined that the second communication component needs to perform a certain service, the service and the data required for the service can be determined as the first communication data; or, after receiving a data acquisition request for a certain service sent by the second communication component, the first communication component can process the data acquisition request so that the first communication component obtains the data required for the service based on the data acquisition request, and determines the acquired data as the first communication data. It should be noted that the first communication data can be the host network communication data actively sent by the first communication component to the second communication component, or it can be the host network communication data passively sent to the second communication component, and the embodiment of the present application only uses the above two methods as examples to illustrate the steps of determining the first communication data, and the embodiment of the present application does not limit the method of determining the first communication data.
[0037] S202: Determine whether the first communication component and the second communication component in the edge node meet a preset communication condition.
[0038] In an embodiment of the present application, the preset communication conditions are used to determine whether the first communication component and the second communication component can interact with host network communication data through a preset data transmission channel; the preset communication conditions can be set in advance, and the preset communication conditions can be set based on the network address and network port of the first preset component and the network address and network port of the second preset component, and the preset communication conditions can also be set based on other data, which is not limited by the embodiment of the present application.
[0039] S203: When the first communication component and the second communication component meet the preset communication conditions, the first communication data is sent to the gateway node.
[0040] The gateway node is used to determine the second communication data based on the first communication data, and send the second communication data to the second communication component in the edge node through a preset data transmission channel.
[0041] In an embodiment of the present application, a method for establishing a preset data transmission channel includes: obtaining first network information provided by a user, and sending the first network information to the edge node through a K8S cluster channel; after the edge node receives the first network information, a preset data transmission channel is established between the edge node and the cloud node according to the first network information.
[0042] It should be noted that the preset data transmission channel is used for the interaction of host network communication data between the cloud node and the edge node, that is, the host network communication data interaction between the first communication component in the cloud node and the second communication component in the edge node can be realized through the preset data transmission channel; the preset data transmission channel is the data transmission channel between the gateway node and the edge node, and this preset data transmission channel is used to transmit the host network communication data between the first communication component and the second communication component that meets the preset communication conditions.
[0043] It should be noted that the preset data transmission channel is different from the data transmission channel for cloud nodes to send control data to edge nodes in the prior art, and is also different from the data transmission channel for data transmission between cloud nodes; in a specific feasible implementation, the preset data transmission channel can be an Internet Security Protocol (Internet Protocol Security, IPSEC) tunnel. The gateway node is a node selected from multiple cloud nodes included in the cloud, and is used to forward the host network communication data transmitted between the first communication component and the second communication component to realize the host network communication data interaction between the first communication component and the second communication component.
[0044] In the embodiment of the present application, when it is determined that the first communication component and the second communication component meet the preset communication conditions, the first communication data is sent to the gateway node, that is, not all data can be exchanged through the gateway node and the preset data transmission channel for host network communication data. Only when the first communication component and the second communication component meet the preset communication conditions, the host network communication data between the first communication component and the second communication component will be exchanged through the gateway node and the preset data transmission channel; wherein, it can be Figure 3 The routing rules in the communication module determine that the first communication component and the second communication component meet the preset communication condition.
[0045] In a specific feasible implementation, since the cloud node and the gateway node are in the same network, the cloud node and the gateway node can use the existing cloud intranet data transmission channel to interact with the first communication data; in this case, the first communication component of the cloud node can send the first communication data to the gateway node through the cloud intranet, and the gateway node sends the first communication data to the second communication component of the edge node through a specially set preset data transmission channel. At this time, the first communication component of the cloud node and the second communication component of the edge node interact with the host network communication data through the cloud intranet between the cloud node and the gateway node and the preset data transmission channel specially set between the gateway node and the edge node for transmitting communication data across networks; wherein the data transmission channel of the cloud intranet can be a virtual eXtensible Local Area Network (VXLAN) tunnel. Figure 3 As shown, the cloud node and the gateway node are in the same network, and the first communication data can be sent to the gateway node through the VXLAN tunnel. The gateway node and the edge node are in different networks, and the first communication data can be sent to the second communication component of the edge node through a specially set IPSEC tunnel to realize the interaction of host network communication data between the first communication component of the cloud node and the second communication component of the edge node.
[0046] Although the cloud nodes in K8s can send configuration data to the edge nodes, this data transmission channel realizes data interaction between the cloud nodes and the edge nodes, that is, data interaction between the two nodes, and cannot realize data interaction between the host network pod in the cloud node and the host network pod in the edge node. In addition, the cloud nodes and the edge nodes are cross-network communications. Cross-network communications are more likely to cause memory data loss due to node abnormalities or restarts, and are also prone to network disconnection, resulting in the inability to restore business components. Therefore, when the above problems occur, the edge nodes cannot obtain data from the server where the cloud nodes are located, resulting in the inability to operate the business deployed on the edge normally. In the embodiment of the present application, when the host network pod in the cloud node and the host network pod in the edge node meet the preset communication conditions, the host network pod in the cloud node can first send the first communication data to the gateway node, and then the gateway node sends the first communication data to the host network pod in the edge node through a specially set preset data transmission channel, thereby realizing the transmission of host network communication data between the host network pod in the cloud node and the host network pod in the edge node. Since the host network communication data is transmitted through the specially set preset data transmission channel, even if an abnormality occurs in the network between the cloud node and the edge node, it will not affect the transmission of the host network communication data.
[0047] In the host network communication data transmission method provided in the embodiment of the present application, the first communication component in the cloud node can first send the first communication data to the gateway node, and then the gateway node sends the first communication data to the second communication component in the edge node through a specially set preset data transmission channel, so as to realize the transmission of host network communication data between the first communication component in the cloud node and the second communication component in the edge node, thereby solving the problem of network disconnection between the host network pod in the cloud node and the host network pod in the edge node in the related technology.
[0048] Based on the above embodiments, the present application provides a host network communication data transmission method, referring to Figure 4 As shown, the method comprises the following steps:
[0049] S401: The cloud node determines initial communication data of a first communication component in the cloud node.
[0050] In an embodiment of the present application, the communication component of the cloud node and the communication component of the edge node can interact with host network communication data, that is, the communication component of the cloud node can send host network communication data to the communication component of the edge node, and the communication component of the edge node can also send host network communication data to the communication component of the cloud node. The embodiment of the present application takes the example of the communication component of the cloud node sending the first communication data to the communication component of the edge node. It should be understood that the process of the communication component of the edge node sending host network communication data to the communication component of the cloud node is similar to the process of the communication component of the cloud node sending the first communication data to the communication component of the edge node, and the embodiment of the present application will not repeat it.
[0051] In the embodiment of the present application, the initial communication data is the data required for the current business, that is, the communication data between the gateway node host network and the edge node host network. In a specific feasible implementation, the initial communication data of the first communication component can be obtained from the database corresponding to the cloud node according to the business identifier of the current business.
[0052] S402: The cloud node performs a first encapsulation on the first target address in the initial communication data based on the network information corresponding to the gateway node to obtain first communication data.
[0053] In an embodiment of the present application, the network information may include a network address and a network port. The network information corresponding to the gateway node is used to determine the gateway node, and the network information corresponding to the gateway node may include the protocol (Internet Protocol, IP) address of the interconnection between the networks of the gateway node. The first communication data is the business data after the initial communication data is encapsulated based on the network information corresponding to the gateway node, and only the public network address is exposed to the outside, thereby ensuring the security of the business data. The initial communication data is [gateway node host IP, edge node host IP], and the first target address is the receiving address. Since the first communication data of the first communication component in the cloud node needs to pass through the gateway node to be transmitted to the second communication component of the edge node, it is necessary to encapsulate the receiving address in the initial business data based on the network information corresponding to the gateway node to obtain the first communication data, so as to send the first communication data to the gateway node.
[0054] In a specific feasible implementation, an address conversion rule can be used to encapsulate the first target address in the initial communication data based on the network information corresponding to the gateway node to obtain the first communication data; wherein the address conversion rule can be a Network Address Translation (NAT) rule. Specifically, the NAT rule can be used to encapsulate the sending address and receiving address in the initial communication data based on the host IP of the cloud node and the host IP of the gateway node to obtain the first communication data, that is, the sending address is the host IP of the cloud node at this time, and the receiving address is the host IP of the gateway node at this time, that is, the sender of the first communication data is the cloud node at this time, and the receiver is the gateway node, so as to send the first communication data of the first communication component to the gateway node. It should be noted that the cloud node sets the next-hop gateway to the network information of the gateway node through the NAT rule to transmit the first communication data to the gateway node, and then transmits it to the second communication component of the edge node through the gateway node.
[0055] It should be noted that the initial communication data may include network information of the first communication component and network information of the second communication component. The first target address in the initial communication data is first encapsulated based on the network information corresponding to the gateway node. The first communication data can be sent to the gateway node, and the gateway node can be informed that the first communication data is to be sent to the second communication component of the edge node. The security of business data, network information of the first communication component and network information of the second communication component can also be ensured.
[0056] S403: The cloud node determines first network information corresponding to the first communication component and second network information corresponding to the second communication component.
[0057] The first network information is used to determine the first communication component, and the second network information is used to determine the second communication component.
[0058] In an embodiment of the present application, the first communication component is the sender and the second communication component is the receiver. The first network information is the network information of the first communication component, that is, the network information of the sender, that is, the source address; the first network information is used to determine the first communication component, that is, the first communication component can be found through the first network information; the first network information may include a first network address and a first network port; the first network address may be the IP address of the first communication component, and the first network port may be the host network pod segment of the first communication component. The second network information is the network information of the second communication component, that is, the network information of the receiver, that is, the destination address; the second network information is used to determine the second service component, that is, the second communication component can be found through the second network information; the second network information may include a second network address and a second network port; the second network address may be the IP address of the second communication component, and the second network port may be the host network pod segment of the second communication component. In a specific feasible implementation, the network information of the first communication component (i.e., the first network information) and the network information of the second communication component (i.e., the second network information) may be directly determined; or, the first network information and the second network information may be determined from the initial communication data.
[0059] S404: The cloud node determines whether the first communication component and the second communication component meet preset communication conditions based on the first network information and the second network information.
[0060] In an embodiment of the present application, it is possible to determine whether the first communication component and the second communication component meet the preset communication conditions based on the network information of the first communication component and the network information of the second communication component, that is, it is possible to determine whether the first communication component and the second communication component can interact with the host network communication data through the gateway node and the preset data transmission channel based on the network information of the first communication component and the network information of the second communication component.
[0061] Among them, S404 can be implemented by the following steps:
[0062] S404a: The cloud node matches the first network address and the second network address with the first routing table.
[0063] In an embodiment of the present application, the first routing table is used to determine whether the network address of the first communication component can interact with the network address of the second communication component for host network communication data. The first network address and the second network address are matched with the first routing table, that is, the source address and the destination address are matched with the first routing table. In a specific feasible implementation method, the network address of the communication component of the cloud node that can interact with the host network communication data and the network address of the communication component of the edge node can be stored in the first routing table in advance, so that after determining the first network address and the second network address, the first network address and the second network address can be matched with the first routing table to determine whether the first communication component and the second communication component can interact with each other for host network communication data.
[0064] S404b: When the match with the first routing table is successful, the cloud node matches the first network port and the second network port with the second routing table.
[0065] The first network information includes a first network address and a first network port, and the second network information includes a second network address and a second network port.
[0066] In the embodiment of the present application, the second routing table is used to perform a second filtering based on the network port; since the source address and the destination address when the cloud node sends the configuration data to the edge node may be the same as the first network address and the second network address, it is not desirable for the configuration data to go through the gateway node and the preset data transmission channel at this time, so it is necessary to perform a second filtering based on the network port. A network address can correspond to multiple network ports, but the network port can more accurately locate the communication component, so performing a second filtering based on the network port can more accurately determine the communication component that can perform host network communication data transmission through the gateway node and the preset data transmission channel.
[0067] S404c: When the match with the second routing table is successful, the cloud node determines that the first communication component and the second communication component meet the preset communication condition.
[0068] In the embodiment of the present application, the match with the second routing table is successful, indicating that the match with the first routing table and the second routing table has been passed at this time. In this case, it is determined that the first communication component and the second communication component meet the target communication conditions.
[0069] In the embodiment of the present application, the first routing table and the second routing table can be set Figure 3In the routing rules shown. Specifically, after determining the first communication data of the first communication component, the first routing table can be used for judgment, and the destination address corresponding to the first communication data can be matched with the first routing table. If the match is successful, the IPSEC module can be entered, that is, the second routing table is continued to be matched, and the source address and destination address corresponding to the first communication data can be matched with the second routing table. After the match is successful, the first network port of the sender and the second network port of the receiver corresponding to the first communication data can be matched with the second routing table. After the match is successful, it is determined that the first communication component and the second communication component meet the preset communication conditions; if any of the above does not match, it means that the data cannot be transmitted through the gateway node and the preset data transmission channel for host network communication data transmission.
[0070] 405: When it is determined that the first communication component and the second communication component meet the preset communication condition, the cloud node sends the first communication data to the gateway node.
[0071] Among them, the gateway node is used to determine the second communication data based on the first communication data, and send the second communication data to the second communication component in the edge node through a preset data transmission channel; the preset data transmission channel is used to realize the host network communication data interaction between the first communication component and the second communication component.
[0072] In the embodiment of the present application, when it is determined that the first communication component and the second communication component meet the preset communication conditions, the encapsulated first communication data is sent, that is, at this time, the first communication data has encapsulated the initial communication data according to the IP address of the gateway node.
[0073] 406: The gateway node receives first communication data of the first communication component in the cloud node sent by the cloud node.
[0074] In the embodiment of the present application, what is received at this time is the first communication data after the destination address of the initial communication data is encapsulated according to the IP address of the gateway node.
[0075] 407: The gateway node decapsulates the first communication data to obtain initial communication data of the first communication component in the cloud node.
[0076] In the embodiment of the present application, since the first communication data is the data obtained by encapsulating the destination address of the initial communication data according to the IP address of the gateway node, it is necessary to decapsulate the first communication data to obtain the initial communication data and expose the original source address and destination address. In a specific feasible implementation, the Xfrm rule can be used to decapsulate the first communication data to obtain the initial communication data.
[0077] 408: The gateway node performs a second encapsulation on the second target address in the initial communication data based on the network information of the gateway node to obtain second communication data.
[0078] In an embodiment of the present application, the second communication data is data after the second target address in the initial communication data is second-encapsulated based on the network information of the gateway node. The second target address is the sending address. The second encapsulation of the sending address in the initial communication data based on the network information of the gateway node is to modify the sending address to the network information of the gateway node when the gateway node sends service data to the second communication component of the edge node, so that it is easy to know where the communication data comes from, which nodes it passes through in the middle, and where it is to be transmitted.
[0079] In a specific feasible implementation, an address conversion rule can be adopted to perform a second encapsulation on the second target address in the initial communication data based on the network information corresponding to the gateway node to obtain the second communication data. Specifically, a NAT rule can be adopted to encapsulate the sending address and receiving address in the initial communication data based on the IP address of the gateway node and the IP address of the edge node to obtain the second communication data, that is, the sending address is the host IP of the gateway node at this time, and the receiving address is the host IP of the edge node at this time, that is, the sender of the second communication data is the gateway node at this time, and the receiver is the second communication component of the edge node, so as to send the second communication data to the second communication component of the edge node through the gateway node.
[0080] In other embodiments of the present application, Xfrm rule matching can be performed through the IPSEC module of the gateway node, and after a successful match, it is encapsulated into the second communication data by the IPSEC tunnel.
[0081] 409: The gateway node sends the second communication data to the second communication component in the edge node through a preset data transmission channel.
[0082] Among them, the preset data transmission channel is used for the interaction of host network communication data between cloud nodes and edge nodes.
[0083] In an embodiment of the present application, what is received at this time is the second communication data that is second-encapsulated based on the network information corresponding to the gateway node for the second target address in the initial communication data; after receiving the second communication data, Xfrm rule matching can be performed through the IPSEC module, and after a successful match, the second communication data is decapsulated to expose the original source address and destination address [gateway node host IP, edge node host IP]; when the second communication component of the edge node replies to the data, it can send the reply data to the first communication component of the cloud node along the original path.
[0084] In a specific feasible implementation method, the intranet IP and pod network segments of all nodes in the cloud can be added to the IPSEC module of the gateway node for encapsulation configuration, and the intranet IP and pod network segments of all nodes in the edge can be added to the IPSEC module of the gateway node for encapsulation configuration. In this way, before sending the second communication data, the gateway node can also match the original source address and destination address according to the IPSEC module. After the match is successful, the second communication data is sent to the second communication component of the edge node through the preset data transmission channel to ensure the security of the business data.
[0085] It should be noted that when the first communication component of the cloud node sends the first communication data to the gateway node, the receiving address of the initial communication data is first encapsulated based on the network information of the gateway node. When the gateway node sends the second communication data to the second communication component of the edge node, the sending address of the initial communication data is secondly encapsulated based on the network information of the gateway node. This can realize cloud-edge network intercommunication and symmetry of the packet sending and receiving paths, which is convenient for operation and maintenance personnel to study and analyze the transmission of communication data.
[0086]
[0087] In an embodiment of the present application, the rule configuration of the cloud node, gateway node and edge node can be as shown in the table above: Dst is the destination address, Src is the source address, and Gw is the gateway node; through the routing rules of the cloud node, it can be known that the destination address is the edge node (edge_node_ip), the next-hop gateway is the gateway node, and the communication data is sent from the flannel.1 network port of the gateway node. When it is determined that the first communication component and the second communication component meet the preset communication conditions, it is necessary to encapsulate the communication data through the address masquerade (MASQUERADE, MASQ) rule of the NAT rule to protect the security of the business data; the Xfrm rule of the gateway node is to decapsulate the received communication data to expose the source address and destination address before encapsulation; the gateway node uses the MASQ rule to modify the source address of the decapsulated communication data, and then sends the modified communication data to the second communication component of the edge node.
[0088] like Figure 6As shown, when the first communication component of the cloud node sends the initial communication data to the second communication component of the edge node, it can first match the routing rules, send the initial communication data to the next-hop gateway node flannel.1 through the flannel.1 network port, then perform source address conversion, encapsulate through flannel to obtain the first communication data, and send the first communication data to the gateway node through the Vxlan tunnel; after the gateway node receives the first communication data, it decapsulates through flannel to obtain the initial communication data, and then performs routing forwarding. The initial communication data passes through the IPsec module, and after successfully matching the Xfrm rule, the initial communication data is encapsulated by the IPSEC tunnel to obtain the second communication data, and then forwarded to the edge node; after the edge node receives the second communication data, it passes through the IPsec module, and after successfully matching the Xfrm rule, the second communication data is decapsulated to expose the original source address, destination address and initial communication data; when the second communication component of the edge node replies to data, it can use the above-mentioned original path to send the reply data to the first communication component of the cloud node.
[0089] The host network communication data transmission method provided in the embodiment of the present application realizes secure cloud-edge interconnection through an IPSEC tunnel, and realizes network diversion by combining routing and NAT technology, thereby achieving the purpose of full interoperability between cloud-edge networks; the rule configuration corresponding to the preset communication conditions can be deployed in a plug-in manner without modifying the system configuration of k8s, thereby achieving zero modification and zero intrusion to k8s, and also achieving the purpose of separation of the control plane and the data plane, that is, only the business data of the data plane will be transmitted through the gateway node and the preset data transmission channel, and the data of the control plane will go through the original one-way channel; the gateway node can also be in master-slave mode, and the control node detects the status of the main gateway node and performs abnormal switching; VIP technology is used to enable non-cluster nodes in the cloud to switch without perception.
[0090] It should be noted that, for the description of the same steps and the same contents in this embodiment as those in other embodiments, reference can be made to the description in other embodiments and will not be repeated here.
[0091] In the host network communication data transmission method provided in the embodiment of the present application, the first communication component in the cloud node can first send the first communication data to the gateway node, and then the gateway node sends the first communication data to the second communication component in the edge node through a preset data transmission channel, so as to realize the transmission between the first communication component in the cloud node and the second communication component in the edge node, thereby solving the problem of network disconnection between the host network pod in the cloud node and the host network pod in the edge node in the related technology.
[0092] Corresponding to the aforementioned application function implementation method embodiment, the present application also provides a data transmission device, an electronic device and corresponding embodiments.
[0093] Figure 7 It is a structural diagram of a host network communication data transmission device shown in an embodiment of the present application.
[0094] See also Figure 7 , the embodiment of the present application provides a host network communication data transmission device, the device specifically comprising:
[0095] The first processing module 701 is used to pre-establish a preset data transmission channel, where the preset data transmission channel is used to exchange host network communication data between the cloud node and the edge node;
[0096] A second processing module 702 is used to obtain first communication data of a first communication component in a cloud node, where the first communication component is used to implement the transmission of host network communication data in the cloud node;
[0097] The third processing module 703 is used to determine whether the first communication component and the second communication component in the edge node meet the preset communication condition;
[0098] The fourth processing module 704 is used to send the first communication data to the gateway node when the first communication component and the second communication component meet the preset communication conditions; wherein the gateway node is used to determine the second communication data based on the first communication data, and send the second communication data to the second communication component through a preset data transmission channel.
[0099] Furthermore, the first processing module 701 is specifically used for:
[0100] Obtain the first network information provided by the user, and send the first network information to the edge node through the K8S cluster channel;
[0101] After receiving the first network information, the edge node establishes the preset data transmission channel between the edge node and the cloud node according to the first network information.
[0102] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated again here.
[0103] Figure 8 It is a schematic diagram of the structure of an electronic device shown in an embodiment of the present application.
[0104] See also Figure 8 , the electronic device 800 includes a memory 810 and a processor 820 .
[0105] The processor 820 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
[0106] The memory 810 may include various types of storage units, such as system memory, read-only memory (ROM), and permanent storage devices. Among them, ROM can store static data or instructions required by the processor 820 or other modules of the computer. The permanent storage device may be a readable and writable storage device. The permanent storage device may be a non-volatile storage device that does not lose the stored instructions and data even after the computer is powered off. In some embodiments, the permanent storage device uses a large-capacity storage device (such as a magnetic or optical disk, flash memory) as a permanent storage device. In some other embodiments, the permanent storage device may be a removable storage device (such as a floppy disk, optical drive). The system memory may be a readable and writable storage device or a volatile readable and writable storage device, such as a dynamic random access memory. The system memory may store some or all instructions and data required by the processor at run time. In addition, the memory 810 may include any combination of computer-readable storage media, including various types of semiconductor memory chips (DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), and disks and / or optical disks may also be used. In some embodiments, the memory 810 may include a readable and / or writable removable storage device, such as a laser disc (CD), a read-only digital versatile disc (e.g., DVD-ROM, double-layer DVD-ROM), a read-only Blu-ray disc, an ultra-density optical disc, a flash memory card (e.g., SD card, mini SD card, Micro-SD card, etc.), a magnetic floppy disk, etc. The computer-readable storage medium does not include carrier waves and transient electronic signals transmitted wirelessly or wired.
[0107] The memory 810 stores executable codes, and when the executable codes are processed by the processor 820 , the processor 820 can execute part or all of the methods described above.
[0108] The scheme of the present application has been described in detail above with reference to the accompanying drawings. In the above embodiments, the description of each embodiment has its own emphasis. For the part that is not described in detail in a certain embodiment, refer to the relevant description of other embodiments. Those skilled in the art should also know that the actions and modules involved in the description are not necessarily required for the present application. In addition, it can be understood that the steps in the method of the embodiment of the present application can be adjusted in order, merged and deleted according to actual needs, and the modules in the device of the embodiment of the present application can be merged, divided and deleted according to actual needs.
[0109] In addition, the method according to the present application may also be implemented as a computer program or a computer program product, which includes computer program code instructions for executing some or all of the steps in the above method of the present application.
[0110] Alternatively, the present application can also be implemented as a non-temporary machine-readable storage medium (or computer-readable storage medium, or machine-readable storage medium) on which executable code (or computer program, or computer instruction code) is stored. When the executable code (or computer program, or computer instruction code) is executed by a processor of an electronic device (or electronic device, server, etc.), the processor executes part or all of the steps of the above-mentioned method according to the present application.
[0111] Those skilled in the art will further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the application herein may be implemented as electronic hardware, computer software, or a combination of both.
[0112] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system and method according to multiple embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a part of a module, a program segment or a code, and the part of the module, the program segment or the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted 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 be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0113] The embodiments of the present application have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A host network communication data transmission method, characterized in that: A preset data transmission channel is pre-established, and the preset data transmission channel is used for the interaction of host network communication data between the cloud node and the edge node. The method includes: Obtaining first communication data of a first communication component in the cloud node, wherein the first communication component is used to implement transmission of host network communication data in the cloud node; Determine whether the first communication component and the second communication component in the edge node meet a preset communication condition; When the first communication component and the second communication component meet preset communication conditions, the first communication data is sent to a gateway node; wherein the gateway node is used to determine second communication data based on the first communication data, and send the second communication data to the second communication component through the preset data transmission channel.
2. The method according to claim 1, characterized in that The method for establishing the preset data transmission channel includes: Obtain the first network information provided by the user, and send the first network information to the edge node through the K8S cluster channel; After receiving the first network information, the edge node establishes the preset data transmission channel between the edge node and the cloud node according to the first network information.
3. The method according to claim 2, characterized in that The determining whether the first communication component and the second communication component meet a preset communication condition includes: Determine the first network information corresponding to the first communication component and the second network information corresponding to the second communication component; wherein the first network information is used to determine the first communication component, and the second network information is used to determine the second communication component; Based on the first network information and the second network information, it is determined whether the first communication component and the second communication component meet a preset communication condition.
4. The method according to claim 3, characterized in that The determining, based on the first network information and the second network information, whether the first communication component and the second communication component meet a preset communication condition includes: Obtaining a first network address and a first network port in the first network information; Acquire the second network address and the second network port in the second network information; matching the first network address and the second network address with a first routing table; In case of successful matching with the first routing table, matching the first network port and the second network port with a second routing table; In case of successful matching with the second routing table, it is determined that the first communication component and the second communication component meet a preset communication condition.
5. The method according to claim 1, characterized in that The obtaining of first communication data of a first communication component in a cloud node includes: Determining initial communication data of a first communication component in the cloud node; The first target address in the initial communication data is encapsulated based on the network information corresponding to the gateway node to obtain the first communication data.
6. The method according to claim 1, characterized in that The determining the second communication data based on the first communication data comprises: Decapsulating the first communication data to obtain initial service data of the first communication component in the cloud node; The second target address in the initial communication data is encapsulated based on the network information corresponding to the gateway node to obtain the second communication data.
7. A host network communication data transmission device, characterized in that: include: A first processing module, used to pre-establish a preset data transmission channel, wherein the preset data transmission channel is used to exchange host network communication data between the cloud node and the edge node; A second processing module, used to obtain first communication data of a first communication component in a cloud node, wherein the first communication component is used to realize the transmission of host network communication data in the cloud node; A third processing module, used to determine whether the first communication component and the second communication component in the edge node meet a preset communication condition; A fourth processing module is used to send the first communication data to a gateway node when the first communication component and the second communication component meet preset communication conditions; wherein the gateway node is used to determine the second communication data based on the first communication data, and send the second communication data to the second communication component through a preset data transmission channel.
8. The device according to claim 7, characterized in that The first processing module is used for: Obtain the first network information provided by the user, and send the first network information to the edge node through the K8S cluster channel; After receiving the first network information, the edge node establishes the preset data transmission channel between the edge node and the cloud node according to the first network information.
9. An electronic device, characterized in that: include: processor; and a memory storing executable codes thereon, which, when the executable codes are executed by the processor, enable the processor to execute the host network communication data transmission method according to any one of claims 1 to 6.
10. A non-transitory machine-readable storage medium having executable codes stored thereon, which, when executed by a processor of an electronic device, causes the processor to execute the host network communication data transmission method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Application access method, cloud proxy and node proxy component, equipment and medium
CN114363410A
Cloud edge kubernetes receiving and managing method and system
CN114443214A