Data forwarding method and system, electronic equipment and storage medium
By acquiring network configuration information and determining data encapsulation and transmission methods, the high management cost and poor scalability of cloud network containers accessing offline cluster containers are resolved, enabling cross-network data transmission and communication.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-12
- Publication Date
- 2026-03-13
AI Technical Summary
Containers in cloud networks cannot effectively access containers in on-premises clusters, resulting in high management costs and poor scalability. Existing technologies cannot effectively solve this problem.
By acquiring network configuration information, the system determines the data encapsulation and data transmission methods for data transmission from the elastic container instance resource scheduling unit in the cloud network to the resource scheduling unit in the offline user data center network. Based on the destination address and network configuration information of the data packet to be forwarded, the system performs forwarding processing to achieve cross-network data transmission.
It enables data transmission between cloud networks and offline user data center networks, reducing management costs and improving network scalability and performance.
Smart Images

Figure CN121664799A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer network technology, and more specifically, to a data forwarding method, system, electronic device, and storage medium. Background Technology
[0002] User clusters can be deployed in on-premises Internet Data Centers (IDCs). Containers (Pods) in the on-premises cluster can connect to the cloud environment via dedicated lines and access containers corresponding to Elastic Container Instances (ECIs) in the cloud network. However, ECIPods in the cloud network cannot access Pods in the on-premises cluster due to the lack of effective network routing. To enable data transfer from ECIPods in the cloud network to containers in the on-premises cluster, related technologies can manually manage the cloud routing table. However, when user nodes change frequently, manually adding and deleting records in the routing table is a huge workload, increasing management costs. Related technologies can also embed various network plugins into the ECI to directly generate data packets that can be routed to on-premises IDC nodes, but this method has poor scalability.
[0003] There is currently no effective solution to the above problems. Summary of the Invention
[0004] This application provides a data forwarding method, system, electronic device, and storage medium to at least solve the technical problems of high management cost and poor scalability when transmitting data from containers in cloud networks to containers in offline clusters.
[0005] According to one aspect of the embodiments of this application, a data forwarding method is provided, comprising: obtaining network configuration information, wherein the network configuration information is used to determine the data encapsulation method and data transmission method adopted by a first type of resource scheduling unit to transmit data to a second type of resource scheduling unit, wherein the first type of resource scheduling unit is an elastic container instance resource scheduling unit in a cloud network, and the second type of resource scheduling unit is a resource scheduling unit in an offline user data center network; and forwarding the data packet to be forwarded based on the destination address of the data packet to be forwarded and the network configuration information, wherein the source address of the data packet to be forwarded is located in a cloud network, and the destination address is located in a user data center network.
[0006] According to one aspect of the embodiments of this application, a data forwarding method is provided, comprising: obtaining network configuration information, wherein the network configuration information is used to determine the data encapsulation method and data transmission method adopted by a first type of resource scheduling unit to transmit data to a second type of resource scheduling unit, wherein the first type of resource scheduling unit is an elastic container instance resource scheduling unit of a virtual private cloud network, and the second type of resource scheduling unit is a resource scheduling unit of an offline Internet data center cluster coverage network; and forwarding the data packet to be forwarded based on the destination address of the data packet to be forwarded and the network configuration information, wherein the source address of the data packet to be forwarded is located in the virtual private cloud network, and the destination address of the data packet to be forwarded is located in the Internet data center cluster coverage network.
[0007] According to one aspect of the embodiments of this application, a data forwarding system is provided, comprising: a virtual node server cluster deployed in a cloud network, used to obtain network configuration information and to forward data packets to be forwarded based on the destination address and network configuration information of the data packets to be forwarded, wherein the network configuration information is used to determine the data encapsulation method and data transmission method used by a first type of resource scheduling unit to transmit data to a second type of resource scheduling unit, the first type of resource scheduling unit being an elastic container instance resource scheduling unit in the cloud network, the second type of resource scheduling unit being a resource scheduling unit in an offline user data center network, the source address of the data packets to be forwarded being located in the cloud network, and the destination address being located in the user data center network; a virtual node router deployed in the cloud network, used to forward data packets to be forwarded from the source address to a relay router; a relay router deployed between the cloud network and the user data center network, used to forward data packets to be forwarded from the virtual node router to a target node server in the user data center network; and a node server cluster deployed in the user data center network, used to receive data packets to be forwarded forwarded by the relay router.
[0008] According to one aspect of the embodiments of this application, an electronic device is also provided, including: a memory storing an executable program; and a processor for running the program, wherein the program executes the methods in various embodiments of this application when it runs.
[0009] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored executable program, wherein, when the executable program is running, it controls the device where the computer-readable storage medium is located to perform the methods of various embodiments of this application.
[0010] According to another aspect of the embodiments of this application, a computer program product is also provided, including a computer program that, when executed by a processor, implements the methods of various embodiments of this application.
[0011] According to another aspect of the embodiments of this application, a computer program product is also provided, including a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, implements the methods in various embodiments of this application.
[0012] According to another aspect of the embodiments of this application, a computer program is also provided, which, when executed by a processor, implements the methods of the various embodiments of this application.
[0013] In this embodiment, by acquiring network configuration information, the data encapsulation and data transmission methods used by the elastic container instance resource scheduling unit of the cloud network to transmit data to the resource scheduling unit of the offline user data center network are determined. Then, based on the destination address and network configuration information of the data packet to be forwarded, the data packet is forwarded, thereby realizing data transmission between the cloud network and the offline user data center network. The data encapsulation and data transmission methods are determined according to the network configuration information, achieving cross-network data transmission functionality. By forwarding the data packet, the elastic container instance resource scheduling unit of the cloud network can communicate with the resource scheduling unit of the offline user data center network, realizing data interaction and communication between different network environments. This provides users with more flexible resource scheduling and data transmission methods, improving network scalability and performance. Therefore, this embodiment achieves the goal of data transmission from the elastic container instance resource scheduling unit of the cloud network to the resource scheduling unit of the user data center network, thereby reducing management costs and improving scalability. It also solves the technical problems of high management costs and poor scalability in related technologies when transmitting data from containers in the cloud network to containers in the offline cluster.
[0014] It is worth noting that the general description above and the detailed description that follow are merely for illustrative purposes and do not constitute a limitation on this application. Attached Figure Description
[0015] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0016] Figure 1 This is a hardware structure block diagram of a computer terminal (or mobile device) for implementing a data forwarding method according to an embodiment of this application;
[0017] Figure 2 This is a structural block diagram of a computing environment according to an embodiment of this application;
[0018] Figure 3 This is a structural block diagram of a service mesh according to an embodiment of this application;
[0019] Figure 4 This is a flowchart of a data forwarding method according to an embodiment of this application;
[0020] Figure 5 This is a schematic diagram of a data forwarding method according to an embodiment of this application;
[0021] Figure 6 This is a flowchart of yet another data forwarding method according to an embodiment of this application;
[0022] Figure 7 This is a structural block diagram of a data forwarding device according to an embodiment of this application;
[0023] Figure 8 This is a structural block diagram of another data forwarding device according to an embodiment of this application;
[0024] Figure 9 This is a structural block diagram of an electronic device according to an embodiment of this application. Detailed Implementation
[0025] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0026] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0027] First, some nouns or terms that appear in the description of the embodiments of this application shall be interpreted as follows:
[0028] Overlay Network: An overlay network is a network virtualization technology that allows a virtual network layer to be created on top of an existing network.
[0029] Transit Router (TR): Used to connect network instances and forward traffic between network instances in the same region or across regions.
[0030] Virtual Border Router (VBR): A router located between two or more networks or network areas.
[0031] Virtual Node Gateway (VNode-Gateway): A key component that enables cloud-based ECIPods to access Pods in on-premises Overlay cluster networks.
[0032] User clusters can be deployed in on-premises data centers (IDCs). Pods in the on-premises cluster can connect to the cloud environment via dedicated lines and access ECIPods in the cloud network. However, ECIPods in the cloud network cannot access Pods in the on-premises cluster due to a lack of effective network routing. Specifically, since ECIPods in the cloud network actually occupy a network interface card (NIC) in the Virtual Private Cloud (VPC), and conversely, when an ECIPod accesses a Pod in the on-premises overlay network, there is no route from the VPC network to the overlay network to the corresponding on-premises node. This results in data packets originating from the ECIPod with the target Internet Protocol (IP) address of the overlay network failing to reach the corresponding on-premises node.
[0033] In related technologies, to enable data transfer between ECIPod in the cloud network and containers in the offline cluster, the cloud routing table can be manually managed. Administrators need to be familiar with network configurations to manage the cloud routing table granularly. However, when user nodes change frequently, manually adding and deleting records in the routing table is a huge workload, thus increasing management costs.
[0034] Related technologies also allow embedding various network plugin code into ECIs, eliminating the need to add routing records to the cloud routing table and directly generating data packets routable to offline IDC nodes. However, embedding network plugin code into ECIs results in each ECI independently initiating requests to the Application Programming Interface (API) Server, creating significant load pressure on the API Server. When the number of ECIs becomes large, the API Server struggles to handle the massive requests, leading to performance degradation or even crashes. Furthermore, because each ECI needs to independently acquire resources, scalability is poor, making it difficult to cope with a rapidly growing number of ECIs.
[0035] There is currently no effective solution to the above problems.
[0036] According to an embodiment of this application, a data forwarding method is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0037] The data forwarding method provided in this application embodiment can be executed in a mobile terminal, computer terminal or similar computing device. Figure 1 A hardware block diagram of a computer terminal (or mobile device) for implementing a data forwarding method is shown. Figure 1 As shown, the computer terminal 10 (or mobile device) may include one or more processors 102 (shown as 102a, 102b, ..., 102n in the figure) 102 (processor 102 may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a Universal Serial Bus (USB) port (which may be included as one of the ports of a BUS bus), a network interface, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, computer terminal 10 may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0038] It should be noted that the aforementioned one or more processors 102 and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element within the computer terminal 10 (or mobile device). As involved in the embodiments of this application, the data processing circuits serve as a processor control mechanism (e.g., selection of a variable resistor termination path connected to an interface).
[0039] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the method in the embodiments of this application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby implementing the method in the above embodiments. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0040] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.
[0041] The display can be, for example, a touchscreen liquid crystal display (LCD), which allows the user to interact with the user interface of the computer terminal 10 (or mobile device).
[0042] Figure 1 The hardware structure block diagram shown can serve not only as an exemplary block diagram of the aforementioned computer terminal 10 (or mobile device), but also as an exemplary block diagram of the aforementioned server. In one optional embodiment, Figure 2 The use of the above is illustrated in a block diagram. Figure 1The computer terminal 10 (or mobile device) shown is an embodiment of a computing node in computing environment 201. Figure 2 A block diagram of a computing environment is shown, such as Figure 2 As shown, computing environment 201 includes multiple computing nodes (such as servers) running on a distributed network (shown as 210-1, 210-2, ... in the diagram). Each computing node contains local processing and memory resources, and end user 202 can remotely run applications or store data within computing environment 201. Applications can be provided as multiple services 220-1, 220-2, 220-3, and 220-4 within computing environment 201, representing services "A", "D", "E", and "H", respectively.
[0043] End user 202 can provide and access services through a web browser or other software application on a client. In some embodiments, the provisioning and / or requests of end user 202 can be provided to ingress gateway 230. Ingress gateway 230 may include a corresponding agent to handle the provisioning and / or requests for services (one or more services provided in computing environment 201).
[0044] The services are provided or deployed based on various virtualization technologies supported by the computing environment 201. In some embodiments, services may be provided based on virtual machine (VM)-based virtualization, container-based virtualization, and / or similar methods. VM-based virtualization can simulate a real computer by initializing a virtual machine, executing programs and applications without directly accessing any actual hardware resources. While the machine is virtualized by a virtual machine, container-based virtualization can launch containers to virtualize an entire operating system (OS), allowing multiple workloads to run on a single OS instance.
[0045] In one embodiment based on container virtualization, several containers of a service can be assembled into a Pod (e.g., a Kubernetes Pod). For example, such as Figure 2 As shown, service 220-2 can be equipped with one or more Pods 240-1, 240-2, ..., 240-N (collectively referred to as Pods). A Pod can include a proxy 245 and one or more containers 242-1, 242-2, ..., 242-M (collectively referred to as containers). One or more containers within a Pod handle requests related to one or more corresponding functions of the service. Proxy 245 typically controls service-related network functions such as routing and load balancing. Other services can also be equipped with similar Pods.
[0046] During operation, executing a user request from end user 202 may require invoking one or more services in computing environment 201, and executing one or more functions of one service may require invoking one or more functions of another service. For example... Figure 2 As shown, service "A" 220-1 receives user requests from terminal user 202 from ingress gateway 230. Service "A" 220-1 can call service "D" 220-2, and service "D" 220-2 can request service "E" 220-3 to perform one or more functions.
[0047] The aforementioned computing environment can be a cloud computing environment, where resource allocation is managed by cloud services, allowing functionality development without needing to consider implementation, adjustment, or server scaling. This computing environment allows developers to execute event-responsive code without building or maintaining complex infrastructure. Services can be partitioned into a set of functions that can automatically and independently scale, rather than scaling a single hardware device to handle potential loads.
[0048] In another alternative embodiment, Figure 3 The use of the above is illustrated in a block diagram. Figure 1 The computer terminal 10 (or mobile device) shown is an embodiment of a service mesh. Figure 3 A structural block diagram of a service mesh is shown, such as Figure 3 As shown, the service mesh 300 is mainly used to facilitate secure and reliable communication between multiple microservices. Microservices refer to the decomposition of an application into multiple smaller services or instances, which are distributed across different clusters / machines.
[0049] like Figure 3 As shown, a microservice may include application service instance A and application service instance B, which together form the functional application layer of service mesh 300. In one implementation, application service instance A runs as a container / process 308 on machine / workload container group 314 (Pod), and application service instance B runs as a container / process 310 on machine / workload container group 316 (Pod).
[0050] In one implementation, application service instance A can be a product query service, and application service instance B can be a product order placement service.
[0051] like Figure 3As shown, application service instance A and grid agent (sidecar) 303 coexist in machine / workload container group 314, and application service instance B and grid agent 305 coexist in machine / workload container group 316. Grid agents 303 and 305 form the data plane layer of service mesh 300. Grid agents 303 and 305 run as containers / processes 304 and 306 respectively, and can receive requests 312 for product query services. Grid agent 303 and application service instance A can communicate bidirectionally, and grid agent 305 and application service instance B can also communicate bidirectionally. Furthermore, grid agents 303 and 305 can also communicate bidirectionally with each other.
[0052] In one implementation, traffic from application service instance A is routed to the appropriate destination via mesh proxy 303, and network traffic from application service instance B is routed to the appropriate destination via mesh proxy 305. It should be noted that the network traffic mentioned here includes, but is not limited to, Hypertext Transfer Protocol (HTTP), Representational State Transfer (REST), high-performance, general-purpose open-source frameworks (Google Remote Procedure Call, gRPC), and open-source in-memory data structure storage systems (Redis).
[0053] In one implementation, the functionality of the extended data plane layer can be achieved by writing custom filters for the proxy (Envoy) in service mesh 300. The service mesh proxy configuration can enable the service mesh to correctly proxy service traffic, achieving service interoperability and service governance. Mesh proxy 303 and mesh proxy 305 can be configured to perform at least one of the following functions: service discovery, health checking, routing, load balancing, authentication and authorization, and observability.
[0054] like Figure 3 As shown, the service mesh 300 also includes a control plane layer. This control plane layer can consist of a set of services running in a dedicated namespace, hosted by a managed control plane component 301 within machine / workload container groups (machine / Pods) 302. Figure 3 As shown, the managed control plane component 301 communicates bidirectionally with grid agents 303 and 305. The managed control plane component 301 is configured to perform various control and management functions. For example, it receives telemetry data transmitted from grid agents 303 and 305 and can further aggregate this telemetry data. In addition to these services, the managed control plane component 301 can also provide a user-facing application programming interface (API) to facilitate manipulation of network behavior and the provision of configuration data to grid agents 303 and 305.
[0055] Under the aforementioned operating environment, this application provides the following: Figure 4 The data forwarding method shown. Figure 4 This is a flowchart of a data forwarding method according to an embodiment of this application, such as... Figure 4 As shown, the method includes the following steps:
[0056] Step S41: Obtain network configuration information, wherein the network configuration information is used to determine the data encapsulation method and data transmission method used by the first category resource scheduling unit to transmit data to the second category resource scheduling unit. The first category resource scheduling unit is the elastic container instance resource scheduling unit of the cloud network, and the second category resource scheduling unit is the resource scheduling unit of the offline user data center network.
[0057] Step S42: Based on the destination address and network configuration information of the data packet to be forwarded, the data packet to be forwarded is forwarded. The source address of the data packet to be forwarded is located in the cloud network, and the destination address is located in the user data center network.
[0058] The data forwarding method described above can be executed by the VPC network side. A VPC network is a virtual network environment built in the cloud environment, mainly used to isolate and manage cloud resources. VPC networks typically achieve network isolation and management through components such as virtual routers and virtual firewalls. They are mainly used in the network environment of cloud service providers to provide isolated and secure network services.
[0059] The aforementioned network configuration information can be a mapping table, a network topology diagram, or it can exist in the form of text files, configuration files, script files, database records, etc. Additionally, network configuration information can also be recorded and displayed through network management tools, monitoring systems, log files, etc. Network configuration information can be obtained from the API Server through network management tools. The API Server can provide information such as network topology, routing tables, and data encapsulation methods. Users can use the information provided by the API Server to determine the network configuration information required when the first category of resource scheduling unit transmits data to the second category of resource scheduling unit.
[0060] The aforementioned network configuration information can be used to determine the data encapsulation and data transmission methods used by the first category of resource scheduling units to transmit data to the second category of resource scheduling units. Utilizing appropriate network configuration information can improve the efficiency and reliability of data transmission. Specifically, the data encapsulation method is used to encapsulate data into data packets according to a certain format for transmission in the network. Data encapsulation methods include, but are not limited to, protocols such as Ethernet, IP, Transmission Control Protocol (TCP), and User Datagram Protocol (UDP). Based on the network configuration information, it can be determined which data encapsulation method should be used for data transmission in a specific network environment. The data transmission method is used to determine the transmission path of data packets in the network. Based on the network configuration information, it can be determined which nodes the data packets should pass through in the network, and the order in which they pass through these nodes. Data transmission methods can include static routing and dynamic routing. Based on the network configuration information, an appropriate data transmission method can be selected for data transmission.
[0061] The aforementioned first category of resource scheduling units refers to elastic container instance resource scheduling units in cloud networks. These cloud networks can be VPC networks or public cloud networks. In a VPC network, users can customize network configurations such as IP address ranges, subnets, routing tables, and gateways to achieve more flexible network management and security control. In a public cloud network, users can directly use the network facilities provided by the cloud service provider and enjoy elastic and highly available services. Both VPC and public cloud networks can achieve cloud network connectivity and data transmission, meeting different user needs. It should be noted that this application embodiment uses a VPC network as an example for illustration, but does not constitute a specific limitation on cloud networks.
[0062] An Elastic Container Instance (ECI) resource scheduling unit is a unit used in a cloud computing environment to schedule and manage Elastic Container Instance (ECI) resources, specifically an ECIPod within a VPC network. An ECIPod monitors and manages ECI resource usage, dynamically adjusting resource allocation as needed to ensure efficient operation and meet user demands. An ECIPod typically includes components such as a resource manager, scheduler, and monitor, which work together to achieve effective scheduling and management of ECI resources. Through ECIPod management, dynamic resource allocation and optimization can be achieved, improving resource utilization and application performance, while also enhancing system reliability and stability.
[0063] The second category of resource scheduling units mentioned above refers to the resource scheduling units of offline user data center networks, namely IDC cluster Overlay network Pods. An Overlay network is a virtual network built on top of an existing physical network through tunneling technology. It can be applied to a wider range of network scenarios, such as data centers, Software-Defined Wide Area Networks (SD-WAN), and other scenarios, providing flexible network expansion and management.
[0064] Data forwarding from ECIPods in the VPC network to Pods in the IDC cluster Overlay network enables data communication between different networks. Through data transmission from ECIPods in the cloud network to Pods in the on-premises Overlay network, applications and services in the VPC network and the IDC cluster can be interconnected, enabling cross-network data transmission and interaction. This facilitates collaborative work and processing between applications, improving network availability, reliability, and flexibility, while better supporting application service needs and expansion.
[0065] The aforementioned data packets to be forwarded are those that need to be forwarded by routers or switches during transmission within the network. These packets determine the next hop path based on the destination address and routing table, ultimately reaching their destination. Typically, these packets contain information such as source address, destination address, transport protocol type, and data content. The source address is located in the cloud network, and the destination address is located in the user's data center network. When the data packet arrives at the network device, the device forwards it according to the destination address, sending the packet to the correct destination.
[0066] Based on steps S41 to S42 above, by acquiring network configuration information, the data encapsulation and data transmission methods used by the elastic container instance resource scheduling unit of the cloud network to transmit data to the resource scheduling unit of the user data center network are determined. Then, based on the destination address and network configuration information of the data packet to be forwarded, the data packet is forwarded, thereby realizing data transmission between the cloud network and the offline user data center network. The data encapsulation and data transmission methods are determined according to the network configuration information, realizing cross-network data transmission functionality. By forwarding the data packet, the elastic container instance resource scheduling unit of the cloud network can communicate with the resource scheduling unit of the offline user data center network, realizing data interaction and communication between different network environments. This provides users with more flexible resource scheduling and data transmission methods, improving network scalability and performance. Therefore, this embodiment of the application achieves the goal of data transmission from the elastic container instance resource scheduling unit of the cloud network to the resource scheduling unit of the user data center network, thereby achieving the technical effects of reducing management costs and improving scalability. It also solves the technical problems of high management costs and poor scalability in related technologies when transmitting data from containers in the cloud network to containers in the offline cluster.
[0067] The data forwarding method in the embodiments of this application will be further described below.
[0068] In one optional embodiment, the network configuration information includes a mapping table, wherein the mapping table is used to record the network plug-in type of the user data center network, the address information of multiple node servers of the user data center network, and the address range of the resource scheduling unit corresponding to the address information of the multiple node servers.
[0069] Specifically, the network configuration information obtained by VNode-Gateway from the API Server located in the IDC network includes a mapping table. The mapping table records the network plugin type of the IDC network, the address information of multiple Node servers in the IDC network, and the IP address range of the Pod corresponding to the address information of multiple Node servers, as well as the container classless inter-domain routing (Cluster IP Range, Pod CIDR).
[0070] A Node is a physical or virtual machine, a physical resource in a Kubernetes cluster. It manages physical resources such as CPU, memory, and storage, and is primarily responsible for running Pods. A Node's lifecycle is typically long, matching that of the physical or virtual machine, and Nodes can communicate with each other through the Kubernetes cluster network. A Pod is the basic deployment unit in Kubernetes, containing one or more containers. It is responsible for packaging and managing containers and is a logical resource in the Kubernetes cluster. Pods have a shorter lifecycle and can be dynamically created and destroyed based on service needs. Containers within a Pod communicate through the Pod's network, and communication between Pods is managed through Kubernetes network policies. Nodes and Pods are interdependent in a Kubernetes cluster, working together to deploy and manage applications.
[0071] In Kubernetes, a Pod CIDR represents a range of IP addresses assigned to a Pod. A Pod CIDR is a set of IP addresses used to assign a unique IP address to each Pod within a Kubernetes cluster. These IP addresses are only visible within the Pod itself and among other Pods on the same node. The primary function of a Pod CIDR is to ensure that each Pod has a unique IP address within the cluster, thereby enabling network communication between Pods.
[0072] Node CIDR represents the range of Pod IP addresses allocated to each node. The Pod IP address range is used to assign IP addresses to Pods running on that node. The primary function of Node CIDR is to ensure that each Pod on a node has a unique IP address, thereby enabling network communication between Pods. Node CIDR is part of the Pod network; Pod CIDR is the range of IP addresses allocated to Pods across the entire cluster, while Node CIDR is a subset of that range allocated to each node.
[0073] Network plug-in types for IDC networks include, but are not limited to, Virtual Extensible LAN (VXLAN) mode and Internet Address Translation (IP-IP) mode. VXLAN is a network virtualization technology used to expand the scale of data center networks. It enables communication across physical networks by creating virtual networks on top of existing network infrastructure, thus providing greater scalability and flexibility. IPIP is a tunneling protocol used to transmit IP packets between different networks. It encapsulates and transmits packets by adding an extra IP header to the original IP packet. IPIP is typically used to establish secure communication connections between different networks.
[0074] Table 1 Mapping Relationship Table
[0075] Network plugin type Node Pod CIDR VXLAN 192.168.8.1 10.88.1.0 / 24 VXLAN 192.168.8.2 10.88.2.0 / 24 VXLAN 192.168.8.3 10.88.3.0 / 24 VXLAN 192.168.8.4 10.88.4.0 / 24
[0076] As shown in Table 1, in the mapping table included in the network configuration information, the network plugin type is VXLAN mode, the Node server addresses are 192.168.8.1, 192.168.8.2, 192.168.8.3, and 192.168.8.4 respectively, and the PodCIDRs are 10.88.1.0 / 24, 10.88.2.0 / 24, 10.88.3.0 / 24, and 10.88.4.0 / 24 respectively. In this context, 10.88.1.0 / 24 indicates that the Pod's IP address range is from 10.88.1.0 to 10.88.1.255, a total of 256 IP addresses, corresponding to the Node server address 192.168.8.1; 10.88.2.0 / 24 indicates that the Pod's IP address range is from 10.88.2.0 to 10.88.2.255, a total of 256 IP addresses, corresponding to the Node server address 192.168.8. 2; 10.88.3.0 / 24 indicates that the IP address range of the Pod is from 10.88.3.0 to 10.88.3.255, a total of 256 IP addresses, corresponding to the Node server address 192.168.8.3; 10.88.4.0 / 24 indicates that the IP address range of the Pod is from 10.88.4.0 to 10.88.4.255, a total of 256 IP addresses, corresponding to the Node server address 192.168.8.4.
[0077] Based on the above optional embodiments, by obtaining a mapping table that records the network plug-in type of the user's data center network, the address information of multiple node servers in the user's data center network, and the address range of the resource scheduling unit corresponding to the address information of the multiple node servers, resources in the data center network can be managed more flexibly, and dynamically adjusted and optimized according to actual needs.
[0078] In an optional embodiment, step S42, based on the destination address and network configuration information, includes forwarding the data packet to be forwarded, which includes:
[0079] Step S421: Determine the target encapsulation method of the data packet to be forwarded based on the network plugin type;
[0080] Step S422: Determine the target routing method for the data packet to be forwarded based on the destination address and the address range of the resource scheduling unit corresponding to the address information of multiple node servers.
[0081] Step S423: Forward the data packets to be forwarded according to the target encapsulation method and the target routing method.
[0082] Specifically, determining the target encapsulation method for data packets to be forwarded based on the network plugin type ensures that these packets are correctly delivered to the target address. Different types of network plugins require different encapsulation methods; for example, specific encapsulation protocols may be needed in virtual network environments to ensure correct packet routing. By determining the appropriate encapsulation method based on the network plugin type, errors or loss of data packets during transmission can be avoided, guaranteeing the normal operation of network communication.
[0083] The target routing method for the data packet to be forwarded is determined based on the destination address and the IP address range of the Pods corresponding to the address information of multiple Nodes. For example, if the destination address is 10.88.4.4, the Node server address corresponding to the encapsulated data packet is determined to be 192.168.8.4 based on the IP address range of the Pods corresponding to the address information of multiple Nodes. Further, the data packet to be forwarded is processed according to the target encapsulation method and the target routing method.
[0084] Based on the above optional embodiments, by determining the target encapsulation method of the data packet to be forwarded based on the network plugin type, and then determining the target routing method of the data packet to be forwarded based on the destination address and the address range of the resource scheduling unit corresponding to the address information of multiple node servers, the data packet to be forwarded is finally forwarded according to the target encapsulation method and the target routing method. This effectively determines the target encapsulation method and target routing method of the data packet to be forwarded, thereby enabling fast and accurate forwarding of data packets and improving the efficiency and speed of data transmission. By dynamically determining the target encapsulation method and target routing method, the transmission path of the data packet can be flexibly adjusted according to the network plugin type and address information, enabling the data packet to reach its destination quickly, improving network performance and user experience.
[0085] In an optional embodiment, step S421, determining the target encapsulation method of the data packet to be forwarded based on the network plugin type includes:
[0086] Step S4211: In response to the network plugin type being Virtual Extensible LAN mode, the Virtual Extensible LAN encapsulation method of the data packet to be forwarded is determined as the target encapsulation method.
[0087] Step S4212: In response to the network plugin type being Internet Address Overlay mode, the Internet Address Overlay encapsulation method of the data packet to be forwarded is determined as the target encapsulation method.
[0088] Specifically, when the network plugin type is VXLAN mode, the data packets to be forwarded are encapsulated in VXLAN and a VXLAN tag (VXLAN Network Identifier, VNI) is added to the header to isolate and identify virtual networks during transmission. This ensures that the data packets can be correctly identified and forwarded to the corresponding host or virtual machine in the target virtual network during transmission.
[0089] When the network plugin type is in IPIP mode, the data packet to be forwarded is encapsulated in IPIP, a new IP header is added to the header of the data packet, and the data packet to be forwarded is transmitted as the payload of the new IP data packet. This enables cross-network transmission while ensuring the integrity and reliability of the data packet. At the receiving end, the original data packet is parsed and processed based on the new IP header information. IPIP mode is typically used for communication between different networks, enabling cross-network data transmission.
[0090] Based on the above optional embodiments, in response to the network plugin type being Virtual Scalable LAN mode, the Virtual Scalable LAN encapsulation method of the data packet to be forwarded is determined as the target encapsulation method; in response to the network plugin type being Internet Address Overlay mode, the Internet Address Overlay encapsulation method of the data packet to be forwarded is determined as the target encapsulation method. Thus, different encapsulation processing can be performed on the data packet to be forwarded according to different network plugin types, thereby realizing different network functions and improving the flexibility and scalability of the network.
[0091] In an optional embodiment, the data forwarding method in this application further includes: adding a first routing record and a second routing record to a virtual bridging table based on network configuration information, wherein the first routing record is an address range routing record of the resource scheduling unit of the user data center network, and the first routing record is used to route data packets transmitted from the first type of resource scheduling unit to the second type of resource scheduling unit to the virtual node router; the second routing record is an address range routing record of the node server of the user data center network, and the second routing record is used to route data packets transmitted from the first type of resource scheduling unit to the second type of resource scheduling unit from the virtual node router to the target node server corresponding to the destination address.
[0092] Specifically, based on the Pod CIDR in the network configuration information, a first routing record and a second routing record are added to the Virtual Bridge Table (VBT). In network technology, VBT is a network device used in virtualized network environments, primarily implementing network bridging functions within virtualization software. VBT is responsible for establishing network connections between virtual machines, similar to a bridge in a physical network, allowing virtual machines to communicate as if they were in a physical network. Adding a first routing record to the VPC allows all packets accessing the Pod CIDR to be routed to the VNode-Gateway as the next hop.
[0093] Table 2 Virtual Bridging Table
[0094] Target address range Gateway describe 10.88.0.0 / 16 172.168.0.88 / 32 Offline Pod CIDR Router 192.168.0 / 24 172.168.0.188 / 32 Offline Node CIDR Router
[0095] Specifically, as shown in Table 2, in the first routing record, for the destination address range 10.88.0.0 / 16, when the destination address of the data packet to be forwarded is within this range, the data packet transmitted from the first category resource scheduling unit to the second category resource scheduling unit is routed to the virtual node router, and the address of the virtual node router is 172.168.0.88 / 32; in the second routing record, for the destination address range 192.168.0 / 24, when the destination address of the data packet to be forwarded is within this range, the data packet transmitted from the first category resource scheduling unit to the second category resource scheduling unit is routed from the virtual node router to the target node server corresponding to the destination address, and the address of the target node server is 172.168.0.188 / 32.
[0096] Based on the above optional embodiments, by adding a first routing record and a second routing record to the virtual bridging table based on network configuration information, the first routing record is used to route data packets transmitted from the first category resource scheduling unit to the second category resource scheduling unit to the virtual node router, and the second routing record is used to route data packets transmitted from the first category resource scheduling unit to the second category resource scheduling unit from the virtual node router to the target node server corresponding to the destination address. This enables precise control and management of network data flow, improving network performance and security.
[0097] In an optional embodiment, step S422, determining the target routing method for the data packet to be forwarded based on the destination address and the address range of the resource scheduling unit corresponding to the address information of the multiple node servers, includes:
[0098] Step S4221: Obtain the first routing record from the virtual bridging table based on the destination address;
[0099] Step S4222: Based on the first routing record, route the data packet to be forwarded from the source address to the virtual node router;
[0100] Step S4223: Determine the address information of the node server corresponding to the address range of the resource scheduling unit where the destination address is located;
[0101] Step S4224: Obtain the second routing record from the virtual bridging table based on the address information of the node server;
[0102] Step S4225: Based on the second routing record, the data packet to be forwarded is routed from the virtual node router to the target node server.
[0103] Specifically, when the target address is used to access a Pod in the offline cluster, it will hit the Pod CIDR within the VBT.
[0104] The routing record is then used to route the data packet to be forwarded from the source address to the VNode-Gateway based on the Pod CIDR. Subsequently, the Node server address corresponding to the address range of the Pod containing the destination address is determined. Based on the Node server address, a second routing record is obtained from the VBT, thereby routing the data packet from the VNode-Gateway to the Node corresponding to the destination address.
[0105] For example, if the destination address is 10.88.4.4, the first routing record within the VBT, namely the Pod CIDR route 172.168.0.88 / 32, is matched. Based on the first routing record, the data packet to be forwarded is routed from the source address to the corresponding VNode-Gateway. Subsequently, the mapping table is used to determine that the address range of the Pod containing the destination address corresponds to the Node server address 192.168.8.4. Based on the Node server address, the second routing record is obtained from the VBT, namely the Node CIDR route 172.168.0.188 / 32. Based on the second routing record, the data packet transmitted from the first category resource scheduling unit to the second category resource scheduling unit is routed from the virtual node router to the target node server corresponding to the destination address. The destination address of the data packet to be forwarded from the VNode-Gateway is 192.168.8.4, and the source address is 172.168.8.88.
[0106] Based on the above optional embodiments, by obtaining a first route from the virtual bridging table based on the destination address, and then routing the data packet to be forwarded from the source address to the virtual node router according to the first route record, the address information of the node server corresponding to the address range of the resource scheduling unit where the destination address is located is determined. Based on the address information of the node server, a second route record is obtained from the virtual bridging table, and finally, the data packet to be forwarded is routed from the virtual node router to the target node server according to the second route record. This achieves data packet routing and forwarding. By routing data packets from the source address to the target node server through the route records in the virtual bridging table, the reliability and efficiency of network communication are achieved. Simultaneously, through the mapping between the virtual node router and the node server addresses, network resources can be effectively managed and scheduled, improving network performance and scalability.
[0107] In an optional embodiment, in step S4225, routing the data packet to be forwarded from the virtual node router to the target node server according to the second routing record includes: routing the data packet to be forwarded from the virtual node router to the relay router between the cloud network and the user data center network according to the second routing record, wherein the relay router includes: a border router or a forwarding router; and routing the data packet to be forwarded to the target node server via the relay router.
[0108] Specifically, based on the second routing record, the data packets to be forwarded are routed from the VNode-Gateway to the relay router, such as VBR or TR, between the cloud network and the user data center network, and then routed to the target node server via the relay router.
[0109] Based on the above optional embodiments, by routing the data packets to be forwarded from the virtual node router to the relay router between the cloud network and the user data center network according to the second routing record, and then routing the data packets to be forwarded to the target node server via the relay router, network transmission efficiency and data packet forwarding speed can be improved, data packet transmission latency in the network can be reduced, and the stability and reliability of data transmission can be improved, thereby enhancing user experience and network performance. Furthermore, through the forwarding via the relay router, data packet traffic can be better managed and controlled, avoiding network congestion and data loss, thereby improving the overall operating efficiency and performance of the network.
[0110] In an optional embodiment, step S41, obtaining network configuration information includes: obtaining network configuration information from an application programming interface server located in the user data center network.
[0111] Specifically, network configuration information is obtained from the API Server located in the IDC network. An API Server is a server that provides interface services for applications, allowing applications to interact with the server through a predefined interface to obtain data or perform operations.
[0112] For example, when a VNode-Gateway retrieves network configuration information from an API Server located in an IDC network, it first needs to determine its permissions to access the IDC network API Server. Access to the API Server is only granted with the appropriate authentication credentials, such as an API key or access token. It then sends an information retrieval request to the API Server, which includes the required authentication credentials and API endpoint. The required network configuration information is then obtained by parsing the response returned by the API Server.
[0113] Based on the above optional embodiments, by obtaining network configuration information from the application programming interface server located in the user's data center network, the network connection can be correctly configured using the network configuration information, ensuring that the data packets to be forwarded can be accurately forwarded.
[0114] Figure 5 This is a schematic diagram of a data forwarding method according to an embodiment of this application, such as... Figure 5 As shown, in the control plane, network configuration information is obtained from the application programming interface server located in the user's data center network. Based on the network configuration information, a first routing record and a second routing record are added to the virtual bridging table. In the data plane, the target encapsulation method of the data packet to be forwarded is determined based on the network plugin type. When the network plugin type is VXLAN mode, the data packet to be forwarded is encapsulated in VXLAN. The destination address is 10.88.4.4, which matches the first routing record in the VBT, namely the Pod CIDR route 172.168.0.88 / 32. According to the first routing record, the data packet to be forwarded is routed from the source address to the corresponding VNode-Gateway. Subsequently, the mapping table is used to determine that the Node server address corresponding to the address range of the Pod containing the destination address is 192.168.8.4. Based on the Node server address, the second routing record is obtained from the VBT, namely the Node CIDR route 172.168.0.188 / 32. According to the second routing record, the encapsulated data packet to be forwarded is sent from the VNode-Gateway with a destination address of 192.168.8.4 and a source address of 172.168.8.88. Based on the second routing record, the data packet to be forwarded is routed from the virtual node router to the border router between the cloud network and the user data center network. The border router then routes the data packet to be forwarded to the target node server.
[0115] In this embodiment, VNode-Gateway acts as an intermediate layer, resolving the communication issue between cloud-based ECIPods and on-premises Overlay network Pods. On one hand, it retrieves network plugin, Pod CIDR, and Node information from the on-premises Kubernetes cluster to generate local network forwarding configuration information. On the other hand, it maintains the cloud VPC routing table, ensuring that the next hop for cloud-based ECIPods accessing Pod CIDRs must pass through VNode-Gateway. The data forwarding method in this embodiment enables dynamic configuration of VPC routes without manual intervention. For newly added network plugin packet modes and bug fixes, there's no need to release the underlying ECI image; only rolling upgrades of VNode-Gateway are required, thus offering higher scalability.
[0116] Figure 6 This is a flowchart of another data forwarding method according to an embodiment of this application, such as... Figure 6 As shown, the method includes the following steps:
[0117] Step S61: Obtain network configuration information, wherein the network configuration information is used to determine the data encapsulation method and data transmission method used by the first category resource scheduling unit to transmit data to the second category resource scheduling unit. The first category resource scheduling unit is the elastic container instance resource scheduling unit of the virtual private cloud network, and the second category resource scheduling unit is the resource scheduling unit of the offline Internet data center cluster coverage network.
[0118] Step S62: Based on the destination address and network configuration information of the data packet to be forwarded, the data packet to be forwarded is forwarded. The source address of the data packet to be forwarded is located in the virtual private cloud network, and the destination address of the data packet to be forwarded is located in the Internet data center cluster coverage network.
[0119] Based on steps S61 to S62 above, by acquiring network configuration information, the data encapsulation and data transmission methods used by the elastic container instance resource scheduling unit of the virtual private cloud network to transmit data to the resource scheduling unit of the Internet data center cluster coverage network are determined. Then, based on the destination address and network configuration information of the data packet to be forwarded, the data packet is forwarded, thereby realizing data transmission between the cloud network and the offline user data center network. The data encapsulation and data transmission methods are determined according to the network configuration information, realizing cross-network data transmission functionality. By forwarding the data packet, the elastic container instance resource scheduling unit of the cloud network can communicate with the resource scheduling unit of the offline user data center network, realizing data interaction and communication between different network environments. This provides users with more flexible resource scheduling and data transmission methods, improving network scalability and performance. Therefore, this embodiment of the application achieves the goal of data transmission from the elastic container instance resource scheduling unit of the cloud network to the resource scheduling unit of the user data center network, thereby achieving the technical effects of reducing management costs and improving scalability. This solves the technical problems of high management costs and poor scalability in related technologies when transmitting data from containers in the cloud network to containers in the offline cluster.
[0120] In one optional embodiment, the network configuration information includes a mapping table, wherein the mapping table is used to record the network plug-in type of the Internet Data Center Cluster Covered Network, the address information of multiple node servers of the Internet Data Center Cluster Covered Network, and the address range of the resource scheduling unit corresponding to the address information of the multiple node servers.
[0121] It should be noted that the preferred embodiments involved in the above embodiments of this application are the same as the solutions, application scenarios and implementation processes provided in the above embodiments, but are not limited to the solutions provided in the above embodiments.
[0122] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.
[0123] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0124] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, they can also be implemented by hardware. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0125] According to an embodiment of this application, a data forwarding apparatus for implementing the above-described data forwarding method is also provided. Figure 7 This is a structural block diagram of a data forwarding device according to an embodiment of this application, such as... Figure 7 As shown, the device includes:
[0126] The acquisition module 701 is used to acquire network configuration information, wherein the network configuration information is used to determine the data encapsulation method and data transmission method used by the first category resource scheduling unit to transmit data to the second category resource scheduling unit. The first category resource scheduling unit is the elastic container instance resource scheduling unit of the cloud network, and the second category resource scheduling unit is the resource scheduling unit of the offline user data center network.
[0127] The forwarding module 702 is used to forward data packets based on the destination address and network configuration information of the data packets to be forwarded. The source address of the data packets to be forwarded is located in the cloud network, and the destination address is located in the user data center network.
[0128] Optionally, the network configuration information includes a mapping table, which records the network plug-in type of the user's data center network, the address information of multiple node servers in the user's data center network, and the address range of the resource scheduling unit corresponding to the address information of the multiple node servers.
[0129] Optionally, the forwarding module 702 is further configured to: determine the target encapsulation method of the data packet to be forwarded based on the network plug-in type; determine the target routing method of the data packet to be forwarded based on the destination address and the address range of the resource scheduling unit corresponding to the address information of multiple node servers; and forward the data packet to be forwarded according to the target encapsulation method and the target routing method.
[0130] Optionally, the forwarding module 702 is further configured to: determine the virtual scalable local area network encapsulation method of the data packet to be forwarded as the target encapsulation method in response to the network plugin type being Virtual Scalable Local Area Network mode; and determine the Internet address superposition encapsulation method of the data packet to be forwarded as the target encapsulation method in response to the network plugin type being Internet address superposition mode.
[0131] Optionally, the data forwarding device further includes: an adding module 703, used to add a first routing record and a second routing record to the virtual bridging table based on network configuration information, wherein the first routing record is an address range routing record of the resource scheduling unit of the user data center network, and the first routing record is used to route data packets transmitted from the first type of resource scheduling unit to the second type of resource scheduling unit to the virtual node router; the second routing record is an address range routing record of the node server of the user data center network, and the second routing record is used to route data packets transmitted from the first type of resource scheduling unit to the second type of resource scheduling unit from the virtual node router to the target node server corresponding to the destination address.
[0132] Optionally, the forwarding module 702 is further configured to: obtain a first routing record from the virtual bridging table based on the destination address; route the data packet to be forwarded from the source address to the virtual node router according to the first routing record; determine the address information of the node server corresponding to the address range of the resource scheduling unit where the destination address is located; obtain a second routing record from the virtual bridging table based on the address information of the node server; and route the data packet to be forwarded from the virtual node router to the target node server according to the second routing record.
[0133] Optionally, the forwarding module 702 is further configured to: route the data packet to be forwarded from the virtual node router to the relay router between the cloud network and the user data center network according to the second routing record, wherein the relay router includes: a border router or a forwarding router; and route the data packet to be forwarded to the target node server via the relay router.
[0134] Optionally, the acquisition module 701 is also used to: acquire network configuration information from the application programming interface server located in the user's data center network.
[0135] It should be noted that the acquisition module 701 and the forwarding module 702 correspond to steps S41 to S42 in the above embodiments. The two modules and the corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in the above embodiments. It should be noted that the above modules or units can be hardware components or software components stored in memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n). The above modules can also be part of a device and run in the computer terminal 10 provided in the above embodiments.
[0136] Figure 8 This is a structural block diagram of another data forwarding device according to an embodiment of this application, such as... Figure 8 As shown, the device includes:
[0137] The acquisition module 801 is used to acquire network configuration information, wherein the network configuration information is used to determine the data encapsulation method and data transmission method used by the first category of resource scheduling unit to transmit data to the second category of resource scheduling unit. The first category of resource scheduling unit is the elastic container instance resource scheduling unit of the virtual private cloud network, and the second category of resource scheduling unit is the resource scheduling unit of the offline Internet data center cluster coverage network.
[0138] The forwarding module 802 is used to forward data packets based on the destination address and network configuration information of the data packets to be forwarded. The source address of the data packets to be forwarded is located in the virtual private cloud network, and the destination address of the data packets to be forwarded is located in the Internet data center cluster overlay network.
[0139] Optionally, the network configuration information includes a mapping table, which records the network plug-in type of the Internet Data Center Cluster Covered Network, the address information of multiple node servers in the Internet Data Center Cluster Covered Network, and the address range of the resource scheduling unit corresponding to the address information of the multiple node servers.
[0140] It should be noted that the acquisition module 801 and the forwarding module 802 mentioned above correspond to steps S61 to S62 in the above embodiments. The two modules and the corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in the above embodiments. It should be noted that the above modules or units can be hardware components or software components stored in memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n). The above modules can also be part of a device and run in the computer terminal 10 provided in the above embodiments.
[0141] It should be noted that the preferred embodiments involved in the above embodiments of this application are the same as the solutions, application scenarios and implementation processes provided in the above embodiments, but are not limited to the solutions provided in the above embodiments.
[0142] Embodiments of this application also provide a data forwarding system, including:
[0143] The virtual node server cluster, deployed on the cloud network, is used to obtain network configuration information and forward data packets based on the destination address and network configuration information of the data packets to be forwarded. The network configuration information is used to determine the data encapsulation and data transmission methods used by the first type of resource scheduling unit to transmit data to the second type of resource scheduling unit. The first type of resource scheduling unit is the elastic container instance resource scheduling unit of the cloud network, and the second type of resource scheduling unit is the resource scheduling unit of the offline user data center network. The source address of the data packet to be forwarded is located on the cloud network, and the destination address is located on the user data center network.
[0144] Virtual node routers, deployed in cloud networks, are used to forward data packets from their source addresses to relay routers.
[0145] A relay router is deployed between the cloud network and the user data center network to forward data packets from the virtual node router to the target node server in the user data center network.
[0146] A cluster of node servers is deployed in the user's data center network to receive data packets to be forwarded from relay routers.
[0147] By acquiring network configuration information, this application determines the data encapsulation and data transmission methods used by the elastic container instance resource scheduling unit in the cloud network to transmit data to the resource scheduling unit in the user data center network. Then, based on the destination address and network configuration information of the data packet to be forwarded, the data packet is forwarded, thereby realizing data transmission between the cloud network and the offline user data center network. The data encapsulation and data transmission methods are determined according to the network configuration information, achieving cross-network data transmission functionality. By forwarding the data packet, the elastic container instance resource scheduling unit in the cloud network can communicate with the resource scheduling unit in the offline user data center network, enabling data interaction and communication between different network environments. This provides users with more flexible resource scheduling and data transmission methods, improving network scalability and performance. Therefore, this application achieves the goal of data transmission from the elastic container instance resource scheduling unit in the cloud network to the resource scheduling unit in the user data center network, thereby reducing management costs and improving scalability. It also solves the technical problems of high management costs and poor scalability in related technologies when transmitting data from containers in the cloud network to containers in an offline cluster.
[0148] Embodiments of this application may provide an electronic device, which may be any one of a group of electronic devices. Optionally, in this embodiment, the aforementioned electronic device may also be replaced by a terminal device such as a mobile terminal.
[0149] Optionally, in this embodiment, the aforementioned electronic device may be located in at least one of a plurality of network devices in a computer network.
[0150] In this embodiment, the computer terminal described above can execute the program code in the method.
[0151] Optionally, Figure 9 This is a structural block diagram of an electronic device according to an embodiment of this application. As shown in the figure, the electronic device may include: one or more (only one is shown in the figure) processors 92, memory 94, memory controller, and peripheral interfaces, wherein the peripheral interfaces are connected to a radio frequency module, an audio module, and a display.
[0152] The memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the methods and apparatus in the embodiments of this application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby implementing the methods in the above embodiments. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0153] The processor can invoke information and applications stored in the memory through the transmission device to perform the following steps: obtaining network configuration information, wherein the network configuration information is used to determine the data encapsulation method and data transmission method adopted by the first type of resource scheduling unit to transmit data to the second type of resource scheduling unit, wherein the first type of resource scheduling unit is the elastic container instance resource scheduling unit in the cloud network, and the second type of resource scheduling unit is the resource scheduling unit in the offline user data center network; and forwarding the data packet to be forwarded based on the destination address of the data packet to be forwarded and the network configuration information, wherein the source address of the data packet to be forwarded is located in the cloud network, and the destination address is located in the user data center network.
[0154] Optionally, the network configuration information includes a mapping table, which records the network plug-in type of the user's data center network, the address information of multiple node servers in the user's data center network, and the address range of the resource scheduling unit corresponding to the address information of the multiple node servers.
[0155] Optionally, the processor may also execute program code that performs the following steps: determining the target encapsulation method of the data packet to be forwarded based on the network plug-in type; determining the target routing method of the data packet to be forwarded based on the destination address and the address range of the resource scheduling unit corresponding to the address information of multiple node servers; and forwarding the data packet to be forwarded according to the target encapsulation method and the target routing method.
[0156] Optionally, the processor may also execute program code that performs the following steps: in response to the network plugin type being Virtual Scalable LAN mode, determining the Virtual Scalable LAN encapsulation method of the data packet to be forwarded as the target encapsulation method; in response to the network plugin type being Internet Address Overlay mode, determining the Internet Address Overlay encapsulation method of the data packet to be forwarded as the target encapsulation method.
[0157] Optionally, the processor may also execute program code that performs the following steps: Based on network configuration information, add a first routing record and a second routing record to the virtual bridging table, wherein the first routing record is an address range routing record of the resource scheduling unit of the user data center network, and the first routing record is used to route data packets transmitted from the first type of resource scheduling unit to the second type of resource scheduling unit to the virtual node router; the second routing record is an address range routing record of the node server of the user data center network, and the second routing record is used to route data packets transmitted from the first type of resource scheduling unit to the second type of resource scheduling unit from the virtual node router to the target node server corresponding to the destination address.
[0158] Optionally, the processor may also execute program code that performs the following steps: obtaining a first routing record from the virtual bridging table based on the destination address; routing the data packet to be forwarded from the source address to the virtual node router according to the first routing record; determining the address information of the node server corresponding to the address range of the resource scheduling unit where the destination address is located; obtaining a second routing record from the virtual bridging table based on the address information of the node server; and routing the data packet to be forwarded from the virtual node router to the target node server according to the second routing record.
[0159] Optionally, the processor may also execute program code that performs the following steps: routes the data packet to be forwarded from the virtual node router to the relay router between the cloud network and the user data center network according to the second routing record, wherein the relay router includes: a border router or a forwarding router; and routes the data packet to be forwarded to the target node server via the relay router.
[0160] Optionally, the processor may also execute program code that retrieves network configuration information from an application programming interface server located in the user's data center network.
[0161] The processor can invoke information and applications stored in memory through the transmission device to perform the following steps: obtaining network configuration information, wherein the network configuration information is used to determine the data encapsulation method and data transmission method used by the first type of resource scheduling unit to transmit data to the second type of resource scheduling unit, wherein the first type of resource scheduling unit is the elastic container instance resource scheduling unit of the virtual private cloud network, and the second type of resource scheduling unit is the resource scheduling unit of the offline Internet data center cluster coverage network; and forwarding the data packet to be forwarded based on the destination address of the data packet to be forwarded and the network configuration information, wherein the source address of the data packet to be forwarded is located in the virtual private cloud network, and the destination address of the data packet to be forwarded is located in the Internet data center cluster coverage network.
[0162] By acquiring network configuration information, this application determines the data encapsulation and data transmission methods used by the elastic container instance resource scheduling unit in the cloud network to transmit data to the resource scheduling unit in the user data center network. Then, based on the destination address and network configuration information of the data packet to be forwarded, the data packet is forwarded, thereby realizing data transmission between the cloud network and the offline user data center network. The data encapsulation and data transmission methods are determined according to the network configuration information, achieving cross-network data transmission functionality. By forwarding the data packet, the elastic container instance resource scheduling unit in the cloud network can communicate with the resource scheduling unit in the offline user data center network, enabling data interaction and communication between different network environments. This provides users with more flexible resource scheduling and data transmission methods, improving network scalability and performance. Therefore, this application achieves the goal of data transmission from the elastic container instance resource scheduling unit in the cloud network to the resource scheduling unit in the user data center network, thereby reducing management costs and improving scalability. It also solves the technical problems of high management costs and poor scalability in related technologies when transmitting data from containers in the cloud network to containers in an offline cluster.
[0163] It will be understood by those skilled in the art that the structure shown in the figure is merely illustrative, and the electronic device may also be a smartphone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile internet device (MID), a PAD, or other terminal device. This figure does not limit the structure of the aforementioned electronic device. For example, the electronic device may include more or fewer components (such as a network interface, a display device, etc.) than shown in the figure, or may have a different configuration than that shown in the figure.
[0164] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0165] Embodiments of this application also provide a computer-readable storage medium. Optionally, in this embodiment, the computer-readable storage medium can be used to store program code executed by the method provided in the above embodiments.
[0166] Optionally, in this embodiment, the storage medium may be located in any one of the electronic devices in the group of electronic devices in the computer network, or in any one of the mobile terminals in the group of mobile terminals.
[0167] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: obtaining network configuration information, wherein the network configuration information is used to determine the data encapsulation method and data transmission method used by the first type of resource scheduling unit to transmit data to the second type of resource scheduling unit, wherein the first type of resource scheduling unit is an elastic container instance resource scheduling unit in the cloud network, and the second type of resource scheduling unit is a resource scheduling unit in the offline user data center network; and forwarding the data packet to be forwarded based on the destination address of the data packet to be forwarded and the network configuration information, wherein the source address of the data packet to be forwarded is located in the cloud network, and the destination address is located in the user data center network.
[0168] Optionally, the network configuration information includes a mapping table, which records the network plug-in type of the user's data center network, the address information of multiple node servers in the user's data center network, and the address range of the resource scheduling unit corresponding to the address information of the multiple node servers.
[0169] Optionally, the computer-readable storage medium is further configured to store program code for performing the following steps: determining the target encapsulation method of the data packet to be forwarded based on the network plug-in type; determining the target routing method of the data packet to be forwarded based on the destination address and the address range of the resource scheduling unit corresponding to the address information of multiple node servers; and forwarding the data packet to be forwarded according to the target encapsulation method and the target routing method.
[0170] Optionally, the computer-readable storage medium is further configured to store program code for performing the following steps: in response to the network plug-in type being Virtual Scalable LAN mode, determining the Virtual Scalable LAN encapsulation method of the data packet to be forwarded as the target encapsulation method; in response to the network plug-in type being Internet Address Overlay mode, determining the Internet Address Overlay encapsulation method of the data packet to be forwarded as the target encapsulation method.
[0171] Optionally, the computer-readable storage medium is further configured to store program code for performing the following steps: adding a first routing record and a second routing record to a virtual bridging table based on network configuration information, wherein the first routing record is an address range routing record for the resource scheduling unit of the user's data center network, and the first routing record is used to route data packets transmitted from the first type of resource scheduling unit to the second type of resource scheduling unit to the virtual node router; the second routing record is an address range routing record for the node server of the user's data center network, and the second routing record is used to route data packets transmitted from the first type of resource scheduling unit to the second type of resource scheduling unit from the virtual node router to the target node server corresponding to the destination address.
[0172] Optionally, the computer-readable storage medium is further configured to store program code for performing the following steps: retrieving a first routing record from a virtual bridging table based on the destination address; routing the data packet to be forwarded from the source address to the virtual node router according to the first routing record; determining the address information of the node server corresponding to the address range of the resource scheduling unit where the destination address is located; retrieving a second routing record from the virtual bridging table based on the address information of the node server; and routing the data packet to be forwarded from the virtual node router to the target node server according to the second routing record.
[0173] Optionally, the computer-readable storage medium is further configured to store program code for performing the following steps: routing the data packet to be forwarded from the virtual node router to a relay router between the cloud network and the user data center network according to a second routing record, wherein the relay router includes: a border router or a forwarding router; and routing the data packet to be forwarded to the target node server via the relay router.
[0174] Optionally, the computer-readable storage medium is also configured to store program code for performing the following steps: obtaining network configuration information from an application programming interface server located in the user's data center network.
[0175] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: obtaining network configuration information, wherein the network configuration information is used to determine the data encapsulation method and data transmission method adopted by the first type of resource scheduling unit to transmit data to the second type of resource scheduling unit, the first type of resource scheduling unit is the elastic container instance resource scheduling unit of the virtual private cloud network, and the second type of resource scheduling unit is the resource scheduling unit of the offline Internet data center cluster coverage network;
[0176] Based on the destination address and network configuration information of the data packet to be forwarded, the data packet is forwarded. The source address of the data packet to be forwarded is located in the virtual private cloud network, and the destination address of the data packet to be forwarded is located in the Internet data center cluster coverage network.
[0177] By acquiring network configuration information, this application determines the data encapsulation and data transmission methods used by the elastic container instance resource scheduling unit in the cloud network to transmit data to the resource scheduling unit in the user data center network. Then, based on the destination address and network configuration information of the data packet to be forwarded, the data packet is forwarded, achieving the goal of data transmission from the elastic container instance resource scheduling unit in the cloud network to the resource scheduling unit in the user data center network. This realizes data transmission between the cloud network and the offline user data center network. Furthermore, by determining the data encapsulation and data transmission methods based on network configuration information, cross-network data transmission functionality is achieved. Through forwarding the data packet, the elastic container instance resource scheduling unit in the cloud network can communicate with the resource scheduling unit in the offline user data center network, enabling data interaction and communication between different network environments. This provides users with more flexible resource scheduling and data transmission methods, improving network scalability and performance. Therefore, this application achieves the technical effects of reducing management costs and improving scalability, thus solving the technical problems of high management costs and poor scalability in related technologies when transmitting data from containers in the cloud network to containers in the offline cluster.
[0178] Embodiments of this application also provide a computer program product. Optionally, in this embodiment, the computer program product may include a computer program that, when executed by a processor, implements the methods provided in the embodiments described above.
[0179] Embodiments of this application also provide a computer program product. Optionally, the computer program product may include a non-volatile computer-readable storage medium, which can be used to store a computer program that, when executed by a processor, implements the method provided in the above embodiments.
[0180] Embodiments of this application also provide a computer program. Optionally, in this embodiment, when the computer program is executed by a processor, it implements the method provided in the above embodiments.
[0181] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0182] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0183] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0184] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0185] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.
[0186] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A data forwarding method, characterized in that, include: Obtain network configuration information, wherein the network configuration information is used to determine the data encapsulation method and data transmission method adopted by the first type of resource scheduling unit to transmit data to the second type of resource scheduling unit, the first type of resource scheduling unit is the elastic container instance resource scheduling unit of the cloud network, and the second type of resource scheduling unit is the resource scheduling unit of the offline user data center network; Based on the destination address of the data packet to be forwarded and the network configuration information, the data packet to be forwarded is forwarded, wherein the source address of the data packet to be forwarded is located in the cloud network, and the destination address is located in the user data center network.
2. The data forwarding method according to claim 1, characterized in that, The network configuration information includes a mapping table, which records the network plug-in type of the user data center network, the address information of multiple node servers of the user data center network, and the address range of the resource scheduling unit corresponding to the address information of the multiple node servers.
3. The data forwarding method according to claim 2, characterized in that, The forwarding process for the data packet to be forwarded, based on the destination address and the network configuration information, includes: The target encapsulation method of the data packet to be forwarded is determined based on the network plugin type. The target routing method for the data packet to be forwarded is determined based on the address range of the resource scheduling unit corresponding to the destination address and the address information of the multiple node servers. The data packets to be forwarded are processed according to the target encapsulation method and the target routing method.
4. The data forwarding method according to claim 3, characterized in that, Determining the target encapsulation method of the data packet to be forwarded based on the network plugin type includes: In response to the network plugin type being Virtual Scalable LAN mode, the Virtual Scalable LAN encapsulation method of the data packet to be forwarded is determined as the target encapsulation method; In response to the network plugin type being Internet address superposition mode, the Internet address superposition encapsulation method of the data packet to be forwarded is determined as the target encapsulation method.
5. The data forwarding method according to claim 3, characterized in that, The data forwarding method further includes: Based on the network configuration information, a first routing record and a second routing record are added to the virtual bridging table. The first routing record is an address range routing record for the resource scheduling unit of the user data center network. The first routing record is used to route data packets transmitted from the first type of resource scheduling unit to the second type of resource scheduling unit to the virtual node router. The second routing record is an address range routing record for the node server of the user data center network. The second routing record is used to route data packets transmitted from the first type of resource scheduling unit to the second type of resource scheduling unit from the virtual node router to the target node server corresponding to the destination address.
6. The data forwarding method according to claim 5, characterized in that, The method for determining the target routing of the data packet to be forwarded based on the address range of the resource scheduling unit corresponding to the destination address and the address information of the multiple node servers includes: The first routing record is obtained from the virtual bridging table based on the destination address; The data packet to be forwarded is routed from the source address to the virtual node router based on the first routing record; Determine the address information of the node server corresponding to the address range of the resource scheduling unit where the destination address is located; The second routing record is obtained from the virtual bridging table based on the address information of the node server; The data packet to be forwarded is routed from the virtual node router to the target node server according to the second routing record.
7. The data forwarding method according to claim 6, characterized in that, Routing the data packet to be forwarded from the virtual node router to the target node server according to the second routing record includes: The data packet to be forwarded is routed from the virtual node router to the relay router between the cloud network and the user data center network according to the second routing record, wherein the relay router includes: a border router or a forwarding router; The data packet to be forwarded is routed to the target node server via the relay router.
8. The data forwarding method according to claim 1, characterized in that, Obtaining the network configuration information includes: The network configuration information is obtained from the application programming interface server located in the user data center network.
9. A data forwarding method, characterized in that, include: Obtain network configuration information, wherein the network configuration information is used to determine the data encapsulation method and data transmission method adopted by the first type of resource scheduling unit to transmit data to the second type of resource scheduling unit, the first type of resource scheduling unit is the elastic container instance resource scheduling unit of the virtual private cloud network, and the second type of resource scheduling unit is the resource scheduling unit of the offline Internet data center cluster coverage network; Based on the destination address of the data packet to be forwarded and the network configuration information, the data packet to be forwarded is forwarded, wherein the source address of the data packet to be forwarded is located in the virtual private cloud network, and the destination address of the data packet to be forwarded is located in the Internet data center cluster coverage network.
10. The data forwarding method according to claim 9, characterized in that, The network configuration information includes a mapping table, which records the network plugin type of the Internet Data Center Cluster Covered Network, the address information of multiple node servers of the Internet Data Center Cluster Covered Network, and the address range of the resource scheduling unit corresponding to the address information of the multiple node servers.
11. A data forwarding system, characterized in that, include: A virtual node server cluster, deployed on a cloud network, is used to obtain network configuration information and forward data packets to be forwarded based on the destination address of the data packets to be forwarded and the network configuration information. The network configuration information is used to determine the data encapsulation method and data transmission method used by the first type of resource scheduling unit to transmit data to the second type of resource scheduling unit. The first type of resource scheduling unit is the elastic container instance resource scheduling unit of the cloud network, and the second type of resource scheduling unit is the resource scheduling unit of the offline user data center network. The source address of the data packets to be forwarded is located in the cloud network, and the destination address is located in the user data center network. A virtual node router, deployed on the cloud network, is used to forward the data packets to be forwarded from the source address to the relay router; The relay router is deployed between the cloud network and the user data center network, and is used to forward the data packets to be forwarded from the virtual node router to the target node server in the user data center network. A cluster of node servers, deployed in the user data center network, is used to receive the data packets to be forwarded from the relay router.
12. An electronic device, characterized in that, include: Memory, which stores executable programs; A processor for running the program, wherein the program, when running, performs the data forwarding method according to any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored executable program, wherein, when the executable program is executed, it controls the device containing the computer-readable storage medium to perform the data forwarding method according to any one of claims 1 to 10.
14. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the data forwarding method according to any one of claims 1 to 10.