Data communication method and device, electronic device and computer-readable storage medium

By deploying acquisition tools in edge computing and using cloud nodes to forward data communication requests, the problem of instability of node communication in edge computing is solved, and stable and efficient data transmission is achieved, suitable for systems built by Kubernetes and KubeEdge.

CN116032995BActive Publication Date: 2025-09-02CHINA CONSTRUCTION BANK +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211617204.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-13
Publication Date
2025-09-02
Estimated Expiration
2042-12-13

AI Technical Summary

Technical Problem

The prior art cannot guarantee the communication stability and communication efficiency between different nodes during edge computing.

Method used

By deploying acquisition tools on the edge, using cloud nodes to forward data communication requests based on communication type and connection status, ensuring that data is transmitted to the target container group through cloud nodes without connection, and using KubeEdge and Kubernetes to build edge and cloud architectures.

Benefits of technology

Data communication across cloud nodes or edge nodes is realized, ensuring the communication stability and efficiency of the container cluster management system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116032995B_ABST
    Figure CN116032995B_ABST
Patent Text Reader

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 fields of edge computing technology and financial technology. The data communication method includes: in response to receiving a first data communication request, determining a communication type and a communication connection state according to the first data communication request, wherein the first data communication request includes source address information corresponding to a source container group and target address information corresponding to a target container group; according to the communication type, obtaining data to be communicated using a collection tool corresponding to the source address information; and when the communication connection state is disconnected, sending a second data communication request to a cloud node in the cloud based on the first communication connection, 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 includes the data to be communicated and the target address information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of edge computing technology and the field of financial technology, and more specifically, to a data communication method and device, an electronic device, a computer-readable storage medium, and a computer program product. Background Art

[0002] With the development of computer technology, edge computing technology came into being.

[0003] Edge computing refers to the process of migrating the computation of applications, data, and services from central network nodes to edge nodes for processing. The overall architecture of edge computing can be divided into cloud, edge, and end components.

[0004] In the process of implementing the concept of the present disclosure, the inventors discovered that there are at least the following problems in the related art: the communication stability and efficiency between different nodes in the edge computing process cannot be guaranteed. Summary of the Invention

[0005] 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.

[0006] According to one aspect of the present disclosure, a data communication method is provided, which is applied to an edge terminal in a container cluster management system. The method includes:

[0007] In response to receiving a first data communication request, determining a communication type and a communication connection state according to the first data communication request, wherein the first data communication request includes source address information corresponding to the source container group and target address information corresponding to the target container group;

[0008] According to the communication type, using a collection tool corresponding to the source address information, to obtain the data to be communicated, wherein the edge end includes at least one edge node, and each of the at least one edge node is deployed with the collection tool; and

[0009] When the communication connection state is disconnected, a second data communication request is sent to a cloud node in the cloud based on the first communication connection, 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 includes the data to be communicated and the target address information.

[0010] According to an embodiment of the present disclosure, each of the at least one edge node includes at least one container group. Each of the at least one container group has corresponding address information. The address information is determined in the following manner:

[0011] For each edge node in the at least one edge node,

[0012] Determine the subnet segment range corresponding to the edge node based on the network segment range of the container cluster management system; and

[0013] According to the subnet segment range corresponding to the edge node, address information of each of the at least one container group corresponding to the edge node is determined.

[0014] According to an embodiment of the present disclosure, each of the at least one edge node corresponds to an edge node identifier, and each of the at least one container group corresponds to a container group identifier.

[0015] The method further includes, after determining the address information of each of the at least one container group corresponding to the edge node based on the subnet segment range corresponding to the edge node:

[0016] Determining a first routing rule according to the edge node identifier corresponding to the edge node and at least one container group identifier; and

[0017] A second routing rule is determined according to the at least one container group identifier and the address information of each of the at least one container group.

[0018] According to an embodiment of the present disclosure, in response to receiving the first data communication request, determining the communication type and the communication connection state according to the first data communication request includes:

[0019] Determine a source node identifier and a target node identifier based on the source address information, the target address information, the first routing rule, and the second routing rule; and

[0020] The communication type and communication connection state are determined according to the source node identifier and the target node identifier.

[0021] According to an embodiment of the present disclosure, determining the source node identifier and the target node identifier based on the source address information, the target address information, the first routing rule, and the second routing rule includes:

[0022] Determine a source container group identifier based on the source address information and the second routing rule;

[0023] Determine a source node identifier based on the source container group identifier and the first routing rule.

[0024] Determine a target container group identifier based on the target address information and the second routing rule; and

[0025] The target node identifier is determined according to the target container group identifier and the first routing rule.

[0026] According to an embodiment of the present disclosure, determining the communication type and the communication connection state according to the source node identifier and the target node identifier includes:

[0027] When the source node identifier and the target node identifier are consistent, determining the communication type as local node communication;

[0028] In the case where the source node identifier and the target node identifier are inconsistent, determining the communication type as cross-node communication;

[0029] In a case where a heartbeat connection exists between the source node and the target node, determining that the communication connection state is connected, wherein the source node corresponds to the source node identifier, and the target node corresponds to the target node identifier; and

[0030] In the case that there is no heartbeat connection between the source node and the target node, it is determined that the communication connection state is disconnected.

[0031] According to an embodiment of the present disclosure, the acquisition of the data to be communicated using a collection tool corresponding to the source address information according to the communication type includes:

[0032] In the case where the communication type is local node communication, using the acquisition tool to obtain the data to be communicated from the target container group; and

[0033] In the case where the communication type is inter-node communication, the data to be communicated is acquired from the target port using the acquisition tool.

[0034] According to an embodiment of the present disclosure, when the communication connection state is disconnected, sending the second data communication request to the cloud node in the cloud based on the first communication connection includes:

[0035] When the communication connection state is disconnected, establishing a first communication connection between the source node corresponding to the source container group and the cloud node in the cloud; and

[0036] Based on the first communication connection, the second data communication request is sent to the cloud node.

[0037] According to an embodiment of the present disclosure, the data communication method further includes:

[0038] When the communication connection state is connected, establishing a second communication connection between the source node and the target node; and

[0039] Based on the second communication connection, the second data communication request is sent to the target node, so as to complete the data communication between the source node and the target node.

[0040] According to an embodiment of the present disclosure, the edge is built based on KubeEdge, and the cloud is built based on Kubernetes.

[0041] According to another aspect of the present disclosure, a data communication method is provided, which is applied to the cloud in a container cluster management system. The method includes:

[0042] In response to receiving a second data communication request, determining a target node identifier according to the second data communication request, wherein the second data communication request includes data to be communicated and target address information; and

[0043] The configuration tool is used to send the data to be communicated to the target node corresponding to the target node identifier, so as to complete the data communication between the source node and the target node, wherein the cloud includes a cloud node, and the cloud node is deployed with the configuration tool.

[0044] According to an embodiment of the present disclosure, in response to receiving the second data communication request, determining the target node identifier according to the second data communication request includes:

[0045] Determine the target container group identifier based on the target address information; and

[0046] The target node identifier is determined according to the target container group identifier.

[0047] According to an embodiment of the present disclosure, using a configuration tool to send 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:

[0048] The configuration tool is used to send the data to be communicated to a collection tool corresponding to the target node identifier, so that the collection tool forwards the data to be communicated to the target container group corresponding to the target container group identifier.

[0049] According to another aspect of the present disclosure, a data communication device is provided, which is applied to an edge terminal in a container cluster management system. The device includes:

[0050] a first determining module configured to, in response to receiving a first data communication request, determine a communication type and a communication connection state according to the first data communication request, wherein the first data communication request includes source address information corresponding to the source container group and target address information corresponding to the target container group;

