Communication method and device of edge node, electronic equipment and storage medium
By introducing coordination devices into edge computing nodes, responding to connection instructions and establishing direct connections, the problem of communication blockage between edge nodes is solved, and efficient cross-network communication is achieved.
Patent Information
- Application Number
- CN202410102980.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-24
- Publication Date
- 2025-03-07
AI Technical Summary
In the prior art, edge computing nodes are independent in different private networks, resulting in the communication between edge nodes being blocked, and there is a lack of effective solutions.
By coordinating the device, in response to the received connection instruction, a direct connection request is sent to the server, and a direct connection between edge nodes is established through the received source address information.
Communication between edge nodes in different networks is realized, transmission speed is ensured, and communication obstruction is overcome.
Smart Images

Figure CN119583620A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of communication technology, and in particular to a communication method, device, electronic device and storage medium for an edge node. Background Art
[0002] With the continuous development of Internet technology, the cloud-edge collaborative architecture has gradually matured, and more and more edge computing scenarios require the participation of edge nodes.
[0003] In the related art, each edge computing node is independent in different private networks, which results in the obstruction of communication between edge nodes. Therefore, how to achieve communication between edge nodes in different networks is a technical problem to be solved in this field. Summary of the invention
[0004] In view of this, the purpose of the present disclosure is to propose a communication method, device, electronic device and storage medium for an edge node, and the present disclosure can solve the existing problems in a targeted manner.
[0005] Based on the above-mentioned purpose, in a first aspect, the present disclosure proposes a communication method for an edge node, comprising: in response to receiving a connection instruction with a second edge node in a second network, sending a direct connection request for the second edge node to a coordination device on the server side; in response to receiving source address information of the second edge node from the coordination device, establishing a direct connection with the second edge node through the source address information.
[0006] In a second aspect, a communication method for an edge node is also provided, which is used for a coordination device on a server side, comprising: in response to receiving a direct connection request from a first edge node to a second edge node, searching for source address information of the second edge node, wherein the first edge node is located in a first network and the second edge node is located in a second network; sending the found source address information to the first edge node, so that the first edge node establishes a direct connection with the second edge node through the source address information.
[0007] According to a third aspect, a communication device for an edge node is provided, which is characterized in that it is used for a first edge node in a first network and includes: a request unit, configured to send a direct connection request for the second edge node to a coordination device on a server side in response to receiving a connection instruction with a second edge node in a second network; and an establishment unit, configured to establish a direct connection with the second edge node through the source address information in response to receiving source address information of the second edge node from the coordination device.
[0008] In a fourth aspect, a communication device for an edge node is also provided, which is used for a coordination device on a server side, and includes: in response to receiving a direct connection request from a first edge node to a second edge node, searching for source address information of the second edge node, wherein the first edge node is located in a first network and the second edge node is located in a second network; sending the found source address information to the first edge node, so that the first edge node establishes a direct connection with the second edge node through the source address information.
[0009] In a fifth aspect, an electronic device is also provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method of the first aspect.
[0010] In a sixth aspect, a computer-readable storage medium is provided, on which a computer program is stored, and the program is executed by a processor to implement any method of the first aspect.
[0011] In general, the present disclosure has at least the following beneficial effects: a direct connection with a second edge node can be prioritized through a coordination device, which not only overcomes the communication obstruction between edge nodes and realizes the communication between edge nodes in different networks, but also ensures the transmission speed between edge nodes through direct connection. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the multiple drawings represent the same or similar parts or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings only depict some embodiments disclosed in accordance with the present disclosure and should not be regarded as limiting the scope of the present disclosure.
[0013] Figure 1a A flow chart of a communication method of an edge node according to an embodiment of the present disclosure is shown;
[0014] Figure 1b A flow chart of a communication method of an edge node according to an embodiment of the present disclosure is shown;
[0015] Figure 2 Another flow chart of the communication method of the edge node according to the embodiment of the present disclosure is shown;
[0016] Figure 3a A schematic diagram showing a connection through an edge relay node according to an embodiment of the present disclosure is shown;
[0017] Figure 3b Another flow chart of the communication method of the edge node according to the embodiment of the present disclosure is shown;
[0018] Figure 4A schematic diagram of a communication device of an edge node according to an embodiment of the present disclosure is shown;
[0019] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure is shown;
[0020] Figure 6 A schematic diagram of a storage medium provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0021] The present disclosure is further described in detail below in conjunction with the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It is also necessary to explain that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.
[0022] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0023] Figure 1a The communication method of the edge node of the present disclosure is shown. In an embodiment of the present disclosure, for a first edge node in a first network, the method includes:
[0024] Step S101, in response to receiving a connection instruction to a second edge node in a second network, sending a direct connection request to the second edge node to a coordination device at a server end.
[0025] In this embodiment, the execution subject of the edge node communication method, that is, the first edge node, can send a direct connection request to the second edge node to the coordination device of the server when receiving a connection instruction to the second edge node in the second network. The direct connection request is used to request a direct connection between the first edge node and the second edge node from the coordination device.
[0026] The coordination device in the present disclosure is any electronic device capable of performing the function of a coordinator. Specifically, the function of a coordinator may refer to being responsible for managing and maintaining metadata and information of network devices in at least one network.
[0027] The connection instruction may be a message received by the first edge node from other electronic devices, or may be a connection instruction generated by a user performing a connection operation received by the first edge node.
[0028] The first edge node and the second edge node are in different networks. The network here can be an independent communication environment. Specifically, the network can have a firewall to block data sent by devices that have not established a communication connection with the devices in the network. Data sent by devices in the network to devices outside the firewall can penetrate the firewall.
[0029] Step S102: In response to receiving the source address information of the second edge node from the coordination device, a direct connection with the second edge node is established through the source address information.
[0030] In this embodiment, the execution subject can establish a direct connection between the first edge node and the second edge node through the source address information when receiving the source address information of the second edge node from the coordination device. The source address information is the IP (Internet Protocol Address) address and port number of the device. The port here refers to the software port.
[0031] The above-mentioned execution entity may try to establish a direct connection with the second edge node through the source address information. For example, the above-mentioned execution entity may send a connection request message to the coordination device so that the coordination device forwards the connection request message to the second edge node. The second edge node may generate a confirmation connection message for the connection request message and send it to the first edge node through the coordination device. In this way, a direct connection can be successfully established between the first edge node and the second edge node. Alternatively, the above-mentioned execution entity may send a network access request to the second edge node through forwarding by the coordination device to request to join the network where the second edge node is located. If the second edge node sends a message to the first edge node through the coordination device indicating to join the network of the second edge node, a direct connection between the first edge node and the second edge node can be established.
[0032] This embodiment can prioritize direct connection with the second edge node through the coordination device, which not only overcomes the communication obstruction between edge nodes and realizes communication between edge nodes in different networks, but also ensures the transmission speed between edge nodes through direct connection.
[0033] In some optional implementations of any embodiment of the present disclosure, when a direct connection is not successfully established, a connection request for requesting a network address translation NAT connection with a second edge node is sent to a coordination device; in response to receiving the converted address information of the second edge node returned by the coordination device, a NAT connection is established between the first edge node and the second edge node based on the converted address information, wherein the converted address information is address information obtained by converting the source address information.
[0034] In these optional implementations, the execution subject may send a connection request to the coordination device for requesting a network address translation NAT (Network Address Translation) connection with the second edge node when the direct connection is not established successfully. If the converted address information fed back by the coordination device is received, a NAT connection between the two nodes is established. The NAT connection between the first edge node and the second edge node may be a direct connection.
[0035] The translated address information is information obtained after performing source network address translation (SNAT) on the source address information. The coordination device may send the translated address information of the second edge node to the first edge node, and send the translated address information of the first edge node to the second edge node.
[0036] The execution subject may establish a NAT connection between the first edge node and the second edge node according to the converted address information. Figure 1b As shown, edge node 1 performs SNAT on the data to be sent through the NAT device to obtain the converted data, and edge node 1 uploads the converted address information of edge node 1 to the coordination device, such as 2.2.2.2:1234. Edge node 1 can also receive the converted address information of edge node 2 sent by the coordination device, such as 5.5.5.5:5678. The above-mentioned execution subject can convert the source IP address and port number of edge node 1 into the public IP and public port number of the NAT device. Edge node 1 sends the converted data to edge node 2. According to the mechanism of allowing the inbound packet of the outbound packet to pass, edge node 1 can receive the data with the converted address information of 5.5.5.5:5678 from edge node 2, but cannot receive the data with the converted address information of 5.5.5.5:2345 from edge node 2. Edge node 2 can receive the data with the converted address information of 2.2.2.2:1234 from edge node 1. At this point, both edge node 1 and edge node 2 allow each other to pass through the firewall, open up each other's tunnels, and thus establish a NAT connection.
[0037] In these implementations, the first edge node and the second edge node may exchange the translated address information through a coordination device, thereby determining the translated address information to be released by the firewall to implement a NAT connection.
[0038] In some optional application scenarios of these implementations, the method also includes: uploading the converted address information of the first edge node to the coordination device, so that the coordination device forwards the converted address information of the first edge node to the second edge node; establishing a NAT connection between the first edge node and the second edge node, including: in response to receiving a connection instruction sent by the coordination device to instruct to make a NAT connection, sending a connection message to the second edge node, and receiving a message corresponding to the converted address information of the second edge node, so as to establish a NAT connection between the first edge node and the second edge node.
[0039] In these optional application scenarios, the first edge node and the second edge node can both upload their respective converted address information to the coordination device, so that the coordination device can send the converted address information of the first edge node to the second edge node, and send the converted address information of the second edge node to the first edge node.
[0040] The connection instruction may be an instruction issued by the coordination device to the first edge node and the second edge node within a time period (such as a preset time period). For example, the coordination device may issue the instruction to the first edge node and the second edge node at the same time, so that the first edge node and the second edge node may send a connection message at the same time. The connection message refers to a message used to open a NAT communication channel to achieve a NAT connection.
[0041] In these application scenarios, the coordination device sends the connection instructions, which can realize the sending of connection messages between the two edge nodes to be connected at a precise time. In addition, the coordination device can save the converted address information of different edge nodes and send the converted address information to the device that needs to make a NAT connection, which helps to realize the NAT connection.
[0042] In some optional implementations of any embodiment of the present disclosure, the method also includes: when the NAT connection between the first edge node and the second edge node is not established, sending a connection request to the coordination device to the second edge node through the relay edge node, the relay edge node has established a connection with the first edge node and has established a connection with the second edge node; in response to receiving the relay path information returned by the coordination device within a preset time length, establishing a connection between the first edge node and the second edge node through the relay edge node through the relay path information, and the relay path information is used to indicate the relay edge node.
[0043] In these implementations, when the NAT connection between the first edge node and the second edge node is not established, a connection request with the second edge node through the relay edge node is sent to the coordination device, so that the coordination device generates and returns relay path information indicating the relay edge node between the first edge node and the second edge node.
[0044] The relay edge node has established a connection with the first edge node and has established a connection with the second edge node, so that the relay edge node is qualified to serve as a relay between the first edge node and the second edge node.
[0045] Specifically, the first edge node may send a connection request to the coordination device with the second edge node through the relay edge node, so that the coordination device generates and returns relay path information indicating the relay edge node between the first edge node and the second edge node.
[0046] If the first edge node receives the relay path information returned by the coordination device within the preset time length, the above-mentioned execution subject can establish a connection between the first edge node and the second edge node through the relay edge node through the relay path information. The above-mentioned execution subject can use various methods to establish a connection between the first edge node and the second edge node through the relay edge node through the relay path information. For example, the first edge node can send a relay connection message through the relay edge node to the second edge node and the relay edge node through the coordination device or the server. If the first edge node receives the confirmation connection message sent by the second edge node and the relay edge node through the coordination device or the server, the connection between the first edge node and the second edge node through the relay edge node is successfully established. Alternatively, the coordination device can send confirmation information for connection through the relay edge node to the first edge node, the second edge node and the relay edge node. If the coordination device receives the confirmation information returned by the first edge node, the second edge node and the relay edge node, the connection between the first edge node and the second edge node through the relay edge node is successfully established.
[0047] The relay path information can be used to indicate the relay edge node. In addition, the relay path information can also indicate the forwarding order when the first edge node and the second edge node use each relay edge node to communicate when there are at least two relay edge nodes. For example, the third edge node and the fourth edge node are used as relay edge nodes, and the process of the first edge node sending a message to the second edge node may include: first, the first edge node sends a message to the third edge node, and the message is forwarded from the third edge node to the fourth edge node, and then forwarded from the fourth edge node to the second edge node. Optionally, the number of relay edge nodes can be 1-2.
[0048] These implementations can establish a connection through a relay edge node through a coordination device. In this way, an edge node that is already in communication connection with both the first edge node and the second edge node is used as a relay, and the communication path is shorter, which helps to ensure the transmission efficiency between the first edge node and the second edge node.
[0049] In some optional application scenarios of these optional implementations, the method may also include: in response to not receiving the relay path information returned by the coordination device within a preset time period, sending a relay service request for communication between the second edge node to the server, so that the server provides relay services to the first edge node and the second edge node.
[0050] In these optional application scenarios, the above-mentioned execution entity can request relay service from the server if it does not receive the relay path information returned by the coordination device within a preset time period, so that the server can provide relay for the first edge node and the second edge node.
[0051] These application scenarios can achieve communication connection through the relay of the server when the communication between the first edge node and the second edge node cannot be resolved only at the edge.
[0052] In some optional cases of these application scenarios, the above method may also include: when the connection between the first edge node and the second edge node is successfully established, uploading connection information indicating the connection between the first edge node and the second edge node to the coordination device, so that the coordination device generates a connection relationship map between the edge nodes based on the connection information.
[0053] In these cases, if the first edge node and the second edge node are successfully connected through any connection mode, the connection information indicating the connection between the first edge node and the second edge node can be uploaded to the coordination device. In this way, the coordination device can generate a connection relationship map between the edge nodes according to the connection information. The connection relationship map includes the above connection information.
[0054] The connection relationship graph may include the connection relationship between each edge node that has connections.
[0055] The above-mentioned execution entity can record the connection relationship between the edge nodes in the form of a connection relationship map in the coordinator when any communication connection is established between the first edge node and the second edge node, thereby realizing clear and systematic recording of the connection relationship between each edge node.
[0056] Figure 2 The communication method of the edge node according to the embodiment of the present disclosure is shown. Figure 2As shown, a coordination device for a server side, the communication method of the edge node includes: step S201, in response to receiving a direct connection request from a first edge node to a second edge node, searching for source address information of the second edge node, wherein the first edge node is located in a first network and the second edge node is located in a second network; step S202, sending the found source address information to the first edge node, so that the first edge node establishes a direct connection with the second edge node through the source address information.
[0057] This embodiment can prioritize direct connection with the second edge node through the coordination device, which not only overcomes the communication obstruction between edge nodes and realizes communication between edge nodes in different networks, but also ensures the transmission speed between edge nodes in different networks through direct connection.
[0058] In some optional implementations of the present embodiment, the method may further include: in response to receiving a connection request from the first edge node for requesting a network address translation NAT connection with the second edge node, searching for and sending the converted address information of the second edge node to the first edge node, so that the first edge node establishes a NAT connection between the first edge node and the second edge node based on the converted address information, wherein the connection request is sent by the first edge node when the direct connection is not successfully established, and the converted address information is address information obtained by converting the source address information.
[0059] In these optional implementations, the coordination device can receive and store the converted address information of the first edge node uploaded by the first edge node, and in addition, the coordination device can also receive and store the converted address information of the second edge node uploaded by the second edge node. In this way, the coordination device can send the converted address information of the second edge node to the first edge node, and send the converted address information of the first edge node to the second edge node, so as to establish a NAT connection between the first edge node and the second edge node.
[0060] In these implementations, the first edge node and the second edge node may exchange the translated address information through a coordination device, thereby determining the translated address information to be released by the firewall to implement a NAT connection.
[0061] In some optional application scenarios of these implementations, the above method may also include: when the converted address information of the first edge node is received from the first edge node, sending the converted address information of the first edge node to the second edge node; when the converted address information of the second edge node is received from the second edge node, performing an operation of searching and sending the converted address information of the second edge node to the first edge node; within a preset time period, sending a connection instruction for indicating a NAT connection to the first edge node, so that the first edge node sends a connection message to the second edge node and receives a message corresponding to the converted address information of the second edge node; within a preset time period, sending a connection instruction for indicating a NAT connection to the second edge node, so that the second edge node sends a connection message to the first edge node and receives a message corresponding to the converted address information of the first edge node.
[0062] In these application scenarios, the coordination device sends the connection instructions, which can realize the sending of connection messages between the two edge nodes to be connected at a precise time. In addition, the coordination device can save the converted address information of different edge nodes and send the converted address information to the device that needs to make a NAT connection, which helps to realize the NAT connection.
[0063] In some optional application scenarios of these implementations, the method also includes: generating relay path information in response to receiving a connection request sent by the first edge node to the second edge node through the relay edge node, the connection request is sent by the first edge node when the NAT connection between the first edge node and the second edge node is not established, and the relay path information is used to indicate the relay edge node; returning the relay path information to the first edge node.
[0064] In these application scenarios, the coordination device can use a variety of methods to generate relay path information for indicating the relay edge node between the first edge node and the second edge node. For example, the coordination device can select an edge node with the smallest sum of communication time with the first edge node and the second edge node from among the edge nodes that are in communication connection with both the first edge node and the second edge node. And use the relay path information corresponding to the selected edge node as the relay path information of the relay edge node between the first edge node and the second edge node.
[0065] These application scenarios can generate relay path information consisting of relay edge nodes in the coordination device, which helps to implement the solution of using edge nodes as relays.
[0066] In some specific cases of these application scenarios, generating relay path information may include: determining an edge node that has established a connection with a first edge node and has established a connection with a second edge node, and obtaining at least one candidate edge node; selecting a relay edge node between the first edge node and the second edge node from at least one candidate edge node based on the communication delay and busyness of each candidate edge node; and generating relay path information based on the relay edge node.
[0067] In these cases, the coordination device may select a relay edge node between the first edge node and the second edge node from at least one candidate edge node according to the communication delay and busyness of each candidate edge node in various ways. For example, the coordination device may select the candidate edge node with the smallest sum of the communication delay and busyness as the relay edge node.
[0068] Alternatively, the coordination device may also input both the communication delay and the busyness of each candidate edge node into a preset formula or model, and obtain the relay edge node output by the preset formula or model.
[0069] For example, all possible candidate relay path information corresponding to at least one candidate edge node may be determined, and the delay weighted value of each edge node in each candidate relay path information may be calculated. The delay weighted value ∑△t may be expressed as:
[0070] ∑△t=f 1 *△t 1 +f 2 *△t 2 +…+fn*△tn
[0071] Among them, f 1 、f 2 …fn is the busyness of each edge node, and the busyness can be the ratio of the number of relay loads of the current edge node to the total number of loads that can be loaded. △t 1 , △t 2 …△tn is the communication delay of each edge node, specifically the time interval from when the sender sends data to when the sender receives the confirmation from the receiver, which defines the network delay.
[0072] Specifically, the coordination device may use a breadth-first-search (BFS) algorithm to determine the path with the smallest delay weight and the path with the second smallest delay weight. The coordination device may generate relay path information from the path with the smallest delay weight and return it to the first edge node. If the path with the smallest delay weight does not achieve a connection between the first edge node and the second edge node, the coordination device may generate relay path information from the path with the second smallest delay weight and return it to the first edge node.
[0073] In these cases, the coordination device can accurately determine the nodes that are suitable as communication relays based on communication delay and busyness, and thus obtain accurate relay path information.
[0074] In some optional implementations of this embodiment, determining an edge node that has established connections with both the first edge node and the second edge node includes: determining an edge node that has established connections with both the first edge node and the second edge node in a connection relationship graph that characterizes the connection relationship between edge nodes.
[0075] In these optional implementations, the execution subject may determine an edge node in the connection relationship graph, and the determined edge node has not only established a connection with the first edge node, but also established a connection with the second edge node.
[0076] The connection relationship map contains the connection relationship between each edge node. Therefore, the edge nodes that have established connection relationships with both the first edge node and the second edge node can be comprehensively and accurately determined through the connection relationship map.
[0077] Figure 3a A schematic diagram of a connection through an edge relay node is shown. Node 1 and node 3 cannot be directly connected, and node 2 or node 6 can be used as a relay edge node to help node 1 and node 3 connect through the relay edge node.
[0078] Figure 3b Another flow chart of a communication method of an edge node is shown. The figure involves edge nodes and the cloud. The cloud has a coordinator and can also provide relay services.
[0079] The figure provides three connection modes. The first connection mode is that edge node 1 (also known as edge node 1) and edge node 2 (also known as edge node 2) can be directly connected. If the direct connection between the two nodes is successful, edge node 1 or edge node 2 can feedback a message indicating the direct connection is successful to the cloud.
[0080] If the first connection method fails to connect successfully, the second connection method may be used: direct connection using NAT penetration technology. If the second connection method is successful, the edge node 1 or the edge node 2 may feedback a message indicating that the connection method is successful to the cloud.
[0081] If the second connection method is also unsuccessful, the edge relay mode can be used, that is, the connection can be made through the edge relay node. Edge node 1 sends a route request to the cloud to request the relay route corresponding to the relay mode, that is, the relay path information. The server returns the optimal relay path information. If the edge relay mode is successfully connected, the communication connection through the edge relay node can be used, and edge node 1 can feedback the adopted connection method to the cloud.
[0082] If the connection is not successful through the edge relay node, the edge node 1 can request the cloud relay service from the cloud.
[0083] The present disclosure provides a communication device for an edge node, which is used to execute the communication method for the edge node in the above embodiment. Figure 4 As shown, the device includes: a first edge node in a first network, including: a request unit 401, configured to send a direct connection request for the second edge node to a coordination device on the server side in response to receiving a connection instruction with a second edge node in a second network; an establishment unit 402, configured to establish a direct connection with the second edge node through the source address information in response to receiving source address information of the second edge node from the coordination device.
[0084] Optionally, the device also includes: a request unit, configured to send a connection request for requesting a network address translation NAT connection with the second edge node to the coordination device when a direct connection is not successfully established; an establishment unit, configured to establish a NAT connection between the first edge node and the second edge node in response to receiving the converted address information of the second edge node returned by the coordination device, according to the converted address information, wherein the converted address information is address information obtained by converting the source address information.
[0085] Optionally, the apparatus is further configured to: upload the converted address information of the first edge node to the coordination device so that the coordination device forwards the converted address information of the first edge node to the second edge node; and an establishment unit is further configured to perform establishment of a NAT connection between the first edge node and the second edge node in the following manner: in response to receiving a connection instruction sent by the coordination device to instruct a NAT connection, sending a connection message to the second edge node, and receiving a message corresponding to the converted address information of the second edge node to establish a NAT connection between the first edge node and the second edge node.
[0086] Optionally, the device is also configured to: when the NAT connection between the first edge node and the second edge node is not established, send a connection request to the coordination device to the second edge node through the relay edge node, and the relay edge node has established a connection with the first edge node and the second edge node; in response to receiving the relay path information returned by the coordination device within a preset time length, establish a connection between the first edge node and the second edge node through the relay edge node through the relay path information, and the relay path information is used to indicate the relay edge node.
[0087] Optionally, the apparatus is further configured to: in response to not receiving relay path information returned by the coordination device within a preset time period, send a relay service request for communication with the second edge node to the server, so that the server provides relay service to the first edge node and the second edge node.
[0088] Optionally, the apparatus is further configured to: when the connection between the first edge node and the second edge node is successfully established, upload connection information indicating the connection between the first edge node and the second edge node to the coordination device, so that the coordination device generates a connection relationship map between the edge nodes based on the connection information.
[0089] An embodiment of the present disclosure provides a communication device for an edge node, which is used for a coordination device on a server side, including: a searching unit, configured to search for source address information of the second edge node in response to receiving a direct connection request from a first edge node to a second edge node, wherein the first edge node is located in a first network and the second edge node is located in a second network; and an establishing unit, configured to send the found source address information to the first edge node, so that the first edge node establishes a direct connection with the second edge node through the source address information.
[0090] Optionally, the device is also configured to: in response to receiving a connection request from the first edge node for requesting a network address translation NAT connection with the second edge node, search for and send the converted address information of the second edge node to the first edge node, so that the first edge node establishes a NAT connection between the first edge node and the second edge node based on the converted address information, wherein the connection request is sent by the first edge node when the direct connection is not successfully established, and the converted address information is address information obtained by converting the source address information.
[0091] Optionally, the device is also configured to: upon receiving the converted address information of the first edge node from the first edge node, send the converted address information of the first edge node to the second edge node; upon receiving the converted address information of the second edge node from the second edge node, perform an operation of searching and sending the converted address information of the second edge node to the first edge node; within a preset time period, send a connection instruction for indicating a NAT connection to the first edge node, so that the first edge node sends a connection message to the second edge node and receives a message corresponding to the converted address information of the second edge node; within a preset time period, send a connection instruction for indicating a NAT connection to the second edge node, so that the second edge node sends a connection message to the first edge node and receives a message corresponding to the converted address information of the first edge node.
[0092] Optionally, the device is also configured to: generate relay path information in response to receiving a connection request sent by the first edge node to the second edge node through the relay edge node, the connection request is sent by the first edge node when the NAT connection between the first edge node and the second edge node is not established, and the relay path information is used to indicate the relay edge node; return the relay path information to the first edge node.
[0093] Optionally, the device is further configured to: determine an edge node that has established a connection with the first edge node and has established a connection with the second edge node, and obtain at least one candidate edge node; based on the communication delay and busyness of each candidate edge node, select a relay edge node between the first edge node and the second edge node from at least one candidate edge node; and generate relay path information based on the relay edge node.
[0094] Optionally, the apparatus is further configured to: determine, in a connection relationship graph characterizing a connection relationship between edge nodes, an edge node that has established a connection with the first edge node and has established a connection with the second edge node.
[0095] The edge node communication device provided in the above-mentioned embodiment of the present disclosure and the edge node communication method provided in the embodiment of the present disclosure are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the application programs stored therein.
[0096] The embodiments of the present disclosure also provide an electronic device corresponding to the edge node communication method provided in the above embodiments, so as to execute the above edge node communication method. The embodiments of the present disclosure are not limited.
[0097] Please refer to Figure 5 , which shows a schematic diagram of an electronic device provided by some embodiments of the present disclosure. Figure 5As shown, the electronic device 50 includes: a processor 500, a memory 501, a bus 502 and a communication interface 503, and the processor 500, the communication interface 503 and the memory 501 are connected via the bus 502; the memory 501 stores a computer program that can be run on the processor 500, and when the processor 500 runs the computer program, it executes the method provided in any of the aforementioned embodiments of the present disclosure.
[0098] The memory 501 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 503 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used.
[0099] The bus 502 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The memory 501 is used to store programs, and the processor 500 executes the program after receiving the execution instruction. The edge node communication method disclosed in any of the embodiments of the present disclosure may be applied to the processor 500, or implemented by the processor 500.
[0100] The processor 500 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit in the processor 500 or the instruction in the form of software. The above processor 500 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present disclosure can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in conjunction with the embodiments of the present disclosure can be directly embodied as a hardware decoding processor to be executed, or the hardware and software modules in the decoding processor can be executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 501, and the processor 500 reads the information in the memory 501 and completes the steps of the above method in combination with its hardware.
[0101] The electronic device provided by the embodiment of the present disclosure and the communication method of the edge node provided by the embodiment of the present disclosure are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by them.
[0102] The present disclosure also provides a computer-readable storage medium corresponding to the edge node communication method provided in the above embodiment. Figure 6 The computer-readable storage medium shown is a CD 60 on which a computer program (ie, a program product) is stored. When the computer program is run by a processor, the communication method of the edge node provided in any of the aforementioned embodiments will be executed.
[0103] It should be noted that examples of computer-readable storage media may also include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other optical or magnetic storage media, which are not listed here one by one.
[0104] The computer-readable storage medium provided by the above-mentioned embodiments of the present disclosure and the edge node communication method provided by the embodiments of the present disclosure are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the application programs stored therein.
[0105] It should be noted that:
[0106] In the above text, the term "comprises", "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be noted that the scope of the method and device in the embodiments of the present disclosure is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0107] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present disclosure, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods of each embodiment of the present disclosure.
[0108] The embodiments of the present disclosure are described above in conjunction with the accompanying drawings, which are only specific implementation modes of the present disclosure. However, the present disclosure is not limited to the above-mentioned specific implementation modes. The above-mentioned specific implementation modes are merely illustrative and not restrictive. Under the guidance of the present disclosure, ordinary technicians in this field can also make many forms without departing from the purpose of the present disclosure and the scope of protection of the claims, all of which are within the protection of the present disclosure.
Claims
1. A communication method for an edge node, characterized in that: A first edge node used in a first network includes: In response to receiving a connection instruction to a second edge node in a second network, sending a direct connection request to the second edge node to a coordination device at the service end; In response to receiving the source address information of the second edge node from the coordination device, a direct connection with the second edge node is established through the source address information.
2. The method according to claim 1, characterized in that The method further comprises: If the direct connection is not successfully established, sending a connection request for requesting a network address translation NAT connection with the second edge node to the coordination device; In response to receiving the converted address information of the second edge node returned by the coordination device, a NAT connection is established between the first edge node and the second edge node according to the converted address information, where the converted address information is address information obtained by converting the source address information.
3. The method according to claim 2, characterized in that The method further includes: uploading the converted address information of the first edge node to the coordination device, so that the coordination device forwards the converted address information of the first edge node to the second edge node; The establishing of the NAT connection between the first edge node and the second edge node includes: in response to receiving a connection instruction sent by the coordination device to instruct to perform a NAT connection, sending a connection message to the second edge node, and receiving a message corresponding to the converted address information of the second edge node to establish the NAT connection between the first edge node and the second edge node.
4. The method according to claim 1, characterized in that The method further comprises: When a NAT connection between the first edge node and the second edge node is not established, sending a connection request to the coordination device with the second edge node through a relay edge node, the relay edge node having established a connection with the first edge node and having established a connection with the second edge node; In response to receiving the relay path information returned by the coordination device within a preset time period, a connection is established between the first edge node and the second edge node through the relay edge node through the relay path information, and the relay path information is used to indicate the relay edge node.
5. The method according to claim 4, characterized in that The method further comprises: In response to not receiving the relay path information returned by the coordination device within a preset time period, sending a relay service request for communication with the second edge node to the server, so that the server provides relay services to the first edge node and the second edge node.
6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: When the connection between the first edge node and the second edge node is successfully established, connection information indicating the connection between the first edge node and the second edge node is uploaded to the coordination device, so that the coordination device generates a connection relationship map between the edge nodes according to the connection information.
7. A communication method for an edge node, characterized in that: Coordination equipment for the server, including: In response to receiving a direct connection request from a first edge node to a second edge node, searching for source address information of the second edge node, wherein the first edge node is located in a first network and the second edge node is located in a second network; The found source address information is sent to the first edge node, so that the first edge node establishes a direct connection with the second edge node through the source address information.
8. The method according to claim 7, characterized in that The method further comprises: In response to receiving a connection request from the first edge node for requesting a network address translation NAT connection with the second edge node, searching for and sending the converted address information of the second edge node to the first edge node, so that the first edge node establishes a NAT connection between the first edge node and the second edge node according to the converted address information, wherein the connection request is sent by the first edge node when a direct connection is not successfully established, and the converted address information is address information obtained by converting source address information.
9. The method according to claim 8, characterized in that The method further comprises: In case of receiving the converted address information of the first edge node from the first edge node, sending the converted address information of the first edge node to the second edge node; In case of receiving the converted address information of the second edge node from the second edge node, performing the operation of searching and sending the converted address information of the second edge node to the first edge node; Within a preset time period, sending a connection instruction for instructing to perform a NAT connection to the first edge node, so that the first edge node sends a connection message to the second edge node and receives a message corresponding to the converted address information of the second edge node; Within the preset time period, a connection instruction for instructing to perform a NAT connection is sent to the second edge node, so that the second edge node sends a connection message to the first edge node and receives a message corresponding to the converted address information of the first edge node.
10. The method according to claim 8, characterized in that The method further comprises: generating relay path information in response to receiving a connection request sent by the first edge node to the second edge node through a relay edge node, wherein the connection request is sent by the first edge node when a NAT connection between the first edge node and the second edge node is not established, and the relay path information is used to indicate the relay edge node; The relay path information is returned to the first edge node.
11. The method according to claim 10, characterized in that The generating relay path information includes: Determine an edge node that has established a connection with the first edge node and has established a connection with the second edge node, and obtain at least one candidate edge node; Selecting a relay edge node between the first edge node and the second edge node from the at least one candidate edge node according to the communication delay and busyness of each candidate edge node; Relay path information is generated according to the relay edge node.
12. The method according to claim 11, characterized in that The determining of the edge node that has established a connection with the first edge node and has established a connection with the second edge node includes: In a connection relationship graph characterizing the connection relationship between edge nodes, an edge node that has established a connection with the first edge node and has established a connection with the second edge node is determined.
13. A communication device for an edge node, characterized in that: A first edge node used in a first network includes: a request unit configured to send a direct connection request to a second edge node in a second network to a coordination device at a server end in response to receiving a connection instruction to the second edge node; The establishing unit is configured to, in response to receiving the source address information of the second edge node from the coordination device, establish a direct connection with the second edge node through the source address information.
14. A communication device for an edge node, characterized in that: Coordination equipment for the server, including: a search unit configured to search for source address information of a second edge node in response to receiving a direct connection request from a first edge node to a second edge node, wherein the first edge node is located in a first network and the second edge node is located in a second network; The establishing unit is configured to send the found source address information to the first edge node, so that the first edge node establishes a direct connection with the second edge node through the source address information.
15. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: The processor runs the computer program to implement the method according to any one of claims 1 to 12.
16. A computer-readable storage medium having a computer program stored thereon, characterized in that: The program is executed by a processor to implement the method according to any one of claims 1 to 12.