Communication Method, Device, Storage Medium and System
By installing self-start applications in the cloud desktop virtual machine to store domain names and IP addresses, the unreliable access problem caused by VPN forced DNS is solved, and stable network access of cloud desktop is achieved.
Patent Information
- Application Number
- CN202310413816.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-11
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2043-04-11
AI Technical Summary
In a cloud desktop system, when the VPN server enables the DNS forced issuance function, the cloud desktop cannot access the domain name that the domain name server cannot resolve, resulting in unreliable network access.
Install a target application that is started by starting up in the virtual machine where the cloud desktop is located, obtain and store the target domain name and IP address to be accessed to the storage location of the virtual machine, avoid sending requests directly to the domain name server that may not be resolved, and directly obtaining the IP address from the storage location for access.
Improves the network access reliability of cloud desktop, ensuring that cloud desktop can still access the required resources normally even if the VPN server forces the domain name to be issued and cannot resolve the domain name.
Smart Images

Figure CN116366594B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Internet technologies, and in particular, to a communication method, device, storage medium, and system. Background Art
[0002] A cloud desktop, also known as a virtual desktop, is a convenient and secure virtual desktop service on the cloud provided by cloud computing providers. It supports the rapid and convenient creation, deployment, unified management, and operation and maintenance of desktop environments, and has wide applications in scenarios such as enterprise office. For an enterprise user, only by applying to a cloud computing provider, the cloud computing provider can build a corresponding number of cloud desktops (different cloud desktops can be built in different virtual machines on the cloud) for the employees in the enterprise user. Employees can install a corresponding cloud desktop client on a terminal device to remotely access the cloud desktop through the cloud desktop client.
[0003] A Virtual Private Network (VPN), which refers to a private network established on a public network and can perform encrypted communication, has wide applications in enterprise networks. A VPN includes a VPN server and a VPN client. For information security considerations, the above enterprise user can apply to the VPN server to build its own VPN, and the above cloud desktop can be deployed in the VPN. Employees connect to the VPN server by logging in to the local VPN client.
[0004] Assume that the VPN server enables the Domain Name System (DNS) forced distribution function. Briefly speaking, the DNS forced distribution function is to forcibly replace the IP address of the domain name server configured on the network card of the virtual machine where the cloud desktop is located with the IP address of a certain domain name server specified by the VPN server, so that the cloud desktop in the virtual machine can only use this domain name server when performing domain name resolution. If this domain name server cannot complete the resolution of the domain name required for the cloud desktop to access, then the cloud desktop will not be able to perform normal network access. Summary of the Invention
[0005] Embodiments of the present invention provide a communication method, device, storage medium, and system to improve the network access reliability of cloud services such as cloud desktops.
[0006] In a first aspect, an embodiment of the present invention provides a communication method, which is applied to a target application program located in the same virtual machine as a target cloud service. The method includes:
[0007] Obtain a target domain name to be accessed corresponding to the target cloud service and an IP address corresponding to the target domain name to be accessed;
[0008] Store the target domain name to be accessed and the IP address corresponding to the target domain name to be accessed in the target storage location of the virtual machine, so that when the target cloud service needs to resolve the target domain name to be accessed, it queries the target storage location to obtain the IP address corresponding to the target domain name to be accessed, and performs corresponding access according to the IP address corresponding to the target domain name to be accessed.
[0009] In a second aspect, an embodiment of the present invention provides a communication device, which is applied to a target application program located in the same virtual machine as the target cloud service. The device includes:
[0010] An acquisition module, configured to acquire the target domain name to be accessed corresponding to the target cloud service and the IP address corresponding to the target domain name to be accessed;
[0011] A storage module, configured to store the target domain name to be accessed and the IP address corresponding to the target domain name to be accessed in the target storage location of the virtual machine, so that when the target cloud service needs to resolve the target domain name to be accessed, it queries the target storage location to obtain the IP address corresponding to the target domain name to be accessed, and performs corresponding access according to the IP address corresponding to the target domain name to be accessed.
[0012] In a third aspect, an embodiment of the present invention provides an electronic device, including: a memory, a processor, and a communication interface; wherein, an executable code is stored on the memory, and when the executable code is executed by the processor, the processor is caused to execute the communication method as described in the first aspect.
[0013] In a fourth aspect, an embodiment of the present invention provides a non-transitory machine-readable storage medium, on which an executable code is stored. When the executable code is executed by a processor of an electronic device, the processor can at least implement the communication method as described in the first aspect.
[0014] In a fifth aspect, an embodiment of the present invention provides a communication method, which is applied to a target cloud service located in a virtual machine. The method includes:
[0015] In response to a resolution request for a target domain name to be accessed, determine whether the IP address corresponding to the target domain name to be accessed is included in the target storage location in the virtual machine; wherein, the IP address corresponding to the target domain name to be accessed is written by a target application program in the virtual machine;
[0016] If it is included, perform corresponding access according to the IP address corresponding to the target domain name to be accessed included in the target storage location.
[0017] In a sixth aspect, an embodiment of the present invention provides a communication device, which is applied to a target cloud service located in a virtual machine. The device includes:
[0018] A determination module, configured to determine whether an IP address corresponding to a target domain name to be accessed is included in a target storage location in the virtual machine in response to a resolution request for the target domain name to be accessed; wherein, the IP address corresponding to the target domain name to be accessed is written by a target application in the virtual machine.
[0019] An access module, configured to, if included, perform corresponding access according to the IP address corresponding to the target domain name to be accessed included in the target storage location.
[0020] In a seventh aspect, an embodiment of the present invention provides an electronic device, including: a memory, a processor, and a communication interface; wherein, an executable code is stored on the memory, and when the executable code is executed by the processor, the processor is caused to execute the communication method as described in the fifth aspect.
[0021] In an eighth aspect, an embodiment of the present invention provides a non-transitory machine-readable storage medium, on which an executable code is stored, and when the executable code is executed by a processor of an electronic device, the processor is caused to at least implement the communication method as described in the fifth aspect.
[0022] In a ninth aspect, an embodiment of the present invention provides a communication method, which is applied to a control server corresponding to a target cloud service, and the method includes:
[0023] Establishing a communication connection with a target application in the same virtual machine as the target cloud service;
[0024] Sending the domain name to be accessed corresponding to the target cloud service and the IP address corresponding to the domain name to be accessed to the target application, so that the target application stores the domain name to be accessed and the IP address corresponding to the domain name to be accessed in a target storage location of the virtual machine for the target cloud service to query the target storage location to obtain the IP address corresponding to the domain name to be accessed when the target cloud service needs to access the domain name to be accessed.
[0025] In a tenth aspect, an embodiment of the present invention provides a communication device, which is applied to a control server corresponding to a target cloud service, and the device includes:
[0026] A connection module, configured to establish a communication connection with a target application in the same virtual machine as the target cloud service;
[0027] A sending module, configured to send the to-be-accessed domain name corresponding to the target cloud service and the IP address corresponding to the to-be-accessed domain name to the target application, so that the target application stores the to-be-accessed domain name and the IP address corresponding to the to-be-accessed domain name in a target storage location of the virtual machine, for the target cloud service to query the target storage location to obtain the IP address corresponding to the to-be-accessed domain name when the to-be-accessed domain name needs to be accessed.
[0028] In an eleventh aspect, an embodiment of the present invention provides an electronic device, including: a memory, a processor, and a communication interface; wherein, an executable code is stored on the memory, and when the executable code is executed by the processor, the processor is caused to execute the communication method as described in the ninth aspect.
[0029] In a twelfth aspect, an embodiment of the present invention provides a non-transitory machine-readable storage medium, on which an executable code is stored, and when the executable code is executed by a processor of an electronic device, the processor can at least implement the communication method as described in the ninth aspect.
[0030] In a thirteenth aspect, an embodiment of the present invention provides a communication system, including:
[0031] A target cloud service and a target application located in the same virtual machine;
[0032] The target application is configured to obtain the target to-be-accessed domain name corresponding to the target cloud service and the IP address corresponding to the target to-be-accessed domain name, and store the target to-be-accessed domain name and the IP address corresponding to the target to-be-accessed domain name in a target storage location of the virtual machine;
[0033] The target cloud service is configured to query the target storage location to obtain the IP address corresponding to the target to-be-accessed domain name when the target to-be-accessed domain name needs to be resolved, and perform corresponding access according to the IP address corresponding to the target to-be-accessed domain name.
[0034] In an embodiment of the present invention, it is assumed that a target cloud service (such as a cloud desktop or a certain cloud application) runs in a virtual machine, and a system application program that starts automatically at boot: a target application program, is installed in the virtual machine. The target application program is used to obtain a target domain name to be accessed corresponding to the target cloud service and an IP address corresponding to the target domain name to be accessed, and store the target domain name to be accessed and its IP address in a target storage location of the virtual machine. In this way, when the target cloud service needs to resolve the target domain name to be accessed, it does not need to send a resolution request for the target domain name to be accessed to a domain name server configured by the VPN server that may not be able to resolve the target domain name to be accessed. Instead, it queries the target storage location to obtain the IP address corresponding to the target domain name to be accessed, and performs corresponding access according to the IP address corresponding to the target domain name to be accessed, meeting the normal network access requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0036] Figure 1 Schematic diagram of a communication system provided by an embodiment of the present invention;
[0037] Figure 2 Schematic diagram of a communication system provided by an embodiment of the present invention;
[0038] Figure 3 Flowchart of a communication method provided by an embodiment of the present invention;
[0039] Figure 4 Flowchart of a communication method provided by an embodiment of the present invention;
[0040] Figure 5 Flowchart of a communication method provided by an embodiment of the present invention;
[0041] Figure 6 Interaction flowchart of a communication method provided by an embodiment of the present invention;
[0042] Figure 7 Schematic diagram of the structure of a communication device provided by an embodiment of the present invention;
[0043] Figure 8 Schematic diagram of the structure of a communication device provided by an embodiment of the present invention;
[0044] Figure 9 Schematic diagram of the structure of a communication device provided by an embodiment of the present invention;
[0045] Figure 10 The structural schematic diagram of an electronic device provided in this embodiment. Specific implementation manners
[0046] To make the objectives, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention. In addition, the sequence of steps in the following method embodiments is only an example and is not strictly limited.
[0047] 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 embodiments of the present invention are all information and data 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 users to choose to authorize or refuse.
[0048] Figure 1 The schematic diagram of a communication system provided in an embodiment of the present invention, as Figure 1 shown, the communication system includes a target cloud service and a target application program located in the same virtual machine.
[0049] Among them, the virtual machine can be a cloud server built by a cloud computing manufacturer based on its own physical server. In practical applications, in response to the request of, for example, an enterprise user, multiple virtual machines are built for the enterprise user, and each virtual machine can deploy a target cloud service. Therefore, the above virtual machine can be any one of the virtual machine clusters corresponding to the enterprise user that provides the target cloud service.
[0050] Among them, the target cloud service includes any one of the following: cloud desktop, cloud application. Cloud applications can be, for example, applications such as cloud rendering and cloud gaming.
[0051] Among them, the target application program can be a preset program that starts automatically when the machine is powered on. In the embodiments of the present invention, the target application program is used to write some domain names and the IP addresses corresponding to the domain names that the target cloud service will use into the target storage location of the virtual machine. In practical applications, the target storage location is, for example, a system file in the virtual machine: hosts file, or it can be in a certain storage medium in the virtual machine, such as memory, cache, etc.
[0052] Based on this, when the target cloud service needs to resolve the target domain name to be accessed, it can query the target storage location to determine whether there is an IP address corresponding to the target domain name to be accessed. If so, it directly uses the IP address corresponding to the target domain name obtained from the target storage location to trigger corresponding access, such as sending and receiving data.
[0053] Optionally, the domain names and their corresponding IP addresses written by the above target application to the target storage location can come from the management and control server corresponding to the target cloud service, or can be determined based on the usage behavior of the user of the target cloud service.
[0054] So as Figure 2 As shown, in an optional embodiment, the above communication system further includes a management and control server corresponding to the target cloud service. This management and control server can be a cloud server provided by the cloud to manage and control the target cloud service. Briefly speaking, the management and control functions of this management and control server for the target cloud service include but are not limited to creation, resource scheduling, deletion, and so on.
[0055] In this embodiment, when the target application running in the above virtual machine starts to run, it can establish a long connection with the management and control server based on the configured communication address of the management and control server. During the process of establishing the communication connection or after establishing the communication connection, it sends the identification information of the target cloud service in the same virtual machine to the management and control server, so that the management and control server can know which target cloud service this target application corresponds to.
[0056] The above identification information can indicate the service type and user location corresponding to the target cloud service. Among them, the service type can reflect, for example, whether the target cloud service is a certain cloud application or a cloud desktop, and the user location can reflect the region or city where the user is located.
[0057] In the management and control server, there can be stored some domain names (referred to as domain names to be accessed in this article) that may be used by cloud services corresponding to different users and their corresponding IP addresses. For the above target cloud service, based on the communication connection between the above target applications in the same virtual machine as the target cloud service, the management and control server can send the domain names to be accessed corresponding to the target cloud service and their corresponding IP addresses to the target application, and the target application stores the received domain names to be accessed and the IP addresses corresponding to the domain names to be accessed in the target storage location of the virtual machine.
[0058] Moreover, in practical applications, for a to-be-accessed domain name corresponding to a target cloud service stored in a management and control server, the IP address corresponding to the to-be-accessed domain name may change dynamically. When the IP address changes, the management and control server can send the changed IP address to the target application in real time, so that the target application can update the IP address corresponding to the to-be-accessed domain name in the target storage location in a timely manner.
[0059] As described above, the target to-be-accessed domain name and its corresponding IP address stored in the target storage location can include, in addition to the above-mentioned to-be-accessed domain name and its corresponding IP address sent by the management and control server, some to-be-accessed domain names and their corresponding IP addresses determined based on the user's usage behavior of the target cloud service, which will be specifically described below.
[0060] The above-mentioned target storage location is equivalent to providing a fast domain name resolution channel for the target cloud service. However, in fact, it is impossible to store all the domain names and their corresponding IP addresses that the target cloud service may use in the target storage location. On the one hand, it is impossible to accurately know all the domain names that the target cloud service may use. On the other hand, it will also occupy too much storage resources.
[0061] In fact, when deploying the target cloud service in a virtual machine, the IP address of a domain name server will be configured. For the sake of distinction, it is called domain name server A here. Specifically, this configuration operation can be performed on the network card of the virtual machine. Based on this configuration result, when the target cloud service wants to access a certain domain name x, it will send a resolution request containing the domain name x to the domain name server A, so that the domain name server A can complete the resolution of the domain name x based on the mapping relationship between the domain name and the IP address stored by itself, that is, determine the IP address corresponding to the domain name x and feedback it to the target cloud service. It can be understood that the above resolution can be completed only when the domain name server A stores the domain name x and its corresponding IP address.
[0062] After the target cloud service obtains the IP address corresponding to the domain name x, it can send a corresponding access request using the IP address as the destination IP address.
[0063] In a specific implementation process, the target to-be-accessed domain name and its corresponding IP address written into the target storage location above can be included in the domain name server A. In this way, based on the domain name server A, the target cloud service can complete the resolution of a certain domain name it wants to access.
[0064] However, for the above-mentioned target cloud service, Figure 2For example, assume that a VPN client is also installed in the virtual machine where it is located, and the VPN client is communicatively connected to a VPN server, and the VPN server has enabled the DNS forced distribution function. Then, after the VPN server sends the IP address of the target domain name server (such as domain name server B) to the virtual machine, it can be simply considered that the IP address of the above domain name server A in the virtual machine will be replaced by the IP address of domain name server B. In this way, the domain names that the target cloud service can access will be restricted to the domain names that domain name server B can resolve. If the domain names included in the above target domain name to be accessed do not fall within the scope that domain name server B can resolve, then the target cloud service will not be able to access these domain names.
[0065] However, based on the result that the target application program stores the target domain name to be accessed and its corresponding IP address in the target storage location, actually, when the target cloud service wants to access a certain domain name x, it can first query whether the target storage location contains the IP address corresponding to the domain name x. If it does, it directly uses the IP address queried from the target storage location for subsequent access; if not, it sends a resolution request containing the domain name x to domain name server B. If it receives the IP address corresponding to the domain name x feedback by domain name server B, it performs corresponding access according to the received IP address, otherwise it reports an error, prompts the user that the domain name x cannot be accessed, and can output the reason for the inability to access.
[0066] It can be seen that in the inventive embodiment, by adding a target application program that starts automatically at boot in the virtual machine where the target cloud service is located, the content in the target storage location that stores the domain names and their corresponding IP addresses can be automatically modified by the target application program, with relatively high efficiency. At the same time, based on the interaction between the target application program and the management and control server, new domain names and their corresponding IP addresses can be obtained in real time and updated to the target storage location, without worrying about the problem of the old IP addresses becoming invalid, ensuring the reliability of the network access of the target cloud service.
[0067] Figure 3 The flowchart of a communication method provided by an embodiment of the present invention. This method can be executed by a target application program located in the same virtual machine as the target cloud service, as Figure 3 shown. This method includes the following steps:
[0068] 301. Obtain the target domain name to be accessed corresponding to the target cloud service and the IP address corresponding to the target domain name to be accessed.
[0069] 302. Store the target domain name to be accessed and the IP address corresponding to the target domain name to be accessed in the target storage location of the virtual machine, so that when the target cloud service needs to resolve the target domain name to be accessed, it queries the target storage location to obtain the IP address corresponding to the target domain name to be accessed, and performs corresponding access according to the IP address corresponding to the target domain name to be accessed.
[0070] As described above, in an optional embodiment, after the target application establishes a communication connection with the management and control server corresponding to the target cloud service, it receives the first domain name to be accessed corresponding to the target cloud service and the IP address corresponding to the first domain name to be accessed sent by the management and control server. Thus, the first domain name to be accessed is included in the above-mentioned target domain name to be accessed.
[0071] In practical applications, the first domain name to be accessed and its corresponding IP address can be written into the management and control server by the corresponding operation and maintenance personnel when deploying the target cloud application. In addition, when the IP address corresponding to the first domain name to be accessed changes, the management and control server timely sends the changed IP address to the target application, so that it updates the IP address corresponding to the first domain name to be accessed in the target storage location.
[0072] Optionally, the first domain name to be accessed received from the management and control server includes any one of the following: the domain name corresponding to other cloud services having an association relationship with the target cloud service, and the domain name of the gateway device required for data stream transmission between the target cloud service and the corresponding cloud service client.
[0073] Among them, other cloud services having an association relationship with the target cloud service, such as including but not limited to time synchronization service, version upgrade service, and so on. Simply put, the other cloud services having an association relationship can be embodied as the cloud services required to ensure the normal operation of the target cloud service.
[0074] Taking the target cloud service as a cloud desktop and the above other cloud service as a time synchronization service as an example, the time synchronization service is equivalent to a time server. The system clock corresponding to the cloud desktop needs to be synchronized with the system clock of the time synchronization service. In order to achieve clock synchronization, the cloud desktop needs to access the time synchronization service. When accessing the time synchronization service, the domain name of the time synchronization service needs to be used, that is, the domain name of the time synchronization service needs to be resolved into the corresponding IP address, so as to send a time synchronization request to the time synchronization service based on the IP address. The domain name and IP address corresponding to the time synchronization service corresponding to the cloud desktop are stored in the management and control server, and the domain name and IP address are sent to the target application, and written into the target storage location by the target application. In this way, the cloud desktop can directly use the IP address stored in the target storage location to send the above time synchronization request.
[0075] In another alternative embodiment, the target application can also obtain a second domain name to be accessed corresponding to the target cloud service and the IP address corresponding to the second domain name to be accessed, where the second domain name to be accessed includes domain names whose access frequencies meet set conditions when the user uses the target cloud service. Therefore, the second domain name to be accessed can also be included in the above-mentioned target domain name to be accessed.
[0076] For example, the target cloud service is a cloud desktop. When the user uses the cloud desktop, the user often accesses some websites. However, if the domain names of these websites are not within the scope that can be resolved by the domain name server forcibly issued by the VPN server, then the cloud desktop will not be able to complete the domain name resolution process through this domain name server, and subsequent access cannot be carried out. Therefore, to ensure the user experience, some domain names that the user commonly uses and cannot be resolved by the above-mentioned domain name server and their corresponding IP addresses can be written into the above-mentioned target storage location, so that the cloud desktop can normally access these domain names.
[0077] Specifically, the target application can collect and count the domain names input by the user during the operation of the target cloud service and the access frequency of each domain name, and determine the second domain names to be accessed whose access frequencies reach the set threshold, so as to write these second domain names to be accessed and their corresponding IP addresses into the target storage location.
[0078] Optionally, the user can be prompted whether to add these second domain names to be accessed to the target storage location, and the above-mentioned writing action is executed after the user confirms.
[0079] The target application can obtain the IP address corresponding to the second domain name to be accessed through the operation of pinging the domain name.
[0080] Optionally, when the target cloud service triggers a resolution request including the second domain name to be accessed to the domain name server configured in the virtual machine but does not obtain its corresponding IP address, a write request including the second domain name to be accessed can be sent to the target application, so that the target application writes the second domain name to be accessed and its corresponding IP address into the target storage location. Of course, optionally, the target cloud service can also write the second domain name to be accessed and its corresponding IP address into the target storage location by itself, but the target cloud service needs to obtain the IP address. Additionally, optionally, the user can also manually write the second domain name to be accessed and its corresponding IP address into the target storage location.
[0081] Figure 4 The flowchart of a communication method provided by an embodiment of the present invention, this method can be executed by a management and control server corresponding to the target cloud service, as Figure 4 shown, this method includes the following steps:
[0082] 401. Establish a communication connection between the target application located in the same virtual machine as the target cloud service.
[0083] 402. Send the domain name to be accessed corresponding to the target cloud service and the IP address corresponding to the domain name to be accessed to the target application, so that the target application stores the domain name to be accessed and the IP address corresponding to the domain name to be accessed in the target storage location of the virtual machine for the target cloud service to query the target storage location to obtain the IP address corresponding to the domain name to be accessed when it needs to access the domain name to be accessed.
[0084] In this embodiment, the process of the management and control server sending the domain name to be accessed corresponding to the target cloud service and the IP address corresponding to the domain name to be accessed to the target application can refer to the description in the foregoing other embodiments and will not be elaborated here.
[0085] Figure 5 It is a flowchart of a communication method provided by an embodiment of the present invention. This method can be executed by a target cloud service located in a virtual machine, as Figure 5 shown. This method includes the following steps:
[0086] 501. In response to a resolution request for a target domain name to be accessed, determine whether the IP address corresponding to the target domain name to be accessed is included in the target storage location in the virtual machine. If it is included, execute step 502; otherwise, execute step 503.
[0087] As described above, the IP address corresponding to the target domain name to be accessed is written by the target application in the virtual machine. Optionally, the IP address corresponding to the target domain name to be accessed includes: the IP address corresponding to the first domain name to be accessed received by the target application from the management and control server corresponding to the target cloud service through the communication connection, and / or the IP address corresponding to the second domain name to be accessed whose access frequency meets the set conditions when the user uses the target cloud service.
[0088] The virtual machine also includes a VPN client, and the VPN client is communicatively connected to a VPN server.
[0089] 502. Perform corresponding access according to the IP address corresponding to the target domain name to be accessed included in the target storage location.
[0090] 503. Send a resolution request for the target domain name to be accessed to the target domain name server according to the IP address of the target domain name server. The IP address of the target domain name server is sent to the virtual machine by the VPN server.
[0091] 504. If the IP address corresponding to the target domain name to be accessed fed back by the target domain name server is received, perform corresponding access according to the received IP address corresponding to the target domain name to be accessed.
[0092] The execution process of the target cloud service in this embodiment can be understood by referring to the foregoing other embodiments, and will not be elaborated here.
[0093] Taking the target cloud service as a cloud desktop and the foregoing target domain name to be accessed including the domain name corresponding to the gateway device required when the cloud desktop and the corresponding cloud desktop client perform data transmission as an example, in combination with Figure 6 introduce the process of data transmission between the cloud desktop and the cloud desktop client. As Figure 6 shown in the figure, the cloud desktop and the target application are in the same virtual machine. The virtual machine also includes a VPN client connected to the VPN server, which is not shown in the figure.
[0094] Figure 6 is an interaction flowchart of a communication method provided by an embodiment of the present invention. As Figure 6 shown, the method includes the following steps:
[0095] 601. The target application establishes a long connection with the management and control server.
[0096] The target application can establish a long connection with the management and control server when the virtual machine is powered on and started.
[0097] 602. The management and control server sends the domain name of the gateway device corresponding to the cloud desktop and its corresponding IP address to the target application.
[0098] In practical applications, the gateway devices corresponding to different cloud desktops can be different. For example, different gateways are set in different regions.
[0099] For a certain cloud desktop, the target area closer to the virtual machine where the cloud desktop is located can be determined, and the domain name and IP address of the gateway device set in the target area are sent to the target application. Among them, the management and control server stores the location information of the virtual machines where different cloud desktops are located.
[0100] 603. The target application writes the domain name of the gateway device and its corresponding IP address into the hosts file.
[0101] 604. The cloud desktop queries the hosts file with the domain name of the gateway device to obtain the IP address of the gateway device.
[0102] 605. Send the video stream to the gateway device according to the IP address of the gateway device.
[0103] 606. The gateway device sends the video stream to the cloud desktop client.
[0104] In this embodiment, the cloud desktop and the cloud desktop client can communicate through a certain data stream transmission protocol, such as the Adaptive Streaming Protocol (ASP for short). The gateway device supports this data stream transmission protocol.
[0105] The cloud desktop encodes the screen content to be displayed on the interface into a video stream and transmits it to the cloud desktop client for decoding and display. Specifically, after the cloud desktop first obtains the IP address of the gateway device by querying the hosts file, it sends the video stream to the gateway device according to this IP address, and forwards it to the corresponding cloud desktop client through the gateway device.
[0106] It can be seen that by installing a target application program that starts automatically at boot in the virtual machine where the cloud desktop is located, the target application program interacts with the management and control server to obtain the domain name and IP address of the gateway device corresponding to the cloud desktop, and writes the domain name and IP address of the gateway device to the local of the virtual machine. In this way, even if the VPN client in the virtual machine connects to the VPN server and the domain name server forcibly issued by the VPN server cannot complete the resolution of the domain name of the gateway device, the cloud desktop can still communicate with the gateway device based on the domain name and IP address of the gateway device stored in the hosts file, thereby ensuring that the cloud desktop client can still connect to the cloud desktop normally, receive the video stream of the cloud desktop normally for decoding and display, and ensure the reliable access to the cloud desktop.
[0107] The communication devices of one or more embodiments of the present invention will be described in detail below. Those skilled in the art can understand that these devices can all be configured by using commercially available hardware components through the steps taught by this solution.
[0108] Figure 7 The following is a schematic structural diagram of a communication device provided for an embodiment of the present invention. This device is applied to a target application program located in the same virtual machine as the target cloud service, such as Figure 7 As shown, this device includes: an acquisition module 11 and a storage module 12.
[0109] The acquisition module 11 is used to acquire the target domain name to be accessed corresponding to the target cloud service and the IP address corresponding to the target domain name to be accessed.
[0110] The storage module 12 is used to store the target domain name to be accessed and the IP address corresponding to the target domain name to be accessed in the target storage location of the virtual machine, so that when the target cloud service needs to resolve the target domain name to be accessed, it queries the target storage location to obtain the IP address corresponding to the target domain name to be accessed, and performs corresponding access according to the IP address corresponding to the target domain name to be accessed.
[0111] Optionally, the obtaining module 11 is specifically configured to: establish a communication connection with a management and control server corresponding to the target cloud service; receive a first domain name to be accessed corresponding to the target cloud service and an IP address corresponding to the first domain name to be accessed sent by the management and control server.
[0112] Optionally, the obtaining module 11 is specifically configured to: obtain a second domain name to be accessed corresponding to the target cloud service and an IP address corresponding to the second domain name to be accessed, where the second domain name to be accessed includes domain names whose access frequencies meet set conditions when a user uses the target cloud service.
[0113] Optionally, the first domain name to be accessed includes any one of the following: a domain name corresponding to another cloud service having an association relationship with the target cloud service, and a domain name of a gateway device required for data stream transmission between the target cloud service and a corresponding cloud service client.
[0114] Optionally, the apparatus further includes: a sending module, configured to send identification information of the target cloud service to the management and control server, so that the management and control server determines a first domain name to be accessed corresponding to the target cloud service and an IP address corresponding to the first domain name to be accessed.
[0115] Figure 7 The apparatus shown can execute the steps executed by the target application program in the foregoing embodiments. For the detailed execution process and technical effects, refer to the descriptions in the foregoing embodiments and will not be elaborated herein.
[0116] Figure 8 The figure is a schematic structural diagram of a communication apparatus provided by an embodiment of the present invention. The apparatus is applied to a management and control server corresponding to a target cloud service. As Figure 8 shown, the apparatus includes: a connection module 21 and a sending module 22.
[0117] The connection module 21 is configured to establish a communication connection with a target application program located in the same virtual machine as the target cloud service.
[0118] The sending module 22 is configured to send a domain name to be accessed corresponding to the target cloud service and an IP address corresponding to the domain name to be accessed to the target application program, so that the target application program stores the domain name to be accessed and the IP address corresponding to the domain name to be accessed in a target storage location of the virtual machine, for the target cloud service to query the target storage location to obtain the IP address corresponding to the domain name to be accessed when it needs to access the domain name to be accessed.
[0119] Figure 8 The apparatus shown can execute the steps executed by the management and control server in the foregoing embodiments. For the detailed execution process and technical effects, refer to the descriptions in the foregoing embodiments and will not be elaborated herein.
[0120] Figure 9 A schematic structural diagram of a communication device provided by an embodiment of the present invention. This device is applied to a target cloud service located in a virtual machine, such as Figure 9 As shown, the device includes: a determination module 31 and an access module 32.
[0121] The determination module 31 is configured to, in response to a resolution request for a target domain name to be accessed, determine whether the target storage location in the virtual machine contains the IP address corresponding to the target domain name to be accessed; wherein, the IP address corresponding to the target domain name to be accessed is written by a target application program in the virtual machine.
[0122] The access module 32 is configured to, if it contains, perform corresponding access according to the IP address corresponding to the target domain name to be accessed included in the target storage location.
[0123] Optionally, the IP address corresponding to the target domain name to be accessed includes: the IP address corresponding to a first domain name to be accessed received by the target application program from a management and control server corresponding to the target cloud service through a communication connection, and / or, the IP address corresponding to a second domain name to be accessed whose access frequency meets a set condition when a user uses the target cloud service.
[0124] Optionally, a client of a virtual private network is further included in the virtual machine. The client of the virtual private network is communicatively connected to a server of the virtual private network. The access module 32 is further configured to: if it does not contain, send a resolution request for the target domain name to be accessed to the target domain name server according to the IP address of the target domain name server, where the IP address of the target domain name server is sent by the server of the virtual private network to the virtual machine; if receiving the IP address corresponding to the target domain name to be accessed feedback by the target domain name server, perform corresponding access according to the received IP address corresponding to the target domain name to be accessed.
[0125] Figure 9 The device shown can execute the steps performed by the target cloud service in the foregoing embodiment. For the detailed execution process and technical effects, refer to the description in the foregoing embodiment, which will not be elaborated here.
[0126] An embodiment of the present invention further provides an electronic device, such as Figure 10 As shown, the electronic device may include: a processor 41, a memory 42, and a communication interface 43. Wherein, executable code is stored on the memory 42. When the executable code is executed by the processor 41, the processor 41 is caused to implement the communication method performed by the target application program in the foregoing embodiment, or implement the communication method performed by the target cloud service in the foregoing embodiment, or implement the communication method performed by the management and control server in the foregoing embodiment.
[0127] In addition, an embodiment of the present invention provides a non-transitory machine-readable storage medium, on which executable code is stored. When the executable code is executed by a processor of an electronic device, the processor can at least implement the communication method provided in the foregoing embodiment.
[0128] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without creative labor.
[0129] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of adding a necessary general hardware platform, and of course, can also be implemented by a combination of hardware and software. Based on such an understanding, the above technical solution, in essence, or the part that contributes to the prior art can be embodied in the form of a computer product. The present invention can be implemented in the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program code.
[0130] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments or equivalently replace some of the technical features. These modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A communication method, characterized in that, Applied to a target application located in the same virtual machine as the target cloud service, the method includes: Obtaining a target domain name to be accessed corresponding to the target cloud service and an IP address corresponding to the target domain name to be accessed; Storing the target domain name to be accessed and the IP address corresponding to the target domain name to be accessed in a target storage location of the virtual machine, so that when the target cloud service needs to resolve the target domain name to be accessed, it queries the target storage location to obtain the IP address corresponding to the target domain name to be accessed, and performs corresponding access according to the IP address corresponding to the target domain name to be accessed; Among them, obtaining the target domain name to be accessed corresponding to the target cloud service and the IP address corresponding to the target domain name to be accessed includes: establishing a communication connection with a management and control server corresponding to the target cloud service; receiving a first domain name to be accessed corresponding to the target cloud service and an IP address corresponding to the first domain name to be accessed sent by the management and control server; Sending the identification information of the target cloud service to the management and control server, so that the management and control server determines the first domain name to be accessed corresponding to the target cloud service and the IP address corresponding to the first domain name to be accessed.
2. The method according to claim 1, wherein The obtaining the target domain name to be accessed corresponding to the target cloud service and the IP address corresponding to the target domain name to be accessed includes: Obtaining a second domain name to be accessed corresponding to the target cloud service and an IP address corresponding to the second domain name to be accessed, where the second domain name to be accessed includes domain names whose access frequencies meet set conditions when a user uses the target cloud service.
3. The method according to claim 1, wherein The first domain name to be accessed includes any one of the following: a domain name corresponding to another cloud service having an association relationship with the target cloud service, and a domain name of a gateway device required for data stream transmission between the target cloud service and a corresponding cloud service client.
4. A communication method, characterized in that, Applied to a management and control server corresponding to a target cloud service, the method includes: Establishing a communication connection with a target application located in the same virtual machine as the target cloud service; Sending the domain name to be accessed corresponding to the target cloud service and the IP address corresponding to the domain name to be accessed to the target application, so that the target application stores the domain name to be accessed and the IP address corresponding to the domain name to be accessed in a target storage location of the virtual machine, for the target cloud service to query the target storage location to obtain the IP address corresponding to the domain name to be accessed when it needs to access the domain name to be accessed; Sending the domain name to be accessed corresponding to the target cloud service and the IP address corresponding to the domain name to be accessed to the target application includes: Determining the first domain name to be accessed corresponding to the target cloud service and the IP address corresponding to the first domain name to be accessed according to the received identification information of the target cloud service; Sending the first domain name to be accessed corresponding to the target cloud service and the IP address corresponding to the first domain name to be accessed to the target application.
5. A communication method, characterized in that, Applied to a target cloud service located in a virtual machine, the method includes: In response to a resolution request for a target domain name to be accessed, determine whether the target storage location in the virtual machine contains the IP address corresponding to the target domain name to be accessed; wherein, the IP address corresponding to the target domain name to be accessed is written by a target application in the virtual machine. If it contains, perform corresponding access according to the IP address corresponding to the target domain name to be accessed contained in the target storage location. The IP address corresponding to the target domain name to be accessed includes: the IP address corresponding to the first domain name to be accessed received by the target application from a management and control server corresponding to the target cloud service through a communication connection; the management and control server determines the first domain name to be accessed corresponding to the target cloud service and the IP address corresponding to the first domain name to be accessed according to the received identification information of the target cloud service.
6. The method according to claim 5, characterized in that, The IP address corresponding to the target domain name to be accessed includes: the IP address corresponding to the second domain name to be accessed whose access frequency meets a set condition when the user uses the target cloud service.
7. The method according to claim 5, wherein The virtual machine also contains a client of a virtual private network, and the client of the virtual private network is communicatively connected to the server of the virtual private network. The method further includes: If it does not contain, send a resolution request for the target domain name to be accessed to the target domain name server according to the IP address of the target domain name server, and the IP address of the target domain name server is sent by the server of the virtual private network to the virtual machine. If the IP address corresponding to the target domain name to be accessed fed back by the target domain name server is received, perform corresponding access according to the received IP address corresponding to the target domain name to be accessed.
8. A communication system, characterized in that, Includes: A target cloud service and a target application located in the same virtual machine. The target application is used to obtain the target domain name to be accessed corresponding to the target cloud service and the IP address corresponding to the target domain name to be accessed, and store the target domain name to be accessed and the IP address corresponding to the target domain name to be accessed in the target storage location of the virtual machine. The target cloud service is used to query the target storage location to obtain the IP address corresponding to the target domain name to be accessed when it is necessary to resolve the target domain name to be accessed, and perform corresponding access according to the IP address corresponding to the target domain name to be accessed. Obtaining the target domain name to be accessed corresponding to the target cloud service and the IP address corresponding to the target domain name to be accessed includes: establishing a communication connection with a management and control server corresponding to the target cloud service; receiving the first domain name to be accessed corresponding to the target cloud service and the IP address corresponding to the first domain name to be accessed sent by the management and control server; sending the identification information of the target cloud service to the management and control server so that the management and control server determines the first domain name to be accessed corresponding to the target cloud service and the IP address corresponding to the first domain name to be accessed.
9. The system according to claim 8, wherein Also includes: A control server corresponding to the target cloud service, which is used to establish a communication connection with the target application program, and send the domain name to be accessed corresponding to the target cloud service and the IP address corresponding to the domain name to be accessed to the target application program, where the target domain name to be accessed includes the domain name to be accessed sent by the control server.
10. The system according to claim 8 or 9, characterized in that, The virtual machine further includes a client of a virtual private network, and the client of the virtual private network is communicatively connected to the server of the virtual private network; The server of the virtual private network is used to send the IP address of the target domain name server to the virtual machine; The target cloud service is further configured to, if it is determined that the target storage location does not include the IP address corresponding to the target domain name to be accessed, send a resolution request for the target domain name to be accessed to the target domain name server according to the IP address of the target domain name server, and if it receives the IP address corresponding to the target domain name to be accessed fed back by the target domain name server, perform corresponding access according to the received IP address corresponding to the target domain name to be accessed.
11. An electronic device, characterized in that, Comprising: A memory, a processor, and a communication interface; wherein, executable code is stored on the memory, and when the executable code is executed by the processor, the processor executes the communication method according to any one of claims 1 to 3, or executes the communication method according to claim 4, or executes the communication method according to any one of claims 5 to 7.
12. A non-transitory machine-readable storage medium, characterized in that, Executable code is stored on the non-transitory machine-readable storage medium, and when the executable code is executed by the processor of the electronic device, the processor executes the communication method according to any one of claims 1 to 3, or executes the communication method according to claim 4, or executes the communication method according to any one of claims 5 to 7.
Citation Information
Patent Citations
Method, device and system for virtual machine to access physical server in cloud computing system
CN109314724A
Domain name resolution method and device, electronic equipment and storage medium
CN111245944A