CN116032995A - Data communication method and device, electronic equipment and computer readable storage medium - Google Patents
Data communication method and device, electronic equipment and computer readable storage medium Download PDFInfo
- Publication number
- CN116032995A CN116032995A CN202211617204.0A CN202211617204A CN116032995A CN 116032995 A CN116032995 A CN 116032995A CN 202211617204 A CN202211617204 A CN 202211617204A CN 116032995 A CN116032995 A CN 116032995A
- Authority
- CN
- China
- Prior art keywords
- node
- target
- data communication
- address information
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Computer And Data Communications (AREA)
Abstract
The present disclosure provides a data communication method and apparatus, an electronic device, and a computer-readable storage medium, which can be applied to the technical field of edge computing and the field of financial science and technology. The data communication method comprises the following steps: determining a communication type and a communication connection state according to a first data communication request in response to receiving the first data communication request, wherein the first data communication request comprises source address information corresponding to a source container group and target address information corresponding to a target container group; acquiring data to be communicated by utilizing an acquisition tool corresponding to the source address information according to the communication type; and under the condition that the communication connection state is not communicated, based on the first communication connection, sending a second data communication request to a cloud node of the cloud so that the cloud node can forward the second data communication request to a target node corresponding to the target container group according to the target address information, wherein the second data communication request comprises data to be communicated and the target address information.
Description
Technical Field
The present disclosure relates to the field of edge computing technology and financial technology, and more particularly, to a data communication method and apparatus, an electronic device, a computer-readable storage medium, and a computer program product.
Background
With the development of computer technology, edge computing technology has evolved.
Edge computation may refer to the process of migrating an application, data, and service operation from a central node of a network to an edge node of the network for processing. The overall architecture of edge computing may include a cloud portion, an edge portion, and an end portion.
In the process of implementing the disclosed concept, the inventor finds that at least the following problems exist in the related art: communication stability and communication efficiency between different nodes in the edge calculation process cannot be guaranteed.
Disclosure of Invention
In view of this, the present disclosure provides a data communication method and apparatus, an electronic device, a computer-readable storage medium, and a computer program product.
According to one aspect of the present disclosure, there is provided a data communication method applied to an edge in a container cluster management system, the method including:
determining a communication type and a communication connection state according to a first data communication request in response to receiving the first data communication request, wherein the first data communication request comprises source address information corresponding to a source container group and target address information corresponding to a target container group;
Acquiring data to be communicated by utilizing an acquisition tool corresponding to the source address information according to the communication type, wherein the edge end comprises at least one edge node, and the acquisition tools are respectively arranged on the at least one edge node; and
and sending a second data communication request to a cloud node of the cloud based on the first communication connection under the condition that the communication connection state is not communicated, so that the cloud node forwards the second data communication request to a target node corresponding to the target container group according to the target address information, wherein the second data communication request comprises the data to be communicated and the target address information.
According to an embodiment of the present disclosure, each of the at least one edge node comprises at least one container group, each of the at least one container group corresponding to address information, the address information being determined by:
for each of the at least one edge node,
determining a sub-network segment range corresponding to the edge node according to the network segment range of the container cluster management system; and
And determining the address information of each container group corresponding to the edge node according to the subnet range corresponding to the edge node.
According to an embodiment of the present disclosure, the at least one edge node each corresponds to an edge node identification, and the at least one container group each corresponds to a container group identification.
The method further includes, after determining address information of each of the at least one container group corresponding to the edge node according to a subnet range corresponding to the edge node:
determining a first routing rule according to an edge node identifier corresponding to the edge node and at least one container group identifier; and
and determining a second routing rule according to the at least one container group identifier and the address information of the at least one container group.
According to an embodiment of the present disclosure, the determining, in response to receiving the first data communication request, a communication type and a communication connection state according to the first data communication request includes:
determining a source node identifier and a target node identifier according to the source address information, the target address information, the first routing rule and the second routing rule; and
And determining the communication type and the communication connection state according to the source node identifier and the target node identifier.
According to an embodiment of the present disclosure, determining the source node identifier and the destination node identifier according to the source address information, the destination address information, the first routing rule, and the second routing rule includes:
determining a source container group identifier according to the source address information and the second routing rule;
determining a source node identifier according to the source container group identifier and the first routing rule;
determining a target container group identifier according to the target address information and the second routing rule; and
and determining a target node identifier according to the target container group identifier and the first routing rule.
According to an embodiment of the present disclosure, the determining the communication type and the communication connection state according to the source node identifier and the destination node identifier includes:
under the condition that the source node identification is consistent with the target node identification, determining the communication type as the node communication;
under the condition that the source node identification is inconsistent with the target node identification, determining the communication type as cross-node communication;
Determining that the communication connection state is connected under the condition that heartbeat connection exists between a source node and the target node, wherein the source node corresponds to the source node identifier, and the target node corresponds to the target node identifier; and
and when the heartbeat connection does not exist between the source node and the target node, determining that the communication connection state is not communicated.
According to an embodiment of the present disclosure, according to the communication type, the acquiring, with an acquisition tool corresponding to the source address information, data to be communicated includes:
under the condition that the communication type is the node communication, acquiring the data to be communicated from the target container group by utilizing the acquisition tool; and
and under the condition that the communication type is cross-node communication, acquiring the data to be communicated from a target port by utilizing the acquisition tool.
According to an embodiment of the present disclosure, when the communication connection state is not connected, sending, based on the first communication connection, the second data communication request to the cloud node of the cloud includes:
if the communication connection state is not communicated, establishing a first communication connection between a source node corresponding to the source container group and a cloud node of the cloud; and
And sending the second data communication request to the cloud node based on the first communication connection.
According to an embodiment of the present disclosure, the above data communication method further includes:
establishing a second communication connection between the source node and the target node when the communication connection state is connected; and
and sending the second data communication request to the target node based on the second communication connection so as to complete the data communication between the source node and the target node.
According to an embodiment of the disclosure, the edge is based on KubeEdge, and the cloud is based on Kubernetes.
According to another aspect of the present disclosure, there is provided a data communication method applied to a cloud in a container cluster management system, the method including:
determining a target node identification according to a second data communication request in response to receiving the second data communication request, wherein the second data communication request comprises data to be communicated and target address information; and
and sending the data to be communicated to a target node corresponding to the target node identifier by using a configuration tool so as to finish data communication between the source node and the target node, wherein the cloud comprises a cloud node, and the configuration tool is deployed on the cloud node.
According to an embodiment of the present disclosure, the determining, in response to receiving the second data communication request, the target node identification according to the second data communication request includes:
determining a target container group identifier according to the target address information; and
and determining the target node identification according to the target container group identification.
According to an embodiment of the present disclosure, the sending, by the configuration tool, the data to be communicated to a target node corresponding to the target node identifier, so as to complete data communication between the source node and the target node includes:
and sending the data to be communicated to an acquisition tool corresponding to the target node identifier by using the configuration tool, so that the acquisition tool can forward the data to be communicated to a target container group corresponding to the target container group identifier.
According to another aspect of the present disclosure, there is provided a data communication apparatus for use at an edge in a container cluster management system, the apparatus comprising:
a first determining module, configured to determine a communication type and a communication connection state according to a first data communication request in response to receiving the first data communication request, where the first data communication request includes source address information corresponding to a source container group and destination address information corresponding to a destination container group;
The acquisition module is used for acquiring data to be communicated by utilizing an acquisition tool corresponding to the source address information according to the communication type, wherein the edge end comprises at least one edge node, and the acquisition tools are respectively arranged on the at least one edge node; and
the first sending module is configured to send, based on the first communication connection, a second data communication request to a cloud node in the cloud, so that the cloud node forwards, according to the target address information, the second data communication request to a target node corresponding to the target container group, where the second data communication request includes the data to be communicated and the target address information.
According to another aspect of the present disclosure, there is provided a data communication apparatus for use in a cloud in a container cluster management system, the apparatus comprising:
a second determining module, configured to determine, in response to receiving a second data communication request, a target node identifier according to the second data communication request, where the second data communication request includes data to be communicated and target address information; and
The second sending module is configured to send the data to be communicated to a target node corresponding to the target node identifier by using a configuration tool, so as to complete data communication between the source node and the target node, where the cloud end includes a cloud end node, and the cloud end node deploys the configuration tool.
According to another aspect of the present disclosure, there is provided an electronic device including:
one or more processors;
a memory for storing one or more instructions,
wherein the one or more instructions, when executed by the one or more processors, cause the one or more processors to implement a method as described in the present disclosure.
According to another aspect of the present disclosure, there is provided a computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to implement a method as described in the present disclosure.
According to another aspect of the present disclosure, there is provided a computer program product comprising computer executable instructions which, when executed, are adapted to carry out the method as described in the present disclosure.
According to the embodiment of the disclosure, the communication type and the communication connection state are determined according to the first data communication request, the data to be communicated is acquired by utilizing the acquisition tool corresponding to the source address information according to the communication type, and the data to be communicated and the target address information are forwarded to the target node corresponding to the target container group through the cloud node of the cloud when the communication connection state is not communicated, so that a network path between the container group deployed in the cloud and the container group deployed at the edge in the edge calculation is opened, the technical problem that communication stability and communication efficiency between different nodes in the edge calculation process cannot be guaranteed in the related art is at least partially overcome, and further data communication across the cloud node or the edge node is realized, and communication stability and communication efficiency in the container cluster management system are guaranteed.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent from the following description of embodiments thereof with reference to the accompanying drawings in which:
FIG. 1 schematically illustrates a system architecture to which a data communication method may be applied, according to an embodiment of the present disclosure;
FIG. 2 schematically illustrates a flow chart of a data communication method according to an embodiment of the disclosure;
FIG. 3A schematically illustrates an example schematic diagram of a process of determining a range of sub-segments corresponding to an edge node in accordance with an embodiment of the disclosure;
fig. 3B schematically illustrates an example schematic diagram of a process of determining respective address information of at least one container group corresponding to an edge node according to an embodiment of the present disclosure;
FIG. 3C schematically illustrates an example schematic diagram of a process of determining a first routing rule and a second routing rule according to an embodiment of the present disclosure;
FIG. 4 schematically illustrates an example schematic diagram of a process of determining a communication type and a communication connection status from a first data communication request according to an embodiment of the disclosure;
fig. 5 schematically illustrates an example schematic diagram of a data communication process according to an embodiment of the disclosure;
fig. 6 schematically illustrates a flow chart of a data communication method according to another embodiment of the present disclosure;
fig. 7 schematically illustrates an example schematic diagram of a data communication process according to another embodiment of the present disclosure;
fig. 8 schematically illustrates a block diagram of a data communication apparatus according to an embodiment of the disclosure;
fig. 9 schematically illustrates a block diagram of a data communication apparatus according to another embodiment of the present disclosure; and
Fig. 10 schematically illustrates a block diagram of an electronic device adapted to implement a data communication method according to an embodiment of the disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is only exemplary and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the present disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. In addition, in the following description, descriptions of well-known structures and techniques are omitted so as not to unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and/or the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It should be noted that the terms used herein should be construed to have meanings consistent with the context of the present specification and should not be construed in an idealized or overly formal manner.
Where expressions like at least one of "A, B and C, etc. are used, the expressions should generally be interpreted in accordance with the meaning as commonly understood by those skilled in the art (e.g.," a system having at least one of A, B and C "shall include, but not be limited to, a system having a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.). Where a formulation similar to at least one of "A, B or C, etc." is used, in general such a formulation should be interpreted in accordance with the ordinary understanding of one skilled in the art (e.g. "a system with at least one of A, B or C" would include but not be limited to systems with a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
In the technical scheme of the disclosure, the acquisition, storage, application and the like of the related personal information of the user all conform to the regulations of related laws and regulations, necessary security measures are taken, and the public order harmony is not violated.
In the technical scheme of the disclosure, the authorization or consent of the user is obtained before the personal information of the user is obtained or acquired.
The cloud part can be a central node of traditional cloud computing, and belongs to a management and control end of edge computing. The edge portion may refer to an edge side of the cloud computing, including infrastructure edges and device edges. The end portion may refer to a terminal device such as a cell phone, a smart home, various sensors, a camera, and the like.
Cloud-edge coordination can be achieved through a Kubernetes control node of the cloud part and a node operated by a KubeEdge of the edge part. Edge-to-edge synergy can be achieved by KubeEdge of the edge portion and EdgeX foundation of the end portion.
In the prior art, an EdgeMesh component is generally adopted to realize communication between a cloud Pod and an edge Pod. Accessing the corresponding Pod is accomplished indirectly, for example, by creating and accessing the corresponding Service. However, since the EdgeMesh is a Service function implemented based on the user space, each Service needs to start a Service listening port on a node, and a situation of insufficient ports easily occurs in a large-scale cluster.
In addition, since the Service function is not applicable to some cluster types, certain specific edge computing scenarios cannot be satisfied, and there may be a problem that communication cannot be achieved through the Service function.
In order to at least partially solve the technical problems in the related art, the present disclosure provides a data communication method and apparatus, an electronic device, and a computer-readable storage medium, which can be applied to the edge computing technology field and the financial technology field. The data communication method comprises the following steps: determining a communication type and a communication connection state according to a first data communication request in response to receiving the first data communication request, wherein the first data communication request comprises source address information corresponding to a source container group and target address information corresponding to a target container group; acquiring data to be communicated by utilizing an acquisition tool corresponding to source address information according to a communication type, wherein an edge end comprises at least one edge node, and the at least one edge node is respectively provided with the acquisition tool; and under the condition that the communication connection state is not communicated, based on the first communication connection, sending a second data communication request to a cloud node of the cloud so that the cloud node can forward the second data communication request to a target node corresponding to the target container group according to the target address information, wherein the second data communication request comprises data to be communicated and the target address information.
It should be noted that the data communication method and device provided by the embodiments of the present disclosure may be used in the field of edge computing technology and the field of financial technology, for example, in the field of Kubernetes container technology. The data communication method and device provided by the embodiment of the disclosure can also be used in any field except the edge computing technical field and the financial science and technology field, for example, in the computer technical field. The application fields of the data communication method and the data communication device provided by the embodiment of the disclosure are not limited.
Fig. 1 schematically illustrates a system architecture to which a data communication method may be applied according to an embodiment of the present disclosure. It should be noted that fig. 1 is only an example of a system architecture to which embodiments of the present disclosure may be applied to assist those skilled in the art in understanding the technical content of the present disclosure, but does not mean that embodiments of the present disclosure may not be used in other devices, systems, environments, or scenarios.
As shown in fig. 1, a system architecture 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is a medium used to provide a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 through the network 104 using at least one of the first terminal device 101, the second terminal device 102, the third terminal device 103, to receive or send messages, etc. Various communication client applications, such as a shopping class application, a web browser application, a search class application, an instant messaging tool, a mailbox client, social platform software, etc. (by way of example only) may be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103.
The first terminal device 101, the second terminal device 102, the third terminal device 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (by way of example only) providing support for websites browsed by the user using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process the received data such as the user request, and feed back the processing result (e.g., the web page, information, or data obtained or generated according to the user request) to the terminal device.
It should be noted that the data communication method provided by the embodiments of the present disclosure may be generally performed by the server 105. Accordingly, the data communication apparatus provided by the embodiments of the present disclosure may be generally provided in the server 105. The data communication method provided by the embodiments of the present disclosure may also be performed by a server or a server cluster that is different from the server 105 and is capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and/or the server 105. Accordingly, the data communication apparatus provided by the embodiments of the present disclosure may also be provided in a server or a server cluster that is different from the server 105 and is capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103 and/or the server 105.
Alternatively, the data processing method provided by the embodiment of the present disclosure may also be performed by the first terminal device 101, the second terminal device 102, or the third terminal device 103, or may also be performed by other terminal devices different from the first terminal device 101, the second terminal device 102, or the third terminal device 103. Accordingly, the data communication apparatus provided by the embodiments of the present disclosure may also be provided in the first terminal device 101, the second terminal device 102, or the third terminal device 103, or in other terminal devices different from the first terminal device 101, the second terminal device 102, or the third terminal device 103.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
It should be noted that the sequence numbers of the respective operations in the following methods are merely representative of the operations for the purpose of description, and should not be construed as representing the order of execution of the respective operations. The method need not be performed in the exact order shown unless explicitly stated.
Fig. 2 schematically illustrates a flow chart of a data communication method according to an embodiment of the disclosure.
As shown in fig. 2, the data communication method 200 includes operations S210 to S230.
In response to receiving the first data communication request, the communication type and the communication connection state are determined according to the first data communication request, wherein the first data communication request includes source address information corresponding to the source container group and destination address information corresponding to the destination container group, in operation S210.
In operation S220, according to the communication type, the data to be communicated is obtained by using the collection tool corresponding to the source address information, wherein the edge end includes at least one edge node, and the collection tools are respectively disposed on the at least one edge node.
In operation S230, if the communication connection state is not connected, based on the first communication connection, the cloud node sends the second data communication request to the cloud node, so that the cloud node forwards the second data communication request to the target node corresponding to the target container group according to the target address information, where the second data communication request includes the data to be communicated and the target address information.
According to embodiments of the present disclosure, the data communication method 200 may be applied to an edge in a container cluster management system.
According to embodiments of the present disclosure, a container cluster management system may include an edge and a cloud. The edge may be used to run edge applications and manage access devices. The edge may comprise at least one edge node. The edge nodes may characterize nodes in the container cluster for traffic data processing. The cloud may be used for application and configuration delivery. The cloud may include cloud nodes. The cloud node may characterize nodes in the container cluster that are used to deploy the management and control components. A node (i.e., node) may characterize a separate host, such as a physical machine or virtual machine, that is managed in a container cluster.
According to embodiments of the present disclosure, each of the at least one edge node may comprise at least one container group (i.e., pod). The container group may characterize the smallest deployable computing unit created and managed in the container cluster. Each of the at least one container group may include at least one container. For example, the source node and the target node may belong to edge nodes. The source node may comprise a source container group. The target node may comprise a target container group.
According to the embodiment of the disclosure, the code for generating the first data communication request may be written in the first script in advance, and in response to detecting the data communication operation initiated by the source node of the edge, the container cluster management system may run the first script to generate the first data communication request. The container cluster management system can send the first data communication request to the edge end in the container cluster management system, so that the edge end can acquire data to be communicated according to the first data communication request.
According to an embodiment of the present disclosure, the first data communication request may include source address information corresponding to the source container group and destination address information corresponding to the destination container group. The source address information and the destination address information may belong to an internet protocol (Internet Protocol, IP). The source container set and the target container set may be container sets deployed at the same edge node. Alternatively, the source container set and the target container set may be container sets deployed at the same edge node.
According to an embodiment of the present disclosure, after receiving the first data communication request, the communication type and the communication connection state may be determined according to the first data communication request. The communication type may be used to characterize whether the source node and the target node belong to the same edge node. The communication type may include at least one of: cross node communication and home node communication. The communication connection status may be used to characterize whether a communication connection exists between the source node and the target node. The communication connection state may include at least one of: is not communicated and is communicated.
According to the embodiment of the disclosure, after determining the communication type, the data to be communicated may be acquired according to the communication type by using an acquisition tool corresponding to the source address information. At least one edge node may each be deployed with an acquisition tool (i.e., an edge mesh-agent). The acquisition tool may be used to acquire data to be communicated of the source node. For example, the collection tool may be deployed separately on each edge node by means of Daemon Set. Acquisition tools corresponding to the source address information may be determined from the source address information. And acquiring data to be communicated of the source container group by utilizing an acquisition tool corresponding to the source address information.
According to embodiments of the present disclosure, code that generates the second data communication request may be pre-written in a second script, which may be run by the container cluster management system in response to obtaining the data to be communicated, generating the second data communication request. The container cluster management system may send the second data communication request to an edge in the container cluster management system, so that the edge sends the second data communication request to the cloud.
According to the embodiment of the disclosure, after the communication connection state is determined, a first communication connection can be established between the source node corresponding to the source container group and the cloud node of the cloud end under the condition that the communication connection state is not communicated, so that based on the first communication connection, an application layer protocol is adopted to send a second data communication request to the cloud node. The application layer protocol includes at least one of: full duplex communication protocol based on transmission control protocol (WebSocket), hypertext transfer protocol (HyperText Transfer Protocol, HTTP) and message queue telemetry transfer protocol (Message Queuing Telemetry Transport, MQTT).
According to the embodiment of the disclosure, the cloud node may send the data to be communicated to the target node after receiving the second data communication request. The target node, upon receiving the second data communication request, may determine a target container group identification based on target address information in the second data communication request. And sending the data to be communicated to the target container group according to the target container group identification.
According to the embodiment of the disclosure, the communication type and the communication connection state are determined according to the first data communication request, the data to be communicated is acquired by utilizing the acquisition tool corresponding to the source address information according to the communication type, and the data to be communicated and the target address information are forwarded to the target node corresponding to the target container group through the cloud node of the cloud when the communication connection state is not communicated, so that a network path between the container group deployed in the cloud and the container group deployed at the edge in the edge calculation is opened, the technical problem that communication stability and communication efficiency between different nodes in the edge calculation process cannot be guaranteed in the related art is at least partially overcome, and further data communication across the cloud node or across the edge node is realized, and communication stability and communication efficiency of the container cluster management system are guaranteed.
A data communication method 200 according to an embodiment of the present invention is further described below with reference to fig. 3A, 3B, 3C, 4 and 5.
According to the embodiment of the disclosure, the edge is built based on KubeEdge, and the cloud is built based on Kubernetes.
According to embodiments of the present disclosure, kubernetes (i.e., K8 s) is a container orchestration engine that may be used to automate deployment, scaling, and management of containerized applications. Cloud may be constructed based on Kubernetes.
According to embodiments of the present disclosure, kubeEdge is constructed based on Kubernetes. KubeEdge can extend the native containerized application programming functionality to edge nodes. KubeEdge may provide core infrastructure support for cloud, network communication between edges, application deployment, and metadata synchronization. The edge termination can be constructed based on KubeEdge.
According to an embodiment of the present disclosure, address information may be determined in the following manner.
For each of the at least one edge node, determining a sub-segment range corresponding to the edge node from the segment range of the container cluster management system. And determining the respective address information of at least one container group corresponding to the edge node according to the subnet segment range corresponding to the edge node.
According to an embodiment of the present disclosure, each of the at least one edge node may comprise at least one container group. At least one container group may each correspond to address information.
According to embodiments of the present disclosure, the network segment range of the container cluster management system may be preset in the process of deploying the container cluster management system. The segment range may include class-free Inter-Domain Routing (CIDR). The network segment range may be used to define a network address range for a group of containers in the container cluster.
According to an embodiment of the present disclosure, in response to detecting that a new edge node accesses a container cluster, a sub-segment range corresponding to the edge node is determined from the segment range of the container cluster management system. For example, each edge node may be assigned a globally unique address field using IP address management (IP Address Management, IPAM), and the address information of the container group scheduled to that edge node may all be located within the subnet range.
According to embodiments of the present disclosure, after determining a subnet range corresponding to an edge node, a node identification and a subnet range corresponding to the edge node may be recorded. For example, the node identification and the subnet range corresponding to the edge node may be recorded in the advertisement of the edge node. The animation of the edge node belongs to the map type field, and the key value pair can be used for storing the external address information of the node. For example, the key value pair may be "edge mesh-agent. Node A/public-ip:192.168.100.10", in which case the address information of edge node a may be characterized as 192.168.100.10.
Fig. 3A schematically illustrates an example schematic diagram of a process of determining a range of sub-segments corresponding to an edge node according to an embodiment of the disclosure.
As shown in fig. 3A, in 300A, at least one edge node 301 may include edge node 3011, edge nodes 3012, …, edge nodes 301M, …, edge node 301M. M may be an integer greater than or equal to 1, M ε {1,2, …, (M-1), M }.
The sub-segment range 3021 corresponding to the edge node 3011, the sub-segment ranges 3022, … corresponding to the edge node 3012, the sub-segment ranges 302M, … corresponding to the edge node 301M, and the sub-segment range 302M corresponding to the edge node 301M may be determined from the segment ranges of the container cluster management system.
Fig. 3B schematically illustrates an example schematic diagram of a process of determining respective address information of at least one container group corresponding to an edge node according to an embodiment of the disclosure.
As shown in fig. 3B, in 300B, an edge node 303 may include at least one container group for each edge node 303 of the at least one edge node. The at least one container group may include container group 304_1, container groups 304_2, …, container groups 304_n, …, container group 304_n. N may be an integer greater than or equal to 1, N ε {1,2, …, (N-1), N }.
The address information 305_1 of the container group 304_1, the address information 305_2, … of the container group 304_2, the address information 305_n, … of the container group 304_n, and the address information 305_n of the container group 304N corresponding to the edge node 303 may be determined according to the subnet range corresponding to the edge node 303.
According to an embodiment of the present disclosure, the data communication method 200 may further include the following operations.
A first routing rule is determined based on an edge node identification corresponding to the edge node and at least one container group identification. A second routing rule is determined based on the at least one container group identification and the respective address information of the at least one container group.
According to an embodiment of the present disclosure, at least one edge node may each correspond to an edge node identity. At least one container group may each correspond to a container group identification.
According to embodiments of the present disclosure, edge node identification may be used to identify edge nodes. The container group identification may be used to identify the container group. The first routing rule may include a correspondence between an edge node identity and at least one container group identity. The second routing rule may include a correspondence between at least one container group identification and respective address information of at least one container group.
In response to detecting a new edge node access container cluster, a network card tun0 may be created on the edge node, according to embodiments of the present disclosure. The network card tun0 may be of a tunnel type. In response to receiving the first data communication request, a communication type may be determined according to the first routing rule and the second routing rule. In the case that the communication type is cross-node communication, the data to be communicated may be sent to the network card tun0.
According to the embodiment of the disclosure, since the sub-network segment range corresponding to the edge node is determined according to the network segment range of the container cluster management system, and the address information of each of the at least one container group corresponding to the edge node is determined according to the sub-network segment range corresponding to the edge node, the address information can be automatically allocated to the at least one container group corresponding to the edge node, thereby ensuring the communication efficiency of the container cluster management system. On the basis, the first routing rule is determined according to the edge node identification corresponding to the edge node and the at least one container group identification, and the second routing rule is determined according to the at least one container group identification and the address information of the at least one container group, so that the routing rule can be automatically configured for the edge node, and the communication accuracy of the container cluster management system is further ensured.
Fig. 3C schematically illustrates an example schematic diagram of a process of determining a first routing rule and a second routing rule according to an embodiment of the present disclosure.
As shown in fig. 3C, in 300C, after determining respective address information of at least one container group corresponding to an edge node, for each of the at least one edge node, a first routing rule 309 may be determined according to an edge node identification 306 and at least one container group identification 307 corresponding to the edge node. A second routing rule 310 is determined based on the at least one container group identification 307 and the respective address information 308 of the at least one container group.
According to an embodiment of the present disclosure, operation S210 may include the following operations.
And determining the source node identification and the target node identification according to the source address information, the target address information, the first routing rule and the second routing rule. And determining the communication type and the communication connection state according to the source node identification and the target node identification.
According to an embodiment of the present disclosure, in response to receiving a first data communication request, a first routing rule and a second routing rule corresponding to source address information may be acquired. After obtaining the first routing rule and the second routing rule, a source container group identification may be determined based on the source address information and the second routing rule. After determining the source container group identity, the source node identity may be determined based on the source container group identity and the first routing rule.
According to an embodiment of the present disclosure, after the first routing rule and the second routing rule are obtained, the target container group identification may also be determined according to the target address information and the second routing rule. After determining the target container group identification, the target node identification may be determined based on the target container group identification and the first routing rule.
According to embodiments of the present disclosure, after determining the source node identification and the destination node identification, the communication type may be determined according to determining the source node identification and the destination node identification. The communication type may be used to characterize whether the source node and the target node belong to the same edge node. The communication type may include at least one of: cross node communication and home node communication. Alternatively, the communication connection status may be determined in accordance with determining the source node identity and the destination node identity. The communication connection status may be used to characterize whether a communication connection exists between the source node and the target node. The communication connection state may include at least one of: is not communicated and is communicated.
According to an embodiment of the present disclosure, determining the source node identification and the destination node identification according to the source address information, the destination address information, the first routing rule, and the second routing rule may include the following operations.
And determining the source container group identification according to the source address information and the second routing rule. And determining the source node identification according to the source container group identification and the first routing rule. And determining the target container group identification according to the target address information and the second routing rule. And determining the target node identification according to the target container group identification and the first routing rule.
According to embodiments of the present disclosure, determining the communication type and the communication connection state may include the following operations according to the source node identification and the destination node identification.
And under the condition that the source node identification and the target node identification are consistent, determining the communication type as the node communication. In the event that the source node identity and the destination node identity are not consistent, the communication type is determined to be cross-node communication. And under the condition that heartbeat connection exists between the source node and the target node, determining the communication connection state as communication, wherein the source node corresponds to the source node identification, and the target node corresponds to the target node identification. And under the condition that the heartbeat connection does not exist between the source node and the target node, determining that the communication connection state is not communicated.
According to embodiments of the present disclosure, the communication type may be determined according to whether the source node identification and the destination node identification are consistent. The communication connection status may be determined based on whether a heartbeat connection exists between the source node and the target node.
According to the embodiment of the disclosure, in response to detecting that a new edge node accesses the container cluster, the edge node may be registered with a configuration tool of the cloud, and a connection is established between an acquisition tool corresponding to the edge node and the configuration tool of the cloud. The default dictionary may be maintained using an index in Kubernets to monitor node resources in the container cluster. The preset dictionary may include a mapping relationship between the container group and the address information.
According to an embodiment of the present disclosure, data to be communicated may be imported to tun0. And reading the data to be communicated from tun0 by utilizing an acquisition tool and analyzing the target address information. And determining the target node and the target container group according to the preset dictionary and the target address information.
According to the embodiment of the disclosure, since the source node identification and the destination node identification are determined according to the source address information, the destination address information, the first routing rule and the second routing rule, and the communication type and the communication connection state are determined according to the source node identification and the destination node identification, the communication type can characterize whether the source node and the destination node belong to the same node, and the communication connection state can characterize whether a communication connection exists between the source node and the destination node. On the basis, the method is beneficial to realizing data communication of the cross-cloud node or the cross-edge node according to the communication type and the communication connection state.
Fig. 4 schematically illustrates an example schematic diagram of a process of determining a communication type and a communication connection state according to a first data communication request according to an embodiment of the present disclosure.
As shown in fig. 4, in 400, a source container group identification 404 may be determined from source address information 403 and a second routing rule 402. The source node identification 407 is determined from the source container group identification 404 and the first routing rule 401.
The target container group identification 406 may be determined based on the target address information 405 and the second routing rule 402. The target node identification 408 is determined based on the target container group identification 406 and the first routing rule 401.
After determining the source node identification 407 and the destination node identification 408, operations S410 and S420 may be performed.
In operation S410, the source node identification and the destination node identification agree? If so, then the communication type may be determined to be the present node communication 409. If not, then the communication type may be determined to be cross-node communication 410.
In operation S420, there is a heartbeat connection between the source node and the target node? If so, the communication connection state may be determined to be connected 411. If not, it may be determined that the communication connection state is not connected 412.
According to an embodiment of the present disclosure, operation S220 may include the following operations.
And under the condition that the communication type is the node communication, acquiring data to be communicated from the target container group by utilizing an acquisition tool. And under the condition that the communication type is cross-node communication, acquiring data to be communicated from the target port by utilizing an acquisition tool.
According to embodiments of the present disclosure, the cloud may also be deployed with an acquisition tool. The collection tool at the cloud can monitor Kube Apiserver using Kubernetes informer. The collection tool at the edge can monitor the Metaserver. The Metaserver may be a mirror image of the Kube Apiserver, with the synchronization between the Metaserver and the Kube Apiserver maintained by the Kubeedge component.
According to embodiments of the present disclosure, cross-node communication may be used to characterize that a source node corresponding to source address information and a target node corresponding to target address information belong to different nodes. The node communication can be used for representing that a source node corresponding to source address information and a target node corresponding to target address information belong to the same node.
According to embodiments of the present disclosure, the collection tool may route data to be communicated, of which the communication type is cross-node communication, to tun0. Alternatively, the collecting tool may also obtain the data to be communicated from tun0 and establish a first communication connection between the source node and the target node. The second data communication request is sent to the first communication connection to facilitate reading the return data from the first communication connection and sending the return data to the source container group of the source node.
According to an embodiment of the present disclosure, operation S230 may include the following operations.
And under the condition that the communication connection state is not communicated, establishing a first communication connection between the source node corresponding to the source container group and the cloud node of the cloud. And sending a second data communication request to the cloud node based on the first communication connection.
According to the embodiment of the disclosure, in the case that the communication type is cross-node communication, data to be communicated can be acquired based on different modes according to the communication connection state. For example, in a case where the communication connection state is not connected, the first communication connection may be between the source node corresponding to the source container group and the cloud node of the cloud. The first communication connection may comprise a proxy connection. In this case, the collection tool of the source node may send the data to be communicated to the configuration tool of the cloud node, the configuration tool of the cloud node may send the data to be communicated to the collection tool of the target node, and the collection tool of the target node sends the data to be communicated to the target container group.
The above-described data communication method 200 may further include the following operations according to an embodiment of the present disclosure.
In the case where the communication connection state is connected, a second communication connection is established between the source node and the target node. Based on the second communication connection, a second data communication request is sent to the target node in order to complete the data communication between the source node and the target node.
According to the embodiments of the present disclosure, in the case where the communication connection state is the communication, the second communication connection may be established between the source node corresponding to the source container group and the target node corresponding to the target container group. The second communication connection may comprise a proxy connection. In this case, the collection tool of the source node may directly send the data to be communicated to the collection tool of the target node, which sends the data to be communicated to the target container group. Alternatively, the collecting tool of the source node may also forward the data to be communicated to the target node based on the second communication connection, and obtain the returned data from the target node based on the second communication connection.
According to the embodiment of the disclosure, under the condition that the communication connection state is connected, the data to be communicated can be directly forwarded to the target node based on the second communication connection, so that the data communication efficiency of the container cluster management system is ensured. In addition, under the condition that the communication connection state is not communicated, the data to be communicated can be forwarded to the target node through the cloud node based on the first communication connection, so that the data communication stability of the container cluster management system is guaranteed.
Fig. 5 schematically illustrates an example schematic diagram of a data communication process according to an embodiment of the disclosure.
As shown in fig. 5, in 500, an edge determines a communication type 502 and a communication connection state 503 from a first data communication request 501 in response to receiving the first data communication request 501.
After determining the communication type 502 and the communication connection state 503, operations S510 and S520 may be performed.
In operation S510, the communication type is the present node communication? If so, the data to be communicated 504 may be obtained from the target set of containers using an acquisition tool. If not, the data to be communicated 504 may be acquired from the destination port using an acquisition tool.
In operation S520, is the communication connection state not connected? If so, a first communication connection 505 may be established between the source node corresponding to the source container group and the cloud node 506 of the cloud, and based on the first communication connection 505, a second data communication request may be sent to the cloud node 506. If so, a second communication connection 507 may be established between the source node and the target node, and a second data communication request may be sent to the target node 508 based on the second communication connection 507.
The above is only an exemplary embodiment, but is not limited thereto, and other data communication methods known in the art may be included as long as communication stability and communication efficiency in the container cluster management system can be secured.
Fig. 6 schematically illustrates a flow chart of a data communication method according to another embodiment of the present disclosure.
As shown in fig. 6, the data communication method 600 includes operations S610 to S620.
In response to receiving the second data communication request, the destination node identification is determined in accordance with the second data communication request, wherein the second data communication request includes the data to be communicated and the destination address information, in operation S610.
In operation S620, the data to be communicated is sent to the target node corresponding to the target node identifier by using the configuration tool, so as to complete data communication between the source node and the target node, where the cloud end includes a cloud end node, and the cloud end node deploys the configuration tool.
According to embodiments of the present disclosure, the data communication method 600 may be applied to a cloud in a container cluster management system.
According to embodiments of the present disclosure, a container cluster management system may include an edge and a cloud. The cloud may be used for application and configuration delivery. The cloud may include cloud nodes. The cloud node may characterize nodes in the container cluster that are used to deploy the management and control components. The nodes may characterize independent hosts, e.g., physical machines or virtual machines, that are managed in the container cluster. The cloud node may include at least one container group. The container group may characterize the smallest deployable computing unit created and managed in the container cluster. Each of the at least one container group may include at least one container.
According to embodiments of the present disclosure, the cloud may include a cloud node. The cloud node may be deployed with a configuration tool (i.e., an edgemesh-server). The configuration tool may be used to forward data to be communicated to the target node in accordance with the target address information. For example, a configuration tool may be deployed on a cloud node by means of a depoyment. The destination node identification may be determined from the destination address information. And sending the data to be communicated to a target node corresponding to the target node identification by using a configuration tool.
According to the embodiment of the disclosure, after receiving the second data communication request, the cloud end may determine the target node identifier according to the target address information in the second data communication request. The target node identification may be used to identify edge nodes on which the target container group is deployed. After determining the destination node identification, the data to be communicated may be sent to the destination node corresponding to the destination node identification using a configuration tool to facilitate completing the data communication between the source node and the destination node.
According to the embodiment of the disclosure, as the target node identification is determined according to the second data communication request, the data to be communicated is sent to the target node corresponding to the target node identification by using the configuration tool, so that the data communication between the source node and the target node is realized, a network path between a container group deployed in the cloud end and a container group deployed in the edge end in the edge calculation is opened, the data communication between the cross-cloud node or the cross-edge node is realized, and the communication stability and the communication efficiency in the container cluster management system are ensured.
A data communication method 600 according to an embodiment of the present invention is further described below with reference to fig. 7.
According to an embodiment of the present disclosure, operation S610 may include the following operations.
And determining the target container group identification according to the target address information. And determining the target node identification according to the target container group identification.
According to an embodiment of the present disclosure, operation S620 may operate as follows.
And sending the data to be communicated to an acquisition tool corresponding to the target node identifier by using the configuration tool, so that the acquisition tool can forward the data to be communicated to a target container group corresponding to the target container group identifier.
According to embodiments of the present disclosure, a configuration tool may be understood as a proxy server. After receiving the second data communication request, the cloud end can analyze the second data communication request to obtain data to be communicated and target address information. And determining the target container group identification according to the target address information. And determining the target node identification according to the target container group identification. And forwarding the data to be communicated to an acquisition tool corresponding to the target node identifier by using the configuration tool according to the target node identifier.
Fig. 7 schematically illustrates an example schematic diagram of a data communication process according to another embodiment of the present disclosure.
As shown in fig. 7, the container cluster management system may include a cloud and an edge. In 700, the data communication method of the embodiment of the present disclosure is exemplarily shown with the cloud end including a cloud node 701 and the edge end including an edge node 702 and an edge node 703.
The edge node 702 may be deployed with an acquisition tool 7020. In the edge node 702, a container group 7021 and a container group 7022 may be included. A container 70211 and a container 70212 may be included in the container group 7021. Among the container group 7022, a container 70221, a container 70222, and a container 70223 can be included. In this case, the collection tool 7020 can be used to collect data for the containers 70211, 70212, 70221, 70222, and 70223.
The edge node 703 may be deployed with an acquisition tool 7030. In the edge node 703, a container group 7031 and a container group 7032 may be included. The set of containers 7031 may include a container 70311, a container 70312, and a container 70313. The set of containers 7032 can include a container 70321 and a container 70322. In this case, the collection tool 7030 can be used for data of the container 70311, the container 70312, the container 70313, the container 70321, and the container 70322.
For example, the initiator of the data communication is container 70212, in which case the source node may be edge node 702, the source container group may be container group 7021, and the collection tool corresponding to the source address information may be collection tool 7020.
For example, the recipient of the data communication is container 70313, in which case the target node may be edge node 703, the target container group may be container group 7031, and the collection tool corresponding to the target address information may be collection tool 7030.
In this case, the collection tool 7020 of the edge node 702 may collect data to be communicated of the container 70212 in the container group 7021, the collection tool 7020 may send the data to be communicated to the configuration tool 7010 of the cloud node 701, the configuration tool 7010 of the cloud node 701 may send the data to be communicated to the collection tool 7030 of the edge node 703, and the collection tool 7030 of the edge node 703 may send the data to be communicated to the container 70313 in the container group 7031 to complete data communication between the edge node 702 and the edge node 703, the container group 7021 and the container group 7031, and the container 70212 and the container 70313.
The above is only an exemplary embodiment, but is not limited thereto, and other data communication methods known in the art may be included as long as communication stability and communication efficiency in the container cluster management system can be secured.
Fig. 8 schematically illustrates a block diagram of a data communication apparatus according to an embodiment of the present disclosure.
As shown in fig. 8, the data communication apparatus 800 may be applied to an edge in a container cluster management system, and the data communication apparatus 800 may include a first determining module 810, an acquiring module 820, and a first transmitting module 830.
The first determining module 810 is configured to determine, in response to receiving the first data communication request, a communication type and a communication connection state according to the first data communication request, where the first data communication request includes source address information corresponding to the source container group and destination address information corresponding to the destination container group.
The obtaining module 820 is configured to obtain, according to the communication type, data to be communicated by using an collecting tool corresponding to the source address information, where the edge end includes at least one edge node, and the collecting tools are disposed on each of the at least one edge node.
The first sending module 830 is configured to send, based on the first communication connection, a second data communication request to a cloud node in the cloud end when the communication connection state is not connected, so that the cloud node forwards, according to the target address information, the second data communication request to a target node corresponding to the target container group, where the second data communication request includes data to be communicated and the target address information.
According to an embodiment of the present disclosure, each of the at least one edge node comprises at least one container group, each of the at least one container group corresponding to address information, which may be determined in the following manner.
For each of the at least one edge node, determining a sub-segment range corresponding to the edge node from the segment range of the container cluster management system. And determining the respective address information of at least one container group corresponding to the edge node according to the subnet segment range corresponding to the edge node.
According to an embodiment of the present disclosure, at least one edge node each corresponds to an edge node identity and at least one container group each corresponds to a container group identity.
According to embodiments of the present disclosure, the routing rules may be determined in the following manner.
A first routing rule is determined based on an edge node identification corresponding to the edge node and at least one container group identification. A second routing rule is determined based on the at least one container group identification and the respective address information of the at least one container group.
According to an embodiment of the present disclosure, the first determining module 810 may include a first determining unit and a second determining unit.
And the first determining unit is used for determining the source node identification and the target node identification according to the source address information, the target address information, the first routing rule and the second routing rule.
And the second determining unit is used for determining the communication type and the communication connection state according to the source node identifier and the target node identifier.
According to an embodiment of the present disclosure, the first determination unit may include a first determination subunit, a second determination subunit, a third determination subunit, and a fourth determination subunit.
And the first determining subunit is used for determining the source container group identification according to the source address information and the second routing rule.
And the second determining subunit is used for determining the source node identification according to the source container group identification and the first routing rule.
And the third determining subunit is used for determining the target container group identification according to the target address information and the second routing rule.
And the fourth determining subunit is used for determining the target node identification according to the target container group identification and the first routing rule.
According to an embodiment of the present disclosure, the second determination unit may include a fifth determination subunit, a sixth determination subunit, a seventh determination subunit, and an eighth determination subunit.
And a fifth determining subunit, configured to determine that the communication type is the node communication when the source node identifier and the target node identifier are consistent.
And a sixth determining subunit, configured to determine that the communication type is cross-node communication if the source node identifier and the destination node identifier are inconsistent.
And a seventh determining subunit, configured to determine that the communication connection state is connected when a heartbeat connection exists between the source node and the target node, where the source node corresponds to the source node identifier, and the target node corresponds to the target node identifier.
And an eighth determination subunit, configured to determine that the communication connection state is not connected when there is no heartbeat connection between the source node and the target node.
According to an embodiment of the present disclosure, the acquisition module 820 may include a first acquisition unit and a second acquisition unit.
The first acquisition unit is used for acquiring data to be communicated from the target container group by utilizing the acquisition tool under the condition that the communication type is the node communication.
The second acquisition unit is used for acquiring data to be communicated from the target port by utilizing the acquisition tool under the condition that the communication type is cross-node communication.
According to an embodiment of the present disclosure, the first transmitting module 830 may include a setup unit and a first transmitting unit.
The establishing unit is used for establishing a first communication connection between the source node corresponding to the source container group and the cloud node of the cloud under the condition that the communication connection state is not communicated.
The first sending unit is used for sending the second data communication request to the cloud node based on the first communication connection.
According to an embodiment of the present disclosure, the data communication apparatus 800 may further include a setup module and a third transmission module.
The establishing module is used for establishing a second communication connection between the source node and the target node under the condition that the communication connection state is communicated.
And the third sending module is used for sending a second data communication request to the target node based on the second communication connection so as to finish data communication between the source node and the target node.
According to the embodiment of the disclosure, the edge is built based on KubeEdge, and the cloud is built based on Kubernetes.
Fig. 9 schematically illustrates a block diagram of a data communication apparatus according to another embodiment of the present disclosure.
As shown in fig. 9, the data communication apparatus 900 may be applied to a cloud in a container cluster management system, and the data communication apparatus 900 may include a second determining module 910 and a second transmitting module 920.
A second determining module 910, configured to determine, in response to receiving the second data communication request, a destination node identifier according to the second data communication request, where the second data communication request includes data to be communicated and destination address information.
The second sending module 920 is configured to send, using a configuration tool, data to be communicated to a target node corresponding to the target node identifier, so as to complete data communication between the source node and the target node, where the cloud node includes a cloud node, and the cloud node deploys the configuration tool.
According to an embodiment of the present disclosure, the second determination module 910 may include a third determination unit and a fourth determination unit.
And the third determining unit is used for determining the target container group identification according to the target address information.
And the fourth determining unit is used for determining the target node identification according to the target container group identification.
According to an embodiment of the present disclosure, the second transmitting module 920 may include a second transmitting unit.
And the second sending unit is used for sending the data to be communicated to the acquisition tool corresponding to the target node identifier by using the configuration tool so that the acquisition tool can forward the data to be communicated to the target container group corresponding to the target container group identifier.
Any number of modules, sub-modules, units, sub-units, or at least some of the functionality of any number of the sub-units according to embodiments of the present disclosure may be implemented in one module. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented as split into multiple modules. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system-on-chip, a system-on-substrate, a system-on-package, an Application Specific Integrated Circuit (ASIC), or in any other reasonable manner of hardware or firmware that integrates or encapsulates the circuit, or in any one of or a suitable combination of three of software, hardware, and firmware. Alternatively, one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be at least partially implemented as computer program modules, which when executed, may perform the corresponding functions.
For example, any of the first determining module 810, the acquiring module 820, and the first transmitting module 830 may be combined in one module/unit/sub-unit or any of them may be split into a plurality of modules/units/sub-units. Alternatively, at least some of the functionality of one or more of these modules/units/sub-units may be combined with at least some of the functionality of other modules/units/sub-units and implemented in one module/unit/sub-unit. According to embodiments of the present disclosure, at least one of the first determination module 810, the acquisition module 820, and the first transmission module 830 may be implemented at least in part as hardware circuitry, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in hardware or firmware in any other reasonable way of integrating or packaging circuitry, or in any one of or a suitable combination of any of the three. Alternatively, at least one of the first determining module 810, the obtaining module 820 and the first transmitting module 830 may be at least partially implemented as a computer program module, which may perform the corresponding functions when being executed.
It should be noted that, in the embodiment of the present disclosure, the portion of the data communication device applied to the edge in the container cluster management system corresponds to the portion of the data communication method applied to the edge in the container cluster management system, and the description of the portion of the data communication device applied to the edge in the container cluster management system specifically refers to the portion of the data communication method applied to the edge in the container cluster management system, which is not repeated herein.
For example, any of the second determining module 910 and the second transmitting module 920 may be combined in one module/unit/sub-unit, or any of the modules/units/sub-units may be split into a plurality of modules/units/sub-units. Alternatively, at least some of the functionality of one or more of these modules/units/sub-units may be combined with at least some of the functionality of other modules/units/sub-units and implemented in one module/unit/sub-unit. According to embodiments of the present disclosure, at least one of the second determination module 910 and the second transmission module 920 may be implemented at least in part as hardware circuitry, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system-on-chip, a system-on-substrate, a system-on-package, an Application Specific Integrated Circuit (ASIC), or in hardware or firmware, such as any other reasonable way of integrating or packaging the circuitry, or in any one of or a suitable combination of three of software, hardware, and firmware. Alternatively, at least one of the second determination module 910 and the second transmission module 920 may be at least partially implemented as a computer program module, which when executed may perform the corresponding functions.
It should be noted that, in the embodiment of the present disclosure, the portion of the data communication device applied to the cloud end in the container cluster management system corresponds to the portion of the data communication method applied to the cloud end in the container cluster management system, and the description of the portion of the data communication device applied to the cloud end in the container cluster management system specifically refers to the portion of the data communication method applied to the cloud end in the container cluster management system, which is not described herein again.
Fig. 10 schematically illustrates a block diagram of an electronic device adapted to implement a data communication method according to an embodiment of the disclosure. The electronic device shown in fig. 10 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 10, a computer electronic device 1000 according to an embodiment of the present disclosure includes a processor 1001 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 1002 or a program loaded from a storage section 1009 into a Random Access Memory (RAM) 1003. The processor 1001 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or an associated chipset and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), or the like. The processor 1001 may also include on-board memory for caching purposes. The processor 1001 may include a single processing unit or multiple processing units for performing different actions of the method flows according to embodiments of the present disclosure.
In the RAM 1003, various programs and data necessary for the operation of the electronic apparatus 1000 are stored. The processor 1001, the ROM 1002, and the RAM 1003 are connected to each other by a bus 1004. The processor 1001 performs various operations of the method flow according to the embodiment of the present disclosure by executing programs in the ROM 1002 and/or the RAM 1003. Note that the program may be stored in one or more memories other than the ROM 1002 and the RAM 1003. The processor 1001 may also perform various operations of the method flow according to the embodiments of the present disclosure by executing programs stored in the one or more memories.
According to an embodiment of the disclosure, the electronic device 1000 may also include an input/output (I/O) interface 1005, the input/output (I/O) interface 1005 also being connected to the bus 1004. The electronic device 1000 may also include one or more of the following components connected to the I/O interface 1005: an input section 1006 including a keyboard, a mouse, and the like; an output portion 1007 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), etc., and a speaker, etc.; a storage portion 1008 including a hard disk or the like; and a communication section 1009 including a network interface card such as a LAN card, a modem, or the like. The communication section 1009 performs communication processing via a network such as the internet. The drive 1010 is also connected to the I/O interface 1005 as needed. A removable medium 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like, is installed as needed in the drive 1010, so that a computer program read out therefrom is installed as needed in the storage section 1008.
According to embodiments of the present disclosure, the method flow according to embodiments of the present disclosure may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable storage medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 1009, and/or installed from the removable medium 1011. The above-described functions defined in the system of the embodiments of the present disclosure are performed when the computer program is executed by the processor 1001. The systems, devices, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
The present disclosure also provides a computer-readable storage medium that may be embodied in the apparatus/device/system described in the above embodiments; or may exist alone without being assembled into the apparatus/device/system. The computer-readable storage medium carries one or more programs which, when executed, implement methods in accordance with embodiments of the present disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. Examples may include, but are not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
For example, according to embodiments of the present disclosure, the computer-readable storage medium may include ROM 1002 and/or RAM 1003 and/or one or more memories other than ROM 1002 and RAM 1003 described above.
Embodiments of the present disclosure also include a computer program product comprising a computer program comprising program code for performing the method provided by the embodiments of the present disclosure, when the computer program product is run on an electronic device, for causing the electronic device to carry out the data communication method provided by the embodiments of the present disclosure.
The above-described functions defined in the system/apparatus of the embodiments of the present disclosure are performed when the computer program is executed by the processor 1001. The systems, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
In one embodiment, the computer program may be based on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted in the form of signals on a network medium, distributed, and downloaded and installed via the communication section 1009, and/or installed from the removable medium 1011. The computer program may include program code that may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
According to embodiments of the present disclosure, program code for performing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, such computer programs may be implemented in high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. Programming languages include, but are not limited to, such as Java, c++, python, "C" or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. Those skilled in the art will appreciate that the features recited in the various embodiments of the disclosure and/or in the claims may be combined in various combinations and/or combinations, even if such combinations or combinations are not explicitly recited in the disclosure. In particular, the features recited in the various embodiments of the present disclosure and/or the claims may be variously combined and/or combined without departing from the spirit and teachings of the present disclosure. All such combinations and/or combinations fall within the scope of the present disclosure.
The embodiments of the present disclosure are described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the embodiments cannot be used advantageously in combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be made by those skilled in the art without departing from the scope of the disclosure, and such alternatives and modifications are intended to fall within the scope of the disclosure.
Claims (18)
1. A data communication method applied to an edge in a container cluster management system, the method comprising:
determining a communication type and a communication connection state according to a first data communication request in response to receiving the first data communication request, wherein the first data communication request comprises source address information corresponding to a source container group and target address information corresponding to a target container group;
acquiring data to be communicated by utilizing an acquisition tool corresponding to the source address information according to the communication type, wherein the edge end comprises at least one edge node, and the acquisition tools are respectively arranged on the at least one edge node; and
And under the condition that the communication connection state is not communicated, based on the first communication connection, sending a second data communication request to a cloud node of the cloud so that the cloud node can forward the second data communication request to a target node corresponding to the target container group according to the target address information, wherein the second data communication request comprises the data to be communicated and the target address information.
2. The method of claim 1, wherein each of the at least one edge node comprises at least one container group, the at least one container group each corresponding to address information, the address information determined by:
for each of the at least one edge node,
determining a sub-network segment range corresponding to the edge node according to the network segment range of the container cluster management system; and
and determining the respective address information of the at least one container group corresponding to the edge node according to the subnet segment range corresponding to the edge node.
3. The method of claim 2, wherein the at least one edge node each corresponds to an edge node identification, and the at least one container group each corresponds to a container group identification;
The method further comprises, after the determining, according to the subnet range corresponding to the edge node, respective address information of the at least one container group corresponding to the edge node:
determining a first routing rule according to an edge node identifier corresponding to the edge node and at least one container group identifier; and
and determining a second routing rule according to the at least one container group identifier and the respective address information of the at least one container group.
4. The method of claim 1, wherein the determining the communication type and the communication connection state from the first data communication request in response to receiving the first data communication request comprises:
determining a source node identifier and a target node identifier according to the source address information, the target address information, the first routing rule and the second routing rule; and
and determining the communication type and the communication connection state according to the source node identification and the target node identification.
5. The method of claim 4, wherein the determining a source node identity and a destination node identity from the source address information, the destination address information, a first routing rule, and a second routing rule comprises:
Determining a source container group identifier according to the source address information and the second routing rule;
determining a source node identifier according to the source container group identifier and the first routing rule;
determining a target container group identifier according to the target address information and the second routing rule; and
and determining a target node identifier according to the target container group identifier and the first routing rule.
6. The method according to claim 4 or 5, wherein said determining the communication type and communication connection status from the source node identification and the destination node identification comprises:
under the condition that the source node identification is consistent with the target node identification, determining the communication type as the node communication;
under the condition that the source node identification is inconsistent with the target node identification, determining the communication type as cross-node communication;
determining that the communication connection state is communicated under the condition that heartbeat connection exists between a source node and a target node, wherein the source node corresponds to the source node identification, and the target node corresponds to the target node identification; and
and under the condition that the heartbeat connection does not exist between the source node and the target node, determining that the communication connection state is not communicated.
7. The method of claim 6, wherein the acquiring the data to be communicated using the acquisition tool corresponding to the source address information according to the communication type comprises:
under the condition that the communication type is the node communication, acquiring the data to be communicated from the target container group by utilizing the acquisition tool; and
and under the condition that the communication type is cross-node communication, acquiring the data to be communicated from a target port by utilizing the acquisition tool.
8. The method of claim 1, wherein the sending, based on the first communication connection, the second data communication request to the cloud node of the cloud, if the communication connection state is not connected, comprises:
under the condition that the communication connection state is not communicated, a first communication connection is established between a source node corresponding to the source container group and a cloud node of the cloud; and
and sending the second data communication request to the cloud node based on the first communication connection.
9. The method of claim 1, further comprising:
establishing a second communication connection between the source node and the target node in the case that the communication connection state is connected; and
And sending the second data communication request to the target node based on the second communication connection so as to facilitate the completion of the data communication between the source node and the target node.
10. The method of any of claims 1 to 9, wherein the edge is constructed based on KubeEdge and the cloud is constructed based on Kubernetes.
11. A data communication method applied to a cloud in a container cluster management system, the method comprising:
determining a target node identification according to a second data communication request in response to receiving the second data communication request, wherein the second data communication request comprises data to be communicated and target address information; and
and sending the data to be communicated to a target node corresponding to the target node identifier by using a configuration tool so as to finish data communication between the source node and the target node, wherein the cloud comprises a cloud node, and the configuration tool is deployed on the cloud node.
12. The method of claim 11, wherein the determining the target node identification in response to receiving a second data communication request from the second data communication request comprises:
Determining a target container group identifier according to the target address information; and
and determining the target node identification according to the target container group identification.
13. The method according to claim 11 or 12, wherein the sending the data to be communicated to a target node corresponding to the target node identification using a configuration tool in order to complete data communication between the source node and the target node comprises:
and sending the data to be communicated to an acquisition tool corresponding to the target node identifier by using the configuration tool, so that the acquisition tool can forward the data to be communicated to a target container group corresponding to the target container group identifier.
14. A data communication device for use at an edge in a container cluster management system, the device comprising:
a first determining module, configured to determine a communication type and a communication connection state according to a first data communication request in response to receiving the first data communication request, where the first data communication request includes source address information corresponding to a source container group and destination address information corresponding to a destination container group;
the acquisition module is used for acquiring data to be communicated by utilizing an acquisition tool corresponding to the source address information according to the communication type, wherein the edge end comprises at least one edge node, and the acquisition tools are respectively deployed on the at least one edge node; and
The first sending module is configured to send, based on the first communication connection, a second data communication request to a cloud node in the cloud, so that the cloud node forwards, according to the target address information, the second data communication request to a target node corresponding to the target container group, where the second data communication request includes the data to be communicated and the target address information.
15. A data communication device for use in a cloud in a container cluster management system, the device comprising:
a second determining module, configured to determine, in response to receiving a second data communication request, a target node identifier according to the second data communication request, where the second data communication request includes data to be communicated and target address information; and
the second sending module is configured to send the data to be communicated to a target node corresponding to the target node identifier by using a configuration tool, so as to complete data communication between the source node and the target node, where the cloud end includes a cloud end node, and the cloud end node deploys the configuration tool.
16. An electronic device, comprising:
one or more processors;
a memory for storing one or more instructions,
wherein the one or more instructions, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1 to 10 or 11 to 13.
17. A computer readable storage medium having stored thereon executable instructions which when executed by a processor cause the processor to implement the method of any of claims 1 to 10 or 11 to 13.
18. A computer program product comprising computer executable instructions for implementing the method of any one of claims 1 to 10 or 11 to 13 when executed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211617204.0A CN116032995A (en) | 2022-12-13 | 2022-12-13 | Data communication method and device, electronic equipment and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211617204.0A CN116032995A (en) | 2022-12-13 | 2022-12-13 | Data communication method and device, electronic equipment and computer readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116032995A true CN116032995A (en) | 2023-04-28 |
Family
ID=86090421
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211617204.0A Pending CN116032995A (en) | 2022-12-13 | 2022-12-13 | Data communication method and device, electronic equipment and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116032995A (en) |
-
2022
- 2022-12-13 CN CN202211617204.0A patent/CN116032995A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10841336B2 (en) | Selectively providing mutual transport layer security using alternative server names | |
CN108449418B (en) | Hybrid cloud platform management system and method | |
CN112165532B (en) | Node access method, device, equipment and computer readable storage medium | |
CN107615716B (en) | Multi-tenant aware Dynamic Host Configuration Protocol (DHCP) mechanism for cloud networking | |
WO2017113201A1 (en) | Network service lifecycle management method and device | |
CN113987074A (en) | Distributed service full-link monitoring method and device, electronic equipment and storage medium | |
CN113259479B (en) | Data processing method and equipment | |
CN108200018B (en) | Flow forwarding method and equipment, computer equipment and readable medium in cloud computing | |
CN112748962B (en) | Application loading method, device, electronic equipment and computer readable medium | |
CN109104368B (en) | Connection request method, device, server and computer readable storage medium | |
US12052173B2 (en) | Executing workloads across multiple cloud service providers | |
CN114172966A (en) | Service calling method and device and service processing method and device under unitized architecture | |
US12074918B2 (en) | Network-based Media Processing (NBMP) workflow management through 5G Framework for Live Uplink Streaming (FLUS) control | |
CN115589383A (en) | eBPF-based virtual machine data transmission method, device, equipment and storage medium | |
CN112202744A (en) | Multi-system data communication method and device | |
CN113949639B (en) | Resource allocation method, device, equipment and medium | |
EP3740869B1 (en) | Automated distribution of models for execution on a non-edge device and an edge device | |
CN114385382A (en) | Light application access method and device, computer equipment and storage medium | |
EP3857826B1 (en) | Flexible unnumbered destination tunnels for virtual networks | |
CN112804366A (en) | Method and device for resolving domain name | |
US9916280B2 (en) | Virtualizing TCP/IP services with shared memory transport | |
CN115514771A (en) | Data transmission method and device, electronic equipment and computer readable storage medium | |
CN114760360B (en) | Request response method, request response device, electronic equipment and computer readable storage medium | |
CN116032995A (en) | Data communication method and device, electronic equipment and computer readable storage medium | |
WO2021232860A1 (en) | Communication method, apparatus and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |