In-cloud communication method, device, system, equipment, medium and product

By modifying the DNS reply message, the cloud network host obtains the internal address and realizes intra-cloud communication, which solves the problems of low communication efficiency and high NAT resource consumption between the cloud network service host and the cloud network host, and improves communication efficiency and resource utilization.

CN116155857BActive Publication Date: 2024-09-27CHINA TELECOM CLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211684942.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-27
Publication Date
2024-09-27
Estimated Expiration
2042-12-27

AI Technical Summary

Technical Problem

The cloud network service host and cloud network host need to go through NAT gateway conversion when accessing, resulting in low communication efficiency and consumption of NAT resources, affecting user experience.

Method used

By intercepting and modifying the first target DNS response message of the DNS reply, the cloud network host obtains the internal address of the cloud network service host, thereby accessing it through the intra-cloud communication path, reducing NAT resource consumption and shortening the forwarding path.

Benefits of technology

It improves the communication efficiency between the cloud network host and the cloud network service host, reduces NAT resource consumption, avoids resource competition during internal and external network communication, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116155857B
    Figure CN116155857B
Patent Text Reader

Abstract

The present application provides a method, device, system and equipment, medium and product for intra-cloud communication, aiming to reduce the consumption of NAT resources by cloud network hosts and improve communication efficiency. The method comprises: obtaining a first target DNS response message returned by a domain name system DNS for a request of a cloud network host to access a cloud network service host; determining the internal address of the cloud network service host according to a mapping relationship between an external address and an internal address, and the external address of the cloud network service host carried by the first target DNS response message; generating a second target DNS response message according to the internal address of the cloud network service host and the first target DNS response message; sending the second target DNS response message so that the cloud network host can access the cloud network service host through an intra-cloud communication path according to the second target DNS response message.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud computing and cloud network technology, and in particular to a method, device, system and equipment, medium and product for intra-cloud communication. Background Art

[0002] Cloud network service hosts usually use Network Address Translation (NAT) and port mapping to open internal services to the external network.

[0003] For cloud network hosts in the same cloud network as the cloud network service host, when accessing the cloud network service host, it is still necessary to go through the NAT gateway conversion and then access the cloud network service host through the external network, resulting in low forwarding efficiency and the need to consume NAT resources when the cloud network service host communicates with the cloud network host. Summary of the invention

[0004] In view of the above problems, the embodiments of the present application provide a method, apparatus, system and equipment, medium and product for intra-cloud communication to overcome the above problems or at least partially solve the above problems.

[0005] In a first aspect of an embodiment of the present application, a method for intra-cloud communication is provided, the method comprising:

[0006] Obtaining a first target DNS response message returned by a domain name system DNS in response to a request from a cloud network host to access a cloud network service host;

[0007] Determine the internal address of the cloud network service host according to the mapping relationship between the external address and the internal address and the external address of the cloud network service host carried by the first target DNS response message;

[0008] Generate a second target DNS response message according to the internal address of the cloud network service host and the first target DNS response message;

[0009] The second target DNS response message is sent so that the cloud network host accesses the cloud network service host through the intra-cloud communication path according to the second target DNS response message.

[0010] Optionally, generating a second target DNS response message according to the internal address of the cloud network service host and the first target DNS response message includes:

[0011] Generate a first target message segment according to the internal address of the cloud network service host;

[0012] According to the first target message segment, the first target DNS response message is updated to obtain the second target DNS response message.

[0013] Optionally, updating the first target DNS response message according to the first target message segment to obtain the second target DNS response message includes performing any one of the following:

[0014] Using the first target message segment to replace the second target message segment in the first target DNS response message, to obtain the second target DNS response message, wherein the second target message segment indicates the external address of the cloud network service host;

[0015] Insert the first target message segment into the head position or the tail position of the reply message segment in the first target DNS response message to obtain the second target DNS response message.

[0016] Optionally, updating the first target DNS response message according to the first target message segment to obtain the second target DNS response message includes:

[0017] Adding the first target message segment to the first target DNS response message;

[0018] Update the target information associated with the first target DNS response message to which the first target message segment is added to obtain the second target DNS response message, wherein the target information includes at least one of the total length of the UDP data packet, the checksum of the UDP data packet, the total length of the IP datagram, and the checksum of the IP datagram.

[0019] Optionally, the obtaining of a first target DNS response message returned by a domain name system DNS in response to a request for a cloud network host to access a cloud network service host includes:

[0020] Obtaining a third target DNS response message returned by the DNS in response to the request for the cloud network host to access the service host;

[0021] Determine whether the service host is a cloud network service host according to the external address of the service host carried in the third target DNS response message;

[0022] In a case where the service host is a cloud network service host, the third target DNS response message is determined as the first target DNS response message.

[0023] Optionally, before generating the second target DNS response message according to the internal address of the cloud network service host and the first target DNS response message, the method further includes:

[0024] Determine, based on the routing table and the internal address of the cloud network service host, whether the cloud network host can access the cloud network service host through the intra-cloud communication path;

[0025] The generating a second target DNS response message according to the internal address of the cloud network service host and the first target DNS response message includes:

[0026] In the case where the cloud network host can access the cloud network service host through the intra-cloud communication path, a second target DNS response message is generated according to the internal address of the cloud network service host and the first target DNS response message.

[0027] Optionally, judging whether the cloud network host can access the cloud network service host through an intra-cloud communication path according to the routing table and the internal address of the cloud network service host includes:

[0028] According to the routing table and the internal address of the cloud network service host, it is determined whether there is a target route for constituting an intra-cloud communication path between the cloud network host and the cloud network service host, wherein the target route includes at least one of the following: a direct route for constituting an internal communication path of a virtual private cloud VPC, and a hop table route for constituting a communication path of a VPC peer connection VPC-Peering;

[0029] In response to the existence of a target route for constituting an intra-cloud communication path between the cloud network host and the cloud network service host, determining that the cloud network host can access the cloud network service host through the intra-cloud communication path;

[0030] In response to the absence of a target route for constituting an intra-cloud communication path between the cloud network host and the cloud network service host, it is determined that the cloud network host cannot access the cloud network service host through the intra-cloud communication path.

[0031] Optionally, before determining the internal address of the cloud network service host according to the mapping relationship between the external address and the internal address and the external address of the cloud network service host carried by the first target DNS response message, the method further includes:

[0032] Parsing the reply message segment in the first target DNS response message to obtain a message segment indicating the external address of the cloud network service host;

[0033] According to the message segment, obtaining the external address of the cloud network service host;

[0034] The message segment includes at least one of the following:

[0035] A segment indicating the IPv4 address of the cloud network service host;

[0036] A segment indicating the IPv6 address of the cloud network service host.

[0037] A second aspect of an embodiment of the present application provides a method for intra-cloud communication, the method comprising:

[0038] Send a DNS request message, where the DNS request message is used to request access to a cloud network service host;

[0039] Receive a response message corresponding to the DNS request message, wherein the response message carries the internal address of the cloud network service host;

[0040] According to the internal address of the cloud network service host, the cloud network service host is accessed through the intra-cloud communication path.

[0041] According to a third aspect of an embodiment of the present application, a cloud communication device is provided, the device comprising:

[0042] A first acquisition module is used to acquire a first target DNS response message returned by a domain name system DNS in response to a request of a cloud network host to access a cloud network service host;

[0043] A first processing module, configured to determine the internal address of the cloud network service host according to a mapping relationship between the external address and the internal address and the external address of the cloud network service host carried by the first target DNS response message;

[0044] A second processing module, configured to generate a second target DNS response message according to the internal address of the cloud network service host and the first target DNS response message;

[0045] The first sending module is used to send the second target DNS response message, so that the cloud network host accesses the cloud network service host through the cloud communication path according to the second target DNS response message.

[0046] According to a fourth aspect of an embodiment of the present application, a cloud communication device is provided, the device comprising:

[0047] A sending module, used to send a DNS request message, wherein the DNS request message is used to request access to a cloud network service host;

[0048] A receiving module, used to receive a response message corresponding to the DNS request message, wherein the response message carries the internal address of the cloud network service host;

[0049] The communication module is used to access the cloud network service host through the cloud communication path according to the internal address of the cloud network service host.

[0050] In a fifth aspect of an embodiment of the present application, a cloud communication system is provided, the system comprising a cloud network host, a cloud network service host, a domain name system DNS and a network address translation NAT gateway, wherein:

[0051] The NAT gateway is used to obtain the first target DNS response message returned by the DNS in response to the request of the cloud network host to access the cloud network service host, and execute the intra-cloud communication method as described in the first aspect to generate and send a second target DNS response message, so that the cloud network host can access the cloud network service host through the intra-cloud communication path according to the second target DNS response message.

[0052] In a sixth aspect of an embodiment of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the intra-cloud communication method described in the first aspect or the steps of the intra-cloud communication method described in the second aspect are implemented.

[0053] In a seventh aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, the steps of the intra-cloud communication method as described in the first aspect are implemented, or when the computer program / instruction is executed by a processor, the steps of the intra-cloud communication method as described in the second aspect are implemented.

[0054] In an eighth aspect of an embodiment of the present application, a computer program product is provided, including a computer program / instruction, which, when executed by a processor, implements the steps of the intra-cloud communication method described in the first aspect or the steps of the intra-cloud communication method described in the second aspect.

[0055] The embodiments of the present application include the following advantages:

[0056] In this embodiment, by intercepting and modifying the first target DNS response message of the DNS reply, the cloud network host can obtain the internal address of the cloud network service host, thereby accessing the cloud network service host through the intra-cloud communication path, which can reduce the cloud network host's consumption of NAT resources, shorten the forwarding path, and improve communication efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0058] Figure 1 It is a schematic diagram of an existing cloud network host accessing a cloud network service host;