[0051] an acquisition module, configured to acquire the data to be communicated based on the communication type and using a collection tool corresponding to the source address information, wherein the edge end includes at least one edge node, and each of the at least one edge node is deployed with the collection tool; and

[0052] A first sending module is configured to send, when the communication connection state is disconnected, a second data communication request to a cloud node in the cloud based on the first communication connection, 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 includes the data to be communicated and the target address information.

[0053] According to another aspect of the present disclosure, a data communication device is provided, which is applied to a cloud in a container cluster management system. The device includes:

[0054] a second determining module configured to, in response to receiving a second data communication request, determine a target node identifier according to the second data communication request, wherein the second data communication request includes data to be communicated and target address information; and

[0055] The second sending module is used to use the configuration tool to send the above-mentioned data to be communicated to the target node corresponding to the above-mentioned target node identifier, so as to complete the data communication between the above-mentioned source node and the above-mentioned target node, wherein the above-mentioned cloud includes a cloud node, and the above-mentioned cloud node is deployed with the above-mentioned configuration tool.

[0056] According to another aspect of the present disclosure, there is provided an electronic device, comprising:

[0057] one or more processors;

[0058] a memory for storing one or more instructions,

[0059] When the one or more instructions are executed by the one or more processors, the one or more processors implement the method described in the present disclosure.

[0060] According to another aspect of the present disclosure, a computer-readable storage medium is provided, on which executable instructions are stored. When the executable instructions are executed by a processor, the processor implements the method described in the present disclosure.

[0061] According to another aspect of the present disclosure, a computer program product is provided. The computer program product includes computer-executable instructions. When the computer-executable instructions are executed, they are used to implement the method described in the present disclosure.

[0062] According to the embodiments of the present disclosure, since the communication type and the communication connection status are determined according to the first data communication request, the data to be communicated is obtained by using the collection tool corresponding to the source address information according to the communication type, and when the communication connection status is disconnected, the data to be communicated and the target address information are forwarded to the target node corresponding to the target container group via the cloud node in the cloud, thereby opening up the network path between the container group deployed in the cloud and the container group deployed at the edge in edge computing, thereby at least partially overcoming the technical problem in the related art that the communication stability and communication efficiency between different nodes in the edge computing process cannot be guaranteed, thereby realizing data communication across cloud nodes or across edge nodes, and ensuring the communication stability and communication efficiency in the container cluster management system. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] The above and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:

[0064] Figure 1 The system architecture to which the data communication method according to an embodiment of the present disclosure can be applied is schematically shown;

[0065] Figure 2 The flowchart of the data communication method according to the embodiment of the present disclosure is schematically shown;

[0066] Figure 3A The following schematically illustrates an example process of determining a subnet segment range corresponding to an edge node according to an embodiment of the present disclosure;

[0067] Figure 3B The following schematically illustrates an example process of determining the address information of at least one container group corresponding to an edge node according to an embodiment of the present disclosure;

[0068] Figure 3C An exemplary diagram schematically illustrates a process of determining a first routing rule and a second routing rule according to an embodiment of the present disclosure;

[0069] Figure 4 Schematically illustrates an example 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;

[0070] Figure 5 An exemplary diagram schematically illustrates a data communication process according to an embodiment of the present disclosure;

[0071] Figure 6 Schematically shows a flow chart of a data communication method according to another embodiment of the present disclosure;

[0072] Figure 7An exemplary diagram schematically illustrates a data communication process according to another embodiment of the present disclosure;

[0073] Figure 8 Schematically shows a block diagram of a data communication device according to an embodiment of the present disclosure;

[0074] Figure 9 A block diagram schematically shows a data communication device according to another embodiment of the present disclosure; and

[0075] Figure 10 The block diagram schematically shows an electronic device suitable for implementing a data communication method according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0076] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present disclosure. In the detailed description below, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.

[0077] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise," "include," etc. used herein indicate the presence of the features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0078] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.

[0079] When expressions such as “at least one of A, B, and C, etc.” are used, they should generally be interpreted in accordance with the meaning commonly understood by those skilled in the art (e.g., “a system having at least one of A, B, and C” should include but is not limited to systems having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, and C, etc.). When expressions such as “at least one of A, B, or C, etc.” are used, they should generally be interpreted in accordance with the meaning commonly understood by those skilled in the art (e.g., “a system having at least one of A, B, or C” should include but is not limited to systems having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, and C, etc.).

[0080] In the technical solution disclosed herein, the acquisition, storage and application of user personal information involved comply with the provisions of relevant laws and regulations, take necessary confidentiality measures, and do not violate public order and good morals.

[0081] In the technical solution disclosed herein, the user's authorization or consent is obtained before obtaining or collecting the user's personal information.

[0082] The cloud portion can refer to the central nodes of traditional cloud computing, which are the control and management end of edge computing. The edge portion can refer to the edge side of cloud computing, including the infrastructure edge and the device edge. The end portion can refer to terminal devices such as mobile phones, smart appliances, various sensors, and cameras.

[0083] Cloud-edge collaboration can be achieved by controlling Kubernetes nodes in the cloud and running nodes on KubeEdge at the edge. Edge-end collaboration can be achieved by KubeEdge at the edge and EdgeX Foundry at the edge.

[0084] In existing technologies, EdgeMesh components are often used to enable communication between cloud pods and edge pods. For example, access to the corresponding pod is achieved indirectly by creating and accessing the corresponding service. However, because EdgeMesh implements service functionality in user space, each service requires a service listening port to be enabled on the node, which can easily lead to insufficient ports in large-scale clusters.

[0085] In addition, since the Service function is not applicable to certain cluster types and cannot meet certain specific edge computing scenarios, there may be problems with communication being unable to be achieved through the Service function.

[0086] In order to at least partially solve the technical problems existing in the related art, the present disclosure provides a data communication method and device, an electronic device and a computer-readable storage medium, which can be applied to the field of edge computing technology and the field of financial technology. The data communication method includes: in response to receiving a first data communication request, determining the communication type and communication connection status according to the first data communication request, wherein the first data communication request includes source address information corresponding to the source container group and target address information corresponding to the target container group; according to the communication type, using a collection tool corresponding to the source address information to obtain the data to be communicated, wherein the edge end includes at least one edge node, and the at least one edge node is each deployed with a collection tool; when the communication connection status is disconnected, based on the first communication connection, sending a second data communication request to a cloud node in the cloud, 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, wherein the second data communication request includes the data to be communicated and the target address information.

[0087] It should be noted that the data communication method and apparatus provided in the embodiments of the present disclosure can be used in the fields of edge computing technology and financial technology, such as in the field of Kubernetes container technology. The data communication method and apparatus provided in the embodiments of the present disclosure can also be used in any field other than the fields of edge computing technology and financial technology, such as in the field of computer technology. The application fields of the data communication method and apparatus provided in the embodiments of the present disclosure are not limited.

[0088] Figure 1 The system architecture to which the data communication method according to the embodiment of the present disclosure can be applied is schematically shown. Figure 1 The examples shown are merely examples of system architectures to which the embodiments of the present disclosure may be applied, to help those skilled in the art understand the technical content of the present disclosure, but do not mean that the embodiments of the present disclosure may not be used in other devices, systems, environments or scenarios.

[0089] like Figure 1 As shown, the 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 used as a medium for providing 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 or wireless communication links or fiber optic cables.

[0090] The user may use at least one of the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 via the network 104 to receive or send messages, etc. Various communication client applications may be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).

[0091] The first terminal device 101 , the second terminal device 102 , and the third terminal device 103 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.

[0092] The server 105 may be a server that provides various services, such as a background management server (for example only) that supports websites browsed by users 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 received user requests and other data, and feed back processing results (e.g., web pages, information, or data obtained or generated according to user requests) to the terminal devices.

[0093] It should be noted that the data communication method provided in the embodiments of the present disclosure can generally be executed by the server 105. Accordingly, the data communication device provided in the embodiments of the present disclosure can generally be set in the server 105. The data communication method provided in the embodiments of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate 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 device provided in the embodiments of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105.

[0094] Alternatively, the data processing method provided in the embodiment of the present disclosure may also be executed by the first terminal device 101, the second terminal device 102, or the third terminal device 103, or may also be executed by another terminal device different from the first terminal device 101, the second terminal device 102, or the third terminal device 103. Accordingly, the data communication apparatus provided in the embodiment 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 may be provided in another terminal device different from the first terminal device 101, the second terminal device 102, or the third terminal device 103.

[0095] It should be understood that Figure 1The number of terminal devices, networks and servers in the embodiment is merely illustrative. Any number of terminal devices, networks and servers may be provided as required.

[0096] It should be noted that the sequence numbers of the operations in the following method are only used to indicate the operation for the purpose of description, and should not be regarded as indicating the order in which the operations should be performed. Unless explicitly stated, the method does not need to be performed in the order shown.

[0097] Figure 2 The flowchart of the data communication method according to the embodiment of the present disclosure is schematically shown.

[0098] like Figure 2 As shown, the data communication method 200 includes operations S210 to S230.

[0099] In operation S210 , in response to receiving a first data communication request, a communication type and a 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 target address information corresponding to the target container group.

[0100] In operation S220, data to be communicated is acquired using a collection tool corresponding to the source address information according to the communication type, wherein the edge end includes at least one edge node, and each of the at least one edge node is deployed with a collection tool.

[0101] In operation S230, when the communication connection state is disconnected, a second data communication request is sent to a cloud node in the cloud based on the first communication connection, 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 includes the data to be communicated and the target address information.

[0102] According to an embodiment of the present disclosure, the data communication method 200 can be applied to an edge end in a container cluster management system.

[0103] According to an embodiment of the present disclosure, a container cluster management system may include an edge end and a cloud end. The edge end may be used to run edge applications and manage access devices. The edge end may include at least one edge node. The edge node may represent a node in the container cluster used for business data processing. The cloud end may be used to distribute applications and configurations. The cloud end may include cloud nodes. The cloud end node may represent a node in the container cluster used to deploy management and control components. A node (i.e., a node) may represent a managed independent host in the container cluster, such as a physical machine or a virtual machine.

[0104] According to an embodiment of the present disclosure, each of at least one edge node may include at least one container group (i.e., pod). A container group may represent the smallest deployable computing unit created and managed in a container cluster. Each of the at least one container group may include at least one container. For example, a source node and a target node may be edge nodes. A source node may include a source container group. A target node may include a target container group.

[0105] According to an embodiment of the present disclosure, code for generating a first data communication request can be pre-written into a first script. In response to detecting a data communication operation initiated by a source node at an edge end, the container cluster management system can execute the first script to generate the first data communication request. The container cluster management system can send the first data communication request to an edge end within the container cluster management system, so that the edge end can obtain the data to be communicated according to the first data communication request.

[0106] 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 target address information corresponding to the target container group. The source address information and the target address information may be Internet Protocol (IP). The source container group and the target container group may be container groups deployed on the same edge node. Alternatively, the source container group and the target container group may be container groups deployed on the same edge node.

[0107] According to an embodiment of the present disclosure, after receiving a first data communication request, a communication type and a communication connection status can be determined based on the first data communication request. The communication type can be used to indicate whether the source node and the destination node belong to the same edge node. The communication type can include at least one of the following: inter-node communication and local node communication. The communication connection status can be used to indicate whether a communication connection exists between the source node and the destination node. The communication connection status can include at least one of the following: disconnected and connected.

[0108] According to an embodiment of the present disclosure, after determining the communication type, the data to be communicated can be obtained using a collection tool corresponding to the source address information based on the communication type. At least one edge node can each be deployed with a collection tool (i.e., an edgemesh-agent). The collection tool can be used to obtain the data to be communicated from the source node. For example, a collection tool can be deployed on each edge node using a DaemonSet. Based on the source address information, the collection tool corresponding to the source address information can be determined. Using the collection tool corresponding to the source address information, the data to be communicated from the source container group can be obtained.

[0109] According to an embodiment of the present disclosure, code for generating a second data communication request can be pre-written into a second script. In response to obtaining the data to be communicated, the container cluster management system can execute the second script to generate the second data communication request. The container cluster management system can send the second data communication request to an edge device within the container cluster management system, so that the edge device can send the second data communication request to the cloud.

[0110] According to an embodiment of the present disclosure, after determining the communication connection status, a first communication connection can be established between a source node corresponding to the source container group and a cloud node in the cloud, if the communication connection status is disconnected, so as to send a second data communication request to the cloud node using an application layer protocol based on the first communication connection. The application layer protocol includes at least one of the following: a full-duplex communication protocol based on the Transmission Control Protocol (WebSocket), a Hypertext Transfer Protocol (HTTP), and a Message Queuing Telemetry Transport (MQTT).

[0111] According to an embodiment of the present disclosure, after receiving the second data communication request, the cloud node may send the data to be communicated to the target node. After receiving the second data communication request, the target node may determine the target container group identifier based on the target address information in the second data communication request. Based on the target container group identifier, the data to be communicated may be sent to the target container group.

[0112] According to the embodiments of the present disclosure, since the communication type and the communication connection status are determined according to the first data communication request, the data to be communicated is obtained by using the collection tool corresponding to the source address information according to the communication type, and when the communication connection status is disconnected, the data to be communicated and the target address information are forwarded to the target node corresponding to the target container group via the cloud node in the cloud, thereby opening up the network path between the container group deployed in the cloud and the container group deployed at the edge in edge computing, thereby at least partially overcoming the technical problem in the related art that the communication stability and communication efficiency between different nodes in the edge computing process cannot be guaranteed, thereby realizing data communication across cloud nodes or across edge nodes, and ensuring the communication stability and communication efficiency of the container cluster management system.

[0113] Reference below Figure 3A 、 Figure 3B 、 Figure 3C 、 Figure 4 and Figure 5 , the data communication method 200 according to the embodiment of the present invention is further described.

[0114] According to an embodiment of the present disclosure, the edge is built based on KubeEdge, and the cloud is built based on Kubernetes.

[0115] According to an embodiment of the present disclosure, Kubernetes (i.e., K8s) is a container orchestration engine that can be used to automatically deploy, scale, and manage containerized applications. Cloud computing can be built based on Kubernetes.

[0116] According to embodiments of the present disclosure, KubeEdge is built on Kubernetes. KubeEdge can extend native containerized application orchestration capabilities to edge nodes. KubeEdge provides core infrastructure support for network communication, application deployment, and metadata synchronization between the cloud and the edge. Edge nodes can be built based on KubeEdge.

[0117] According to an embodiment of the present disclosure, address information may be determined in the following manner.

[0118] For each of the at least one edge node, a subnet segment range corresponding to the edge node is determined based on the network segment range of the container cluster management system. Address information of at least one container group corresponding to the edge node is determined based on the subnet segment range corresponding to the edge node.

[0119] According to an embodiment of the present disclosure, each of the at least one edge node may include at least one container group. Each of the at least one container group may correspond to address information.

[0120] According to an embodiment of the present disclosure, during the deployment of a container cluster management system, the network segment range of the container cluster management system can be preset. The network segment range can include Classless Inter-Domain Routing (CIDR). The network segment range can be used to limit the network address range of the container group in the container cluster.

[0121] According to an embodiment of the present disclosure, in response to detecting a new edge node accessing a container cluster, the subnet segment range corresponding to the edge node is determined based on the network segment range of the container cluster management system. For example, IP Address Management (IPAM) can be used to assign a globally unique address segment to each edge node, and the address information of the container group scheduled to the edge node can all be within the subnet segment range.

[0122] According to an embodiment of the present disclosure, after determining the subnet segment range corresponding to the edge node, the node identifier and subnet segment range corresponding to the edge node can be recorded. For example, the node identifier and subnet segment range corresponding to the edge node can be recorded in the annotation of the edge node. The annotation of the edge node belongs to a map type field, and a key-value pair can be used to save the node's external address information. For example, the key-value pair can be "edgemesh-agent.nodeA / public-ip:192.168.100.10". In this case, the address information of the edge node A can be represented as 192.168.100.10.

[0123] Figure 3A An example diagram of a process for determining a subnet segment range corresponding to an edge node according to an embodiment of the present disclosure is schematically shown.

[0124] like Figure 3A As shown, in 300A, at least one edge node 301 may include edge node 3011, edge node 3012, ..., edge node 301m, ..., edge node 301M. M may be an integer greater than or equal to 1, m∈{1, 2, ..., (M-1), M}.

[0125] According to the network segment range of the container cluster management system, the subnet segment range 3021 corresponding to the edge node 3011, the subnet segment range 3022 corresponding to the edge node 3012, ..., the subnet segment range 302m corresponding to the edge node 301m, ..., and the subnet segment range 302M corresponding to the edge node 301M can be determined.

[0126] Figure 3B The following schematically illustrates an example process of determining the address information of at least one container group corresponding to an edge node according to an embodiment of the present disclosure.

[0127] like Figure 3B As shown in 300B, for each edge node 303 in at least one edge node, edge node 303 may include at least one container group. The at least one container group may include container group 304_1, container group 304_2, ..., container group 304_n, ..., container group 304_N. N may be an integer greater than or equal to 1, where n∈{1, 2, ..., (N-1), N}.

[0128] According to the subnet segment range corresponding to the edge node 303 , 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 can be determined.

[0129] According to an embodiment of the present disclosure, the data communication method 200 may further include the following operations.

[0130] A first routing rule is determined based on an edge node identifier corresponding to the edge node and at least one container group identifier. A second routing rule is determined based on the at least one container group identifier and address information of at least one container group.

[0131] According to an embodiment of the present disclosure, at least one edge node may each correspond to an edge node identifier, and at least one container group may each correspond to a container group identifier.

[0132] According to embodiments of the present disclosure, an edge node identifier can be used to identify an edge node. A container group identifier can be used to identify a container group. A first routing rule can include a correspondence between an edge node identifier and at least one container group identifier. A second routing rule can include a correspondence between at least one container group identifier and the address information of at least one container group.

[0133] According to an embodiment of the present disclosure, in response to detecting that a new edge node has accessed a container cluster, a network card tun0 may be created on the edge node. The network card tun0 may be of the tunnle type. In response to receiving a first data communication request, the communication type may be determined based on the first routing rule and the second routing rule. If the communication type is cross-node communication, the data to be communicated may be sent to the network card tun0.

[0134] According to an embodiment of the present disclosure, since the subnet segment range corresponding to the edge node is determined based on the network segment range of the container cluster management system, and the address information of at least one container group corresponding to the edge node is determined based on the subnet segment range corresponding to the edge node, it is possible to automatically assign address information to at least one container group corresponding to the edge node, thereby ensuring the communication efficiency of the container cluster management system. On this basis, since the first routing rule is determined based on the edge node identifier and at least one container group identifier corresponding to the edge node, and the second routing rule is determined based on at least one container group identifier and the address information of at least one container group, it is possible to automatically configure routing rules for the edge node, thereby ensuring the communication accuracy of the container cluster management system.

[0135] Figure 3C An example diagram of a process of determining a first routing rule and a second routing rule according to an embodiment of the present disclosure is schematically shown.

[0136] like Figure 3CAs shown, in 300C, after determining the address information of at least one container group corresponding to the edge node, a first routing rule 309 can be determined for each of the at least one edge node based on the edge node identifier 306 and the at least one container group identifier 307 corresponding to the edge node. A second routing rule 310 can be determined based on the at least one container group identifier 307 and the address information 308 of the at least one container group.

[0137] According to an embodiment of the present disclosure, operation S210 may include the following operations.

[0138] The source node identifier and the target node identifier are determined according to the source address information, the target address information, the first routing rule and the second routing rule. The communication type and the communication connection state are determined according to the source node identifier and the target node identifier.

[0139] 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 the source address information can be obtained. After obtaining the first routing rule and the second routing rule, a source container group identifier can be determined based on the source address information and the second routing rule. After determining the source container group identifier, a source node identifier can be determined based on the source container group identifier and the first routing rule.

[0140] According to an embodiment of the present disclosure, after obtaining the first routing rule and the second routing rule, the target container group identifier can be determined based on the target address information and the second routing rule. After determining the target container group identifier, the target node identifier can be determined based on the target container group identifier and the first routing rule.

[0141] According to an embodiment of the present disclosure, after determining the source node identifier and the target node identifier, a communication type can be determined based on the source node identifier and the target node identifier. The communication type can be used to indicate whether the source node and the target node belong to the same edge node. The communication type can include at least one of the following: cross-node communication and local node communication. Alternatively, the communication connection state can be determined based on the source node identifier and the target node identifier. The communication connection state can be used to indicate whether a communication connection exists between the source node and the target node. The communication connection state can include at least one of the following: disconnected and connected.

[0142] According to an embodiment of the present disclosure, determining the source node identifier and the target node identifier according to the source address information, the target address information, the first routing rule, and the second routing rule may include the following operations.

[0143] Determine a source container group identifier based on the source address information and the second routing rule. Determine a source node identifier based on the source container group identifier and the first routing rule. Determine a target container group identifier based on the target address information and the second routing rule. Determine a target node identifier based on the target container group identifier and the first routing rule.

[0144] According to an embodiment of the present disclosure, determining the communication type and the communication connection state according to the source node identifier and the target node identifier may include the following operations.

[0145] If the source node identifier and the target node identifier are consistent, the communication type is determined to be local node communication. If the source node identifier and the target node identifier are inconsistent, the communication type is determined to be inter-node communication. If a heartbeat connection exists between the source node and the target node, the communication connection state is determined to be connected, where the source node corresponds to the source node identifier and the target node corresponds to the target node identifier. If no heartbeat connection exists between the source node and the target node, the communication connection state is determined to be disconnected.

[0146] According to an embodiment of the present disclosure, the communication type can be determined based on whether the source node identifier and the target node identifier are consistent. The communication connection state can be determined based on whether a heartbeat connection exists between the source node and the target node.

[0147] According to an embodiment of the present disclosure, in response to detecting a new edge node connected to a container cluster, the edge node can be registered with a cloud-based configuration tool, and a connection can be established between the collection tool corresponding to the edge node and the cloud-based configuration tool. An informer in Kubernetes can be used to monitor node resources in the container cluster and maintain a preset dictionary. The preset dictionary can include mappings between container groups and address information.

[0148] According to an embodiment of the present disclosure, data to be communicated can be imported into tun0. A collection tool is used to read the data to be communicated from tun0 and parse the target address information. The target node and target container group are determined based on a preset dictionary and the target address information.

[0149] According to the embodiments of the present disclosure, since the source node identifier and the target node identifier are determined based on the source address information, the target address information, the first routing rule, and the second routing rule, and the communication type and the communication connection status are determined based on the source node identifier and the target node identifier, the communication type can indicate whether the source node and the target node belong to the same node, and the communication connection status can indicate whether a communication connection exists between the source node and the target node. This facilitates the subsequent implementation of data communication across cloud nodes or across edge nodes based on the communication type and communication connection status.

[0150] Figure 4The following schematically illustrates an example 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.

[0151] like Figure 4 As shown, in 400 , a source container group identifier 404 may be determined based on source address information 403 and second routing rule 402 . A source node identifier 407 may be determined based on source container group identifier 404 and first routing rule 401 .

[0152] A target container group identifier 406 may be determined based on the target address information 405 and the second routing rule 402. A target node identifier 408 may be determined based on the target container group identifier 406 and the first routing rule 401.

[0153] After the source node identifier 407 and the target node identifier 408 are determined, operations S410 and S420 may be performed.

[0154] In operation S410, are the source node identifier and the target node identifier consistent? If so, the communication type can be determined to be local node communication 409. If not, the communication type can be determined to be inter-node communication 410.

[0155] In operation S420, is there a heartbeat connection between the source node and the target node? If so, the communication connection state can be determined to be connected 411. If not, the communication connection state can be determined to be disconnected 412.

[0156] According to an embodiment of the present disclosure, operation S220 may include the following operations.

[0157] When the communication type is intra-node communication, the data to be communicated is acquired from the target container group using a collection tool. When the communication type is inter-node communication, the data to be communicated is acquired from the target port using a collection tool.

[0158] According to embodiments of the present disclosure, a collection tool can also be deployed in the cloud. The cloud collection tool can use the Kubernetes informer to monitor the Kube API server. The edge collection tool can monitor the Meta server. The Meta server can be a mirror of the Kube API server, with the KubeEdge component maintaining synchronization between the Meta server and the Kube API server.

[0159] According to an embodiment of the present disclosure, cross-node communication can be used to indicate that the source node corresponding to the source address information and the target node corresponding to the target address information belong to different nodes. Local node communication can be used to indicate that the source node corresponding to the source address information and the target node corresponding to the target address information belong to the same node.

[0160] According to an embodiment of the present disclosure, the collection tool can route data to be communicated, whose communication type is cross-node communication, to tun0. Alternatively, the collection tool can also obtain the data to be communicated from tun0 and establish a first communication connection between the source node and the target node. A second data communication request is sent to the first communication connection to read the return data from the first communication connection, and the return data is sent to the source container group of the source node.

[0161] According to an embodiment of the present disclosure, operation S230 may include the following operations.

[0162] When the communication connection state is disconnected, a first communication connection is established between the source node corresponding to the source container group and a cloud node in the cloud. Based on the first communication connection, a second data communication request is sent to the cloud node.

[0163] According to embodiments of the present disclosure, when the communication type is cross-node communication, data to be communicated can be obtained in different ways depending on the communication connection status. For example, when the communication connection status is disconnected, a first communication connection can be established between the source node corresponding to the source container group and a cloud node in the cloud. This first communication connection may include a proxy connection. In this case, the collection tool of the source node can send the data to be communicated to the configuration tool of the cloud node, the configuration tool of the cloud node can 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.

[0164] According to an embodiment of the present disclosure, the data communication method 200 may further include the following operations.

[0165] When 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 to complete the data communication between the source node and the target node.

[0166] According to embodiments of the present disclosure, when the communication connection state is connected, a second communication connection can be established between the source node corresponding to the source container group and the target node corresponding to the target container group. This second communication connection can include a proxy connection. In this case, the collection tool of the source node can directly send the data to be communicated to the collection tool of the target node, and the collection tool of the target node can send the data to be communicated to the target container group. Alternatively, the collection tool of the source node can forward the data to be communicated to the target node based on the second communication connection and obtain return data from the target node based on the second communication connection.

[0167] According to the embodiments of the present disclosure, when the communication connection state is connected, the data to be communicated can be forwarded directly to the target node based on the second communication connection, thereby ensuring the data communication efficiency of the container cluster management system. In addition, since when the communication connection state is disconnected, the data to be communicated can be forwarded to the target node via the cloud node based on the first communication connection, thereby ensuring the data communication stability of the container cluster management system.

[0168] Figure 5 An example diagram of a data communication process according to an embodiment of the present disclosure is schematically shown.

[0169] like Figure 5 As shown, in 500 , in response to receiving a first data communication request 501 , the edge end determines a communication type 502 and a communication connection state 503 according to the first data communication request 501 .

[0170] After determining the communication type 502 and the communication connection state 503 , operations S510 and S520 may be performed.

[0171] In operation S510, is the communication type local node communication? If yes, a collection tool can be used to obtain the data to be communicated 504 from the target container group. If no, a collection tool can be used to obtain the data to be communicated 504 from the target port.

[0172] In operation S520, is the communication connection status disconnected? If so, a first communication connection 505 may be established between the source node corresponding to the source container group and a cloud node 506 in the cloud. A second data communication request may be sent to the cloud node 506 based on the first communication connection 505. If so, a second communication connection 507 may be established between the source node and the target node. A second data communication request may be sent to the target node 508 based on the second communication connection 507.

[0173] The above are only exemplary embodiments, but are not limited thereto. Other data communication methods known in the art may also be included as long as they can ensure communication stability and communication efficiency in the container cluster management system.

[0174] Figure 6 The flowchart of a data communication method according to another embodiment of the present disclosure is schematically shown.

[0175] like Figure 6 As shown, the data communication method 600 includes operations S610 to S620.

[0176] In operation S610 , in response to receiving a second data communication request, a target node identifier is determined according to the second data communication request, wherein the second data communication request includes data to be communicated and target address information.

[0177] In operation S620, the data to be communicated is sent to the target node corresponding to the target node identifier using a configuration tool, so as to complete data communication between the source node and the target node, wherein the cloud includes a cloud node, and the cloud node is deployed with a configuration tool.

[0178] According to an embodiment of the present disclosure, the data communication method 600 can be applied to the cloud in a container cluster management system.

[0179] According to an embodiment of the present disclosure, a container cluster management system may include an edge device and a cloud. The cloud can be used to distribute applications and configurations. The cloud may include cloud nodes. A cloud node may represent a node in a container cluster used to deploy management and control components. A node may represent an independent host managed in a container cluster, such as a physical machine or a virtual machine. A cloud node may include at least one container group. A container group may represent the smallest deployable computing unit created and managed in a container cluster. Each of the at least one container group may include at least one container.

[0180] According to an embodiment of the present disclosure, the cloud may include a cloud node. The cloud node may be deployed with a configuration tool (i.e., edgemesh-server). The configuration tool may be used to forward the data to be communicated to the target node based on the target address information. For example, the configuration tool may be deployed on the cloud node via a deployment. The target node identifier may be determined based on the target address information. Using the configuration tool, the data to be communicated is sent to the target node corresponding to the target node identifier.

[0181] According to an embodiment of the present disclosure, after receiving the second data communication request, the cloud can determine the target node identifier based on the target address information in the second data communication request. The target node identifier can be used to identify the edge node where the target container group is deployed. After determining the target node identifier, a configuration tool can be used to send the data to be communicated to the target node corresponding to the target node identifier, thereby completing data communication between the source node and the target node.

[0182] According to the embodiments of the present disclosure, since the target node identifier is determined based on the second data communication request, data communication between the source node and the target node is achieved by using a configuration tool to send the data to be communicated to the target node corresponding to the target node identifier, thereby opening up the network path between the container group deployed in the cloud and the container group deployed at the edge in edge computing, thereby realizing data communication across cloud nodes or across edge nodes, and ensuring communication stability and communication efficiency in the container cluster management system.

[0183] Reference below Figure 7 , the data communication method 600 according to the embodiment of the present invention is further described.

[0184] According to an embodiment of the present disclosure, operation S610 may include the following operations.

[0185] The target container group ID is determined based on the target address information. The target node ID is determined based on the target container group ID.

[0186] According to an embodiment of the present disclosure, operation S620 may be performed as follows.

[0187] The configuration tool is used to send the data to be communicated to the collection tool corresponding to the target node identifier, so that the collection tool forwards the data to be communicated to the target container group corresponding to the target container group identifier.

[0188] According to embodiments of the present disclosure, the configuration tool can be understood as a proxy server. After receiving the second data communication request, the cloud can parse and process the second data communication request to obtain the data to be communicated and the target address information. Based on the target address information, the target container group identifier is determined. Based on the target container group identifier, the target node identifier is determined. Based on the target node identifier, the configuration tool forwards the data to be communicated to the collection tool corresponding to the target node identifier.

[0189] Figure 7 An exemplary diagram of a data communication process according to another embodiment of the present disclosure is schematically shown.

[0190] like Figure 7 As shown, 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 exemplified by taking the cloud including a cloud node 701 and the edge including an edge node 702 and an edge node 703 as an example.

[0191] Edge node 702 may be deployed with a collection tool 7020. Edge node 702 may include a container group 7021 and a container group 7022. Container group 7021 may include containers 70211 and 70212. Container group 7022 may include containers 70221, 70222, and 70223. In this case, collection tool 7020 may be used to collect data from containers 70211, 70212, 70221, 70222, and 70223.

[0192] Edge node 703 may be deployed with a collection tool 7030. Edge node 703 may include a container group 7031 and a container group 7032. Container group 7031 may include container 70311, container 70312, and container 70313. Container group 7032 may include container 70321 and container 70322. In this case, collection tool 7030 may be used to collect data from containers 70311, 70312, 70313, 70321, and 70322.

[0193] The cloud node 701 may be deployed with a configuration tool 7010. The configuration tool 7010 may communicate with a collection tool 7020. The configuration tool 7010 may communicate with a collection tool 7030.

[0194] For example, the initiator of data communication is container 70212 . In this 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 .

[0195] For example, the recipient of the data communication is container 70313 . In this 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 .

[0196] In this case, the collection tool 7020 of the edge node 702 can collect the data to be communicated of the container 70212 in the container group 7021. The collection tool 7020 can 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 can send the data to be communicated to the collection tool 7030 of the edge node 703. The collection tool 7030 of the edge node 703 can send the data to be communicated to the container 70313 in the container group 7031, thereby completing the 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.

[0197] The above are only exemplary embodiments, but are not limited thereto. Other data communication methods known in the art may also be included as long as they can ensure communication stability and communication efficiency in the container cluster management system.

[0198] Figure 8 The block diagram schematically shows a data communication device according to an embodiment of the present disclosure.

[0199] like Figure 8As shown, the data communication device 800 can be applied to the edge end of a container cluster management system. The data communication device 800 can include a first determining module 810 , an acquiring module 820 and a first sending module 830 .

[0200] The first determination module 810 is configured to, in response to receiving a first data communication request, determine a communication type and a communication connection state based on the first data communication request, wherein the first data communication request includes source address information corresponding to the source container group and target address information corresponding to the target container group.

[0201] The acquisition module 820 is configured to acquire the data to be communicated using a collection tool corresponding to the source address information according to the communication type, wherein the edge end includes at least one edge node, and each of the at least one edge node is deployed with a collection tool.

[0202] The first sending module 830 is configured to send a second data communication request to a cloud node in the cloud based on the first communication connection when the communication connection state is disconnected, 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 includes the data to be communicated and the target address information.

[0203] According to an embodiment of the present disclosure, each of the at least one edge node includes at least one container group. Each of the at least one container group corresponds to address information. The address information can be determined in the following manner.

[0204] For each of the at least one edge node, a subnet segment range corresponding to the edge node is determined based on the network segment range of the container cluster management system. Address information of at least one container group corresponding to the edge node is determined based on the subnet segment range corresponding to the edge node.

[0205] According to an embodiment of the present disclosure, at least one edge node corresponds to an edge node identifier, and at least one container group corresponds to a container group identifier.

[0206] According to an embodiment of the present disclosure, routing rules may be determined in the following manner.

[0207] A first routing rule is determined based on an edge node identifier corresponding to the edge node and at least one container group identifier. A second routing rule is determined based on the at least one container group identifier and address information of at least one container group.

[0208] According to an embodiment of the present disclosure, the first determining module 810 may include a first determining unit and a second determining unit.

[0209] The first determining unit is configured to determine a source node identifier and a destination node identifier according to source address information, destination address information, a first routing rule, and a second routing rule.

[0210] The second determining unit is configured to determine the communication type and the communication connection state according to the source node identifier and the target node identifier.

[0211] According to an embodiment of the present disclosure, the first determining unit may include a first determining subunit, a second determining subunit, a third determining subunit, and a fourth determining subunit.

[0212] The first determining subunit is configured to determine a source container group identifier according to the source address information and the second routing rule.

[0213] The second determining subunit is configured to determine a source node identifier according to the source container group identifier and the first routing rule.

[0214] The third determining subunit is configured to determine a target container group identifier according to the target address information and the second routing rule.

[0215] The fourth determining subunit is configured to determine a target node identifier according to the target container group identifier and the first routing rule.

[0216] According to an embodiment of the present disclosure, the second determining unit may include a fifth determining subunit, a sixth determining subunit, a seventh determining subunit, and an eighth determining subunit.

[0217] The fifth determining subunit is configured to determine that the communication type is local node communication when the source node identifier and the target node identifier are consistent.

[0218] The sixth determining subunit is configured to determine that the communication type is cross-node communication when the source node identifier and the target node identifier are inconsistent.

[0219] The seventh determining subunit is configured to determine that the communication connection state is connected when a heartbeat connection exists between the 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.

[0220] The eighth determining subunit is configured to determine that the communication connection state is disconnected when no heartbeat connection exists between the source node and the target node.

[0221] According to an embodiment of the present disclosure, the acquisition module 820 may include a first acquisition unit and a second acquisition unit.

[0222] The first acquiring unit is configured to acquire the data to be communicated from the target container group by using a collection tool when the communication type is local node communication.

[0223] The second acquiring unit is configured to acquire the data to be communicated from the target port by using a collection tool when the communication type is inter-node communication.

[0224] According to an embodiment of the present disclosure, the first sending module 830 may include a establishing unit and a first sending unit.

[0225] The establishing unit is configured to establish a first communication connection between a source node corresponding to the source container group and a cloud node in the cloud when the communication connection state is disconnected.

[0226] The first sending unit is configured to send the second data communication request to the cloud node based on the first communication connection.

[0227] According to an embodiment of the present disclosure, the data communication apparatus 800 may further include an establishing module and a third sending module.

[0228] The establishing module is used to establish a second communication connection between the source node and the target node when the communication connection state is connected.

[0229] The third sending module is configured to send 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.

[0230] According to an embodiment of the present disclosure, the edge is built based on KubeEdge, and the cloud is built based on Kubernetes.

