Data Transmission Method, Device, Electronic Device and Storage Medium Based on Cloud Network
By constructing the first-level query parameters and target table entries to jump to the second routing table, the problem of insufficient cache resources of the programmable switch is solved, and the service scale and data forwarding efficiency of the programmable switch are improved.
Patent Information
- Application Number
- CN202410726382.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-05
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2044-06-05
AI Technical Summary
Existing programmable switches have limited cache resources and cannot support large-scale cloud computing business needs.
By constructing the first-level query parameters, the target table entry is used to jump to the second routing table, the number of table entries in the first routing table is reduced, the cache resources of the programmable switch are saved, and the service scale of the programmable switch is improved.
It realizes supporting larger-scale cloud computing services under limited cache resources, and improves the data forwarding efficiency and resource utilization of programmable switches.
Smart Images

Figure CN118660026B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of cloud computing technologies, and in particular, to a data transmission method, apparatus, electronic device, and storage medium based on a cloud network. Background Art
[0002] Currently, in the field of cloud computing and cloud service technologies, the technology of using a programmable switch as a cloud gateway for a public cloud has achieved large-scale application. Through a programmable switch, flexible and customizable data forwarding and processing capabilities can be realized.
[0003] In the prior art, based on the service requirements of numerous cloud server tenants, the huge and complex network traffic generated by various virtualization service units is forwarded via a programmable switch. By using the customized routing rules in the programmable switch, efficient information forwarding is achieved.
[0004] However, due to the limited cache resources of the currently applied programmable switch, there is a problem that it cannot support large-scale services. Summary of the Invention
[0005] Embodiments of the present disclosure provide a data transmission method, apparatus, electronic device, and storage medium based on a cloud network to overcome the problem of inability to support large-scale services.
[0006] In a first aspect, embodiments of the present disclosure provide a data transmission method based on a cloud network, including:
[0007] Receiving first communication data sent by a first virtualization service unit, where the first communication data includes a target address and a service object identifier. The target address is the virtual address of a second virtualization service unit that receives the first communication data. The first virtualization service unit and the second virtualization service unit belong to an independent virtual network environment characterized by the service object identifier; constructing first-level query parameters according to the target address and the service object identifier, and querying a first routing table based on the first-level query parameters to obtain a query result. The first routing table includes at least a target entry, and the target entry is the query result corresponding to the first-level query parameters with at least two different parameter values. The target entry is used to jump to a second routing table; if the query result is the target entry, obtaining the server address of the second virtualization service unit according to the second routing table, and sending the first communication data to the second virtualization service unit based on the server address.
[0008] In a second aspect, embodiments of the present disclosure provide a data transmission apparatus based on a cloud network, including:
[0009] A receiving module, configured to receive first communication data sent by a first virtualization service unit, where the first communication data includes a target address and a service object identifier, the target address being the virtual address of a second virtualization service unit that receives the first communication data, and the first virtualization service unit and the second virtualization service unit belong to an independent virtual network environment characterized by the service object identifier;
[0010] A query module, configured to construct first-level query parameters according to the target address and the service object identifier, and query a first routing table based on the first-level query parameters to obtain a query result, where the first routing table at least includes a target entry, the target entry being the query result corresponding to the first-level query parameters with at least two different parameter values, and the target entry is used to jump to a second routing table;
[0011] A processing module, configured to, if the query result is the target entry, obtain the server address of the second virtualization service unit according to the second routing table, and send the first communication data to the second virtualization service unit based on the server address.
[0012] In a third aspect, an embodiment of the present disclosure provides an electronic device, including: a processor and a memory;
[0013] The memory stores computer-executable instructions;
[0014] The processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the cloud network-based data transmission method described in the first aspect and various possible designs of the first aspect above.
[0015] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, where computer-executable instructions are stored in the computer-readable storage medium, and when the processor executes the computer-executable instructions, the cloud network-based data transmission method described in the first aspect and various possible designs of the first aspect above is implemented.
[0016] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, and when the computer program is executed by a processor, the cloud network-based data transmission method described in the first aspect and various possible designs of the first aspect above is implemented.
[0017] The data transmission method, device, electronic device, and storage medium based on a cloud network provided in this embodiment receive first communication data sent by a first virtualization service unit. The first communication data includes a target address and a service object identifier. The target address is the virtual address of a second virtualization service unit that receives the first communication data. The first virtualization service unit and the second virtualization service unit belong to an independent virtual network environment represented by the service object identifier. A first-level query parameter is constructed based on the target address and the service object identifier, and a first routing table is queried based on the first-level query parameter to obtain a query result. The first routing table includes at least a target entry. The target entry is the query result corresponding to the first-level query parameter with at least two different parameter values. The target entry is used to jump to a second routing table. If the query result is the target entry, the server address of the second virtualization service unit is obtained according to the second routing table, and the first communication data is sent to the second virtualization service unit based on the server address. By constructing a first-level query parameter based on the first communication data, querying the transformed first routing table based on the first query, obtaining the target entry, and using the target entry to jump to the second routing table to complete the determination of the server address of the second virtualization service unit. Since the target entry in the first routing table corresponds to multiple first-level query parameters, fewer table entries can be used to cover more query parameters, thereby reducing the number of table entries in the first routing table, and further achieving the purpose of saving the cache resources of the programmable switch and improving the service scale supported by the programmable switch. Description of the Drawings
[0018] To more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the following briefly introduces the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present disclosure. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0019] Figure 1 It is an application scenario diagram of the data transmission method based on a cloud network provided in an embodiment of the present disclosure;
[0020] Figure 2 It is a flowchart of the data transmission method based on a cloud network provided in an embodiment of the present disclosure Figure 1 ;
[0021] Figure 3 It is a schematic diagram of the process of querying the first routing table provided in an embodiment of the present disclosure;
[0022] Figure 4It is a flowchart of the specific implementation steps for constructing the first-level query parameters in step S102;
[0023] Figure 5 It is a flowchart of the specific implementation steps for querying the first routing table in step S102;
[0024] Figure 6 It is a schematic flowchart of the data transmission method based on a cloud network provided by an embodiment of the present disclosure Figure 2 ;
[0025] Figure 7 It is a schematic diagram of generating a first routing table and a second routing table provided by an embodiment of the present disclosure;
[0026] Figure 8 It is Figure 6 a flowchart of the specific implementation manner of step S206 in the illustrated embodiment;
[0027] Figure 9 It is a schematic diagram of the process of querying the second routing table provided by an embodiment of the present disclosure;
[0028] Figure 10 It is a structural block diagram of a data transmission device based on a cloud network provided by an embodiment of the present disclosure;
[0029] Figure 11 It is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure;
[0030] Figure 12 It is a schematic hardware structure diagram of the electronic device provided by an embodiment of the present disclosure. Specific Embodiments
[0031] To make the objectives, technical solutions, and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present disclosure. Apparently, the described embodiments are some, but not all, of the embodiments of the present disclosure. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present disclosure without creative efforts shall fall within the scope of protection of the present disclosure.
[0032] 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 for analysis, stored data, displayed data, etc.) involved in the present disclosure are all information and data that have been authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with the relevant laws, regulations, and standards of relevant countries and regions, and corresponding operation entrances are provided for the user to select to authorize or reject.
[0033] The application scenarios of the embodiments of the present disclosure will be explained below:
[0034] Figure 1 FIG. is an application scenario diagram of the data transmission method based on a cloud network provided by an embodiment of the present disclosure. The data transmission method based on a cloud network provided by an embodiment of the present disclosure can be applied to application scenarios of cloud services and cloud computing. More specifically, it can be applied to data forwarding with a programmable switch as a cloud gateway. The execution subject of this embodiment can be a network device with a programmable switch function or other electronic devices with similar functions.
[0035] Among them, in some embodiments, the network device or electronic device can implement the data transmission method based on a cloud network provided by the embodiments of the present application by running various computer-executable instructions or computer programs. For example, the computer-executable instructions can be program-level commands, machine instructions, or software instructions. The computer program can be a native program or software module in an operating system; it can be a local application program, that is, a program that needs to be installed in the operating system to run. In summary, the above computer-executable instructions can be in any form of instructions, and the above computer programs can be in any form of application programs, modules, or plugins, and the specific implementation form can be configured according to needs. Further, in the application scenarios of cloud computing and cloud services, the network device or electronic device communicates with the server and forwards the data generated by the server. Among them, in some embodiments, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud storage, cloud communication, cloud databases, cloud computing, cloud functions, network services, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.
[0036] Refer to Figure 1As shown in the figure, taking a network device as an example, the network device is, for example, a programmable switch, and exemplarily, it is a P4 switch. In the application scenario of cloud computing, corresponding virtual machines, containers, or virtualized service units (collectively referred to as virtualized service units hereinafter) are created through cloud servers (physical machines). When data communication occurs between virtualized service units created by different cloud servers, the above-mentioned programmable switch needs to be used for data forwarding. For example, as shown in the figure, when the virtualized service unit vhost_1 created by the server Server_1 communicates with the virtualized service unit vhost_2 created by the server Server_2, first, configuration information needs to be sent to the control plane of the programmable switch. Then, the control plane of the programmable switch converts the tenant information of the cloud server tenant into a routing table entry and sends it to the forwarding pipeline. After that, when the virtualized service unit vhost_1 sends communication data to the forwarding pipeline of the programmable switch through the server Server_1, the server address corresponding to the server Server_2 is determined by using the routing rule represented by the above-mentioned issued routing table entry. After that, the communication data is forwarded to the server Server_2 that creates the virtualized service unit vhost_2, thus completing the process of sending communication data from the virtualized service unit vhost_1 to the virtualized service unit vhost_2.
[0037] In the prior art, after the huge and complex network traffic generated by various virtualized service units in the cloud service scenario is sent to the programmable switch, the routing rule represented by the routing table entry in the programmable switch is used for data sending. However, due to the limited cache resources of the programmable switch, a large number of routing table entries cannot be stored to meet the business requirements of large-scale and multi-tenants, resulting in the problem that the programmable switch cannot support large-scale services.
[0038] The embodiments of the present disclosure provide a data transmission method based on a cloud network to solve the above problems.
[0039] Refer to Figure 2 , Figure 2 which is a flowchart of the data transmission method based on a cloud network provided by the embodiments of the present disclosure. Figure 1 . The method of this embodiment can be applied in a programmable switch. The data transmission method based on a cloud network includes:
[0040] Step S101: Receive first communication data sent by a first virtualized service unit. The first communication data includes a target address and a service object identifier. The target address is the virtual address of a second virtualized service unit that receives the first communication data. The first virtualized service unit and the second virtualized service unit belong to an independent virtual network environment represented by the service object identifier.
[0041] Exemplarily, refer toFigure 1 In the application scenario diagram shown, the execution subject of the method provided in this embodiment is a programmable switch. After receiving the first communication data sent by the first virtualization service unit, the programmable switch parses it to obtain the target address and service object identifier. Among them, the first virtualization service unit and the subsequent second virtualization service unit are both virtualization service units. The virtualization service unit can be a virtual machine, cloud server, container or other virtualization service unit. More specifically, for example, Elastic Compute Service (ECS), users create and release cloud servers by renting elastic computing services, thereby realizing the deployment of required business capabilities. The above-mentioned virtualization service unit is an existing technical concept in cloud service and cloud computing scenarios, and will not be described in detail here. Furthermore, the first communication data contains a target address and a service object identifier, wherein the target address is the virtual address of the second virtualization service unit that receives the first communication data, that is, the destination address of the first communication data. The service object identifier is used to characterize different cloud server tenants. Since different cloud server tenants need to configure corresponding routing rules based on their business needs, the service object identifier can be used to identify different cloud server tenants. Furthermore, illustratively, in a virtual private cloud (VPC), the service object identifier can be a VXLAN network identifier (VNI). The VNI is an identifier for each VXLAN segment and is a 24-bit integer. Each VNI typically corresponds to a tenant. Public clouds built using VXLAN can support a large number of independent virtual network environments. In a virtual private cloud, each cloud server tenant has an isolated independent virtual network environment. The VXLAN network identifier can be used to distinguish independent virtual network environments (i.e., cloud server tenants). VXLAN is an existing network virtualization technology and will not be described in detail.
[0042] Specifically, for example, the virtual address of the first virtualization service unit is 192.168.1.1, and the virtual address of the second virtualization service unit is 192.168.1.2. In the first communication data sent from the first virtualization service unit to the second virtualization service unit, it contains the destination address: 192.168.1.2, which is also the virtual address of the second virtualization service unit, and the service object identifier vni_1 = vpc_vni(001). Both the first virtualization service unit and the second virtualization service unit belong to the independent virtual network environment represented by the service object identifier vni_1. Of course, in another possible implementation, on the basis of including the above information, the first communication data may further include the source address of the first communication data, that is, the virtual address 192.168.1.1 of the first virtualization service unit.
[0043] It should be noted that in addition to the above destination address, source address, and service object identifier and other routing information for communication in the first communication data, it may also include specific service information, such as service request instructions, service data, etc. Finally, the above specific service request information and service data are sent to the second virtualization service unit, thereby completing the data communication between the first virtualization service unit and the second virtualization service unit.
[0044] Step S102: Construct a first-level query parameter according to the destination address and the service object identifier, and query the first routing table based on the first-level query parameter to obtain a query result. Among them, the first routing table at least includes a target entry, and the target entry is the query result corresponding to the first-level query parameter with at least two different parameter values. The target entry is used to jump to the second routing table.
[0045] Further, after obtaining the target address and the service object identifier by parsing the first communication data, query parameters, i.e., the first-level query parameters, are constructed using the target address and the service object identifier. The first-level query parameters can be understood as query parameters of a specific special data structure. By using the first routing table to query the first routing table, the routing rules in the first routing table can be hit, thereby realizing data routing. Exemplarily, the first routing table is a form for recording data routing rules, which includes multiple entries, and each entry corresponds to a routing rule. After querying the first routing table based on the query parameters, the hit entry is executed, so as to perform data forwarding according to the corresponding routing rule. In the solution provided in this embodiment, the first routing table includes at least one special target entry, and the target entry is the query result corresponding to the first-level query parameters with at least two different parameter values. After the target entry is hit, it jumps to the second routing table, and then based on the routing rules recorded in the second routing table, the server address is further determined, and data forwarding is completed. Specifically, that is, after querying the first routing table with multiple different first-level query parameters, the same target entry can be hit, and then the target entry is used to jump to the corresponding second routing table for subsequent routing processing.
[0046] Figure 3 FIG. is a schematic diagram of a process for querying a first routing table provided by an embodiment of the present disclosure. Refer to Figure 3 As shown, when querying the first routing table using first-level query parameters with different values, such as query parameter Para_1, query parameter Para_2, and query parameter Para_3, to query the first routing table, the target entry Key_0 will be hit in all cases. Then, the jump action corresponding to the target entry Key_0 is executed, and it is adjusted to the second routing table to execute the subsequent steps. Based on the previous introduction, at least one of the target addresses and service object identifiers in query parameter Para_1, query parameter Para_2, and query parameter Para_3 is different. More specifically, for example, the service object identifier of query parameter Para_1 is vni_1, the service object identifier of query parameter Para_2 is vni_2, and the service object identifier of query parameter Para_3 is vni_3, corresponding to three different independent virtual network environments and cloud server tenants, but the final query result is the same target entry Key_0. In the steps of this embodiment, since the target entry in the first routing table corresponds to multiple first-level query parameters, fewer entries can be used to cover more first-level query parameters. In practical applications, for example, the target entry can cover thousands of first-level query parameters, thereby greatly reducing the number of entries in the first routing table.
[0047] Further, in a possible implementation, the first routing table is stored in the ternary content addressable memory (TCAM) in the programmable switch. The ternary content addressable memory is a high-speed and high-density hardware memory. Its core feature is to access by content address. Thanks to its high-speed matching and parallel search capabilities, it can query multiple addresses simultaneously within a single clock cycle, thereby improving the routing query ability of the programmable switch. However, the ternary content addressable memory has the characteristic of less resource volume. In view of this feature, in this embodiment, the first routing table containing special target entries is stored in the programmable switch. On the one hand, since the volume of the first routing table is reduced, it can be normally set in the ternary content addressable memory, avoiding the problem of small resource volume of the ternary content addressable memory. On the other hand, the access and query speed of the first routing table is improved.
[0048] Further, in a possible implementation, the first routing table is a virtual private cloud routing table, and the first-level query parameters include the subnet address corresponding to the target address and the service object identifier. As Figure 4 shown, the specific implementation of constructing the first-level query parameters according to the target address and the service object identifier includes:
[0049] Step S102A-1: Obtain the subnet address corresponding to the target address according to the target address.
[0050] Step S102A-2: Construct the first-level query parameters according to the subnet address corresponding to the target address and the corresponding service object identifier.
[0051] Among them, the subnet address is an address range, which defines the range of network addresses (virtual addresses) that the virtualization service unit can use, and the reachability of other virtualization service units within the subnet. The virtualization service unit and other nodes in its subnet can usually directly access each other through layer-2 communication. After determining the subnet address according to the target address, combine the subnet address and the service object identifier into a data pair to construct the first-level query parameters.
[0052] Correspondingly, as Figure 5 shown, the specific implementation of querying the first routing table based on the first-level query parameters in step S102 to obtain the query result includes:
[0053] Step S102B-1: Query the custom entries in the virtual private cloud routing table according to the first data pair composed of the service object identifier and the subnet address.
[0054] Step S102B-2: If the first data pair hits the custom entry, the query result is the target custom entry hit by the first data pair.
[0055] Step S102B-3: If the first data pair does not match any custom entry, the query result is the target entry.
[0056] Exemplarily, through the first data pair composed of the service object identification subnet address in the first-level query parameter, query the custom entries in the virtual private cloud (VPC) routing table. The custom entries can be understood as other entries except the target entry. In another possible implementation, the first routing table contains a target entry and at least one custom entry. First, use the first data pair to retrieve the custom entries. If a match is found, perform subsequent data routing according to the execution action corresponding to the custom entry; if the above custom entry is not matched, it is considered that the target entry is matched, and then perform the execution action corresponding to the target entry.
[0057] In the steps of this embodiment, during the process of querying the first routing table (virtual private cloud routing table), first query the fewer custom entries, and trigger (determine a match) the target entry through the query result for the custom entries. In this way, on the one hand, since the number of custom entries is small, or even there may be none, it is equivalent to a reverse exclusion search method. Compared with the conventional forward search, it greatly reduces the query time for the first routing table, improves the query efficiency for the first routing table, and reduces the resource occupancy and maintenance cost of the first routing table.
[0058] Step S103: If the query result is the target entry, obtain the server address of the second virtualization service unit according to the second routing table, and send the first communication data to the second virtualization service unit based on the server address.
[0059] Exemplarily, after querying the first routing table based on the first-level query parameter and obtaining the query result, in one possible implementation, the first-level query parameter query hits the target entry, that is, the query result is the target entry. In this case, further query the second routing table to obtain the server address of the second virtualization service unit. Since the target entry can cover multiple first-level query parameters, this situation is a high-probability occurrence. Specifically, the second routing table records the rules for mapping server addresses in different independent virtual network environments (cloud server tenants), that is, the second routing table is used to represent the mapping relationship between virtual addresses belonging to different subnet addresses and the corresponding server addresses in the independent virtual network environment. By constructing the corresponding second-level query parameter through the target address and service object identification in the first communication data, and querying the second routing table, the server address of the second virtualization service unit can be obtained, and then the first communication data can be sent to the second virtualization service unit based on this server address.
[0060] In a possible implementation, the second routing table is a virtual machine location (VM location) table, which is a hash exact match table used to indicate the location of the server to which the virtualization service unit belongs. The second routing table is stored in the Static Random-Access Memory (SRAM) of the programmable switch. Compared with the ternary content addressable memory, it has more abundant available resources, so it can store more routing mapping relationships. Combining the introduction in the previous steps, the second routing table records richer mapping relationships, so it has a larger data volume. Storing it in the static random access memory makes full use of the rich resources of the static random access memory, thus realizing the support for a larger-scale independent virtual network environment and cloud server tenants.
[0061] The data transmission method based on the cloud network provided in this embodiment receives the first communication data sent by the first virtualization service unit. The first communication data includes a target address and a service object identifier. The target address is the virtual address of the second virtualization service unit that receives the first communication data. The first virtualization service unit and the second virtualization service unit belong to the independent virtual network environment represented by the service object identifier. Construct a first-level query parameter based on the target address and the service object identifier, and query the first routing table based on the first-level query parameter to obtain a query result. The first routing table at least includes a target entry. The target entry is the query result corresponding to the first-level query parameter with at least two different parameter values. The target entry is used to jump to the second routing table. If the query result is the target entry, obtain the server address of the second virtualization service unit according to the second routing table, and send the first communication data to the second virtualization service unit based on the server address. By constructing a first-level query parameter based on the first communication data and querying the transformed first routing table based on this first query to obtain the target entry, and using the target entry to jump to the second routing table to complete the determination of the server address of the second virtualization service unit. Since the target entry in the first routing table corresponds to multiple first-level query parameters, fewer entries can be used to cover more query parameters, thus reducing the number of entries in the first routing table, and further achieving the purpose of saving the cache resources of the programmable switch and improving the service scale supported by the programmable switch.
[0062] Refer to Figure 6 , Figure 6 is a schematic flow chart of the data transmission method based on the cloud network provided in the embodiments of the present disclosure Figure 2 . This embodiment further refines step S103 on the basis of the embodiment shown in Figure 2 , and adds the process of configuring the first routing table and the second routing table. The data transmission method based on the cloud network includes:
[0063] Step S201: Obtain a third routing table, where the third routing table includes at least two alternative routing entries. Here, an alternative routing entry is a query result corresponding to a first-level query parameter, and the alternative routing entry is used to jump to a first-level query parameter of a second routing table.
[0064] Step S202: Merge all alternative routing entries in the third routing table into a target entry to generate a first routing table.
[0065] Exemplarily, in this embodiment, before a programmable switch as an execution entity performs data routing and forwarding, it can first obtain a third routing table, which can be understood as a conventional routing table in the prior art, for example, stored in a ternary content-addressable memory. The third routing table includes at least two alternative routing entries, and each alternative route is a query result of a unique first-level query parameter. Based on the introduction in the previous embodiment, there is a corresponding relationship between the first-level query parameter and the independent virtual network environment. Therefore, there is also a one-to-one correspondence between the independent virtual network environment and the alternative routing entry. Due to the above characteristics, the third routing table has a problem of data volume. In the steps of this embodiment, for the third routing table in the programmable switch, it is notified to execute the corresponding instructions or programs to merge all alternative routing entries in the third routing table into at least one target entry, thereby generating a first routing table. The specific merging method can be set as needed, for example, merging according to the cloud server tenant information corresponding to the cloud server tenant, which will not be elaborated here. After merging, the third routing table with numerous entries forms a first routing table with fewer entries, realizing the resource release of the ternary content-addressable memory.
[0066] Further, in a possible implementation manner, the alternative routing entry is used to jump to a fourth routing table, that is, the lower-level routing table of the third routing table is the fourth routing table. After generating the first routing table by merging the third routing table, when the lower-level routing table of the third routing table in the system exists in the form of a fourth routing table, the second routing table can be generated by further merging multiple fourth routing tables. Specifically, the alternative routing entry in the third routing table is used to jump to the fourth routing table, and the fourth routing table is stored in the static random access memory in the programmable switch. The fourth routing table is used to represent the mapping relationship between the virtual address belonging to the same target subnet address and the corresponding server address in the target independent virtual network environment indicated by the first-level query parameter, that is, the mapping relationship between the data pair composed of [service object identifier, subnet address] and the server address. Merge the fourth routing tables corresponding to the alternative entries to form a larger routing table, that is, the second routing table. Through the above steps, the first routing table and the corresponding second routing table used in the Figure 2 illustrated embodiment are formed.
[0067] Figure 7 A schematic diagram for generating a first routing table and a second routing table provided by an embodiment of the present disclosure is as follows Figure 7 As shown, exemplarily, on the basis of obtaining a fourth routing table having a mapping relationship with a third routing table, in response to the execution of a configuration program, first, a plurality of alternative routing table entries in the third routing table shown in the figure, such as alternative routing table entry Key_1, alternative routing table entry Key_2, alternative routing table entry Key_3, etc. (shown as Key_1, Key_2, Key_3 in the figure), are merged into a target entry Key_0. Then, the fourth routing tables corresponding to the respective alternative routing table entries Key_1, Key_2, Key_3, such as the fourth routing table R1, the fourth routing table R2, and the fourth routing table R3 shown in the figure, are merged as entries to generate a second routing table. The second routing table, for example, contains entries R1, R2, and R3 to inherit the routing rules of the above-mentioned respective fourth routing tables. On this basis, the custom entries in the original third routing table and the custom routing table called after the custom entry is hit are retained and still stored in the first routing table.
[0068] Optionally, this embodiment further includes (not shown in the figure):
[0069] Step S200: Obtain service object configuration information sent to the control plane of the programmable switch. The service object configuration information is used to register a service object identifier; generate or update the second routing table according to the service object configuration information.
[0070] Exemplarily, before or after forming the above first routing table and second routing table, obtain service object configuration information sent to the control plane of the programmable switch. The service object configuration information is used to register a service object identifier, that is, to register an independent virtual network environment for a service object (cloud server tenant), so as to provide private cloud services for it. After the programmable switch obtains the service object configuration information sent by the control plane, according to the registered service object identifier, it adds corresponding routing rules. For example, it adds a routing rule R1 for the service object identifier vni_1 and forms an entry to record in the second routing table, completing the process of generating or updating the second routing table. Through the steps of this embodiment, real-time update of the second routing table is achieved, the accuracy of the routing rules is improved, and the correctness of the data forwarding process is ensured. This step can be executed before step S201 or after step S202, without limitation.
[0071] Step S203: Receive the first communication data sent by the first virtualization service unit. The first communication data contains a target address and a service object identifier. The target address is the virtual address of the second virtualization service unit that receives the first communication data. The first virtualization service unit and the second virtualization service unit belong to the independent virtual network environment represented by the service object identifier.
[0072] Step S204: Construct first-level query parameters based on the target address and the service object identifier, and query the first routing table based on the first-level query parameters to obtain a query result. The first routing table includes at least a target entry. The target entry is the query result corresponding to the first-level query parameters with at least two different parameter values. The target entry is used to jump to the second routing table.
[0073] Step S205: If the query result is a target entry, construct second-level query parameters according to the service object identifier and the target address.
[0074] Step S206: Query the second routing table based on the second-level query parameters to obtain the server address of the second virtualization service unit.
[0075] Exemplarily, in a possible case, if the query result is a target entry, that is, the target entry is hit, further construct second-level query parameters according to the service object identifier and the target address, so that the second-level query parameters can represent the target address and the service object identifier. Then, use the mapping relationship between the virtual addresses belonging to different subnet addresses and the corresponding server addresses in the independent virtual network environment represented by the second routing table to obtain the server address where the second virtualization service unit is located.
[0076] Further, as Figure 8 shown, the specific implementation steps of Step S206 include:
[0077] Step S2061: Query the second routing table according to the second data pair composed of the service object identifier and the target address;
[0078] Step S2062: If the second data pair hits the target virtual address, use the server address corresponding to the target virtual address as the server address of the second virtualization service unit;
[0079] Step S2063: If the second data pair does not hit any virtual address, discard the first communication data and use the empty address as the server address of the second virtualization service unit.
[0080] Exemplarily, first, according to the service object identifier and the target address in the second-level query parameter, a second data pair is constructed, for example: [target address, service object identifier]. After that, the second routing table is queried through the second-level query parameter. If the second data pair hits the target virtual address, the accurate server address, that is, the server address of the physical server where the second virtualization service unit is located, can be obtained. On the contrary, if it does not hit, it means that the corresponding routing rule is not recorded in the second routing table (editable switch), and then the first communication data is discarded and the processing request for it is ignored.
[0081] Figure 9 FIG. is a schematic diagram of a process for querying a second routing table provided by an embodiment of the present disclosure. The following will be combined with Figure 9 to introduce the above process. Exemplarily, first, the second data pair [addr_1, vin_001] in the second-level query parameter is obtained. After that, the second routing table is queried based on the second data pair. The second routing table contains many entries such as key_2_001, key_2_002, key_2_003, etc. Each entry contains two condition fields and an action field. Among them, the condition field is in the form of [X, Y], where X represents the service object identifier and Y represents the virtual address. As shown in the figure, the second data pair [addr_1, vin_001] hits the condition field [addr_1, vin_001] of the entry key_2_001 in the second routing table, that is, the service object identifier in the second data pair is the same as the content representing the service object identifier in the condition field of the entry in the second routing table, and the target address in the second data pair is the same as the content representing the virtual address in the condition field of the entry in the second routing table. Then it is considered that the second data pair hits the target virtual address. After that, the server address Host_addr_1 mapped by the entry key_2_001 is determined as the server address of the second virtualization service unit.
[0082] It should be noted that compared with the first-level query parameter, the second-level query parameter contains a specific target address, and the subnet address of the target address can actually be a part of the target address. For example, if the target address is 192.168.1.2, then 192.168.1 is the subnet address. Therefore, the second-level query parameter contains the information in the first-level query parameter. Therefore, when directly using the second-level query parameter to query the second route to determine the server address, no information loss will occur, ensuring the accuracy of the routing result.
[0083] Step S207: Send the first communication data to the second virtualization service unit based on the server address.
[0084] In this embodiment, the implementation manners of steps S203, S204, and S207 are the same as the corresponding parts of steps S101 - S103 in the embodiment shown in the present disclosure, and will not be elaborated herein one by one. Figure 2 The implementation manners of the corresponding parts of steps S101 - S103 in the embodiment shown in the present disclosure are the same, and will not be elaborated herein one by one.
[0085] Corresponding to the data transmission method based on a cloud network in the above embodiment, Figure 10 FIG. 7 is a structural block diagram of a data transmission device based on a cloud network provided by an embodiment of the present disclosure. The method introduced in the above embodiment can be executed by the data transmission device based on a cloud network. The device can be implemented in a software and / or hardware manner, and the device can be integrated in an electronic device with a certain data processing function. Among them, the electronic device may include, but is not limited to, a mobile terminal with big data processing capabilities, and a fixed terminal with big data processing capabilities such as a desktop computer and a supercomputer.
[0086] For the sake of convenience of description, only parts related to the embodiments of the present disclosure are shown. Referring to Figure 10 , the data transmission device 3 based on a cloud network includes:
[0087] A receiving module 31, configured to receive first communication data sent by a first virtualization service unit. The first communication data includes a target address and a service object identifier. The target address is the virtual address of a second virtualization service unit that receives the first communication data. The first virtualization service unit and the second virtualization service unit belong to an independent virtual network environment represented by the service object identifier;
[0088] A query module 32, configured to construct first-level query parameters according to the target address and the service object identifier, and query a first routing table based on the first-level query parameters to obtain a query result. Among them, the first routing table at least includes a target entry. The target entry is the query result corresponding to the first-level query parameters with at least two different parameter values. The target entry is used to jump to a second routing table;
[0089] A processing module 33, configured to, if the query result is a target entry, obtain the server address of the second virtualization service unit according to the second routing table, and send the first communication data to the second virtualization service unit based on the server address.
[0090] According to one or more embodiments of the present disclosure, the first routing table is stored in a ternary content addressable memory in a programmable switch; the second routing table is stored in a static random access memory in a programmable switch.
[0091] According to one or more embodiments of the present disclosure, the first routing table is a virtual private cloud routing table, and the first-level query parameters include the subnet address corresponding to the target address and the service object identifier; when the query module 32 queries the first routing table based on the first-level query parameters to obtain a query result, it specifically is used for: querying the custom entries in the virtual private cloud routing table according to the first data pair composed of the service object identifier and the subnet address; if the first data pair hits a custom entry, the query result is the target custom entry hit by the first data pair, and if the first data pair does not hit any custom entry, the query result is the target entry.
[0092] According to one or more embodiments of the present disclosure, the second routing table is used to represent the mapping relationship between virtual addresses belonging to different subnet addresses and the corresponding server addresses in an independent virtual network environment; obtaining the server address of the second virtualization service unit according to the second routing table includes: constructing second-level query parameters according to the service object identifier and the target address; querying the second routing table based on the second-level query parameters to obtain the server address of the second virtualization service unit.
[0093] According to one or more embodiments of the present disclosure, when the processing module 33 queries the second routing table based on the second-level query parameters to obtain the server address of the second virtualization service unit, it specifically is used for: querying the second routing table according to the second data pair composed of the service object identifier and the target address; if the second data pair hits the target virtual address, taking the server address corresponding to the target virtual address as the server address of the second virtualization service unit; if the second data pair does not hit any virtual address, discarding the first communication data.
[0094] According to one or more embodiments of the present disclosure, the processing module 33 is further used for: obtaining the service object configuration information sent to the control plane of the programmable switch, and the service object configuration information is used to register the service object identifier; generating or updating the second routing table according to the service object configuration information.
[0095] According to one or more embodiments of the present disclosure, the processing module 33 is further used for: obtaining a third routing table, where the third routing table includes at least two alternative routing entries, and an alternative routing entry is a query result corresponding to a first-level query parameter, and the alternative routing entry is used to jump to a fourth routing table, and the fourth routing table is used to represent the mapping relationship between virtual addresses belonging to the same target subnet address and the corresponding server addresses in the target independent virtual network environment indicated by the first-level query parameter; merging all the alternative routing entries in the third routing table into a target entry to generate a first routing table; merging each fourth routing table based on the independent virtual network environment and the corresponding subnet address to generate a second routing table.
[0096] Among them, the receiving module 31, the query module 32, and the processing module 33 are connected in sequence. The data transmission device 3 based on the cloud network provided in this embodiment can execute the technical solution of the above method embodiment, and its implementation principle and technical effect are similar, which will not be elaborated here.
[0097] Figure 11 FIG. is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure, as Figure 11 shown, the electronic device 4 includes:
[0098] a processor 41 and a memory 42 communicatively connected to the processor 41;
[0099] The memory 42 stores computer-executable instructions;
[0100] The processor 41 executes the computer-executable instructions stored in the memory 42 to implement the data transmission method based on the cloud network in the embodiment as Figures 2 - 9 shown.
[0101] Optionally, the processor 41 and the memory 42 are connected through a bus 43.
[0102] For relevant descriptions, reference can be made to Figures 2 - 9 the relevant descriptions and effects corresponding to the steps in the corresponding embodiments, and details will not be elaborated here.
[0103] An embodiment of the present disclosure provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are executed by a processor, they are used to implement the data transmission method based on the cloud network provided in any one of the corresponding embodiments of the present disclosure. Figures 2 - 9
[0104] An embodiment of the present disclosure provides a computer program product, including a computer program, and when the computer program is executed by a processor, it implements the data transmission method based on the cloud network provided in any one of the corresponding embodiments of the present disclosure. Figures 2 - 9
[0105] To implement the above embodiments, an embodiment of the present disclosure also provides an electronic device.
[0106] Refer to Figure 12 , which shows a schematic structural diagram of an electronic device 900 suitable for implementing the embodiments of the present disclosure. The electronic device 900 can be a terminal device or a server. Among them, the terminal device can include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (PADs), portable media players (PMPs), in-vehicle terminals (such as in-vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 12 The electronic device shown is only an example and should not impose any limitations on the functions and usage scope of the embodiments of the present disclosure.
[0107] As Figure 12 shown, the electronic device 900 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 901, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 902 or the program loaded from the storage device 908 into the random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the electronic device 900 are also stored. The processing device 901, the ROM 902, and the RAM 903 are connected to each other through a bus 904. The input / output (I / O) interface 905 is also connected to the bus 904.
[0108] Generally, the following devices can be connected to the I / O interface 905: an input device 906 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 907 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 908 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 909. The communication device 909 can allow the electronic device 900 to communicate with other devices wirelessly or wirelesly to exchange data. Although Figure 12 the electronic device 900 with various devices is shown, it should be understood that it is not required to implement or have all the shown devices. More or fewer devices can be alternatively implemented or had.
[0109] In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, an embodiment of the present disclosure includes a computer program product that includes a computer program carried on a computer-readable medium, and the computer program includes program code for performing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication device 909, or installed from a storage device 908, or installed from a ROM 902. When the computer program is executed by a processing device 901, the above-described functions defined in the method of the embodiment of the present disclosure are performed.
[0110] It should be noted that the above computer-readable medium in the present disclosure can be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. And in the present disclosure, a computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable medium other than the computer-readable storage medium, and the computer-readable signal medium can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted by any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0111] The above computer-readable medium can be included in the above electronic device; or it can exist separately and not be assembled into the electronic device.
[0112] The above computer-readable medium carries one or more programs, and when the one or more programs are executed by the electronic device, the electronic device is caused to execute the method shown in the above embodiment.
[0113] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or it can be connected to an external computer (for example, by connecting through the Internet using an Internet service provider).
[0114] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0115] The units or modules involved in the embodiments described in this disclosure can be implemented in software or in hardware. Among them, the name of the unit or module does not constitute a limitation to the unit itself in some cases.
[0116] The functions described above in this document can be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that can be used include: Field Programmable Gate Arrays (FPGA), Application Specific Integrated Circuits (ASIC), Application Specific Standard Products (ASSP), System on a Chip (SOC), Complex Programmable Logic Devices (CPLD), and so on.
[0117] In the context of the present disclosure, a machine-readable medium may be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium would include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0118] In a first aspect, according to one or more embodiments of the present disclosure, there is provided a data transmission method based on a cloud network, including:
[0119] Receiving first communication data sent by a first virtualization service unit, where the first communication data contains a target address and a service object identifier, the target address being the virtual address of a second virtualization service unit that receives the first communication data, and the first virtualization service unit and the second virtualization service unit belong to an independent virtual network environment characterized by the service object identifier; constructing first-level query parameters based on the target address and the service object identifier, and querying a first routing table based on the first-level query parameters to obtain a query result, where the first routing table at least includes a target entry, the target entry being the query result corresponding to the first-level query parameters with at least two different parameter values, and the target entry being used to jump to a second routing table; if the query result is the target entry, then obtaining the server address of the second virtualization service unit according to the second routing table, and sending the first communication data to the second virtualization service unit based on the server address.
[0120] According to one or more embodiments of the present disclosure, the first routing table is stored in a ternary content addressable memory in a programmable switch; the second routing table is stored in a static random access memory in the programmable switch.
[0121] According to one or more embodiments of the present disclosure, the first routing table is a virtual private cloud routing table, and the first-level query parameters include the subnet address corresponding to the target address and the service object identifier; querying the first routing table based on the first-level query parameters to obtain a query result includes: querying the custom entries in the virtual private cloud routing table according to the first data pair formed by the service object identifier and the subnet address; if the first data pair hits a custom entry, the query result is the target custom entry hit by the first data pair, and if the first data pair does not hit any custom entry, the query result is the target entry.
[0122] According to one or more embodiments of the present disclosure, the second routing table is used to represent the mapping relationship between virtual addresses belonging to different subnet addresses and the corresponding server addresses in an independent virtual network environment; obtaining the server address of the second virtualization service unit according to the second routing table includes: constructing second-level query parameters according to the service object identifier and the target address; querying the second routing table based on the second-level query parameters to obtain the server address of the second virtualization service unit.
[0123] According to one or more embodiments of the present disclosure, querying the second routing table based on the second-level query parameters to obtain the server address of the second virtualization service unit includes: querying the second routing table according to the second data pair formed by the service object identifier and the target address; if the second data pair hits a target virtual address, taking the server address corresponding to the target virtual address as the server address of the second virtualization service unit; if the second data pair does not hit any virtual address, discarding the first communication data.
[0124] According to one or more embodiments of the present disclosure, the method further includes: obtaining service object configuration information sent to the control plane of the programmable switch, where the service object configuration information is used to register the service object identifier; generating or updating the second routing table according to the service object configuration information.
[0125] According to one or more embodiments of the present disclosure, the method further includes: obtaining a third routing table, where the third routing table includes at least two alternative routing table entries, and the alternative routing table entry is a query result corresponding to a first-level query parameter, and the alternative routing table entry is used to jump to a fourth routing table, and the fourth routing table is used to represent a mapping relationship between a virtual address and a corresponding server address that belong to the same target subnet address in the target independent virtual network environment indicated by the first-level query parameter; merging all the alternative routing table entries in the third routing table into a target table entry to generate the first routing table; and merging each of the fourth routing tables based on the independent virtual network environment and the corresponding subnet address to generate the second routing table.
[0126] In a second aspect, according to one or more embodiments of the present disclosure, there is provided a data transmission device based on a cloud network, including:
[0127] a receiving module, configured to receive first communication data sent by a first virtualization service unit, where the first communication data includes a target address and a service object identifier, the target address is a virtual address of a second virtualization service unit that receives the first communication data, and the first virtualization service unit and the second virtualization service unit belong to an independent virtual network environment represented by the service object identifier;
[0128] a query module, configured to construct a first-level query parameter according to the target address and the service object identifier, and query a first routing table based on the first-level query parameter to obtain a query result, where the first routing table at least includes a target table entry, and the target table entry is a query result corresponding to first-level query parameters with at least two different parameter values, and the target table entry is used to jump to a second routing table;
[0129] a processing module, configured to, if the query result is the target table entry, obtain the server address of the second virtualization service unit according to the second routing table, and send the first communication data to the second virtualization service unit based on the server address.
[0130] According to one or more embodiments of the present disclosure, the first routing table is stored in a ternary content addressable memory in a programmable switch; the second routing table is stored in a static random access memory in the programmable switch.
[0131] According to one or more embodiments of the present disclosure, the first routing table is a virtual private cloud routing table, and the first-level query parameters include the subnet address corresponding to the target address and the service object identifier; when the query module queries the first routing table based on the first-level query parameters to obtain a query result, it specifically is used for: querying the custom entries in the virtual private cloud routing table according to the first data pair composed of the service object identifier and the subnet address; if the first data pair hits a custom entry, the query result is the target custom entry hit by the first data pair, and if the first data pair does not hit any custom entry, the query result is the target entry.
[0132] According to one or more embodiments of the present disclosure, the second routing table is used to represent the mapping relationship between virtual addresses belonging to different subnet addresses and the corresponding server addresses in an independent virtual network environment; obtaining the server address of the second virtualization service unit according to the second routing table includes: constructing second-level query parameters according to the service object identifier and the target address; querying the second routing table based on the second-level query parameters to obtain the server address of the second virtualization service unit.
[0133] According to one or more embodiments of the present disclosure, when the processing module queries the second routing table based on the second-level query parameters to obtain the server address of the second virtualization service unit, it specifically is used for: querying the second routing table according to the second data pair composed of the service object identifier and the target address; if the second data pair hits a target virtual address, using the server address corresponding to the target virtual address as the server address of the second virtualization service unit; if the second data pair does not hit any virtual address, discarding the first communication data.
[0134] According to one or more embodiments of the present disclosure, the processing module is further used for: obtaining the service object configuration information sent to the control plane of the programmable switch, where the service object configuration information is used to register the service object identifier; generating or updating the second routing table according to the service object configuration information.
[0135] According to one or more embodiments of the present disclosure, the processing module is further configured to: obtain a third routing table, where the third routing table includes at least two alternative routing entries, and the alternative routing entry is a query result corresponding to a first-level query parameter, and the alternative routing entry is used to jump to a fourth routing table, and the fourth routing table is used to represent the mapping relationship between virtual addresses belonging to the same target subnet address and corresponding server addresses in the target independent virtual network environment indicated by the first-level query parameter; merge all the alternative routing entries in the third routing table into a target entry to generate the first routing table; and merge each of the fourth routing tables based on the independent virtual network environment and the corresponding subnet address to generate the second routing table.
[0136] In a third aspect, according to one or more embodiments of the present disclosure, there is provided an electronic device, including: at least one processor and a memory;
[0137] The memory stores computer-executable instructions;
[0138] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the cloud network-based data transmission method described in the first aspect above and various possible designs of the first aspect.
[0139] In a fourth aspect, according to one or more embodiments of the present disclosure, there is provided a computer-readable storage medium, where computer-executable instructions are stored in the computer-readable storage medium, and when the processor executes the computer-executable instructions, the cloud network-based data transmission method described in the first aspect above and various possible designs of the first aspect are implemented.
[0140] In a fifth aspect, according to one or more embodiments of the present disclosure, there is provided a computer program product, including a computer program, and when the computer program is executed by a processor, the cloud network-based data transmission method described in the first aspect above and various possible designs of the first aspect are implemented.
[0141] The above description is only a preferred embodiment of the present disclosure and an explanation of the applied technical principles. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosure concept. For example, a technical solution formed by mutually replacing the above features with technical features having similar functions disclosed in the present disclosure (but not limited to).
[0142] Moreover, although the operations are depicted in a particular order, this should not be construed as requiring that the operations be performed in the particular order shown or in sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, although several specific implementation details are included in the foregoing discussion, these should not be construed as limitations on the scope of the present disclosure. Certain features that are described in the context of separate embodiments may also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment may also be implemented separately or in any suitable sub-combination in multiple embodiments.
[0143] Although the subject matter has been described in language specific to structural features and / or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.
Claims
1. A data transmission method based on a cloud network, characterized in that Applied to a programmable switch, which includes a ternary content addressable memory and a static random access memory, and includes: Receiving first communication data sent by a first virtualization service unit, where the first communication data contains a target address and a service object identifier, the target address is the virtual address of a second virtualization service unit that receives the first communication data, and the first virtualization service unit and the second virtualization service unit belong to an independent virtual network environment represented by the service object identifier; Constructing first-level query parameters based on the target address and the service object identifier, and querying a first routing table based on the first-level query parameters to obtain a query result. Among them, the first routing table at least includes a target entry, and the target entry is the query result corresponding to the first-level query parameters with at least two different parameter values. The target entry is used to jump to a second routing table, and the second routing table is used to represent the mapping relationship between virtual addresses belonging to different subnet addresses and corresponding server addresses in an independent virtual network environment; If the query result is the target entry, then based on the second routing table, obtain the server address of the second virtualization service unit, and send the first communication data to the second virtualization service unit based on the server address; The first routing table is stored in the ternary content addressable memory in the programmable switch; the second routing table is stored in the static random access memory in the programmable switch.
2. The method according to claim 1, wherein The first routing table is a virtual private cloud routing table, and the first-level query parameters include the subnet address corresponding to the target address and the service object identifier; The querying the first routing table based on the first-level query parameters to obtain a query result includes: Querying a custom entry in the virtual private cloud routing table according to a first data pair composed of the service object identifier and the subnet address; If the first data pair hits a custom entry, the query result is the target custom entry hit by the first data pair. If the first data pair does not hit any custom entry, the query result is the target entry.
3. The method according to claim 1, wherein The mapping relationship between virtual addresses belonging to different subnet addresses and corresponding server addresses; the obtaining the server address of the second virtualization service unit according to the second routing table includes: Constructing second-level query parameters based on the service object identifier and the target address; Querying the second routing table based on the second-level query parameters to obtain the server address of the second virtualization service unit.
4. The method according to claim 3, characterized in that, The querying the second routing table based on the second-level query parameters to obtain the server address of the second virtualization service unit includes: Querying the second routing table according to a second data pair composed of the service object identifier and the target address; If the second data pair hits a target virtual address, use the server address corresponding to the target virtual address as the server address of the second virtualization service unit; If the second data pair does not match any virtual address, discard the first communication data and use the null address as the server address of the second virtualization service unit.
5. The method according to claim 1, wherein The method further includes: Obtaining service object configuration information sent to the control plane of the programmable switch, where the service object configuration information is used to register the service object identifier; Obtaining, according to the service object configuration information, a routing rule corresponding to the service object identifier; Generating or updating the second routing table according to the routing rule corresponding to the service object identifier.
6. The method according to claim 1, wherein The method further includes: Obtaining a third routing table, where the third routing table includes at least two alternative routing table entries, and the alternative routing table entry is a query result corresponding to a first-level query parameter, and the alternative routing table entry is used to jump to the first-level query parameter of the second routing table; Merging all the alternative routing table entries in the third routing table into a target table entry to generate the first routing table.
7. A data transmission device based on a cloud network, characterized in that, Applied to a programmable switch, where the programmable switch includes a ternary content addressable memory and a static random access memory, and includes: A receiving module, configured to receive first communication data sent by a first virtualization service unit, where the first communication data includes a target address and a service object identifier, the target address is the virtual address of a second virtualization service unit that receives the first communication data, and the first virtualization service unit and the second virtualization service unit belong to an independent virtual network environment characterized by the service object identifier; A query module, configured to construct a first-level query parameter according to the target address and the service object identifier, and query a first routing table based on the first-level query parameter to obtain a query result, where the first routing table at least includes a target table entry, the target table entry is a query result corresponding to first-level query parameters with at least two different parameter values, the target table entry is used to jump to a second routing table, and the second routing table is used to represent the mapping relationship between virtual addresses belonging to different subnet addresses and corresponding server addresses in an independent virtual network environment; A processing module, configured to, if the query result is the target table entry, obtain the server address of the second virtualization service unit according to the second routing table, and send the first communication data to the second virtualization service unit based on the server address; The first routing table is stored in the ternary content addressable memory in the programmable switch; the second routing table is stored in the static random access memory in the programmable switch.
8. An electronic device, characterized in that, Includes: A processor and a memory; The memory stores computer execution instructions; The processor executes the computer execution instructions stored in the memory, so that the processor executes the cloud network-based data transmission method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, Computer execution instructions are stored in the computer-readable storage medium, and when the processor executes the computer execution instructions, the cloud network-based data transmission method according to any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, the cloud network-based data transmission method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Communication method and device of virtual private network, equipment and medium
CN118101378A