[0059] Figure 2 It is an implementation flow chart of an intra-cloud communication method of an embodiment of the present application;

[0060] Figure 3 It is a schematic diagram of a method for reducing cloud network host communication through NAT in an embodiment of the present application;

[0061] Figure 4 It is a flowchart of an implementation of message parsing in an embodiment of the present application;

[0062] Figure 5 This is a flowchart of an implementation of address matching in an embodiment of the present application;

[0063] Figure 6 This is a flowchart of an implementation of message updating in an embodiment of the present application;

[0064] Figure 7 is an implementation flow chart of another intra-cloud communication method in an embodiment of the present application;

[0065] Figure 8 It is a structural schematic diagram of an intra-cloud communication device according to an embodiment of the present application;

[0066] Fig. 9 It is a structural schematic diagram of another intra-cloud communication device according to an embodiment of the present application;

[0067] Fig.10 It is a schematic diagram of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION

[0068] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0069] A service host (such as a cloud network service host) usually provides access services through a unified domain name, which is converted into an IP address (usually an external address, such as a global IP address) through the Domain Name System (DNS) so that it can be accessed by Internet applications.

[0070] Cloud network service hosts usually use NAT or port mapping (to achieve mapping between internal IP and external IP, or mapping between internal IP:Port and external IP:Port) to open internal services to the external network. Communication between access applications and services must go through a NAT gateway. Even if the access application and the cloud network service host are located in the same cloud network, in the current network architecture, communication still needs to go through a NAT gateway.

[0071] like Figure 1 As shown, the cloud access application on the cloud network host (such as Figure 1 Client) accesses the cloud network service host (such as Figure 1The server Server shown in the figure, whose internal address is FIP1 and external address is EIP1), still needs to be converted by the NAT gateway and then detoured by the external router, resulting in a long forwarding path and inefficient forwarding performance. At the same time, since the cloud network host located in the same virtual private cloud (VPC) as the cloud network service host also needs to consume NAT resources, the current limited NAT resources cannot fully serve the access services of the external host, and will cause competition for NAT resources during internal and external network communications, causing interference between the internal and external networks and affecting user experience.

[0072] In response to the problems existing in the above-mentioned related technologies, the present application proposes a solution to reduce or even avoid cloud network host communication through NAT, which can effectively improve the communication efficiency of cloud network hosts and reduce NAT resource consumption.

[0073] The following is a detailed description of the intra-cloud communication method provided by the embodiment of the present application through some embodiments and their application scenarios in combination with the accompanying drawings.

[0074] First, refer to Figure 2 As shown, it is a flowchart of an implementation method of a cloud communication method provided by an embodiment of the present application, and the method may include the following steps:

[0075] Step S11: Obtain a first target DNS response message returned by the domain name system DNS in response to a request from a cloud network host to access a cloud network service host.

[0076] Among them, the cloud network host and cloud network service host are the host inside the cloud network and the service host that provides access services for the host. Both have internal addresses inside the cloud network and need to convert their own internal addresses into external addresses through the NAT gateway before they can support external access.

[0077] In the specific implementation, the cloud network host can send a DNS request message carrying the domain name of the cloud network service host to the DNS. After the DNS queries the external address associated with the domain name (such as the global IP address), it will return a first target DNS response message carrying the external address associated with the domain name to the cloud network host. At this time, the first target DNS response message can be intercepted by the device (such as a NAT gateway) between the cloud network host and the DNS for forwarding the first target DNS response message.

[0078] Step S12: Determine the internal address of the cloud network service host according to the mapping relationship between the external address and the internal address, and the external address of the cloud network service host carried by the first target DNS response message.

[0079] In a specific implementation, the internal address mapped to the external address carried in the first target DNS response message may be determined through the mapping relationship between the external address and the internal address stored in the NAT gateway.

[0080] Step S13: Generate a second target DNS response message according to the internal address of the cloud network service host and the first target DNS response message.

[0081] In specific implementation, the internal address of the cloud network service host can be added to the first target DNS response message to generate a second target DNS response message carrying the internal address. For example, the internal address can be inserted into the reply message segment of the first target DNS response message, or the internal address can be used to replace the external address of the cloud network service host carried by the first target DNS response message.

[0082] Step S14: Send the second target DNS response message so that the cloud network host accesses the cloud network service host through the intra-cloud communication path according to the second target DNS response message.

[0083] In the specific implementation, the cloud network host determines the internal address of the cloud network service host according to the received second target DNS response message, and sends a message requesting business data to the internal address of the cloud network service host. The gateway connected to the cloud network service host can then find the relevant route according to the internal address, and then send the message to the corresponding cloud network service host through the cloud communication path, so as to realize the access of the cloud network host to the cloud network service host. It can be understood that the access process uses the intranet access path based on the internal address, and does not need to pass through the NAT gateway to enter the external network and perform traffic detour, so the forwarding path can be shortened, and NAT resources (mainly the ports occupied by port mapping) will not be occupied, thereby effectively improving the communication efficiency of the cloud host and reducing NAT resource consumption.

[0084] By adopting the technical solution of the embodiment of the present application, by intercepting and modifying the first target DNS response message of the DNS reply, the cloud network host can obtain the internal address of the cloud network service host, thereby accessing the cloud network service host through the intra-cloud communication path, which can reduce the cloud network host's consumption of NAT resources, shorten the forwarding path, and improve communication efficiency.

[0085] The following combination Figure 3 , the above technical solution is further explained. Figure 3 As shown, the embodiment of the present application provides a method for reducing cloud network host communication through NAT, including:

[0086] 1. The cloud network host sends a DNS request message to the tenant gateway (i.e., NAT gateway) to request access to the cloud network service host (Server). The DNS request message carries the domain name of the cloud network service host.

[0087] 2. The tenant gateway forwards the received DNS request message to the DNS server (DNSServer) through the network layer (L3). The DNS server queries the external address associated with the domain name carried in the DNS request message based on the DNS request message forwarded by the tenant gateway, generates a DNS response message carrying the external address (i.e., the first target DNS response message), and sends the DNS response message to the tenant gateway.

[0088] 3. The tenant gateway parses the received first target DNS response message, queries the internal address of the cloud network service host through the external address of the cloud network service host carried in the first target DNS response message, generates a first target message segment according to the internal address, and updates the first target DNS response message according to the first target message segment to generate a second target DNS response message carrying the internal address, and sends the second target DNS response message to the cloud network host.

[0089] It can be understood that the NAT gateway maintains the mapping relationship between the internal addresses (i.e. private addresses, FIP, Float IP) and external addresses (i.e. external elastic addresses, EIP, Elastic IP) of all hosts (cloud network hosts and cloud network service hosts) inside the cloud network to which it is connected, and it is also responsible for forwarding DNS interaction-related messages. Therefore, the NAT gateway can be used conveniently to intercept and modify DNS interaction-related messages, but in actual applications, other devices can also be used to implement the above-mentioned DNS interaction-related message interception and modification functions, and this application does not limit this.

[0090] As a possible implementation, Figure 4 As shown, the tenant gateway can perform DNS resolution on all intercepted DNS response messages, and obtain the message segment carrying the external address of the service host (i.e., the Type A and / or Type AAA message segment) from the reply message segment (i.e., the Answers message segment) in the DNS response message to obtain the external address list replied by the DNS server (including at least one IPv4 address and / or IPv6 address associated with the domain name of the service host). If the DNA resolution is successful, data A is generated to save the corresponding relationship between the domain name of the service host and the external address list; if the DNS resolution fails, the cloud network host is allowed to access the service host according to the existing technology.

[0091] After generating data A, such as Figure 5As shown, the tenant gateway can traverse the external addresses in data A, match each external address (i.e., EIP) with the EIP rule (used to indicate the mapping relationship between EIP and FIP) and the routing table stored in the tenant gateway, update data A according to the internal address (i.e., FIP) mapped by the successfully matched EIP, and delete or retain the correspondence between the EIP and the domain name in data A that failed to match, and obtain data B that at least includes the correspondence between the domain name, FIP and EIP.

[0092] In the specific implementation, for any cloud network host in the cloud network connected to the tenant gateway, after obtaining the third target DNS response message returned by the DNS for the cloud network host's request to access the service host, the tenant gateway determines whether the service host is a cloud network service host (i.e., performs EIP rule matching) based on the external address of the service host carried in the third target DNS response message; if the service host is a cloud network service host, the third target DNS response message is determined as the first target DNS response message associated with the cloud network service host.

[0093] After confirming that the third target DNS response message is associated with the cloud network service host, the tenant gateway determines whether the cloud network host can access the cloud network service host through the intra-cloud communication path based on the routing table and the internal address of the cloud network service host.

[0094] For example, the tenant gateway can determine whether there is a target route for constituting an intra-cloud communication path between the cloud network host and the cloud network service host based on the routing table and the internal address of the cloud network service host, the target route including at least one of the following: a direct route for constituting an internal communication path of a virtual private cloud VPC, a jump table route for constituting a communication path of a VPC peer connection VPC-Peering; in response to the existence of a target route for constituting an intra-cloud communication path between the cloud network host and the cloud network service host, it is determined that the cloud network host can access the cloud network service host through the intra-cloud communication path; in response to the absence of a target route for constituting an intra-cloud communication path between the cloud network host and the cloud network service host, it is determined that the cloud network host cannot access the cloud network service host through the intra-cloud communication path.

[0095] It is understandable that when checking whether the FIP is reachable in the VPC of the DNS requester (i.e., the cloud service host) (i.e., determining whether there is a communication path within the cloud), the VPC routing table of the tenant gateway can be directly searched. If there are hop-table routes and / or direct routes, it means that the cloud network service host and the cloud network host are in the same VPC (i.e., there are direct routes), and / or, the cloud network service host and the cloud network host are not in the same VPC, but can communicate through vpc-peering (i.e., there are hop-table routes), without using NAT, so the tenant gateway can use the internal address to modify the DNS response message.

[0096] After the above address matching is successful, the tenant gateway can generate a first target message segment carrying the internal address of the cloud network service host according to data B, and use the first target message segment to update the corresponding first target DNS response message to obtain a second target DNS response message.

[0097] In specific implementation, the tenant gateway may perform any of the following to update the first target DNS response message:

[0098] Using the first target message segment to replace the second target message segment in the first target DNS response message, to obtain the second target DNS response message, wherein the second target message segment indicates the external address of the cloud network service host;

[0099] Insert the first target message segment into the head position or the tail position of the reply message segment in the first target DNS response message to obtain the second target DNS response message.

[0100] In this embodiment, if Figure 6 As shown, there are three policy options (including replacement, header insertion and tail insertion) for updating the DNS response message (i.e., DNS Response message): for the replacement method, the tenant gateway can generate a new Type A / AAA message segment (i.e., the first target message segment) according to the internal address of the cloud network service host, and use the new Type A / AAA message segment to replace the original message segment in the first target DNS response message, thereby removing the external address of the cloud network service host carried by the first target DNS response message; for the header insertion or tail insertion method, the tenant gateway can insert the new TypeA / AAA message segment into the head position or tail position of the reply message segment of the first target DNS response message, and the original Type A / AAA segment carried by the reply message remains unchanged, thereby retaining the external address of the cloud network service host carried by the first target DNS response message.

[0101] In addition, to ensure the correctness of the updated DNS response message information, after adding the first target message segment to the first target DNS response message, the target information associated with the first target DNS response message with the first target message segment added can also be updated to obtain the second target DNS response message.

[0102] The target information includes at least one of the total length of a UDP data packet, a checksum of a UDP data packet, the total length of an IP datagram, and a checksum of an IP datagram.

[0103] It is understandable that the DNS response message is usually encapsulated in a UDP data packet carried by an IP datagram. When the DNS response message is updated by replacement, the content of the DNS response message carried by the UDP data packet changes, but the total length of the UDP data packet and the total length of the IP datagram remain unchanged, so only the UDP data packet checksum can be updated; when the DNS response message is updated by header insertion or tail insertion, the above contents all change, so it is necessary to update the total length of the UDP data packet, the UDP data packet checksum, the total length of the IP datagram, and the IP datagram checksum to ensure the information correctness of the IP datagram carrying the updated DNS response message.

[0104] 4. The cloud network host generates a request message for requesting business data from the internal address of the cloud network host carried in the received second target DNS response message. The tenant gateway searches for the intra-cloud route associated with the intra-cloud communication path based on the internal address carried in the request message, and then sends the request message to the cloud network service host through the intra-cloud route. The cloud network service host generates a response message based on the request message, and then forwards it to the cloud network host through the intra-cloud communication path via the tenant gateway, thereby completing the intra-cloud communication interaction between the cloud network host and the cloud network server.

[0105] It should be noted that the internal bootstrap behavior based on DNS response message modification provided in this application can support multiple TCP / UDP services (i.e., support multiple interactions between the cloud network host and the cloud network service host) after one modification without affecting the forwarding performance. While improving customer experience, it improves the utilization rate of NAT resources, shortens the forwarding path, and improves reliability.

[0106] Second, as Figure 7 As shown, the embodiment of the present application also provides another intra-cloud communication method, which includes the following steps:

[0107] Step S21: Send a DNS request message, where the DNS request message is used to request access to a cloud network service host;

[0108] Step S22: receiving a response message corresponding to the DNS request message, wherein the response message carries the internal address of the cloud network service host;

[0109] Step S23: Access the cloud network service host through the intra-cloud communication path according to the internal address of the cloud network service host.

[0110] By adopting the technical solution of the embodiment of the present application, by intercepting and modifying the first target DNS response message of the DNS reply, the cloud network host can obtain the internal address of the cloud network service host, thereby accessing the cloud network service host through the intra-cloud communication path, which can reduce the cloud network host's consumption of NAT resources, shorten the forwarding path, and improve communication efficiency.

[0111] For the method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present application are not limited by the order of the actions described, because according to the embodiments of the present application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present application.

[0112] Thirdly, Figure 8 : is a schematic diagram of the structure of an intra-cloud communication device according to an embodiment of the present application, the device comprising:

[0113] A first acquisition module is used to acquire a first target DNS response message returned by a domain name system DNS in response to a request of a cloud network host to access a cloud network service host;

[0114] A first processing module, configured to determine the internal address of the cloud network service host according to a mapping relationship between the external address and the internal address and the external address of the cloud network service host carried by the first target DNS response message;

[0115] A second processing module, configured to generate a second target DNS response message according to the internal address of the cloud network service host and the first target DNS response message;

[0116] The first sending module is used to send the second target DNS response message, so that the cloud network host accesses the cloud network service host through the cloud communication path according to the second target DNS response message.

[0117] By adopting the technical solution of the embodiment of the present application, by intercepting and modifying the first target DNS response message of the DNS reply, the cloud network host can obtain the internal address of the cloud network service host, thereby accessing the cloud network service host through the intra-cloud communication path, which can reduce the cloud network host's consumption of NAT resources, shorten the forwarding path, and improve communication efficiency.

[0118] Optionally, the second processing module includes:

[0119] A first generating module, configured to generate a first target message segment according to an internal address of the cloud network service host;

[0120] The first updating module is used to update the first target DNS response message according to the first target message segment to obtain the second target DNS response message.

[0121] Optionally, the first update module includes any one of the following:

[0122] a first updating submodule, configured to replace a second target message segment in the first target DNS response message with the first target message segment to obtain the second target DNS response message, wherein the second target message segment indicates an external address of the cloud network service host;

[0123] The second updating submodule is used to insert the first target message segment into the head position or the tail position of the reply message segment in the first target DNS response message to obtain the second target DNS response message.

[0124] Optionally, the first updating module includes:

[0125] A third updating submodule, configured to add the first target message segment to the first target DNS response message;

[0126] The fourth update submodule is used to update the target information associated with the first target DNS response message to which the first target message segment is added, and obtain the second target DNS response message, wherein the target information includes at least one of the total length of the UDP data packet, the checksum of the UDP data packet, the total length of the IP datagram, and the checksum of the IP datagram.

[0127] Optionally, the first acquisition module includes:

[0128] A first acquisition submodule is used to obtain a third target DNS response message returned by the DNS for a request for a cloud network host to access a service host;

[0129] A second acquisition submodule, configured to determine whether the service host is a cloud network service host according to the external address of the service host carried in the third target DNS response message;

[0130] The third acquisition submodule is used to determine the third target DNS response message as the first target DNS response message when the service host is a cloud network service host.

[0131] Optionally, before generating the second target DNS response message according to the internal address of the cloud network service host and the first target DNS response message, the device further includes:

[0132] A third processing module is used to determine whether the cloud network host can access the cloud network service host through the intra-cloud communication path according to the routing table and the internal address of the cloud network service host;

[0133] The second processing module comprises:

[0134] The second generation module is used to generate a second target DNS response message according to the internal address of the cloud network service host and the first target DNS response message when the cloud network host can access the cloud network service host through the intra-cloud communication path.

[0135] Optionally, the third processing module includes:

[0136] A determination module, configured to determine whether there is a target route for constituting an intra-cloud communication path between the cloud network host and the cloud network service host according to the routing table and the internal address of the cloud network service host, wherein the target route includes at least one of the following: a direct route for constituting an internal communication path of a virtual private cloud VPC, and a hop table route for constituting a communication path of a VPC peer connection VPC-Peering;

[0137] A first response module, configured to determine, in response to the existence of a target route for constituting an intra-cloud communication path between the cloud network host and the cloud network service host, that the cloud network host can access the cloud network service host through the intra-cloud communication path;

[0138] The second response module is used to determine that the cloud network host cannot access the cloud network service host through the intra-cloud communication path in response to the absence of a target route for constituting an intra-cloud communication path between the cloud network host and the cloud network service host.

[0139] Optionally, before determining the internal address of the cloud network service host according to the mapping relationship between the external address and the internal address and the external address of the cloud network service host carried by the first target DNS response message, the device further includes:

[0140] A fourth processing module, configured to parse a reply message segment in the first target DNS response message to obtain a message segment indicating an external address of the cloud network service host;

[0141] A fifth processing module, configured to obtain an external address of the cloud network service host according to the message segment;

[0142] The message segment includes at least one of the following:

[0143] A segment indicating the IPv4 address of the cloud network service host;

[0144] A segment indicating the IPv6 address of the cloud network service host.

[0145] Fourthly, Fig. 9 : is a schematic diagram of the structure of another intra-cloud communication device according to an embodiment of the present application, the device comprising:

[0146] A sending module, used to send a DNS request message, wherein the DNS request message is used to request access to a cloud network service host;

[0147] A receiving module, used to receive a response message corresponding to the DNS request message, wherein the response message carries the internal address of the cloud network service host;

[0148] The communication module is used to access the cloud network service host through the cloud communication path according to the internal address of the cloud network service host.

