CN114979128A - Cross-region communication method and device and electronic equipment - Google Patents

Cross-region communication method and device and electronic equipment Download PDF

Info

Publication number
CN114979128A
CN114979128A CN202110193667.8A CN202110193667A CN114979128A CN 114979128 A CN114979128 A CN 114979128A CN 202110193667 A CN202110193667 A CN 202110193667A CN 114979128 A CN114979128 A CN 114979128A
Authority
CN
China
Prior art keywords
private network
target
network node
communication
communication data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110193667.8A
Other languages
Chinese (zh)
Inventor
黎黎
曹德华
周显平
冯荣
袁伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202110193667.8A priority Critical patent/CN114979128A/en
Publication of CN114979128A publication Critical patent/CN114979128A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Abstract

The embodiment of the application provides a cross-region communication method, a cross-region communication device and electronic equipment, which are realized in a public network and a special network, wherein the public network comprises public network nodes, and the special network comprises special network nodes. The method comprises the following steps: acquiring a first communication message forwarded by a target private network node of a target area through the private network, wherein the first communication message comprises header information and first communication data, and the first communication data is sent by a target public network node of the target area; acquiring second communication data, wherein the second communication data is used for responding to the first communication data; determining an IP address of the target private network node in the private network from the header information; and sending the second communication data to the target public network node through the private network based on the IP address of the target private network node in the private network. The technical scheme of the embodiment of the application can improve the stability of cross-region communication.

Description

Cross-region communication method and device and electronic equipment
Technical Field
The present application relates to the field of cloud technologies and communication technologies, and in particular, to a cross-region communication method and apparatus, a computer readable medium, and an electronic device.
Background
In an internet communication scenario, such as between two communication devices across an area, communication is typically via a public network. Communication data flow between two communication devices is entirely routed on a public network line, when the problems of communication outlet faults, international submarine cable faults, network congestion and the like of the communication devices occur, the network quality cannot be effectively guaranteed, a path routed on the public network cannot be controlled to be an optimal path, and the delay quality is also uncontrollable. Therefore, how to improve the stability of cross-region communication is an urgent technical problem to be solved.
Disclosure of Invention
Embodiments of the present application provide a cross-region communication method, apparatus, computer program product or computer program, computer readable medium, and electronic device, so that stability of cross-region communication can be improved at least to a certain extent.
Other features and advantages of the present application will be apparent from the following detailed description, or may be learned by practice of the application.
According to an aspect of an embodiment of the present application, a cross-region communication method is provided, implemented in a public network and a private network, where the public network includes a public network node and the private network includes a private network node, and the method includes: acquiring a first communication message forwarded by a target private network node of a target area through the private network, wherein the first communication message comprises header information and first communication data, and the first communication data is sent by a target public network node of the target area; acquiring second communication data, wherein the second communication data is used for responding to the first communication data; determining an IP address of the target private network node in the private network from the header information; and sending the second communication data to the target public network node through the private network based on the IP address of the target private network node in the private network.
According to an aspect of an embodiment of the present application, there is provided a cross-region communication apparatus implemented in a public network and a private network, wherein the public network includes a public network node, and the private network includes a private network node, the apparatus including: a first obtaining unit, configured to obtain, through the private network, a first communication packet forwarded by a target private network node in a target area, where the first communication packet includes header information and first communication data, and the first communication data is sent by the target public network node in the target area; a second acquisition unit configured to acquire second communication data in response to the first communication data; a determining unit configured to determine an IP address of the target private network node in the private network from the header information; a first sending unit, configured to send the second communication data to the target public network node through the private network based on an IP address of the target private network node in the private network.
In some embodiments of the present application, based on the foregoing solution, the apparatus further includes: a third obtaining unit, configured to obtain an IP address of a target public network node in the public network before obtaining, through the private network, a first communication packet forwarded by the target private network node in a target area; and the second sending unit is used for sending first packet communication data to the target public network node through the public network based on the IP address of the target public network node in the public network, wherein the first packet communication data is the first piece of communication data which is historically sent to the target public network node.
In some embodiments of the present application, based on the foregoing solution, the apparatus further includes: a fourth obtaining unit, configured to obtain an IP address of a predefined private network node in the private network, before obtaining, through the private network, the first communication packet forwarded by a target private network node in a target area; and a third sending unit, configured to send, based on the IP address of the predefined private network node in the private network, a first packet of communication data to the target public network node through the private network, where the first packet of communication data is a first piece of communication data that is historically sent to the target public network node.
In some embodiments of the present application, based on the foregoing solution, a local public network node in a local area includes at least one virtual sub-node, and the second communication data is sent by a target virtual sub-node in the local public network node; the determination unit is configured to: determining an IP address of the target private network node in the private network from the header information when the target virtual child node has the authority to use the private network.
In some embodiments of the present application, based on the foregoing solution, the local public network node is provided with a virtual routing table; when the IP address of the target virtual sub-node in the public network is marked in the virtual routing table, the target virtual sub-node has the authority to use the private network.
In some embodiments of the present application, based on the foregoing scheme, the first sending unit includes: an encapsulating unit, configured to encapsulate the second communication data by using an IP address of the target private network node in the private network as a destination IP address in the private network, so as to obtain a second communication packet; a forwarding unit, configured to forward the second communication packet to the target private network node through the private network, so that the target private network node forwards the second communication data in the second communication packet to a target public network node in the public network.
In some embodiments of the present application, based on the foregoing solution, the encapsulation unit is configured to: and taking the IP address of the target private network node in the private network as a target IP address in the private network, and encapsulating the second communication data through a tunnel protocol to obtain a second communication message.
In some embodiments of the present application, based on the foregoing solution, the forwarding unit is configured to: selecting a local private network node corresponding to the local public network node from each private network node of the private network according to a principle of proximity on a geographical position; forwarding the second communication message to the local private network node such that the local private network node forwards the second communication message to the target private network node over the private network.
According to an aspect of embodiments herein, there is provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the cross-region communication method described in the above embodiments.
According to an aspect of an embodiment of the present application, there is provided a computer-readable medium on which a computer program is stored, the computer program, when executed by a processor, implementing a cross-region communication method as described in the above embodiments.
According to an aspect of an embodiment of the present application, there is provided an electronic device including: one or more processors; a storage device to store one or more programs that, when executed by the one or more processors, cause the one or more processors to implement a cross-region communication method as described in the embodiments above.
In the technical solutions provided in some embodiments of the present application, after a target public network node of a target area sends first communication data, a first communication packet including header information and the first communication data forwarded by the target private network node in a private network of the target area is first obtained, then an IP address of the target private network node in the private network is determined from the header information, and second communication data for responding to the first communication data is sent to the target public network node through the private network based on the IP address of the target private network node in the private network.
The first communication data sent by the target public network node is forwarded through the target private network node belonging to the same area as the target public network node, and the second communication data used for responding to the first communication data is sent to the target public network node through the private network based on the IP address of the target private network node in the private network, so that the communication data of cross-area communication are transmitted on the private network, the quality of cross-area communication is not affected by the defect of low stability of the public network, and the stability of cross-area communication is improved. And cross-region communication is carried out through the private network, so that a non-optimal delay communication path in the public network is avoided, and the time efficiency of cross-region communication is accelerated.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application. It is obvious that the drawings in the following description are only some embodiments of the application, and that for a person skilled in the art, other drawings can be derived from them without inventive effort. In the drawings:
fig. 1 shows a schematic diagram of an exemplary system architecture to which the solution of the embodiments of the present application can be applied;
FIG. 2 illustrates a flow diagram of a method of cross-region communication according to one embodiment of the present application;
FIG. 3 illustrates an example simulation diagram of cross-region communication according to one embodiment of this application;
fig. 4 shows a flowchart of a method before a first communication packet forwarded by a target private network node of a target area is acquired through the private network according to an embodiment of the present application;
FIG. 5 illustrates an example simulation diagram of cross-region communication according to one embodiment of the present application;
fig. 6 shows a flowchart of a method before a first communication packet forwarded by a target private network node of a target area is acquired through the private network according to an embodiment of the present application;
FIG. 7 illustrates an example simulation diagram of cross-region communication according to one embodiment of the present application;
fig. 8 shows a detailed flow diagram for sending the second communication data to the target public network node over the private network according to one embodiment of the present application;
fig. 9 illustrates a detailed flow diagram for forwarding the second communication message to the target private network node over the private network according to one embodiment of the present application;
FIG. 10 shows a block diagram of a cross-region communication device according to one embodiment of the present application;
FIG. 11 illustrates a schematic structural diagram of a computer system suitable for use to implement the electronic device of the embodiments of the subject application.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the application. One skilled in the relevant art will recognize, however, that the subject matter of the present application can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the application.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
It should be noted that: reference herein to "a plurality" means two or more. "and/or" describes the association relationship of the associated object, indicating that there may be three relationships, for example, a and/or B may indicate: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
It is noted that the terms first, second and the like in the description and claims of the present application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the objects so used are interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in other sequences than those illustrated or described herein.
Fig. 1 shows a schematic diagram of an exemplary system architecture to which the technical solution of the embodiments of the present application can be applied.
As shown in fig. 1, the system architecture may include a terminal device (e.g., one or more of the smartphone 101, tablet 102, and portable computer 103 shown in fig. 1, but may be other terminal devices with positioning functionality), a network 104, and a server 105. The network 104 serves as a medium for providing communication links between terminal devices and the server 105. Network 104 may include various connection types, such as wired communication links, wireless communication links, and so forth.
In one embodiment of the present application, the communication between the server 105 and the terminal device may be performed, where the server 105 and the terminal device are respectively in different areas, for example, in different countries, and the server 105 and the terminal device may be regarded as two nodes in a public network, and the server 105 and the terminal device both have IP addresses in the public network. Specifically, the server 105 may obtain a first communication packet forwarded by a target private network node of a target area through a private network, where the first communication packet includes header information and first communication data, and the first communication data is sent by a terminal device of the target area, and then the server 105 may obtain second communication data for responding to the first communication data, determine an IP address of the target private network node in the private network from the header information, and send the second communication data to the terminal device through the private network based on the IP address of the target private network node in the private network.
It should be noted that the cross-region communication method provided in the embodiment of the present application may be executed by the server 105, and accordingly, the cross-region communication apparatus is generally disposed in the server 105. However, in other embodiments of the present application, the terminal device may also have a similar function as the server, so as to execute the cross-region communication scheme provided by the embodiments of the present application.
It should be further noted that the numbers of terminal devices, networks and servers in fig. 1 are merely illustrative, and the networks may include a proprietary network and a public network. According to implementation needs, the server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a network service, cloud communication, a middleware service, a domain name service, a security service, a CDN, a big data and artificial intelligence platform, and the like. The terminal may be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, and the like, but is not limited thereto, and the application is not limited thereto.
It should be explained that cloud computing (cloud computing) as described above is a computing model that distributes computing tasks over a large pool of computers, enabling various application systems to obtain computing power, storage space, and information services as needed. The network that provides the resources is referred to as the "cloud". Resources in the cloud can be infinitely expanded to users, and can be acquired at any time, used as required and expanded at any time. The cloud computing resource pool mainly comprises computing equipment (which is a virtualization machine and comprises an operating system), storage equipment and network equipment.
The implementation details of the technical solution of the embodiment of the present application are set forth in detail below:
fig. 2 illustrates a flow diagram of a cross-region communication method according to one embodiment of the present application, which may be performed by a device having a computing processing function and a communication function, such as server 105 shown in fig. 1.
In addition, the cross-region communication method may be implemented in a public network and a private network, where the public network includes a public network node, and the private network includes a private network node, as shown in fig. 2, the cross-region communication method at least includes steps 220 to 280, which are described in detail as follows:
in step 220, a first communication packet forwarded by a target private network node of a target area is obtained through the private network, where the first communication packet includes header information and first communication data, and the first communication data is sent by the target public network node of the target area.
The private network is a private network and comprises a plurality of private network nodes, wherein the private network nodes are connected with the private network nodes through private lines, each private network node is allocated with a private IP address in the private network, and the private network only allows legal nodes to access, so that the safety, the efficiency and the integrity of the transmission of communication data in the private network are ensured.
The public network is a network facing all users, i.e. the Internet, and in the public network, a large number of public network nodes are included, any two public network nodes can communicate through the public network, and communication between two cross-region public network nodes, for example, communication between two cross-country public network nodes, needs to be forwarded through multiple layers of routes to realize communication data transmission.
In the application, in the process of communication between two cross-regional public network nodes, after a target public network node in a target region is sent out, a private network node in a private network, that is, a target private network node, may be selected in the target region according to a principle of proximity, and the first communication data is forwarded to the target private network node, and the target private network node forwards the first communication data to a local public network node (for example, a server 105 shown in fig. 1) in a local region through the private network. It should be noted that, before the target private network node forwards the first communication data, the first communication data needs to be encapsulated to obtain a first communication packet including header information and the first communication data, where the header information records an IP address of the target private network node in the private network.
In step 240, second communication data is obtained, the second communication data being used in response to the first communication data.
After the local public network node acquires the first communication data, the user responds to the first communication data, second communication data is sent out through the local public network node, and the local public network node acquires the second communication data.
In step 260, the IP address of the target private network node in the private network is determined from the header information.
Since the header information records the IP address of the target private network node in the private network, the IP address of the target private network node in the private network can be determined and obtained by learning the header information.
In step 280, the second communication data is sent to the target public network node through the private network based on the IP address of the target private network node in the private network.
With reference to fig. 3, a cross-country communication scenario is taken as an example to describe in detail the technical solution of the embodiment of the present application:
referring to fig. 3, an exemplary simulation of cross-region communication is shown, according to one embodiment of the present application.
In the cross-country communication scenario 300, a private network 302 and a public network 304 are included. The private network 302 includes a chinese private network node, a french private network node, an american private network node, and a japanese private network node, and the public network 304 includes a french public network node 301 (i.e., a target user) and a chinese public network node 303 (i.e., a local user). It can be understood that the french private network node and the french public network node both belong to a french area, and the chinese private network node and the chinese public network node both belong to a french area.
In the present application, the china public network node 303 may be a cloud server, that is, a physical server where a cloud host is located in a cloud network vpc (virtual Private cloud) scenario.
In a specific example, the french public network node 301 sends out the first communication data S1, and forwards the first communication data through the french private network node in the private network 302, the french private network node forwards the first communication packet including the first communication data through the private network, the chinese public network node obtains the first communication data from the private network, and learns the IP address information of the french private network node in the private network 302 according to the header information in the first communication packet, and then the chinese public network node forwards the second communication data for responding to the first communication data to the french public network node through the french private network node in the private network based on the IP address information of the french private network node.
It should be noted that the communication data proposed in the present application may be text data, for example, a text message is sent by the target user to the local user, and the local user responds to the target user with a text message. Further, the communication data may be audio or video data, game data, or the like.
In an embodiment of the present application, before the step 220 of obtaining the first communication packet forwarded by the target private network node of the target area through the private network, the steps shown in fig. 4 may also be performed.
Referring to fig. 4, a flowchart of a method before acquiring, through the private network, a first communication packet forwarded by a target private network node of a target area is shown, according to an embodiment of the present application. Specifically, the method includes steps 211 to 212:
in step 211, the IP address of the target public network node in the public network is obtained.
In step 212, based on the IP address of the target public network node in the public network, sending a first packet of communication data to the target public network node through the public network, where the first packet of communication data is a first piece of communication data sent to the target public network node historically.
In this embodiment, the first packet of communication data refers to the historical first piece of communication data sent to the target public network node by using the local public network node as the data initiator. Before the first piece of historical communication data is sent to the target public network node, the IP address of the target private network node close to the target public network node in the private network is unknown, so that the first packet communication data cannot be directly forwarded to the target public network node through the target private network node. Based on this, the first packet communication data can be sent to the target public network node through the public network.
It should be noted that the target private network node close to the target public network node refers to a target private network node close to the target public network node in geographic distance.
In this embodiment, when the local public network node sends the first packet of communication data to the target public network node through the public network, the IP address of the local private network node in the private network, which is close to the target public network node itself, may also be sent to the target public network node, so that the target private network node may send the first communication data to the local private network node through the private network based on the IP address of the local private network node in the private network in a subsequent process, and further forward the first communication data to the local public network node.
The following explains the technical solution of the present embodiment in detail by taking a cross-country communication scenario as an example:
referring to fig. 5, an exemplary simulation of cross-region communication is shown, according to one embodiment of the present application.
In the cross-country communication scenario 500, the chinese public network node 303 may obtain an IP address of the french public network node in the public network through DNS resolution according to a link of the french public network node 301, the chinese public network node 303 sends the first packet communication data S0, for example, initiates a video call, to the french public network node 301 through the public network 304 according to the IP address, and the french public network node 301 accordingly forwards the first communication data S1 for responding to the first packet communication data S0 to the chinese public network node 303 through the french private network node in the private network 302.
In another embodiment of the present application, before the first communication packet forwarded by the target private network node of the target area is obtained through the private network in step 220, the steps shown in fig. 6 may also be performed.
Referring to fig. 6, a flowchart of a method before acquiring, through the private network, a first communication packet forwarded by a target private network node of a target area is shown, according to an embodiment of the present application. Specifically, the method comprises steps 213 to 214:
in step 213, the IP address of a predefined private network node in the private network is obtained.
In step 214, based on the IP address of the predefined private network node in the private network, sending a first packet of communication data to the target public network node through the private network, where the first packet of communication data is a first piece of communication data sent to the target public network node historically.
In this embodiment, if a private network node that is close to a target public network node in a geographical distance, that is, a predefined private network node, is known in advance, an IP address of the predefined private network node in the private network may be directly obtained, and based on the IP address of the predefined private network node in the private network, the first packet communication data is sent to the target public network node through the private network.
The following explains the technical solution of the present embodiment in detail by taking a cross-country communication scenario as an example:
referring to fig. 7, an exemplary simulation of cross-region communication is shown, according to one embodiment of the present application.
In the cross-country communication scenario 700, the chinese public network node 303 may send out the first packet communication data S00 to the french public network node 301 through the proprietary network 302 according to the IP address of the predefined private network node (i.e., the target private network node) in the proprietary network, and the french public network node 301 accordingly forwards the first communication data S1 for responding to the first packet communication data S00 to the chinese public network node 303 through the french private network node in the proprietary network 302.
In an embodiment of the present application, the local public network node in the local area may include at least one virtual sub-node, and the second communication data is sent out by a target virtual sub-node in the local public network node.
In this embodiment, if the local public network node is a cloud server, there may be at least one virtual server, that is, a virtual child node, in the cloud server. And each virtual child node in the local public network node corresponds to an IP address in the public network.
In this implementation, when the target virtual child node has the authority to use the private network, the IP address of the target private network node in the private network is determined from the header information.
Further, the local public network node may be provided with a virtual routing table, and when the virtual routing table is marked with an IP address of the target virtual sub-node in the public network, the target virtual sub-node has a right to use the private network.
The proprietary network only allows legitimate nodes to access in order to guarantee the security, efficiency and integrity of the transmission of the communication data in the proprietary network. Therefore, in the application, the IP address of the target virtual sub-node in the public network is recorded through the virtual routing table set in the local public network node, so that the validity of the target virtual sub-node can be identified, and the target virtual sub-node is further proved to have the authority to use the private network.
In an embodiment of the present application, the step 280 of sending the second communication data to the target public network node through the private network based on the IP address of the target private network node in the private network may be performed according to the steps shown in fig. 8.
Referring to fig. 8, a detailed flow diagram of the sending of the second communication data to the target public network node over the private network is shown, according to one embodiment of the present application. Specifically, the method includes steps 281 to 282:
in step 281, the IP address of the target private network node in the private network is used as the destination IP address in the private network, and the second communication data is encapsulated to obtain a second communication packet.
In step 282, forwarding the second communication message to the target private network node over the private network, such that the target private network node forwards the second communication data in the second communication message to a target public network node in the public network.
In step 281, the IP address of the target private network node in the private network may be used as a destination IP address in the private network, and the second communication data is encapsulated through a tunneling protocol to obtain a second communication packet.
In the present application, the tunneling protocol may be generic Routing encapsulation (gre) which encapsulates datagrams of some network layer protocols such that they can be transported in another network layer protocol (e.g., IP).
In this embodiment, the step 282 of forwarding the second communication message to the target private network node through the private network may be performed according to the steps shown in fig. 9:
referring to fig. 9, a detailed flow diagram for forwarding the second communication message to the target private network node over the private network is shown, according to one embodiment of the present application. Specifically, the method comprises steps 2821 to 2822:
in step 2821, according to the geographical proximity principle, a local private network node corresponding to the local public network node is selected from the private network nodes of the private network.
In step 2822, forwarding the second communication message to the local private network node, such that the local private network node forwards the second communication message to the target private network node over the private network.
In this application, the local private network node corresponding to the local public network node is a local private network node close to the local public network node in geographic distance.
The selection of the local private network node corresponding to the local public network node in each private network node of the private network may be implemented based on an Anycast technique, where the Anycast technique refers to that when a unicast address is allocated to more than one interface, a packet to be sent is routed by a network to a "nearest-to-target interface" measured by a routing protocol, that is, the local private network node in this embodiment.
Anycast allows a source node to send datagrams to one of a set of destination nodes, which is selected by a routing system and transparent to the source node; meanwhile, the routing system selects the nearest node to provide service for the source node, thereby providing better service for the source node to a certain extent and reducing the network load.
In the application, the local public network node dynamically adjusts the communication path of the communication data according to the header information in the received communication message, and ensures that the communication data can also be transmitted to the private network node closest to the target public network node through the private network.
In the above embodiment of the present application, the first communication data sent by the target public network node is forwarded by the target private network node that belongs to the same area as the target public network node, and based on the IP address of the target private network node in the private network, the second communication data for responding to the first communication data is sent to the target public network node through the private network, so that the communication data of cross-area communication is transmitted on the private network, the quality of cross-area communication is not affected by the low stability defect of the public network, and the stability of cross-area communication is improved. And cross-region communication is carried out through a private network, so that a non-optimal delay communication path in a public network is avoided, and the time efficiency of cross-region communication is accelerated.
The following describes embodiments of the apparatus of the present application, which may be used to perform the cross-region communication method in the above-described embodiments of the present application. For details that are not disclosed in the embodiments of the apparatus of the present application, please refer to the embodiments of the cross-region communication method described above in the present application.
FIG. 10 shows a block diagram of a cross-region communication device according to one embodiment of the application.
Referring to fig. 10, a cross-region communication apparatus 1000 according to an embodiment of the present application is implemented in a public network including public network nodes and a private network including private network nodes, and includes: a first acquisition unit 1001, a second acquisition unit 1002, a determination unit 1003, and a first transmission unit 1004.
The first obtaining unit 1001 is configured to obtain, through the private network, a first communication packet forwarded by a target private network node in a target area, where the first communication packet includes header information and first communication data, and the first communication data is sent by a target public network node in the target area; a second acquisition unit 1002 configured to acquire second communication data in response to the first communication data; a determining unit 1003, configured to determine, from the header information, an IP address of the target private network node in the private network; a first sending unit 1004, configured to send the second communication data to the target public network node through the private network based on the IP address of the target private network node in the private network.
In some embodiments of the present application, based on the foregoing solution, the apparatus further includes: a third obtaining unit, configured to obtain an IP address of a target public network node in the public network before obtaining, through the private network, a first communication packet forwarded by the target private network node in a target area; and the second sending unit is used for sending first packet communication data to the target public network node through the public network based on the IP address of the target public network node in the public network, wherein the first packet communication data is the first piece of communication data which is historically sent to the target public network node.
In some embodiments of the present application, based on the foregoing solution, the apparatus further includes: a fourth obtaining unit, configured to obtain an IP address of a predefined private network node in the private network, before obtaining, through the private network, the first communication packet forwarded by a target private network node in a target area; and a third sending unit, configured to send, based on the IP address of the predefined private network node in the private network, a first packet of communication data to the target public network node through the private network, where the first packet of communication data is a first piece of communication data that is historically sent to the target public network node.
In some embodiments of the present application, based on the foregoing solution, a local public network node in a local area includes at least one virtual sub-node, and the second communication data is sent by a target virtual sub-node in the local public network node; the determining unit 1003 is configured to: determining an IP address of the target private network node in the private network from the header information when the target virtual child node has the authority to use the private network.
In some embodiments of the present application, based on the foregoing solution, the local public network node is provided with a virtual routing table; when the IP address of the target virtual sub-node in the public network is marked in the virtual routing table, the target virtual sub-node has the authority to use the private network.
In some embodiments of the present application, based on the foregoing scheme, the first sending unit 1004 includes: the encapsulating unit is used for encapsulating the second communication data by taking the IP address of the target private network node in the private network as a target IP address in the private network to obtain a second communication message; a forwarding unit, configured to forward the second communication message to the target private network node through the private network, so that the target private network node forwards the second communication data in the second communication message to a target public network node in the public network.
In some embodiments of the present application, based on the foregoing solution, the encapsulation unit is configured to: and taking the IP address of the target private network node in the private network as a target IP address in the private network, and encapsulating the second communication data through a tunnel protocol to obtain a second communication message.
In some embodiments of the present application, based on the foregoing solution, the forwarding unit is configured to: according to the principle of proximity in geographic position, selecting a local private network node corresponding to the local public network node from each private network node of the private network; forwarding the second communication message to the local private network node such that the local private network node forwards the second communication message to the target private network node over the private network.
FIG. 11 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present application.
It should be noted that the computer system 1100 of the electronic device shown in fig. 11 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 11, a computer system 1100 includes a Central Processing Unit (CPU)1101, which can perform various appropriate actions and processes, such as executing the methods described in the above embodiments, according to a program stored in a Read-Only Memory (ROM) 1102 or a program loaded from a storage section 1108 into a Random Access Memory (RAM) 1103. In the RAM 1103, various programs and data necessary for system operation are also stored. The CPU 1101, ROM 1102, and RAM 1103 are connected to each other by a bus 1104. An Input/Output (I/O) interface 1105 is also connected to bus 1104.
The following components are connected to the I/O interface 1105: an input portion 1106 including a keyboard, mouse, and the like; an output section 1107 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section 1108 including a hard disk and the like; and a communication section 1109 including a Network interface card such as a LAN (Local Area Network) card, a modem, or the like. The communication section 1109 performs communication processing via a network such as the internet. A driver 1110 is also connected to the I/O interface 1105 as necessary. A removable medium 1111, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like, is mounted on the drive 1110 as necessary, so that a computer program read out therefrom is mounted into the storage section 1108 as necessary.
In particular, according to embodiments of the application, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer-readable medium, the computer program comprising program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication portion 1109 and/or installed from the removable medium 1111. When the computer program is executed by a Central Processing Unit (CPU)1101, various functions defined in the system of the present application are executed.
It should be noted that the computer readable medium shown in the embodiments of the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM), a flash Memory, an optical fiber, a portable Compact Disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. Each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software or hardware, and the described units may also be disposed in a processor. Wherein the names of the elements do not in some way constitute a limitation on the elements themselves.
As another aspect, the present application also provides a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the cross-region communication method described in the above embodiments.
As another aspect, the present application also provides a computer-readable medium, which may be contained in the electronic device described in the above embodiment; or may be separate and not incorporated into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to implement the cross-region communication method described in the above embodiments.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the application. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiments of the present application.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (10)