[0231] Figure 9 The figure schematically shows a block diagram of a data communication device according to another embodiment of the present disclosure.

[0232] like Figure 9 As shown, the data communication device 900 can be applied to the cloud in a container cluster management system. The data communication device 900 can include a second determining module 910 and a second sending module 920 .

[0233] The second determining module 910 is configured to determine a target node identifier in response to receiving a second data communication request according to the second data communication request, wherein the second data communication request includes data to be communicated and target address information.

[0234] The second sending module 920 is used to use the configuration tool to send the data to be communicated to the target node corresponding to the target node identifier, so as to complete the data communication between the source node and the target node, wherein the cloud includes a cloud node, and the cloud node is deployed with the configuration tool.

[0235] According to an embodiment of the present disclosure, the second determining module 910 may include a third determining unit and a fourth determining unit.

[0236] The third determining unit is configured to determine a target container group identifier according to the target address information.

[0237] The fourth determining unit is configured to determine a target node identifier according to the target container group identifier.

[0238] According to an embodiment of the present disclosure, the second sending module 920 may include a second sending unit.

[0239] The second sending unit is configured to send the data to be communicated to the collection tool corresponding to the target node identifier by using the configuration tool, so that the collection tool forwards the data to be communicated to the target container group corresponding to the target container group identifier.

[0240] According to the modules, submodules, units, and subunits of the embodiments of the present invention, any multiple or at least part of the functions of any multiple thereof can be implemented in one module. According to the modules, submodules, units, and subunits of the embodiments of the present invention, any one or more thereof can be split into multiple modules for implementation. According to the modules, submodules, units, and subunits of the embodiments of the present invention, any one or more thereof can be at least partially implemented as a hardware circuit, 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 can be implemented by hardware or firmware of any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation modes of software, hardware, and firmware or in an appropriate combination of any of them. Alternatively, according to the modules, submodules, units, and subunits of the embodiments of the present invention, one or more thereof can be at least partially implemented as a computer program module, which can perform the corresponding function when the computer program module is run.

[0241] For example, any multiple of the first determination module 810, the acquisition module 820, and the first sending module 830 can be combined into one module / unit / sub-unit for implementation, or any one of the modules / units / sub-units can be split into multiple modules / units / sub-units. Alternatively, at least part of the functions of one or more of these modules / units / sub-units can be combined with at least part of the functions of other modules / units / sub-units and implemented in one module / unit / sub-unit. According to an embodiment of the present disclosure, at least one of the first determination module 810, the acquisition module 820, and the first sending module 830 can be at least partially implemented as a hardware circuit, 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 can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation modes of software, hardware, and firmware, or in an appropriate combination of any of them. Alternatively, at least one of the first determining module 810 , the acquiring module 820 and the first sending module 830 may be at least partially implemented as a computer program module, and when the computer program module is executed, the corresponding function may be executed.

[0242] It should be noted that the data communication device part applied to the edge end of the container cluster management system in the embodiment of the present disclosure corresponds to the data communication method part applied to the edge end of the container cluster management system in the embodiment of the present disclosure. The description of the data communication device part applied to the edge end of the container cluster management system specifically refers to the data communication method part applied to the edge end of the container cluster management system, which will not be repeated here.

[0243] For example, any number of the second determination module 910 and the second sending module 920 can be combined into one module / unit / sub-unit for implementation, or any one of the modules / units / sub-units can be split into multiple modules / units / sub-units. Alternatively, at least part of the functions of one or more of these modules / units / sub-units can be combined with at least part of the functions of other modules / units / sub-units and implemented in one module / unit / sub-unit. According to an embodiment of the present disclosure, at least one of the second determination module 910 and the second sending module 920 can be at least partially implemented as a hardware circuit, 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 can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in an appropriate combination of any of them. Alternatively, at least one of the second determination module 910 and the second sending module 920 can be at least partially implemented as a computer program module, which can perform the corresponding function when the computer program module is executed.

[0244] It should be noted that the data communication device part applied to the cloud in the container cluster management system in the embodiments of the present disclosure corresponds to the data communication method part applied to the cloud in the container cluster management system in the embodiments of the present disclosure. The description of the data communication device part applied to the cloud in the container cluster management system specifically refers to the data communication method part applied to the cloud in the container cluster management system, which will not be repeated here.

[0245] Figure 10 The block diagram schematically shows an electronic device suitable for implementing a data communication method according to an embodiment of the present disclosure. Figure 10 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.

[0246] like Figure 10As shown, the computer electronic device 1000 according to an embodiment of the present disclosure includes a processor 1001, which 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 part 1009 into a random access memory (RAM) 1003. The processor 1001 may include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (such as an application-specific integrated circuit (ASIC)), etc. The processor 1001 may also include an onboard memory for caching purposes. The processor 1001 may include a single processing unit or multiple processing units for executing different actions of the method flow according to an embodiment of the present disclosure.

[0247] Various programs and data required for the operation of the electronic device 1000 are stored in the RAM 1003. The processor 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. The processor 1001 performs various operations of the method flow according to the embodiment of the present disclosure by executing the programs in the ROM 1002 and / or the RAM 1003. It should be noted that the programs may also 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 embodiment of the present disclosure by executing the programs stored in the one or more memories.

[0248] According to an embodiment of the present disclosure, electronic device 1000 may further include an input / output (I / O) interface 1005, which is also connected to bus 1004. Electronic device 1000 may further include one or more of the following components connected to I / O interface 1005: an input section 1006 including a keyboard, a mouse, etc.; an output section 1007 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and speakers; a storage section 1008 including a hard disk; and a communication section 1009 including a network interface card such as a LAN card or a modem. Communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to I / O interface 1005 as needed. Removable media 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed in drive 1010 as needed, so that computer programs read therefrom can be installed into storage section 1008 as needed.

[0249] According to an embodiment of the present disclosure, the method flow according to an embodiment of the present disclosure can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1009, and / or installed from the removable medium 1011. When the computer program is executed by the processor 1001, the above-mentioned functions defined in the system of the embodiment of the present disclosure are executed. According to an embodiment of the present disclosure, the system, equipment, device, module, unit, etc. described above can be implemented by a computer program module.

[0250] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments, or may exist independently and not be incorporated into the device / apparatus / system. The computer-readable storage medium carries one or more programs, and when executed, implements the method according to the embodiments of the present disclosure.

[0251] According to an embodiment of the present disclosure, a computer-readable storage medium may be a non-volatile computer-readable storage medium. For example, it may include, but is not limited to: a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0252] For example, according to an embodiment of the present disclosure, the computer-readable storage medium may include the ROM 1002 and / or the RAM 1003 described above and / or one or more memories other than the ROM 1002 and the RAM 1003 .

[0253] An embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method provided by the embodiment of the present disclosure. When the computer program product runs on an electronic device, the program code is used to enable the electronic device to implement the data communication method provided by the embodiment of the present disclosure.

[0254] When the computer program is executed by the processor 1001, the above functions defined in the system / device of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.

[0255] In one embodiment, the computer program may be stored on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may be transmitted and distributed in the form of a signal on a network medium, downloaded and installed via the communication portion 1009, and / or installed from the removable medium 1011. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to wireless, wired, or any suitable combination thereof.

[0256] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computer programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, languages ​​such as Java, C++, python, "C" or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect via the Internet).