[0149] By adopting the technical solution of the embodiment of the present application, by intercepting and modifying the first target DNS response message of the DNS reply, the cloud network host can obtain the internal address of the cloud network service host, thereby accessing the cloud network service host through the intra-cloud communication path, which can reduce the cloud network host's consumption of NAT resources, shorten the forwarding path, and improve communication efficiency.

[0150] In a fifth aspect, an embodiment of the present application further provides an intra-cloud communication system, the system comprising a cloud network host, a cloud network service host, a domain name system DNS, and a network address translation NAT gateway, wherein:

[0151] The NAT gateway is used to obtain the first target DNS response message returned by the DNS in response to the request of the cloud network host to access the cloud network service host, and execute the intra-cloud communication method as described in the first aspect to generate and send a second target DNS response message, so that the cloud network host can access the cloud network service host through the intra-cloud communication path according to the second target DNS response message.

[0152] It should be noted that the device embodiment is similar to the method embodiment, so the description is relatively simple, and the relevant parts can be referred to the method embodiment.

[0153] The present application also provides an electronic device, referring to Fig.10 , Fig.10 Schematic diagram of an electronic device according to an embodiment of the present application. Fig.10 As shown, the electronic device 100 includes: a memory 110 and a processor 120. The memory 110 and the processor 120 are connected via a bus communication. A computer program is stored in the memory 110. The computer program can be run on the processor 120 to implement the steps in the cloud communication method disclosed in the embodiment of the present application.

[0154] The embodiment of the present application also provides a computer-readable storage medium on which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, the intra-cloud communication method disclosed in the embodiment of the present application is implemented.

[0155] The embodiment of the present application also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the intra-cloud communication method disclosed in the embodiment of the present application.

[0156] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0157] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, devices or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0158] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, systems, devices, storage media, and program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0159] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0160] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0161] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.

[0162] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal 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 terminal device. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0163] The above is a detailed introduction to the cloud communication method, device, system and equipment, medium and product provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for intra-cloud communication, It is characterized in that The method comprises: Obtaining a first target DNS response message returned by a domain name system DNS in response to a request from a cloud network host to access a cloud network service host; Determine the internal address of the cloud network service host according to the mapping relationship between the external address and the internal address and the external address of the cloud network service host carried by the first target DNS response message; Generate a second target DNS response message according to the internal address of the cloud network service host and the first target DNS response message; Send the second target DNS response message, and according to the internal address carried by the received request message, find the intra-cloud route associated with the intra-cloud communication path, and send the request message to the cloud network service host through the intra-cloud route, so as to access the cloud network service host based on the intra-cloud communication path; Among them, the request message is: the cloud network host generates and sends a request message for requesting business data from the internal address of the cloud network service host carried in the second target DNS response message.

2. The method according to claim 1, It is characterized in that The generating a second target DNS response message according to the internal address of the cloud network service host and the first target DNS response message includes: Generate a first target message segment according to the internal address of the cloud network service host; According to the first target message segment, the first target DNS response message is updated to obtain the second target DNS response message.

3. The method according to claim 2, It is characterized in that The updating the first target DNS response message according to the first target message segment to obtain the second target DNS response message includes performing any one of the following: Using the first target message segment to replace the second target message segment in the first target DNS response message, to obtain the second target DNS response message, wherein the second target message segment indicates the external address of the cloud network service host; Insert the first target message segment into the head position or the tail position of the reply message segment in the first target DNS response message to obtain the second target DNS response message.

4. The method according to claim 2, It is characterized in that The updating the first target DNS response message according to the first target message segment to obtain the second target DNS response message includes: Adding the first target message segment to the first target DNS response message; The target information associated with the first target DNS response message of the first target message segment is updated to obtain the second target DNS response message, wherein the target information includes at least one of the total length of the UDP data packet, the checksum of the UDP data packet, the total length of the IP datagram, and the checksum of the IP datagram.

5. The method according to claim 1, It is characterized in that The obtaining of the first target DNS response message returned by the domain name system DNS in response to the request of the cloud network host to access the cloud network service host includes: Obtaining a third target DNS response message returned by the DNS in response to the request for the cloud network host to access the service host; Determine whether the service host is a cloud network service host according to the external address of the service host carried in the third target DNS response message; In a case where the service host is a cloud network service host, the third target DNS response message is determined as the first target DNS response message.

6. The method according to claim 1, It is characterized in that Before generating the second target DNS response message according to the internal address of the cloud network service host and the first target DNS response message, the method further includes: Determine, based on the routing table and the internal address of the cloud network service host, whether the cloud network host can access the cloud network service host through the intra-cloud communication path; The generating a second target DNS response message according to the internal address of the cloud network service host and the first target DNS response message includes: In the case where the cloud network host can access the cloud network service host through the intra-cloud communication path, a second target DNS response message is generated according to the internal address of the cloud network service host and the first target DNS response message.

7. The method according to claim 6, It is characterized in that The determining, based on the routing table and the internal address of the cloud network service host, whether the cloud network host can access the cloud network service host through the intra-cloud communication path includes: According to the routing table and the internal address of the cloud network service host, it is determined whether there is a target route for constituting an intra-cloud communication path between the cloud network host and the cloud network service host, wherein the target route includes at least one of the following: a direct route for constituting an internal communication path of a virtual private cloud VPC, and a hop table route for constituting a communication path of a VPC peer connection VPC-Peering; In response to the existence of a target route for constituting an intra-cloud communication path between the cloud network host and the cloud network service host, determining that the cloud network host can access the cloud network service host through the intra-cloud communication path; In response to the absence of a target route for constituting an intra-cloud communication path between the cloud network host and the cloud network service host, it is determined that the cloud network host cannot access the cloud network service host through the intra-cloud communication path.

8. The method according to any one of claims 1 to 7, It is characterized in that Before determining the internal address of the cloud network service host according to the mapping relationship between the external address and the internal address and the external address of the cloud network service host carried by the first target DNS response message, the method further includes: Parsing the reply message segment in the first target DNS response message to obtain a message segment indicating the external address of the cloud network service host; According to the message segment, obtaining the external address of the cloud network service host; The message segment includes at least one of the following: A segment indicating the IPv4 address of the cloud network service host; A segment indicating the IPv6 address of the cloud network service host.

9. A method for intra-cloud communication, It is characterized in that The method comprises: Send a DNS request message, where the DNS request message is used to request access to a cloud network service host; Receive a response message corresponding to the DNS request message, wherein the response message carries the internal address of the cloud network service host; Accessing the cloud network service host through an intra-cloud communication path according to an internal address of the cloud network service host; The step of accessing the cloud network service host through an intra-cloud communication path according to the internal address of the cloud network service host includes: According to the internal address of the cloud network service host, a request message for requesting business data to the internal address is generated and sent, so that the network address translation NAT gateway searches for the cloud route associated with the cloud communication path according to the internal address carried in the received request message, and sends the request message to the cloud network service host through the cloud route, so as to access the cloud network service host based on the cloud communication path.

10. A cloud communication device, It is characterized in that The device comprises: A first acquisition module is used to acquire a first target DNS response message returned by a domain name system DNS in response to a request of a cloud network host to access a cloud network service host; A first processing module, configured to determine the internal address of the cloud network service host according to a mapping relationship between the external address and the internal address and the external address of the cloud network service host carried by the first target DNS response message; A second processing module, configured to generate a second target DNS response message according to the internal address of the cloud network service host and the first target DNS response message; A first sending module, used to send the second target DNS response message, and according to the internal address carried by the received request message, find the cloud route associated with the cloud communication path, and send the request message to the cloud network service host through the cloud route, so as to access the cloud network service host based on the cloud communication path; Among them, the request message is: the cloud network host generates and sends a request message for requesting business data from the internal address of the cloud network service host carried in the second target DNS response message.

11. A cloud communication device, It is characterized in that The device comprises: A sending module, used to send a DNS request message, wherein the DNS request message is used to request access to a cloud network service host; A receiving module, used to receive a response message corresponding to the DNS request message, wherein the response message carries the internal address of the cloud network service host; The communication module is used to generate and send a request message for requesting business data to the internal address of the cloud network service host according to the internal address of the cloud network service host, so that the network address translation NAT gateway searches for the cloud route associated with the cloud communication path according to the internal address carried in the received request message, and sends the request message to the cloud network service host through the cloud route, so as to access the cloud network service host based on the cloud communication path.

12. An intra-cloud communication system, It is characterized in that The system includes a cloud network host, a cloud network service host, a domain name system DNS and a network address translation NAT gateway, wherein: The NAT gateway is used to obtain the first target DNS response message returned by the DNS in response to the request of the cloud network host to access the cloud network service host, and execute the intra-cloud communication method described in any one of claims 1 to 8 to generate and send a second target DNS response message, so that the cloud network host can access the cloud network service host through the intra-cloud communication path according to the second target DNS response message.

13. An electronic device comprising a memory, a processor and a computer program stored in the memory, It is characterized in that The processor executes the computer program to implement the intra-cloud communication method according to any one of claims 1 to 8, or the processor executes the computer program to implement the intra-cloud communication method according to claim 9.

14. A computer-readable storage medium having a computer program / instructions stored thereon, It is characterized in that When the computer program / instruction is executed by the processor, the intra-cloud communication method as described in any one of claims 1 to 8 is implemented, or when the computer program / instruction is executed by the processor, the intra-cloud communication method as described in claim 9 is implemented.

15. A computer program product comprising a computer program / instructions, It is characterized in that When the computer program / instruction is executed by the processor, the intra-cloud communication method as described in any one of claims 1 to 8 is implemented, or when the computer program / instruction is executed by the processor, the intra-cloud communication method as described in claim 9 is implemented.