1. A cross-region communication method is realized in a public network and a private network, wherein the public network comprises public network nodes, and the private network comprises private network nodes, and the method comprises the following steps:
acquiring a first communication message forwarded by a target private network node of a target area through the private network, wherein the first communication message comprises header information and first communication data, and the first communication data is sent by a target public network node of the target area;
acquiring second communication data, wherein the second communication data is used for responding to the first communication data;
determining an IP address of the target private network node in the private network from the header information;
and sending the second communication data to the target public network node through the private network based on the IP address of the target private network node in the private network.
2. The method of claim 1, wherein prior to obtaining the first communication packet forwarded by the target private network node of the target area via the private network, the method further comprises:
acquiring the IP address of the target public network node in the public network;
and sending first packet communication data to the target public network node through the public network based on the IP address of the target public network node in the public network, wherein the first packet communication data is the first piece of communication data sent to the target public network node historically.
3. The method of claim 1, wherein prior to obtaining the first communication packet forwarded by the target private network node of the target area via the private network, the method further comprises:
acquiring an IP address of a predefined private network node in the private network;
and sending a first packet of communication data to the target public network node through the private network based on the IP address of the predefined private network node in the private network, wherein the first packet of communication data is the first piece of communication data which is sent to the target public network node historically.
4. The method according to claim 1, wherein at least one virtual sub-node is included in a local public network node of a local area, and the second communication data is sent out by a target virtual sub-node in the local public network node;
said determining an IP address of said target private network node in said private network from said header information, comprising:
determining an IP address of the target private network node in the private network from the header information when the target virtual child node has the authority to use the private network.
5. The method of claim 4, wherein the local public network node is provided with a virtual routing table; when the IP address of the target virtual sub-node in the public network is marked in the virtual routing table, the target virtual sub-node has the authority to use the private network.
6. The method of claim 4, wherein the sending the second communication data to the target public network node over the private network based on the IP address of the target private network node in the private network comprises:
taking the IP address of the target private network node in the private network as a target IP address in the private network, and encapsulating the second communication data to obtain a second communication message;
forwarding the second communication message to the target private network node through the private network, so that the target private network node forwards the second communication data in the second communication message to a target public network node in the public network.
7. The method of claim 6, wherein encapsulating the second communication data with the IP address of the target private network node in the private network as a destination IP address in the private network to obtain a second communication message comprises:
and taking the IP address of the target private network node in the private network as a target IP address in the private network, and encapsulating the second communication data through a tunnel protocol to obtain a second communication message.
8. The method of claim 6, wherein said forwarding the second communication message to the target private network node over the private network comprises:
according to the principle of proximity in geographic position, selecting a local private network node corresponding to the local public network node from each private network node of the private network;
forwarding the second communication message to the local private network node such that the local private network node forwards the second communication message to the target private network node over the private network.
9. A cross-region communication apparatus implemented in a public network including public network nodes and a private network including private network nodes, the apparatus comprising:
a first obtaining unit, configured to obtain, through the private network, a first communication packet forwarded by a target private network node in a target area, where the first communication packet includes header information and first communication data, and the first communication data is sent by the target public network node in the target area;
a second acquisition unit configured to acquire second communication data in response to the first communication data;
a determining unit configured to determine an IP address of the target private network node in the private network from the header information;
a first sending unit, configured to send the second communication data to the target public network node through the private network based on an IP address of the target private network node in the private network.
10. A computer device comprising one or more processors and one or more memories having at least one program code stored therein, the at least one program code being loaded and executed by the one or more processors to implement the operations performed by the cross-region communication method of any of claims 1 to 8.
CN202110193667.8A 2021-02-20 2021-02-20 Cross-region communication method and device and electronic equipment Pending CN114979128A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110193667.8A CN114979128A (en) 2021-02-20 2021-02-20 Cross-region communication method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110193667.8A CN114979128A (en) 2021-02-20 2021-02-20 Cross-region communication method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN114979128A true CN114979128A (en) 2022-08-30