[0257] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of the systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram may represent a module, program segment, or portion of code, which contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the boxes may occur in an order different from that marked in the accompanying drawings. For example, two boxes shown in succession may actually be executed substantially in parallel, or they may sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, as well as the combination of boxes in the block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or may be implemented using a combination of dedicated hardware and computer instructions. It will be understood by those skilled in the art that the features described in the various embodiments and / or claims of the present disclosure may be combined and / or coupled in various ways, even if such combinations or couplings are not explicitly described in the present disclosure. In particular, without departing from the spirit and teachings of the present disclosure, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or coupled in various ways, and all such combinations and / or couplings fall within the scope of the present disclosure.

[0258] The embodiments of the present disclosure are described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although each embodiment has been described separately above, this does not mean that the measures in each embodiment cannot be used in combination to advantage. The scope of the present disclosure is defined by the appended claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make various substitutions and modifications, which should all fall within the scope of the present disclosure.

Claims

1. A data communication method, applied to an edge terminal in a container cluster management system, comprising: In response to receiving a first data communication request, determining a communication type and a communication connection state according to the first data communication request, wherein the first data communication request includes source address information corresponding to the source container group and target address information corresponding to the target container group; According to the communication type, using a collection tool corresponding to the source address information, acquiring the data to be communicated, wherein the edge end includes at least one edge node, and each of the at least one edge node is deployed with the collection tool; and When the communication connection state is disconnected, sending a second data communication request to a cloud node in the cloud based on the first communication connection, 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 includes the data to be communicated and the target address information; Wherein, in response to receiving the first data communication request, determining the communication type and the communication connection state according to the first data communication request includes: determining a source node identifier and a destination node identifier according to the source address information, the destination 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 identifier and the destination node identifier; The communication type is determined based on whether the source node identifier and the target node identifier are consistent, and the communication connection state is determined based on whether a heartbeat connection exists between a source node corresponding to the source node identifier and a target node corresponding to the target node identifier.

2. The method according to claim 1, wherein Each of the at least one edge node includes at least one container group. Each of the at least one container group corresponds to address information, and the address information is determined in the following manner: For each edge node of the at least one edge node, Determine the subnet segment range corresponding to the edge node according to the network segment range of the container cluster management system; as well as According to the subnet segment range corresponding to the edge node, address information of each of the at least one container group corresponding to the edge node is determined.

3. The method according to claim 2, wherein: Each of the at least one edge node corresponds to an edge node identifier, and each of the at least one container group corresponds to a container group identifier; The method further includes, after determining the address information of each of the at least one container group corresponding to the edge node based on the subnet segment range corresponding to the edge node: determining a first routing rule according to an edge node identifier and at least one container group identifier corresponding to the edge node; and A second routing rule is determined according to the at least one container group identifier and the respective address information of the at least one container group.

4. The method according to claim 3, wherein: The determining of the source node identifier and the target node identifier according to the source address information, the target address information, the first routing rule and the second routing rule includes: Determine a source container group identifier according to the source address information and the second routing rule; Determine 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 A target node identifier is determined according to the target container group identifier and the first routing rule.

5. The method according to claim 3 or 4, wherein: The determining, according to the source node identifier and the target node identifier, the communication type and the communication connection state includes: When the source node identifier and the target node identifier are consistent, determining that the communication type is local node communication; When the source node identifier and the target node identifier are inconsistent, determining that the communication type is cross-node communication; In a case where a heartbeat connection exists between a source node and the target node, determining that the communication connection state is connected, wherein the source node corresponds to the source node identifier and the target node corresponds to the target node identifier; and In the case that there is no heartbeat connection between the source node and the target node, the communication connection state is determined to be disconnected.

6. The method according to claim 5, wherein: The acquiring of the data to be communicated by using a collection tool corresponding to the source address information according to the communication type includes: In a case where the communication type is local node communication, using the acquisition tool to acquire the data to be communicated from the target container group; and In a case where the communication type is inter-node communication, the data to be communicated is acquired from a target port using the acquisition tool.

7. The method according to claim 1, wherein When the communication connection state is disconnected, sending the second data communication request to the cloud node in the cloud based on the first communication connection includes: When the communication connection state is disconnected, establishing a first communication connection between the source node corresponding to the source container group and the cloud node in the cloud; and Based on the first communication connection, the second data communication request is sent to the cloud node.

8. The method according to claim 1, further comprising: When the communication connection state is connected, establishing a second communication connection between the source node and the target node; as well as Based on the second communication connection, the second data communication request is sent to the target node, so as to complete the data communication between the source node and the target node.

9. The method according to claim 1, wherein The edge is built based on KubeEdge, and the cloud is built based on Kubernetes.

10. A data communication method, applied to the cloud in a container cluster management system, comprising: In response to receiving a second data communication request from an edge terminal in the container cluster management system, determining a target node identifier according to the second data communication request, wherein the second data communication request includes data to be communicated and target address information, wherein the second data communication request is obtained using the method of any one of claims 1 to 9; and The data to be communicated is sent to a target node corresponding to the target node identifier using a configuration tool, so as to complete data communication between the source node and the target node, wherein the cloud includes a cloud node, and the cloud node is deployed with the configuration tool.

11. The method according to claim 10, wherein: In response to receiving the second data communication request, determining the target node identifier according to the second data communication request includes: Determining a target container group identifier based on the target address information; and The target node identifier is determined according to the target container group identifier.

12. The method according to claim 11, wherein The step of using a configuration tool to send 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: The configuration tool is used to send the data to be communicated to a collection tool corresponding to the target node identifier, so that the collection tool forwards the data to be communicated to a target container group corresponding to the target container group identifier.

13. A data communication device, applied to an edge terminal in a container cluster management system, comprising: a first determining module configured to, in response to receiving a first data communication request, determine a communication type and a communication connection state according to the first data communication request, wherein the first data communication request includes source address information corresponding to the source container group and target address information corresponding to the target container group; an acquisition module, configured to acquire data to be communicated using a collection tool corresponding to the source address information according to the communication type, wherein the edge end includes at least one edge node, and each of the at least one edge node is deployed with the collection tool; and a first sending module, configured to, when the communication connection state is disconnected, send a second data communication request to a cloud node in the cloud based on the first communication connection, 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 includes the data to be communicated and the target address information; The first determining module includes: a first determining unit, configured to determine a source node identifier and a destination node identifier based on the source address information, the destination address information, the first routing rule, and the second routing rule; and a second determining unit, configured to determine the communication type and the communication connection state based on the source node identifier and the destination node identifier; The communication type is determined based on whether the source node identifier and the target node identifier are consistent, and the communication connection state is determined based on whether a heartbeat connection exists between a source node corresponding to the source node identifier and a target node corresponding to the target node identifier.

14. A data communication device, applied to the cloud in a container cluster management system, comprising: a second determining module, configured to, in response to receiving a second data communication request from an edge end in the container cluster management system, determine a target node identifier according to the second data communication request, wherein the second data communication request includes data to be communicated and target address information, and wherein the second data communication request is obtained using the apparatus of claim 13; and The second sending module is used to use a configuration tool to send 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, wherein the cloud includes a cloud node, and the cloud node is deployed with the configuration tool.

15. An electronic device comprising: one or more processors; a memory for storing one or more instructions, Wherein, when the one or more instructions are executed by the one or more processors, the one or more processors are enabled to implement the method of any one of claims 1 to 9 or claims 10 to 12. 16 . A computer-readable storage medium having executable instructions stored thereon, wherein when the executable instructions are executed by a processor, the processor is enabled to implement the method according to claim 1 or any one of claims 10 to 12.

17. A computer program product comprising computer executable instructions for implementing the method of any one of claims 1 to 9 or claims 10 to 12 when the computer executable instructions are executed.

Citation Information

Patent Citations

  • Node cluster management method and device, equipment and storage medium

    CN112799789A