A data transmission method, device and equipment based on cloud network
By using elastic network interface pairs (ENI pairs) for data transmission between cloud devices, the problems of VPC routing complexity and performance consumption in existing technologies are solved, and simplified high-performance data transmission is achieved.
Patent Information
- Application Number
- CN202411045703.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2044-07-31
AI Technical Summary
Data transmission between existing cloud devices relies on VPC routing, which is complex to implement and affects performance. In particular, all VPC functions need to be executed during data forwarding, resulting in performance degradation.
Use an Elastic Network Interface (ENI) pair to connect to cloud servers, independently deployed in a subnet within the cloud network, independent of any subnet or VPC. By querying the address of the ENI pair, data traffic is forwarded in the fast lane, avoiding VPC routing.
It simplifies the implementation of cloud device interconnection, improves data transmission performance, and avoids the complexity and performance consumption of VPC routing.
Smart Images

Figure CN118764464B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a cloud network-based data transmission method, apparatus, and device. Background Art
[0002] VPC (Virtual Private Cloud) builds an isolated, user-configured and managed virtual network environment for elastic cloud servers, improving the security of users' cloud resources and simplifying their network deployment. Currently, interconnection between two devices in the cloud is generally achieved through VPC routing. Specifically, if two devices need to communicate, a tunnel can be established between them based on the VPC network, and data transmission can be carried out based on the configured VPC routing. This method is complex to implement and requires the execution of all VPC functions during data transmission. Some other functions are not essential for data transmission, affecting data forwarding performance. Summary of the Invention
[0003] In view of this, the embodiments of the present application provide a cloud network-based data transmission method, apparatus, and device to simplify the implementation of cloud device interconnection and improve data transmission performance.
[0004] To solve the above problems, the technical solutions provided in the embodiments of the present application are as follows:
[0005] In a first aspect, an embodiment of the present application provides a cloud network-based data transmission method, comprising:
[0006] Receive a first data stream transmitted via a first elastic network interface in an elastic network interface pair connected to a first cloud server; the elastic network interface pair is configured with a first elastic network interface and a second elastic network interface, the first elastic network interface is connected to the first cloud server and transmits the data stream to the second cloud server via the first elastic network interface and the second elastic network interface connected to the second cloud server; wherein the elastic network interface pair is independently deployed in a subnet in the cloud network;
[0007] When it is determined that the first data flow is transmitted via the elastic network card interface pair, the address of the second elastic network card interface is queried in the fast channel, and the first data flow is forwarded to the second cloud server based on the address of the second elastic network card interface.
[0008] In a second aspect, an embodiment of the present application provides a cloud network-based data transmission device, comprising:
[0009] A receiving unit, configured to receive a first data stream transmitted via a first elastic network interface in an elastic network interface pair connected to a first cloud server; the elastic network interface pair is configured with a first elastic network interface and a second elastic network interface, the first elastic network interface is connected to the first cloud server and transmits the data stream to the second cloud server via the first elastic network interface and the second elastic network interface connected to the second cloud server; wherein the elastic network interface pair is independently deployed in a subnet in the cloud network;
[0010] a query unit, configured to query an address of a second elastic network interface in a fast channel when determining that the first data flow is transmitted via the elastic network interface pair;
[0011] A forwarding unit, configured to forward the first data flow to the second cloud server based on the address of the second elastic network interface.
[0012] In a third aspect, an embodiment of the present application provides a cloud network-based data transmission device, comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the cloud network-based data transmission method as described above is implemented.
[0013] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed on a terminal device, the terminal device executes the cloud network-based data transmission method as described above.
[0014] It can be seen that the embodiments of the present application have the following beneficial effects:
[0015] In the embodiment of the present application, the elastic network card interface pair is configured with a first elastic network card interface and a second elastic network card interface. The first elastic network card interface is connected to the first cloud server, and the second elastic network card interface is connected to the second cloud server. The elastic network card interface pair is independently deployed in the subnet in the cloud network, that is, it does not belong to any subnet and VPC. When two cloud servers perform data transmission, after receiving the first data stream transmitted via the first elastic network card interface, the address of the second elastic network card interface is queried in the fast channel, and the first data stream is forwarded to the second cloud server based on the address of the second elastic network card interface. Communication based on the address of the second elastic network card interface does not require VPC routing, and the implementation is relatively simple. At the same time, since the elastic network card interface pair does not belong to the VPC, it is not necessary to execute all the functions of the VPC during data transmission, which improves the data transmission performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 A schematic diagram of an exemplary application scenario of the prior art;
[0017] Figure 2 A schematic diagram of an exemplary implementation of the prior art;
[0018] Figure 3 A schematic diagram of an exemplary application scenario provided in an embodiment of the present application;
[0019] Figure 4 A flowchart of a cloud network-based data transmission method provided in an embodiment of the present application;
[0020] Figure 5 A schematic diagram of an exemplary implementation provided in an embodiment of the present application;
[0021] FIG6( a ) is a schematic diagram of a connection method of an elastic network interface pair in an embodiment of the present application;
[0022] FIG6( b ) is a schematic diagram of another flexible network interface pair connection method in an embodiment of the present application;
[0023] FIG6( c ) is a schematic diagram of a connection method of an elastic network interface pair in an embodiment of the present application;
[0024] Figure 7 A schematic diagram of a data forwarding device provided in an embodiment of the present application;
[0025] Figure 8 A schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0026] In order to make the above-mentioned purposes, features and advantages of the embodiments of the present application more obvious and easy to understand, the embodiments of the present application are further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0027] In order to facilitate understanding and explanation of the technical solutions provided by the embodiments of the present application, the background technology of the embodiments of the present application will be described below.
[0028] Currently, the connection between two cloud devices is typically achieved through VPC routing. Cloud devices can include network elements (NEs) such as routers, load balancers, NAT (Network Address Translation), and firewalls. VPC-based NEs are typically implemented using Elastic Compute Service (ECS), also known as a cloud server. ECS can be understood as a virtual machine that runs on a physical machine. In practice, the connection between cloud devices is essentially the communication between ECSs.
[0029] like Figure 1As shown, a diagram illustrating an example scenario of the prior art is shown. Network element 1 provides the ability for devices in VPC1 and VPC2 to communicate with private networks outside the cloud, forming a transit router (TR). Network element 1 belongs to Service VPC1. Network element 2 can be a router used by a third-party SDWAN (Software Defined Wide Area Network) vendor for multi-cloud interconnection. Network element 2 belongs to Service VPC2. When data packets from VPC1 and VPC2 need to be sent to the external network, network element 1 can send the data packets to network element 2 and then send them to the external network. When network element 1 and network element 2 communicate, VPC routing needs to be configured. For example, the egress routing table of network element 1 is: 192.168.100.0 / 24peering tunnel, and the ingress routing table of network element 1 is: 192.168.1.0 / 24VPC1, 192.168.2.0 / 24VPC2. The egress routing table of NE 2 is: 192.168.100.0 / 24extunnel, and the ingress routing table of NE 2 is: 192.168.1.0 / 24TR, 192.168.2.0 / 24TR.
[0030] The peering tunnel between NE 1 and NE 2 is established based on the VPC network. The VPC network function consists of the QoS (Quality of Service) policy of ENI (Elastic Network Interfaces), the security group ACL (Access Control List), and the VPC routing (TR). Figure 2 As shown in FIG, an example diagram of an implementation of the prior art is shown. Figure 1 In this scenario, at the implementation level, NE 1 is implemented by ECS1, which runs on physical machine 1, and NE 2 is implemented by ECS2, which runs on physical machine 2. When a data packet is sent from NE 1 to NE 2, the peering tunnel traffic passes through vswitch1, the forwarding component that provides VPC functions on physical machine 1 where ECS1 resides.
[0031] Existing implementations require data forwarding based on VPC routing, which is complex to configure. Furthermore, traffic must pass through all functions on the VPC forwarding component, the vswitch. Some of these functions are not essential for data forwarding, resulting in performance overhead and impacting data forwarding performance. Furthermore, tunnel-based data forwarding can introduce significant traffic, necessitating restrictions on single-flow capabilities, which can lead to performance bottlenecks.
[0032] Based on this, the embodiments of the present application provide a cloud network-based data transmission method, device and equipment, and propose a new cloud device interconnection technology, connecting two cloud servers ECS through an elastic network interface pair (ENI pair), and communicating between ECSs based on the address of the elastic network interface in the elastic network interface pair.
[0033] In order to facilitate understanding of the data transmission method of the cloud network provided in the embodiment of the present application, Figure 3 See the example scenario shown. Figure 3 As shown in the figure, this figure is a schematic diagram of an exemplary application scenario provided by an embodiment of the present application.
[0034] Figure 3 The left side shows a diagram of a typical cloud server ECS connection. A typical ECS ENI has only one MAC (Media Access Control) address and belongs to that one ECS. The ENIs of two ECS instances belong to their own subnets and VPCs. Therefore, communication between the two ECS instances requires VPC routing and the full functionality of the VPC.
[0035] Figure 3 On the right is the elastic network interface pair (ENI pair) provided in the embodiment of this application. The ENI pair can be created separately and can be mounted on two ECSs. It has two MAC addresses and does not belong to any subnet or VPC, which greatly simplifies the address planning complexity of user management of ECS interconnection.
[0036] In the embodiment of the present application, ECS interconnection can be extended to all data transmission scenarios between ECSs that are not the source address and destination address of the data packet.
[0037] Those skilled in the art will understand that Figure 3 The framework diagram shown is only an example in which the embodiments of the present application can be implemented. The scope of application of the embodiments of the present application is not limited by any aspect of the framework.
[0038] To facilitate understanding of the embodiments of the present application, a cloud network-based data transmission method provided in the embodiments of the present application is described below with reference to the accompanying drawings.
[0039] See also Figure 4 As shown in FIG, this figure is a flow chart of a data transmission method based on a cloud network provided in an embodiment of the present application, as shown in FIG. Figure 4 As shown, the method may include S401-S403:
[0040] S401: Receive a first data stream transmitted via a first elastic network interface of an elastic network interface pair connected to a first cloud server.
[0041] The elastic network card interface pair is configured with a first elastic network card interface and a second elastic network card interface. The first elastic network card interface is connected to the first cloud server and transmits data stream to the second cloud server through the first elastic network card interface via the second elastic network card interface connected to the second cloud server; the elastic network card interface pair is independently deployed in a subnet in the cloud network.
[0042] In an embodiment of the present application, when the first cloud server and the second cloud server need to be interconnected, the management and control module on the cloud can create an elastic network card interface pair ENI pair, and the ENI pair is configured with two elastic network card interfaces ENI, namely the first elastic network card interface and the second elastic network card interface. Two mac addresses are assigned to the ENI pair, and the ENIs at both ends of the ENI pair have a mac address respectively. The ENI pair is mounted on the first cloud server and the second cloud server, and the first elastic network card interface is used as the ENI used by the first cloud server, and the second elastic network card interface is used as the ENI used by the second cloud server. The first cloud server and the second cloud server each run on a physical machine. The ENI pair is independently deployed in the cloud network and does not belong to the VPC, that is, it provides a non-VPC ENI peer connection method.
[0043] The management and control module can then obtain the address of the first elastic network interface and the address of the second elastic network interface, attach the address of the first elastic network interface and the address of the second elastic network interface to the ENI pair data structure, and send it to the physical machines at both ends.
[0044] Additionally, the ENI pair's IP (Internet Protocol) address can be assigned by the ECS: that is, the first cloud server assigns an IP address to the first elastic network interface, and the second cloud server assigns an IP address to the second elastic network interface. The ECS can use this IP address to specify the ENI pair for communication. In practice, IPv4 can use 169.254 or other non-service-planned / 31 IP addresses, and IPv6 can use commonly used device interconnection addresses.
[0045] The embodiment of the present application describes a cloud network-based data transmission method from the perspective of the physical machine where the first cloud server is located. When the first cloud server sends a first data stream to the second cloud server, the first data stream can be obtained through the first elastic network interface in the ENI pair.
[0046] In a possible implementation, the following may also be included:
[0047] After the elastic network card interface pair is connected to the first cloud server and the second cloud server, the address of the first elastic network card interface and the address of the second elastic network card interface are obtained; and the address of the first elastic network card interface and the address of the second elastic network card interface are saved in the fast channel.
[0048] In actual applications, after the control module issues the addresses of the first and second elastic network interface cards, the physical machine where the first cloud server resides can obtain and save the addresses of the first and second elastic network interface cards. Specifically, the addresses of the first and second elastic network interface cards can be saved in the fast channel of the first forwarding component in the physical machine where the first cloud server resides.
[0049] The address of the first elastic network card interface can be configured as the physical machine address of the physical machine where the first cloud server is located, and the address of the second elastic network card interface can be configured as the physical machine address of the physical machine where the second cloud server is located.
[0050] S402: When it is determined that the first data flow is transmitted via the elastic network interface pair, query the address of the second elastic network interface in the fast channel.
[0051] In practice, the first forwarding component's fastpath stores the ENI pair data structure, which includes the addresses of the first and second elastic network interface cards. When the ENI type determines that the first data flow is sent through the ENI pair, the fastpath is queried for the address of the second elastic network interface card to obtain the physical machine address of the second cloud server.
[0052] S403: Forward the first data flow to the second cloud server based on the address of the second elastic network interface.
[0053] Based on the address of the second elastic network interface, the first data stream is sent to the second cloud server. In actual applications, the first data stream can be sent to a second forwarding component on the physical machine where the second cloud server is located, and the second forwarding component sends the first data stream to the second cloud server.
[0054] In the embodiment of the present application, the elastic network card interface pair is configured with a first elastic network card interface and a second elastic network card interface. The first elastic network card interface is connected to the first cloud server, and the second elastic network card interface is connected to the second cloud server. The elastic network card interface pair is independently deployed in the subnet in the cloud network, that is, it does not belong to any subnet and VPC. When two cloud servers perform data transmission, after receiving the first data stream transmitted via the first elastic network card interface, the address of the second elastic network card interface is queried in the fast channel, and the first data stream is forwarded to the second cloud server based on the address of the second elastic network card interface. Communication based on the address of the second elastic network card interface does not require VPC routing, and the implementation is relatively simple. At the same time, since the elastic network card interface pair does not belong to the VPC, it is not necessary to execute all the functions of the VPC during data transmission, which improves the data transmission performance.
[0055] In one possible implementation, the specific implementation of S403 sending the data packet to the second cloud server on the physical machine corresponding to the physical machine address may include:
[0056] A1: Encapsulate the first data stream. The inner layer of the encapsulated first data stream carries the source address, destination address, source MAC address, and destination MAC address, and the outer layer carries the source physical machine address and destination physical machine address. The source physical machine address is the address of the first elastic network card interface, and the destination physical machine address is the address of the second elastic network card interface. The source MAC address and destination MAC address are the MAC addresses of the elastic network card interface pair.
[0057] The first forwarding component encapsulates the data packet. The inner layer of the encapsulated data packet carries the source address src0, the destination address dst0, the source MAC address, and the destination MAC address. The outer layer carries the address of the first elastic network interface and the address of the second elastic network interface. The source MAC address and the destination MAC address are the MAC addresses assigned to the ENI pair.
[0058] A2: Send the encapsulated first data stream to the physical machine corresponding to the destination physical machine address, so that the physical machine corresponding to the destination physical machine address decapsulates the encapsulated first data stream and sends the decapsulated first data stream to the second cloud server according to the destination MAC address.
[0059] The encapsulated first data stream is sent to the second forwarding component on the physical machine corresponding to the destination physical machine address. The second forwarding component decapsulates the first data stream and sends it to the second cloud server based on the destination MAC address.
[0060] In a possible implementation, the cloud network-based data transmission method provided in the embodiment of the present application may further include: executing a corresponding quality of service policy for the first data stream.
[0061] The first forwarding component and the second forwarding component can also execute corresponding QoS policies, such as limiting the speed of data packets sent through the ENI pair, obtaining the speed limit of the total data packets sent, etc., and thus can skip the security group, VPC route query and other functions of the forwarding component VPC, and only use the required QoS policies to fully improve the communication performance while ensuring the quality of service.
[0062] In one possible implementation, the cloud network-based data transmission method provided in the embodiment of the present application may further include:
[0063] Dynamically update the address of the first or second elastic network interface in the elastic network interface pair as the physical machine connected to the elastic network interface pair changes.
[0064] In some scenarios, the physical machine where the first cloud server or the second cloud server is located may not be able to provide services. In this case, the first cloud server or the second cloud server can be hot migrated to a new physical machine. When the physical machine changes, the cloud management and control module will re-issue the address of the changed first elastic network card interface or the second elastic network card interface, and save the address of the changed first elastic network card interface or the second elastic network card interface to the ENI pair data structure. Based on the address of the changed first elastic network card interface or the second elastic network card interface, communication is carried out between the first cloud server and the second cloud server, thereby realizing the hot migration of ECS.
[0065] Similarly, when the second cloud server sends a second data stream to the first cloud server, the second forwarding component in the physical machine where the second cloud server resides can obtain the second data stream through the second elastic network interface in the ENI pair. Based on the ENI type, it determines that the second data stream is sent through the ENI pair. Then, it queries the fast channel of the second forwarding component to obtain the address of the first elastic network interface, that is, the physical machine address of the physical machine where the first cloud server resides. Then, based on the address of the first elastic network interface, the second data stream is sent to the first forwarding component on the physical machine where the first cloud server resides. The first forwarding component then sends the second data stream to the first cloud server.
[0066] The embodiment of the present application implements high-performance data forwarding based on ENI pairs, supports ECS-related functions such as QoS and hot migration, and simplifies the implementation of ECS interconnection.
[0067] In actual application, the physical machine where the first server is located includes a first forwarding component, and the physical machine where the second server is located includes a second forwarding component. The first forwarding component is connected to the first cloud server, and the second forwarding component is connected to the second cloud server.
[0068] The elastic network card interface pair is specifically used to communicate between the first cloud server and the second cloud server through the first forwarding component and the second forwarding component based on the address of the first elastic network card interface or the address of the second elastic network card interface.
[0069] That is, the first forwarding component is a component for data forwarding in the physical machine where the first cloud server is located, and the second forwarding component is a component for data forwarding in the physical machine where the second cloud server is located. The first forwarding component and the second forwarding component form a path of the ENI pair.
[0070] The ENI pair data structure can be stored in the first forwarding component and the second forwarding component. Specifically, the first forwarding component can store the address of the local first ENI interface in addition to the address of the peer's second ENI interface. The second forwarding component can also store the address of the local second ENI interface in addition to the address of the peer's first ENI interface.
[0071] When the first cloud server sends the first data stream to the second cloud server, the first forwarding component determines that the first data stream is sent through the ENI pair based on the ENI type, then queries the address of the second elastic network card interface from the data structure of the ENI pair saved by the fast channel, sends the first data stream to the second forwarding component, and the second forwarding component sends the first data stream to the second cloud server.
[0072] Similarly, when the second cloud server sends the second data stream to the first cloud server, the second forwarding component determines that the data packet is sent through the ENI pair based on the ENI type, and then queries the address of the first elastic network card interface from the data structure of the ENI pair saved by the fast channel, sends the second data stream to the first forwarding component, and the first forwarding component sends the second data stream to the first cloud server.
[0073] Thus, the ENI pair is implemented to communicate between the first cloud server and the second cloud server through the first forwarding component and the second forwarding component.
[0074] The data structure of the ENI pair is stored in the fastpath of the first forwarding component and the fastpath of the second forwarding component, so that the address of the first elastic network card interface or the address of the second elastic network card interface can be obtained more quickly without occupying the forwarding resources of the slowpath of the first forwarding component and the second forwarding component.
[0075] See also Figure 5As shown, a schematic diagram of an exemplary implementation of a cloud network-based data transmission method provided by an embodiment of the present application is shown. In this example, the first cloud server ECS1 runs on physical machine 1, and the first forwarding component vswitch1 is connected to ECS1 and runs on physical machine 1. The second cloud server ECS2 runs on physical machine 2, and the first forwarding component vswitch2 is connected to ECS2 and runs on physical machine 2. ECS1 and ECS2 are connected through an ENI pair. The management and control module sends the mounting information of the ENIpair, that is, the physical machine address of physical machine 1 and the physical machine address of physical machine 2 are attached to the data structure of the ENI pair, and saved in the fastpath of vswitch1 and vswitch2.
[0076] When the first data stream is sent from ECS1, for example, the final destination address of the first data stream is dst0, and the source address is src0. vswitch1 only performs resource restrictions and management at the QoS level, such as speed limiting the first data stream. vswitch1 determines that the first data stream is sent through the ENI pair based on the ENI type, and queries the physical machine address of physical machine 2 based on the data structure of the ENI pair. The first data stream is encapsulated, and the inner layer of the encapsulated data packet carries the source address src0, the destination address dst0, the source MAC address, and the destination MAC address, and the outer layer carries the address of physical machine 1 and the address of physical machine 2. Among them, the source MAC address and the destination MAC address are the MAC addresses assigned to the ENI pair. After the encapsulated data packet is sent to vswitch2, the data packet is decapsulated, sent to ECS2 based on the destination MAC address, and the corresponding QoS policy is executed.
[0077] In the communication process between ECS1 and ECS2, the embodiment of the present application does not require VPC network planning, VPC routing, or security policies. There is no single-flow bottleneck problem caused by the tunnel. Data forwarding performance can be optimized to the extreme, and it can be used for interconnection of multiple network elements.
[0078] In practical applications, the definition of ENI pair can be further expanded. In one possible implementation, the first elastic network interface is connected to at least one first cloud server, and / or the second elastic network interface is connected to at least one second cloud server.
[0079] When both ends of the ENI pair, the first elastic network interface ENI1 and the second elastic network interface ENI2, are connected to one ECS, a common ENI pair is formed. See FIG6( a ), which shows a schematic diagram of such an ENI pair.
[0080] When one end of the ENI pair is a bondENI (parent ENI), and the bondENI includes multiple workENIs (child ENIs), then one end of the ENI pair can be connected to multiple ECSs, and multiple ECSs provide the same service to achieve high availability. The data stream can be sent to any of the multiple ECSs. Referring to Figure 6(b), a schematic diagram of this type of ENI pair is shown, which is equivalent to an ENI pair formed by an ENI and a bondENI. For example, the first elastic network card interface ENI1 can be connected to an ECS, and the second elastic network card interface as a bondENI (parent ENI) can include multiple workENIs (child ENIs), and each child ENI can be connected to an ECS.
[0081] When both ends of an ENI pair are bondENIs, and multiple workENIs are included after the bondENI, both ends of the ENI pair can be connected to multiple ECSs. See Figure 6(c), which shows a schematic diagram of this type of ENI pair, which is equivalent to an ENI pair formed by a bondENI and a bondENI. For example, the first elastic network interface, as a bondENI (parent ENI), can include multiple workENIs (child ENIs), each of which can be connected to an ECS. The second elastic network interface, also as a bondENI (parent ENI), can include multiple workENIs (child ENIs), each of which can be connected to an ECS.
[0082] In the embodiments of the present application, ENI pair can be combined with technologies such as bondENI to achieve high availability of ECS.
[0083] Based on the cloud network-based data transmission method provided in the above method embodiment, the embodiment of the present application also provides a cloud network-based data transmission device, which will be described below in conjunction with the accompanying drawings.
[0084] See also Figure 7 As shown in FIG, this figure is a schematic diagram of the structure of a data transmission device based on a cloud network provided in an embodiment of the present application. Figure 7 As shown, the cloud network-based data transmission device includes:
[0085] A receiving unit 701 is configured to receive a first data stream transmitted via a first elastic network interface in an elastic network interface pair connected to a first cloud server; the elastic network interface pair is configured with a first elastic network interface and a second elastic network interface, the first elastic network interface is connected to the first cloud server and transmits the data stream to the second cloud server via the first elastic network interface and the second elastic network interface connected to the second cloud server; wherein the elastic network interface pair is independently deployed in a subnet in the cloud network;
[0086] A query unit 702 is configured to query an address of a second elastic network interface in a fast channel when it is determined that the first data flow is transmitted via the elastic network interface pair;
[0087] The forwarding unit 703 is configured to forward the first data flow to the second cloud server based on the address of the second elastic network interface.
[0088] In a possible implementation, the method further includes:
[0089] an acquiring unit, configured to acquire the address of the first elastic network card interface and the address of the second elastic network card interface after the elastic network card interface pair is connected to the first cloud server and the second cloud server;
[0090] A saving unit is configured to save the address of the first elastic network interface and the address of the second elastic network interface into a fast channel.
[0091] In a possible implementation, the method further includes:
[0092] An updating unit is configured to dynamically update an address of the first elastic network interface or the second elastic network interface in the elastic network interface pair according to changes in a physical machine connected to the elastic network interface pair.
[0093] In one possible implementation, the address of the first elastic network card interface is configured as the physical machine address of the physical machine where the first cloud server is located, and the address of the second elastic network card interface is configured as the physical machine address of the physical machine where the second cloud server is located.
[0094] In a possible implementation, the forwarding unit is specifically configured to:
[0095] Encapsulate the first data stream, where the inner layer of the encapsulated first data stream carries the source address, destination address, source media access control MAC address, and destination MAC address, and the outer layer carries the source physical machine address and the destination physical machine address; the source physical machine address is the address of the first elastic network card interface, and the destination physical machine address is the address of the second elastic network card interface; the source MAC address and the destination MAC address are the MAC addresses of the elastic network card interface pair;
[0096] The encapsulated first data stream is sent to the physical machine corresponding to the destination physical machine address, so that the physical machine corresponding to the destination physical machine address decapsulates the encapsulated first data stream, and sends the decapsulated first data stream to the second cloud server according to the destination MAC address.
[0097] In a possible implementation, the first elastic network card interface is connected to at least one of the first cloud servers, and / or the second elastic network card interface is connected to at least one of the second cloud servers.
[0098] In a possible implementation, the method further includes:
[0099] An execution unit is configured to execute a corresponding quality of service policy for the first data flow.
[0100] In addition, an embodiment of the present application also provides a computer-readable storage medium, which stores instructions. When the instructions are executed on a terminal device, the terminal device executes the cloud network-based data transmission method as described in any one of the above items.
[0101] An embodiment of the present application further provides a computer program product, comprising computer program instructions, which, when executed on a computer, enable the computer to execute any of the cloud network-based data transmission methods described above.
[0102] Based on the cloud network-based data transmission method provided in the above method embodiment, the present application also provides an electronic device, including: one or more processors; a storage device on which one or more programs are stored, when the one or more programs are executed by the one or more processors, the one or more processors implement the cloud network-based data transmission method described in any of the above embodiments.
[0103] In the embodiment of the present application, the elastic network card interface pair is configured with a first elastic network card interface and a second elastic network card interface. The first elastic network card interface is connected to the first cloud server, and the second elastic network card interface is connected to the second cloud server. The elastic network card interface pair is independently deployed in the subnet in the cloud network, that is, it does not belong to any subnet and VPC. When two cloud servers perform data transmission, after receiving the first data stream transmitted via the first elastic network card interface, the address of the second elastic network card interface is queried in the fast channel, and the first data stream is forwarded to the second cloud server based on the address of the second elastic network card interface. Communication based on the address of the second elastic network card interface does not require VPC routing, and the implementation is relatively simple. At the same time, since the elastic network card interface pair does not belong to the VPC, it is not necessary to execute all the functions of the VPC during data transmission, which improves the data transmission performance.
[0104] Reference below Figure 8 , which shows a schematic structural diagram of an electronic device 1300 suitable for implementing an embodiment of the present application. The terminal device in the embodiment of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (portable Android devices), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), and fixed terminals such as digital TVs (televisions) and desktop computers. Figure 8 The electronic device shown is merely an example and should not limit the functions and scope of use of the embodiments of the present application.
[0105] like Figure 8 As shown, the electronic device 1300 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 1301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1302 or a program loaded from a storage device 1306 into a random access memory (RAM) 1303. Various programs and data required for the operation of the electronic device 1300 are also stored in the RAM 1303. The processing device 1301, the ROM 1302, and the RAM 1303 are connected to each other via a bus 1304. An input / output (I / O) interface 1305 is also connected to the bus 1304.
[0106] Typically, the following devices may be connected to the I / O interface 1305: an input device 1306 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1306 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1309. The communication device 1309 may allow the electronic device 1300 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 8 The electronic device 1300 is shown with various devices, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead.
[0107] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 1309, or installed from the storage device 1306, or installed from the ROM 1302. When the computer program is executed by the processing device 1301, the above-mentioned functions defined in the method of the embodiment of the present application are performed.
[0108] The electronic device provided in the embodiment of the present application and the cloud network-based data transmission method provided in the above embodiment belong to the same inventive concept. Technical details not fully described in this embodiment can be found in the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0109] Based on the cloud network-based data transmission method provided in the above method embodiment, an embodiment of the present application provides a computer-readable medium on which a computer program is stored, wherein when the program is executed by a processor, the cloud network-based data transmission method as described in any of the above embodiments is implemented.
[0110] It should be noted that the computer-readable medium in the embodiment of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the embodiment of the present application, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the embodiment of the present application, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0111] In some embodiments, the client and server can communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0112] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0113] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the cloud network-based data transmission method.
[0114] The computer program code for performing the operation of the embodiment of the application can be written in one or more programming languages or a combination thereof, and the above-mentioned programming languages include but are not limited to object-oriented programming languages - such as Java, Smalltalk, C++, and also include conventional procedural programming languages - such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network - including a local area network (LAN) or a wide area network (WAN), or, can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).
[0115] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, program segment or a part of code, and the module, program segment or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions.
[0116] The units involved in the embodiments described in this application may be implemented in software or hardware, wherein the name of a unit / module does not, in some cases, constitute a limitation on the unit itself.
[0117] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0118] In the context of the present application embodiment, machine-readable medium can be a tangible medium that can contain or store a program for use by an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable medium can include but is not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0119] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the common and similar parts between the various embodiments. For the systems or devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method description.
[0120] It should be understood that in this application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0121] It should also be noted that, in this document, relational terms such as first and second, etc., are used only 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 "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.
[0122] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0123] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present application. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not limited to the embodiments shown herein, but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A data transmission method based on a cloud network, characterized in that: include: Receiving a first data stream transmitted via a first elastic network interface of an elastic network interface pair connected to a first cloud server; The elastic network card interface pair is configured with a first elastic network card interface and a second elastic network card interface, the first elastic network card interface is connected to the first cloud server and transmits a data stream to the second cloud server through the first elastic network card interface and the second elastic network card interface connected to the second cloud server; wherein the elastic network card interface pair is independently deployed in a subnet in the cloud network; the first cloud server and the second cloud server are virtual machines, and the first cloud server and the second cloud server are each running on a physical machine; When it is determined that the first data flow is transmitted via the elastic network card interface pair, the address of the second elastic network card interface is queried in the fast channel, and the first data flow is forwarded to the second cloud server based on the address of the second elastic network card interface.
2. The method according to claim 1, characterized in that Also includes: After the elastic network interface pair is connected to the first cloud server and the second cloud server, the address of the first elastic network interface and the address of the second elastic network interface are obtained; The address of the first elastic network interface and the address of the second elastic network interface are saved in the fast channel.
3. The method according to claim 1 or 2, characterized in that Also includes: Following changes in the physical machine connected to the elastic network interface pair, the address of the first elastic network interface or the second elastic network interface in the elastic network interface pair is dynamically updated.
4. The method according to any one of claims 1 to 3, characterized in that The address of the first elastic network card interface is configured as the physical machine address of the physical machine where the first cloud server is located, and the address of the second elastic network card interface is configured as the physical machine address of the physical machine where the second cloud server is located.
5. The method according to claim 1 or 2, characterized in that The forwarding of the first data flow to the second cloud server based on the address of the second elastic network interface includes: Encapsulate the first data stream, where the inner layer of the encapsulated first data stream carries the source address, destination address, source media access control MAC address, and destination MAC address, and the outer layer carries the source physical machine address and the destination physical machine address; the source physical machine address is the address of the first elastic network card interface, and the destination physical machine address is the address of the second elastic network card interface; the source MAC address and the destination MAC address are the MAC addresses of the elastic network card interface pair; The encapsulated first data stream is sent to the physical machine corresponding to the destination physical machine address, so that the physical machine corresponding to the destination physical machine address decapsulates the encapsulated first data stream, and sends the decapsulated first data stream to the second cloud server according to the destination MAC address.
6. The method according to claim 1, characterized in that The first elastic network card interface is connected to at least one of the first cloud servers, and / or the second elastic network card interface is connected to at least one of the second cloud servers.
7. The method according to claim 1, characterized in that Also includes: A corresponding quality of service policy is executed for the first data flow.
8. A data transmission device based on a cloud network, characterized in that: include: a receiving unit, configured to receive a first data stream transmitted via a first elastic network interface of an elastic network interface pair connected to the first cloud server; The elastic network card interface pair is configured with a first elastic network card interface and a second elastic network card interface, the first elastic network card interface is connected to the first cloud server and transmits a data stream to the second cloud server through the first elastic network card interface and the second elastic network card interface connected to the second cloud server; wherein the elastic network card interface pair is independently deployed in a subnet in the cloud network; the first cloud server and the second cloud server are virtual machines, and the first cloud server and the second cloud server are each running on a physical machine; a query unit, configured to query an address of a second elastic network interface in a fast channel when determining that the first data flow is transmitted via the elastic network interface pair; A forwarding unit, configured to forward the first data flow to the second cloud server based on the address of the second elastic network interface.
9. A data transmission device based on a cloud network, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the cloud network-based data transmission method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores instructions, and when the instructions are executed on the terminal device, the terminal device executes the cloud network-based data transmission method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Method and apparatus for interconnection between networks
US20170272274A1
Techniques for utilizing multiple network interfaces for a cloud shell
US20220052878A1