Family

ID=82954595

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110193667.8A Pending CN114979128A (en) 2021-02-20 2021-02-20 Cross-region communication method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN114979128A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116915867A (en) * 2023-09-13 2023-10-20 北京嗨飞科技有限公司 Network data transmission method, device and system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116915867A (en) * 2023-09-13 2023-10-20 北京嗨飞科技有限公司 Network data transmission method, device and system

Similar Documents

Publication Publication Date Title
CN110708393B (en) Method, device and system for transmitting data
CN109889586B (en) Communication processing method and device, computer readable medium and electronic equipment
US9628290B2 (en) Traffic migration acceleration for overlay virtual environments
US9251040B2 (en) Remote debugging in a cloud computing environment
CN109547349B (en) Virtual routing-based traffic management method, device, terminal and storage medium
CN111177617A (en) Web direct operation and maintenance method and device based on operation and maintenance management system and electronic equipment
CN110177047B (en) Message sending method, device, electronic equipment and computer readable storage medium
CN111629030A (en) Communication processing method, device, medium and equipment based on edge computing platform
US20230216895A1 (en) Network-based media processing (nbmp) workflow management through 5g framework for live uplink streaming (flus) control
CN110996372B (en) Message routing method, device and system and electronic equipment
CN110896411B (en) Service processing method and related equipment
CN113162836B (en) Virtual local area network communication method and device, cloud server, medium and electronic equipment
CN112152879B (en) Network quality determination method, device, electronic equipment and readable storage medium
US11699093B2 (en) Automated distribution of models for execution on a non-edge device and an edge device
CN114979128A (en) Cross-region communication method and device and electronic equipment
CN113423120A (en) Data distribution processing method and device based on private network terminal and electronic equipment
CA3011601A1 (en) System and method for contextually based fulfillment of communication requests via a telephony platform
CN114301980A (en) Method, device and system for scheduling container cluster and computer readable medium
CN113986995A (en) Request distribution method and device, storage medium and electronic equipment
CN114513552A (en) Data processing method, device, equipment and storage medium
CN112929453A (en) Method and device for sharing session data
CN114640555B (en) Information processing method, virtual machine cluster and system
CN114006707B (en) East-west firewall configuration method, device and system
CN113452670B (en) Phishing blocking method, device, equipment and medium based on SDN network
CN112433821B (en) Method and device for building business model, electronic equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination