A cross-cloud access method, apparatus, device and medium
By deploying services in the provisioned area and creating terminal nodes with unique node IPs in the user area, the problem of communication barriers between different VPCs is solved, achieving uniqueness and reliability of cross-cloud access and improving user experience.
Patent Information
- Application Number
- CN202411791191.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2026-01-09
- Estimated Expiration
- 2044-12-06
AI Technical Summary
The inability of networks between different VPCs to communicate with each other prevents virtual machines with the same IP address from accessing each other across VPCs, impacting user experience.
Deploy forward services in the pre-configured area and create terminal nodes with unique node IPs in the user area. Access is made through these node IPs and the pre-configured area port, ensuring a one-to-one correspondence between each terminal node in the user area and the service in the pre-configured area.
It enables cross-cloud access for different user zones, avoids IP conflicts, ensures the uniqueness and reliability of access, and improves user experience.
Smart Images

Figure CN119814375B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of big data, and in particular to a cross-cloud access method and device, equipment and medium. BACKGROUND
[0002] The networks between different VPCs (Virtual Private Clouds) under a cloud product platform cannot be interconnected. Although many related cloud products currently provide a cross-VPC access solution, in many cases, the same IP virtual machines can appear under different subnets, and the existing cross-VPC access solution cannot support multiple same IP cross-network access. Based on the same IP limitation, the cloud products in most scenarios cannot directly use the cross-VPC access solution to directly implement cross-VPC access.
[0003] Therefore, a cross-cloud access method that can avoid the same IP situation under the same cloud platform and provide convenient and reliable cross-cloud access is urgently needed. SUMMARY
[0004] To solve the above technical problems, the present application provides a cross-cloud access method, device, equipment and medium, aiming at how to conveniently and reliably provide cross-cloud access services for users.
[0005] The first aspect of the present application provides a cross-cloud access method, which comprises:
[0006] deploying a first forward service in a preset area and providing a first preset area port of the preset area to a first user area and a second user area;
[0007] creating a first terminal node in the first user area and a second terminal node in the second user area, the first terminal node having a first node IP unique in node IPs corresponding to each user area accessing the preset area, and the second terminal node having a second node IP unique in node IPs corresponding to each user area accessing the preset area;
[0008] the first user area accesses the first forward service based on the first node IP and a first user area port corresponding to the first preset area port, and the second user area accesses the first forward service based on the second node IP and the first user area port.
[0009] Optionally, the method further comprises:
[0010] deploying a second forward service in the preset area and providing a second preset area port of the preset area to the first user area and the second user area;
[0011] The first user zone accesses the second forward service based on the first node IP and a second user zone port corresponding to the second preset zone port, and the second user zone accesses the second forward service based on the second node IP and the second user zone port.
[0012] Optionally, the method further comprises:
[0013] The first terminal node and the first node IP are reserved when the first user zone needs to access the first forward service and / or the second forward service;
[0014] The first terminal node is cancelled and the first node IP is released when the first user zone does not need to access the first forward service and the second forward service;
[0015] The first node IP is allocated to a terminal node created by another user zone accessing the preset zone after being released.
[0016] Optionally, the first user zone accesses the first forward service based on the first node IP and a first user zone port corresponding to the first preset zone port, and the second user zone accesses the first forward service based on the second node IP and the first user zone port, and the method comprises:
[0017] Each client of the first user zone accesses the first forward service based on the first node IP and the first user zone port corresponding to the first preset zone port;
[0018] Each client of the second user zone accesses the first forward service based on the second node IP and the first user zone port corresponding to the first preset zone port.
[0019] Optionally, the method further comprises:
[0020] A transit node is created in the preset zone, and the transit node has a transit IP address;
[0021] The transit node initiates a first reverse service request to the first terminal node based on the transit IP address and a third preset zone port;
[0022] The first user zone forwards the first reverse service request to a first host in the first user zone having a third user zone port based on the third user zone port corresponding to the third preset zone port, and provides the first reverse service to the first host through the preset zone;
[0023] The transit node initiates a second reverse service request to the first terminal node based on the transit IP address and a fourth preset zone port.
[0024] The first user area forwards the second reverse service request to a second host having the fourth user area port in the first user area based on the fourth user area port corresponding to the fourth preset area port, and provides the second host with the second reverse service through the preset area.
[0025] Optionally, the method further comprises:
[0026] The transit node initiates a third reverse service request to the second terminal node based on the transit IP address and a fifth preset area port;
[0027] The second user area forwards the third reverse service request to a third host having the third user area port in the second user area based on the third user area port corresponding to the fifth preset area port, and provides the third host with the third reverse service through the preset area;
[0028] The transit node initiates a fourth reverse service request to the second terminal node based on the transit IP address and a sixth preset area port;
[0029] The second user area forwards the fourth reverse service request to a fourth host having the fourth user area port in the second user area based on the fourth user area port corresponding to the sixth preset area port, and provides the fourth host with the fourth reverse service through the preset area.
[0030] Optionally, the method further comprises:
[0031] The preset area receives a configuration command;
[0032] The preset area executes the configuration command to configure each preset area port of the preset area for forward service or reverse service.
[0033] The second aspect of the embodiments of the present application provides a cross-cloud access device, the device comprising:
[0034] A first forward service deployment module is configured to deploy a first forward service in a preset area and provide a first preset area port of the preset area to a first user area and a second user area;
[0035] A terminal node creation module is configured to create a first terminal node in the first user area and a second terminal node in the second user area, the first terminal node having a first node IP unique in node IPs corresponding to each user area accessing the preset area, and the second terminal node having a second node IP unique in node IPs corresponding to each user area accessing the preset area;
[0036] The first forward service access module is configured to access the first forward service by the first user area based on the first node IP and a first user area port corresponding to the first preset area port, and access the first forward service by the second user area based on the second node IP and the first user area port.
[0037] Optionally, the cross-cloud access device further comprises:
[0038] The second forward service deployment module is configured to deploy a second forward service in the preset area and provide a second preset area port of the preset area to the first user area and the second user area.
[0039] The second forward service access module is configured to access the second forward service by the first user area based on the first node IP and a second user area port corresponding to the second preset area port, and access the second forward service by the second user area based on the second node IP and the second user area port.
[0040] Optionally, the cross-cloud access device further comprises:
[0041] The first terminal node reservation module is configured to reserve the first terminal node and the first node IP when the first user area needs to access the first forward service and / or the second forward service.
[0042] The first terminal node cancellation module is configured to cancel the first terminal node and release the first node IP when the first user area does not need to access the first forward service and the second forward service.
[0043] The first terminal node allocation module is configured to allocate the first node IP to a terminal node created by another user area accessing the preset area after the first node IP is released.
[0044] Optionally, the cross-cloud access device further comprises:
[0045] The first user area access module is configured to access the first forward service by each client of the first user area based on the first node IP and the first user area port corresponding to the first preset area port.
[0046] The second user area access module is configured to access the first forward service by each client of the second user area based on the second node IP and the first user area port corresponding to the first preset area port.
[0047] Optionally, the cross-cloud access device further comprises:
[0048] The transit node creation module is configured to create a transit node in the preset area, and the transit node has a transit IP address.
[0049] The first reverse service request sending module is configured to initiate a first reverse service request to the first terminal node based on the transit IP address and a third preset area port.
[0050] The first reverse service providing module is configured to forward the first reverse service request to a first host having a third user area port in the first user area based on the third user area port corresponding to the third preset area port, and provide the first host with the first reverse service through the preset area.
[0051] The second reverse service request sending module is configured to initiate a second reverse service request to the first terminal node based on the transit IP address and a fourth preset area port.
[0052] The second reverse service providing module is configured to forward the second reverse service request to a second host having a fourth user area port in the first user area based on the fourth user area port corresponding to the fourth preset area port, and provide the second host with the second reverse service through the preset area.
[0053] Optionally, the cross-cloud access device further comprises:
[0054] The third reverse service request sending module is configured to initiate a third reverse service request to the second terminal node based on the transit IP address and a fifth preset area port.
[0055] The third reverse service providing module is configured to forward the third reverse service request to a third host having the third user area port in the second user area based on the third user area port corresponding to the fifth preset area port, and provide the third host with the third reverse service through the preset area.
[0056] The fourth reverse service request sending module is configured to initiate a fourth reverse service request to the second terminal node based on the transit IP address and a sixth preset area port.
[0057] The fourth reverse service providing module is configured to forward the fourth reverse service request to a fourth host having the fourth user area port in the second user area based on the fourth user area port corresponding to the sixth preset area port, and provide the fourth host with the fourth reverse service through the preset area.
[0058] Optionally, the cross-cloud access device further comprises:
[0059] a configuration command receiving module configured to receive a configuration command in the preset area;
[0060] a preset area port configuration module configured to execute the configuration command in the preset area to configure each preset area port of the preset area for forward service or reverse service.
[0061] The third aspect of the embodiments of the present application provides an electronic device, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program is executed by the processor to implement the cross-cloud access method according to the first aspect of the embodiments of the present application.
[0062] The fourth aspect of the embodiments of the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the cross-cloud access method according to the first aspect of the embodiments of the present application.
[0063] The fifth aspect of the embodiments of the present application provides a computer program product, which comprises a computer program, and the computer program is executed by a processor to implement the cross-cloud access method according to the first aspect of the embodiments of the present application.
[0064] According to the cross-cloud access method, the first forward service is deployed in the preset area for users to use, and the first preset area port corresponding to the first forward service is provided to the user area, and the terminal node for establishing access with the preset area is created in the user area, and each terminal node of the user area has a unique node IP. In this way, the first user area can access the first forward service based on the exclusive first node IP and the first user area port corresponding to the first user area port. Similarly, the second user area can also access the first forward service based on the exclusive second node IP.
[0065] In the present application, the problem that different users use the same IP address to access the public preset area in the same cloud platform in the related art is avoided, which leads to the failure to identify the source of the specific access user. A method of establishing exclusive terminal nodes for each user area and each terminal node having a unique node IP in the cloud platform is proposed, which distinguishes different user areas and avoids the use of the same IP by multiple user areas, thereby realizing the reasonable and effective access of the user to the services provided by the preset area, ensuring that the virtual private cloud of the user area and the service node of the preset area are in a one-to-one relationship, ensuring that the user area can conveniently and reliably access the preset area, improving the user experience, and avoiding the use problems caused by IP conflicts. BRIEF DESCRIPTION OF DRAWINGS
[0066] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments of the present application will be briefly introduced. Obviously, the drawings in the following description only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained without creative labor under the premise of these drawings.
[0067] Figure 1 is a flow chart of a cross-cloud access method according to an embodiment of the present application;
[0068] Figure 2 is a forward service schematic diagram according to an embodiment of the present application;
[0069] Figure 3 is a reverse service schematic diagram according to an embodiment of the present application;
[0070] Figure 4 is a service usage schematic diagram according to an embodiment of the present application;
[0071] Figure 5 is a structural block diagram of a cross-cloud access device according to an embodiment of the present application;
[0072] Figure 6 is a schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0073] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of the present application.
[0074] In the drawings, sometimes the size of the constituent elements, the thickness of the layers or the regions are exaggerated for the sake of clarity, and therefore, any one of the implementations of the present disclosure is not necessarily limited to the size shown in the drawings, and the shapes and sizes of the components in the drawings do not reflect the actual proportions. In addition, the drawings schematically show ideal examples, and any one of the implementations of the present disclosure is not limited to the shapes or values shown in the drawings.
[0075] Please refer to Figure 1 , Figure 1 is a flow chart of a cross-cloud access method according to an embodiment of the present application. As shown in Figure 1 , it can include steps S101 to S103:
[0076] Step S101: deploying a first forward service in a preset area and providing a first preset area port of the preset area to a first user area and a second user area;
[0077] Step S102: creating a first terminal node in the first user area and a second terminal node in the second user area, the first terminal node having a first node IP unique in node IPs corresponding to each user area accessing the preset area, and the second terminal node having a second node IP unique in node IPs corresponding to each user area accessing the preset area;
[0078] Step S103: the first user area accesses the first forward service based on the first node IP and a first user area port corresponding to the first preset area port, and the second user area accesses the first forward service based on the second node IP and the first user area port.
[0079] In the related art, the same cloud platform often contains different VPCs to which different users belong, i.e., the virtual private cloud mentioned in the background art. Since different VPCs are used by different users respectively, the users cannot communicate with each other, and therefore, when implementing some functions, different VPCs of different users select to use the same IP address, i.e., different virtual machines with the same IP address appear in the same cloud platform. This situation causes that when the users use the cross-VPC access service provided by the cloud platform, the same IP cannot be normally accessed, resulting in access failure, which greatly affects the user experience.
[0080] Therefore, based on the problems existing in the related art, the present application proposes a cross-cloud access method. Through the method proposed in the present application, in the same cloud platform, the node IP used by each user area when using the cross-cloud access service is exclusive to each user area, avoiding the same IP due to the inability to intercommunicate between each user area. Specifically, in the embodiments of the present application, first, in the cloud platform, not only is there a user area for users to use, but also a preset area that provides various services. The user accesses the preset area and uses the various forward services provided by the preset area. In order to establish access between the user area and the preset area, various different forward services are deployed in the preset area. After the first forward service is deployed in the preset area, the first preset area port of the first forward service needs to be provided to the user area that may need to use the first forward service, i.e., the first user area and the second user area mentioned above. Then, in order to achieve cross-VPC access to the preset area, each user area also needs to establish a dedicated service site in the user area that communicates with the preset area, i.e., a first terminal node is created in the first user area and a second terminal node is created in the second user area. In order to prevent the same IP problem mentioned in the related art from occurring between different user areas, the terminal nodes when establishing cross-VPC access need to be different between each user area, so the first terminal node of the first user area has a unique first node IP, and the second terminal node of the second user area has a unique second node IP. In this way, the terminal nodes of different user areas are distinguished. Finally, each user area accesses the preset area according to its own node IP and the port of the required forward service to achieve the purpose of using the forward service.
[0081] In a specific embodiment, as shown in Figure 2 Figure 2 is an embodiment of the present application, wherein the user zone is created in 192.16.0.0 / 16, and the preset zone is created in 172.16.0.0 / 12. Taking the service with the preset zone port 80 provided by the preset zone as an example, the service is created based on the TCP (Transmission Control Protocol) protocol in the preset zone, the address of the server in the preset zone providing the forward service is 172.16.0.23, the service is first deployed in the preset zone, and the port is configured and provided to each user zone. When the user zone needs to use the forward service provided by the preset zone, a dedicated terminal node for cross-VPC access is first established in the user zone. The first terminal node is established in the first user zone, and the first node IP corresponding to the first terminal node is 192.16.1.17. This first node IP is determined to be exclusive to the first user zone in the cloud platform, and other user zones cannot select the same IP address as the first node IP when selecting an IP address. Similarly, the second terminal node exclusive to the second user zone is established in the second user zone, and the second node IP corresponding to the second terminal node is 192.16.0.14. After the terminal node is established, the access channel between the user zone and the preset zone can be connected. Specifically, when the first user zone needs to use the first forward service provided by the preset zone, according to the first preset zone port of the first forward service provided by the preset zone and the mapping rule between the ports, the first user zone port corresponding thereto can be determined, that is, 8081 corresponding to 80 in the figure. Therefore, by combining the unique first node IP with the first user zone port, the unique address of the first user zone using the first forward service is determined, that is, 192.16.1.17:8081 in the figure. The first user zone accesses the preset zone through this address, and the preset zone can determine that the access is from the first user zone and that the purpose of the access is to use the first forward service. Similarly, for the second user zone, the unique address established when using the first forward service is 192.16.0.14:8081. In this way, different user zones are distinguished, and the situation that different user zones use the same IP address is avoided. Since each user zone and the terminal node therein are one-to-one correspondence, and each terminal node has a unique node IP, the uniqueness of the IP in each access link can be ensured, and the problems in the related art are avoided.
[0082] Step S101: deploying the first forward service in the preset zone and providing the first preset zone port of the preset zone to the first user zone and the second user zone.
[0083] In the embodiments of the present application, before the preset area provides forward services to the user area, the forward services need to be deployed in the preset area first. Since the possible use environment of various cloud products is different, the deployed forward services need to be assigned with their exclusive preset area ports, and there are corresponding mapping rules in the cloud platform, i.e., the preset area ports correspond to their exclusive user area ports. Therefore, after the first forward service is deployed in the preset area, the first preset area port needs to be provided to each user area that may need to use the first forward service, and the corresponding mapping rules also need to be informed to each user area.
[0084] As shown in Figure 2 Taking two different forward services as an example, as shown in
[0085] Step S102: creating a first terminal node in the first user area and a second terminal node in the second user area, the first terminal node having a first node IP that is unique in the node IPs corresponding to each user area accessing the preset area, and the second terminal node having a second node IP that is unique in the node IPs corresponding to each user area accessing the preset area.
[0086] In the embodiments of the present application, after the services available for the user area are deployed in the preset area, if the user area after creation wants to access the preset area to use the forward services, it also needs to build a "bridge" to communicate with the preset area, i.e., to establish a terminal node in the user area that is exclusive for interacting with the preset area. A first terminal node is established in the first user area, and a second terminal node is established in the second user area. As described above, in order to distinguish the access of different user areas to the preset area, the first terminal node and the second terminal node need different IP addresses, and this IP address is unique in the cloud platform, so that the IP address selected for the node IP of the user area that has been created cannot be used by other user areas in the cloud platform, so as to avoid the problem of using the same IP by different users when communicating across VPCs, which may cause access failure of the repeated party.
[0087] As shown in Figure 2 Taking the first user area and the second user area as an example, a first terminal node is established in the first user area, and the first node IP of the first terminal node is 192.16.1.17. Similarly, the second node IP of the second terminal node in the second user area is 192.16.0.14.
[0088] Step S103: the first user area accesses the first forward service based on the first node IP and a first user area port corresponding to the first preset area port, and the second user area accesses the first forward service based on the second node IP and the first user area port.
[0089] In the embodiments of the present application, after the first terminal node with a unique first node IP and the second terminal node with a unique second node IP are established in the user area, the user area needs to access the forward service provided by the preset area, and needs to correspondingly obtain the first user area port used by the user area according to the mapping rule according to the first preset area port of the first forward service provided by the preset area, and establish an access channel for the first user area to access the first forward service of the preset area according to the first node IP and the first user area port. Similarly, the second user area establishes an access channel for the second user area to access the first forward service of the preset area according to the second node IP and the first user area port.
[0090] In combination with the above embodiments, in an implementation, the present application further provides a cross-cloud access method, specifically including the following contents:
[0091] First, a second forward service is deployed in the preset area, and a second preset area port of the preset area is provided to the first user area and the second user area.
[0092] In the embodiments of the present application, there are multiple selectable forward services in the preset area. By deploying the forward service in the preset area, the preset area port of the forward service is established, and the preset area port is provided to each user area. The user area can determine the address for accessing the forward service according to the preset area port of the forward service and the mapping rule. Specifically, in the present application, a second forward service is deployed in the preset area, and a second preset area port of the second forward service is provided to the first user area and the second user area.
[0093] As shown in FIG. 1, Figure 2 In the preset area, not only the first forward service with the preset area port 80 as described above, but also the second forward service with the preset area port 3306 is deployed. After the second forward service is deployed in the preset area, the preset area port 3306 is provided to the first user area and the second user area, so that the first user area and the second user area can access the second forward service of the preset area.
[0094] Then, the first user area accesses the second forward service based on the first node IP and a second user area port corresponding to the second preset area port, and the second user area accesses the second forward service based on the second node IP and the second user area port.
[0095] In the embodiment of the present application, the first terminal node and the second terminal node respectively associated with the first user zone and the second user zone are created in step S102, and the first terminal node has a unique first node IP and the second terminal node has a unique second node IP. Therefore, when the first user zone wants to use the second forward service after establishing a connection with the preset zone through the first terminal node, it needs to determine the second user zone port corresponding to the second preset zone port of the second forward service through the mapping rule, and then create an access address according to the first node IP and the second user zone port to realize the access of the first user zone to the preset zone and use the second forward service. In the same way, after determining the second user zone port, the second user zone can create an access address of the second user zone to the preset zone through the second node IP and the second user zone port to realize the access of the second user zone to the preset zone and use the second forward service.
[0096] As shown in Figure 2 , when the first user zone and the second user zone want to access the second forward service in the preset zone, they first need to determine the second user zone port 3006 of the second forward service according to the second preset zone port 3306 of the second forward service provided by the preset zone and the mapping rule, and the first user zone determines the access address of the first user zone using the second forward service, i.e. 192.16.1.17:3006, according to the first node IP of the first terminal node: 192.16.1.17; in the same way, the second user zone determines the access address of the second user zone using the second forward service, i.e. 192.16.0.14:3006, according to the second node IP of the second terminal node: 192.16.0.14. In this way, the preset zone can determine which user zone the cross-VPC access comes from and which forward service the user zone wants to use according to the combination of node IP and port, realizing one-to-one correspondence when each user zone uses each service, and avoiding the problem of being unable to determine the user or the service item with the same IP.
[0097] In combination with the above embodiment, in an implementation, the present application further provides a cross-cloud access method, specifically including the following contents:
[0098] First, when the first user zone needs to access the first forward service and / or the second forward service, the first terminal node and the first node IP are reserved.
[0099] In the embodiments of the present application, since each user area creates a terminal node for cross-server access, and each terminal node has a unique node IP in the cloud platform, the problem of IP duplication when each user area performs cross-VPC access is solved. Therefore, in order to ensure that each user area can always maintain a unique node IP when using services in the cloud platform, when a user area is created in the cloud platform, as long as the user area needs to use any service provided by the preset area, a terminal node corresponding to the user area and a unique node IP are reserved for the user area, so as to ensure that as long as each user area exists in the cloud platform, when the user area needs to use cross-VPC services, there will be no IP conflict with other user areas.
[0100] Then, when the first user area does not need to access the first forward service and the second forward service, the first terminal node is cancelled and the first node IP is released.
[0101] In the embodiments of the present application, as described above, the terminal node and the node IP are reserved for each user area that needs to use the services of the preset area. Only when the user of the user area determines that the user no longer needs to use all the services provided by the preset area, the user area is logged out of the cloud platform, and it is determined that the user will no longer exist and there is no possibility of IP conflict with other user areas. Therefore, the terminal node corresponding to the user area that no longer needs to use the services of the preset area can be cancelled, and the node IP corresponding to the cancelled terminal node can also be released and used by other user areas in the platform.
[0102] Finally, the first node IP is allocated to a terminal node created by another user area that needs to access the preset area after being released.
[0103] In the embodiments of the present application, after the node IP corresponding to the cancelled terminal node is released, it is no longer bound to the original user area, and therefore can be used to allocate to other user areas that need to access the preset area. In this way, the uniqueness of the node IP of each user area is ensured, and the node IP corresponding to the user area after being logged out will not be idle due to logging out and will be provided to other new user areas. In this way, in combination with the above-mentioned establishment of a terminal node for cross-VPC access with the preset area in the user area, the determination of a unique node IP corresponding to the user area, and the cancellation of the terminal node and the release of the node IP after the user area is logged out, cross-VPC access of the user is realized. The one-to-one correspondence between the user area and the node IP ensures the uniqueness of the IP in each access link, and the node IP is released when the access is no longer needed, avoiding the failure of the link link due to IP duplication next time, and ensuring the safety and availability of the service.
[0104] In combination with the above embodiments, in an implementation, the application further provides a cross-cloud access method, the first user area accesses the first forward service based on the first node IP and the first user area port corresponding to the first preset area port, and the second user area accesses the first forward service based on the second node IP and the first user area port, which specifically includes the following contents:
[0105] Each client in the first user area accesses the first forward service based on the first node IP and the first user area port corresponding to the first preset area port;
[0106] Each client in the second user area accesses the first forward service based on the second node IP and the first user area port corresponding to the first preset area port.
[0107] In the embodiments of the application, the user area and the preset area exist on the cloud platform, the user actually accesses the corresponding user area through the device operated by the user, and the terminal node of the user area is connected with the preset area to use the services provided by the preset area. Each user area can contain multiple clients, each client can be accessed by the user in the user area to use the services provided by the user area and use the forward services provided by the preset area across the VPC. Each client in the first user area can access the first forward service based on the first node IP and the first user area port corresponding to the first preset area port. In this way, it is also ensured that the IP addresses of the clients in each user area will not conflict with the clients of other user areas.
[0108] In combination with the above embodiments, in an implementation, the application further provides a cross-cloud access method, which specifically includes the following contents:
[0109] First, a transfer node is created in the preset area, and the transfer node has a transfer IP address.
[0110] In the embodiments of the application, the user area not only can access the preset area to use various forward services provided by the preset area, but also can be accessed by the preset area through the cross-cloud access method proposed in the application to provide various reverse services to the user area. Through the reverse services, the preset area can provide the user area with services such as cluster laying and component installation. In the application, in order to enable the preset area to provide the reverse services to the user area, a transfer node that establishes a connection with the user area needs to be first created in the preset area. Similar to the terminal node of the user area, the transfer node has a unique transfer IP address.
[0111] As shown in Figure 3 , the preset area can access the user area through the transfer node to provide the user area with various reverse services. Figure 3is an embodiment of the application, in order to provide reverse service to the user area, a unique transit node is created in the preset area, the transit node has a unique transit IP address, that is, 172.16.0.49, through which the user area can determine that the preset area is applying for providing reverse service.
[0112] Then, the transit node initiates a first reverse service request to the first terminal node based on the transit IP address and a third preset area port.
[0113] In the embodiment of the application, when the preset area provides reverse service to the user area, it makes access request to the user area. Since the user area belongs to the private space of the user, the preset area can only provide reverse service to the user area after obtaining the permission of the user area. Similarly, since the preset area is deployed with various reverse services, the reverse services need to be distinguished according to the ports of the reverse services, therefore, the transit node of the preset area determines the address of the reverse service based on the transit IP address and the preset area port of the reverse service to be provided, and initiates a reverse service request to the user area.
[0114] As shown in Figure 3 The preset area wants to provide reverse service with a user area port of 22 to the first user area, needs to determine the access address of the first reverse service provided to the first user area, that is, 172.16.0.49:16000, according to the transit IP address 172.16.0.49 and the corresponding third preset area port 16000, and initiates a request for providing the first reverse service to the first user area.
[0115] Then, the first user area forwards the first reverse service request to a first host in the first user area with the third user area port based on the third user area port corresponding to the third preset area port, and provides the first host with the first reverse service through the preset area.
[0116] In the embodiment of the application, the reverse service provided by the preset area to the user area needs to be implemented on the host used by the user in the user area. After the terminal node of the user area receives the reverse service request initiated by the preset area and passes it, the terminal node forwards the reverse service to the corresponding host requesting it, and the preset area provides the reverse service approved by the user area to the host.
[0117] Similarly, for other reverse services, the transit node initiates a second reverse service request to the first terminal node based on the transit IP address and a fourth preset area port.
[0118] The first user area forwards the second reverse service request to a second host having the fourth user area port in the first user area based on the fourth user area port corresponding to the fourth preset area port, and provides the second reverse service to the second host through the preset area.
[0119] In the embodiments of the present application, more than one reverse service is deployed in the preset area, but different reverse services are all contacted with the user area through the transit node when provided to the user area. When the preset area provides the second reverse service request to the first user area, the first preset area port corresponding to the second reverse service needs to be acquired first, and then the second reverse service request can be initiated to the first user area according to the fourth preset area port and the transit IP address. Correspondingly, after the terminal node in the first user area receives the reverse service request initiated by the preset area, the second reverse service request can be forwarded to the target of the reverse service, i.e. the second host, after the consent of the user area, and the preset area can provide the second reverse service to the second host in the first user area.
[0120] As shown in Figure 3 The preset area wants to provide the second reverse service with the user area port of 30000 to the first user area, first determines the fourth preset area port of the second reverse service provided to the first user area as 30001 according to the mapping rule, and then determines the access address of the second reverse service provided to the first user area as 172.16.0.49:30001 according to the transit IP address 172.16.0.49 of the transit node, so as to initiate the second reverse service request to the first user area.
[0121] In combination with the above embodiments, in an implementation manner, the present application further provides a cross-cloud access method, specifically including the following contents:
[0122] Firstly, the transit node initiates a third reverse service request to the second terminal node based on the transit IP address and the fifth preset area port;
[0123] The second user area forwards the third reverse service request to a third host having the third user area port in the second user area based on the third user area port corresponding to the fifth preset area port, and provides the third reverse service to the third host through the preset area.
[0124] In the embodiment of the present application, as described above, when the preset area provides reverse services to the user area, the preset area needs to determine the preset area port of the reverse service first, and then provides the reverse service to the user area after the user area agrees. When the preset area wants to provide a third reverse service to a second user area, the preset area needs to determine the access address based on the transit IP address and the fifth preset area port corresponding to the third reverse service, and then initiates a third reverse service request to the second terminal node of the second user area. After the second user area agrees that the preset area provides the third reverse service, the request is forwarded to the target host, i.e., the third host in the second user area. Finally, the preset area provides the third reverse service to the third host in the second user area.
[0125] As shown in Figure 3 the third user area port corresponding to the third reverse service is also 22, but since the third reverse service is provided to the second user area, the fifth preset area port corresponding to the third reverse service is 16001. In combination with the transit IP address 172.16.0.49 of the transit node, the access address of the third reverse service provided by the preset area to the second user area is determined to be 172.16.0.49:16001.
[0126] Similarly, for other reverse services, the transit node initiates a fourth reverse service request to the second terminal node based on the transit IP address and the sixth preset area port;
[0127] The second user area forwards the fourth reverse service request to the fourth host in the second user area having the fourth user area port based on the fourth user area port corresponding to the sixth preset area port, and provides the fourth reverse service to the fourth host through the preset area.
[0128] In the embodiment of the present application, when the preset area provides the fourth reverse service to the second user area, the preset area needs to determine the transit IP address and the sixth preset area port first, and then initiates a fourth reverse service request to the second terminal node of the second user area. After the second user area agrees, the second terminal node forwards the fourth reverse service to the fourth host in the second user area having the fourth user area port, so as to realize that the preset area provides the fourth reverse service to the fourth host in the second user area.
[0129] As shown in Figure 3 the fourth user area port corresponding to the fourth reverse service is also 22, but since the fourth reverse service is provided to the second user area, the sixth preset area port corresponding to the fourth reverse service is 30002. In combination with the transit IP address 172.16.0.49 of the transit node, the access address of the fourth reverse service provided by the preset area to the second user area is determined to be 172.16.0.49:30002.
[0130] In combination with the above embodiments, in an implementation, the application further provides a cross-cloud access method, specifically comprising the following contents:
[0131] Firstly, the preset area receives a configuration command;
[0132] Then, the preset area executes the configuration command to configure each preset area port of the preset area for forward service or reverse service.
[0133] In the embodiments of the application, a plurality of forward services and a plurality of reverse services are deployed in the preset area. In order to meet the use needs of users, the preset area needs to configure each forward service or reverse service of different sources deployed in the preset area under the command of configuring forward service or reverse service, and configure the service port, so as to determine the correspondence between the preset area port and the user area port, so that no matter whether the user area uses the forward service of the preset area by accessing the preset area or the user area agrees to the access of the preset area and accepts the reverse service provided by the preset area, the explicit port correspondence can be obtained to determine whether the service is the service that the user wants to operate or the service that the preset area wants to provide.
[0134] As shown in Figure 4 , Figure 4 is a service use schematic diagram provided by an embodiment of the application. The first forward service is deployed in the preset area, and the first user area and the second user area establish the first terminal node and the second terminal node respectively, and both can use the first forward service by accessing the preset area. In the preset area, the first reverse service and the third reverse service are also deployed. However, since the reverse service is provided by the preset area to a certain user area for service by using the cross-service access method provided in the application, the first reverse service and the third reverse service with the same user area port 22 need to be respectively deployed as the first reverse service and the third reverse service with preset area port configurations of 16000 and 16001 in the preset area.
[0135] Based on the same design concept, an embodiment of the application provides a cross-cloud access device. Referring to Figure 5 , Figure 5 is a structural block diagram of the cross-cloud access device provided by an embodiment of the application. As shown in Figure 5 , the device comprises:
[0136] a first forward service deployment module, configured to deploy a first forward service in a preset area and provide a first preset area port of the preset area to a first user area and a second user area;
[0137] a terminal node creating module, configured to create a first terminal node in the first user area and a second terminal node in the second user area, the first terminal node having a first node IP unique in node IPs corresponding to each user area accessing the preset area, and the second terminal node having a second node IP unique in node IPs corresponding to each user area accessing the preset area;
[0138] a first forward service accessing module, configured to enable the first user area to access the first forward service based on the first node IP and a first user area port corresponding to the first preset area port, and enable the second user area to access the first forward service based on the second node IP and the first user area port.
[0139] Optionally, the cross-cloud access apparatus further comprises:
[0140] a second forward service deploying module, configured to deploy a second forward service in the preset area and provide a second preset area port of the preset area to the first user area and the second user area;
[0141] a second forward service accessing module, configured to enable the first user area to access the second forward service based on the first node IP and a second user area port corresponding to the second preset area port, and enable the second user area to access the second forward service based on the second node IP and the second user area port.
[0142] Optionally, the cross-cloud access apparatus further comprises:
[0143] a first terminal node reserving module, configured to reserve the first terminal node and the first node IP when the first user area needs to access the first forward service and / or the second forward service;
[0144] a first terminal node canceling module, configured to cancel the first terminal node and release the first node IP when the first user area does not need to access the first forward service and the second forward service;
[0145] a first terminal node allocating module, configured to allocate the first node IP to a terminal node created by another user area accessing the preset area after the first node IP is released.
[0146] Optionally, the cross-cloud access apparatus further comprises:
[0147] a first user area accessing module, configured to enable each client of the first user area to access the first forward service based on the first node IP and the first user area port corresponding to the first preset area port;
[0148] The second user area access module is configured to enable each client in the second user area to access the first forward service based on the second node IP and the first preset area port corresponding to the first user area port.
[0149] Optionally, the cross-cloud access device further comprises:
[0150] The transit node creation module is configured to create a transit node in the preset area, and the transit node has a transit IP address.
[0151] The first reverse service request sending module is configured to enable the transit node to initiate a first reverse service request to the first terminal node based on the transit IP address and a third preset area port.
[0152] The first reverse service providing module is configured to enable the first user area to forward the first reverse service request to a first host in the first user area having a third user area port based on the third preset area port corresponding to the third user area port, and provide the first host with the first reverse service through the preset area.
[0153] The second reverse service request sending module is configured to enable the transit node to initiate a second reverse service request to the first terminal node based on the transit IP address and a fourth preset area port.
[0154] The second reverse service providing module is configured to enable the first user area to forward the second reverse service request to a second host in the first user area having a fourth user area port based on the fourth preset area port corresponding to the fourth user area port, and provide the second host with the second reverse service through the preset area.
[0155] Optionally, the cross-cloud access device further comprises:
[0156] The third reverse service request sending module is configured to enable the transit node to initiate a third reverse service request to the second terminal node based on the transit IP address and a fifth preset area port.
[0157] The third reverse service providing module is configured to enable the second user area to forward the third reverse service request to a third host in the second user area having the third user area port based on the fifth preset area port corresponding to the third user area port, and provide the third host with the third reverse service through the preset area.
[0158] The fourth reverse service request sending module is configured to enable the transit node to initiate a fourth reverse service request to the second terminal node based on the transit IP address and a sixth preset area port.
[0159] The fourth reverse service providing module is configured to forward, based on the fourth user area port corresponding to the sixth preset area port, the fourth reverse service request to a fourth host having the fourth user area port in the second user area, and provide the fourth host with the fourth reverse service through the preset area.
[0160] Optionally, the cross-cloud access apparatus further comprises:
[0161] The configuration command receiving module is configured to receive, by the preset area, a configuration command.
[0162] The preset area port configuring module is configured to execute, by the preset area, the configuration command to configure each preset area port of the preset area for forward service or reverse service.
[0163] Based on the same design concept, another embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps in the cross-cloud access method according to any one of the above embodiments of the present application.
[0164] Based on the same design concept, another embodiment of the present application provides a computer program product, which comprises computer programs / instructions, and the computer programs / instructions are executed by a processor to implement the steps in the cross-cloud access method according to any one of the above embodiments of the present application.
[0165] Based on the same design concept, another embodiment of the present application provides an electronic device, as shown in Figure 6 Figure 6 is a schematic diagram of an electronic device according to an embodiment of the present application. The electronic device comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor is executed to implement the steps in the cross-cloud access method according to any one of the above embodiments of the present application.
[0166] For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the related parts are described in the part of the method embodiment.
[0167] Each embodiment in the specification is described in a progressive manner, and each embodiment focuses on the difference from other embodiments. The same and similar parts between the embodiments can be referred to each other.
[0168] Those skilled in the art will appreciate that embodiments of the application can be readily used as software, hardware, or a combination of software and hardware. In one embodiment, the application can be implemented in software and / or firmware. In particular, the application forms part of the software and / or firmware of a terminal device. The software and / or firmware can be executed on a processor-based platform.
[0169] Embodiments of the application are described herein with reference to the Figure 1 one or more processes and / or functions specified in flowchart Figure 1 means for performing the function specified by the flow or
[0170] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing Figure 1 one or more processes and / or functions specified in flowchart Figure 1 means for performing the function specified by the flow or
[0171] These computer program instructions can also be loaded onto a computer or other programmable data processing devices, causing a series of operational steps to be performed on the computer or other programmable devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable devices provide steps for implementing the functions specified in the flowchart Figure 1 one or more processes and / or functions specified in flowchart Figure 1 means for performing the function specified by the flow or
[0172] While the preferred embodiments of the application have been described, additional variations and modifications can be made to the embodiments by those skilled in the art once they learn of the basic inventive concepts. Therefore, the appended claims are intended to cover all such modifications and variations as fall within the scope of the application.
[0173] Finally, it is to be understood that the phraseology or terminology such as "first" and "second" etc. used herein is merely intended to differentiate one entity or operation from another entity or operation, without necessarily requiring or implying any actual such relationship or order between such entities or operations. Moreover, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises... a" does not, without more constraints, exclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.
[0174] The above provides a cross-cloud access method, device, equipment and medium, and the principle and implementation manner of the application are described by applying specific examples. The above example is only used to help understand the method and core idea of the application. Meanwhile, for those skilled in the art, the specific implementation manner and application range can be changed according to the idea of the application. In conclusion, the content of the specification should not be understood as a limitation of the application.
Claims
1. A cross-cloud access method, characterized by, Comprising: deploying a first forward service in a preset area and providing a first preset area port of the preset area to a first user area and a second user area; creating a first terminal node in the first user area and a second terminal node in the second user area, the first terminal node having a first node IP unique in node IPs corresponding to each user area accessing the preset area, and the second terminal node having a second node IP unique in node IPs corresponding to each user area accessing the preset area; the first user area accessing the first forward service based on the first node IP and a first user area port corresponding to the first preset area port, and the second user area accessing the first forward service based on the second node IP and the first user area port.
2. The cross-cloud access method of claim 1, wherein, Further comprising: deploying a second forward service in the preset area and providing a second preset area port of the preset area to the first user area and the second user area; the first user area accessing the second forward service based on the first node IP and a second user area port corresponding to the second preset area port, and the second user area accessing the second forward service based on the second node IP and the second user area port.
3. The cross-cloud access method of claim 2, wherein, Further comprising: when the first user area needs to access the first forward service and / or the second forward service, retaining the first terminal node and the first node IP; when the first user area does not need to access the first forward service and the second forward service, canceling the first terminal node and releasing the first node IP; the first node IP being allocated to a terminal node created by another user area accessing the preset area after being released.
4. The cross-cloud access method of claim 1, wherein, the first user area accessing the first forward service based on the first node IP and the first user area port corresponding to the first preset area port, and the second user area accessing the first forward service based on the second node IP and the first user area port, comprising: each client of the first user area accessing the first forward service based on the first node IP and the first user area port corresponding to the first preset area port; each client of the second user area accessing the first forward service based on the second node IP and the first user area port corresponding to the first preset area port.
5. The cross-cloud access method of claim 1, wherein, Further comprising: creating a transit node in the preset area, the transit node having a transit IP address; the transit node initiating a first reverse service request to the first terminal node based on the transit IP address and a third preset area port; the first user area forwarding the first reverse service request to a first host in the first user area having a third user area port based on the third user area port corresponding to the third preset area port, and providing the first host with the first reverse service through the preset area; the transit node initiating a second reverse service request to the first terminal node based on the transit IP address and a fourth preset area port; the first user area forwarding the second reverse service request to the first host in the first user area having the fourth user area port based on the fourth user area port corresponding to the fourth preset area port, and providing the first host with the second reverse service through the preset area. The first user area forwards the second reverse service request to a second host having the fourth user area port in the first user area based on a fourth user area port corresponding to the fourth preset area port, and provides the second reverse service to the second host through the preset area.
6. The cross-cloud access method of claim 5, wherein, Further comprising: The transit node initiates a third reverse service request to the second terminal node based on the transit IP address and a fifth preset area port; The second user area forwards the third reverse service request to a third host having the third user area port in the second user area based on the third user area port corresponding to the fifth preset area port, and provides the third reverse service to the third host through the preset area; The transit node initiates a fourth reverse service request to the second terminal node based on the transit IP address and a sixth preset area port; The second user area forwards the fourth reverse service request to a fourth host having the fourth user area port in the second user area based on the fourth user area port corresponding to the sixth preset area port, and provides the fourth reverse service to the fourth host through the preset area.
7. The cross-cloud access method of any of claims 1-6, wherein, Further comprising: The preset area receives a configuration command; The preset area executes the configuration command to configure each preset area port of the preset area for forward service or reverse service.
8. A cross-cloud access apparatus, comprising: The device comprises: A first forward service deployment module for deploying a first forward service in a preset area and providing a first preset area port of the preset area to a first user area and a second user area; A terminal node creation module for creating a first terminal node in the first user area and a second terminal node in the second user area, the first terminal node having a first node IP unique in node IPs corresponding to each user area accessing the preset area, and the second terminal node having a second node IP unique in node IPs corresponding to each user area accessing the preset area; A first forward service access module for the first user area accessing the first forward service based on a first user area port corresponding to the first preset area port and the first node IP, and the second user area accessing the first forward service based on the first user area port and the second node IP.
9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The computer program is executed by the processor to implement the cross-cloud access method of any one of claims 1 to 7.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the cross-cloud access method of any one of claims 1 to 7.
Citation Information
Patent Citations
Public service virtual machine access method and device based on private cloud
CN108259642A
Cross-network service access method, device and system and storage medium
CN111431956A