Data transmission method, first virtual machine, virtual desktop management server and system
The virtual desktop management server determines the transmission path between virtual machines, which solves the problem of cumbersome determination of virtual machine file transfer paths in the prior art, and realizes fast and efficient file transfer between virtual machines.
Patent Information
- Application Number
- CN202111543326.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-16
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2041-12-16
AI Technical Summary
When the existing VDI system transfers files between virtual machines, it is necessary to obtain information such as the other party's IP port through instant messaging software, resulting in the traditional and cumbersome transmission path determination regardless of the characteristics of the cloud desktop architecture itself.
Through the virtual desktop management server, virtual machines can quickly determine the transfer path suitable for the current virtual machine and transfer files. The specific steps include: the first virtual machine sends a query request to obtain the current status information of the second virtual machine, sends a data transmission request to obtain the target transmission path, and sends the target data according to the status information and the transmission path.
It realizes fast file transfer between virtual machines, eliminates the cumbersome routing calculation steps in traditional methods, and is suitable for the optimal path selection of VDI system's own characteristics.
Smart Images

Figure CN114356474B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of data transmission, and in particular to a data transmission method, a first virtual machine, a virtual desktop management server and a system. Background Art
[0002] The basic structure of the existing VDI system can be referred to Figure 1 .like Figure 1 As shown, the VDI system is based on the Wanxiang VGTP image transmission protocol, and mainly includes a zero terminal (built-in VGTP-R terminal, referred to as R terminal) and a cloud server terminal (built-in VGTP-S terminal, referred to as S terminal). Among them, the R terminal is used to receive images from the cloud desktop, and at the same time transmit the local mouse and keyboard information back to the cloud, and the cloud is injected into the cloud desktop corresponding to the current R terminal. The cloud desktop is generated by the virtual machine / physical machine (VM / PM) assigned by the cloud server to the current zero terminal; the S terminal is an image acquisition and encoding unit running in the cloud virtual OS, and is also responsible for the injection function of user input data. The cloud server is generally based on the IAAS architecture and is a server with a strong virtual host. It can provide management functions for multiple virtual machines through the hypervisor and provide a hardware environment for VM / PM to run.
[0003] The above VDI system has been widely used in fields such as office and games.
[0004] In some scenarios, a virtual machine user needs to transfer files to another virtual machine user. In the prior art, for such scenarios, the sending virtual machine generally sends the file to be transferred to the receiving virtual machine through instant messaging software. For example, when virtual machine A needs to send a file to virtual machine B, it needs to first obtain information such as the IP port of virtual machine B from the communication software, and then virtual machine A determines the location of B through routing calculation, and then transmits it through the file transfer protocol. This method is relatively traditional and does not take into account the characteristics of the cloud desktop architecture itself. Summary of the invention
[0005] The purpose of the present disclosure is to overcome the shortcomings of the prior art and to provide a data transmission method, a first virtual machine, a virtual desktop management server and a system. The data transmission method can realize communication between virtual machines based on a virtual desktop infrastructure, so as to quickly determine a transmission path suitable for the current virtual machine and perform file transfer when file transfer is required between two virtual machines.
[0006] According to a first aspect of an embodiment of the present disclosure, a data transmission method is provided, which is applied to a first virtual machine, and the method includes:
[0007] Sending a query request to a virtual desktop management server, the query request is used to request the virtual desktop management server to send the current state information of the second virtual machine to the first virtual machine; the virtual desktop management server stores the current state information of at least one virtual machine;
[0008] Receiving current status information of the second virtual machine obtained by the virtual desktop management server according to the query request;
[0009] Sending a data transmission request to the virtual desktop management server, where the data transmission request is used to request the virtual desktop management server to send a target transmission path to the first virtual machine;
[0010] Obtaining a target transmission path returned by the virtual desktop management server according to the data transmission request;
[0011] The target data is sent to the second virtual machine according to the current state information of the second virtual machine and the target transmission path.
[0012] In one embodiment, before sending the query request to the virtual desktop management server, the method further includes:
[0013] Send current status information to the virtual desktop management server in real time or at a scheduled time;
[0014] The virtual desktop management server is instructed to integrate the current status information of each virtual machine to form an information list.
[0015] In one embodiment, sending the current status information to the virtual desktop management server in real time or periodically includes:
[0016] Sending JSON data to the virtual desktop management server, wherein the JSON data carries the current status information of the corresponding virtual machine;
[0017] The instructing the virtual desktop management server to integrate the current status information of each virtual machine to form an information list includes:
[0018] Instruct the virtual desktop management server to receive the JSON data, store the JSON data in a database, and update the data in the database.
[0019] In one embodiment, sending the target data to the second virtual machine according to the current state information of the second virtual machine and the target transmission path includes:
[0020] If the user status in the current status information of the second virtual machine is an offline state, sending both the target transmission path and the target data to the virtual desktop management server;
[0021] Instructing the virtual desktop management server to receive the target data and the target transmission path, and monitoring whether the user status in the current status information of the second virtual machine is an online state;
[0022] If it is monitored that the user status in the current status information of the second virtual machine is online, and the virtual desktop management server receives a request for obtaining target data sent by the second virtual machine, the virtual desktop management server is instructed to send the target data to the second virtual machine according to the target transmission path.
[0023] In one embodiment, instructing the virtual desktop management server to receive the target data and the target transmission receiving path, and monitoring whether the user status in the current status information of the second virtual machine is online includes:
[0024] Instructing the virtual desktop management server to receive the target data and store the target data in an offline file storage area in a file storage server of the virtual desktop management server;
[0025] Instructing the virtual desktop management server to determine whether the user status in the current status information of the second virtual machine is an online state;
[0026] If the user status in the current status information of the second virtual machine is an online state, and the virtual desktop management server receives a request for obtaining target data sent by the second virtual machine, at least the virtual desktop management server sends the target data to the second virtual machine according to the target transmission path, including:
[0027] If it is monitored that the user status in the current status information of the second virtual machine is an online state, instruct the virtual desktop management server to detect whether a request for obtaining the target data sent by the second virtual machine is received;
[0028] If the virtual desktop management server receives the request sent by the second virtual machine to obtain the target data, the virtual desktop management server is instructed to send the target data to the second virtual machine according to the target transmission path.
[0029] In one embodiment, before instructing the virtual desktop management server to receive the target data and the target transmission path and determining whether the user status in the current status information of the second virtual machine is an online state, the method further includes:
[0030] Instructing the virtual desktop management server to set a tag for the target data, wherein the tag carries user information;
[0031] Instructing the virtual desktop management server to receive the target data and the target transmission path, and determining whether the user status in the current status information of the second virtual machine is an online state includes:
[0032] If the user status in the current status information of the second virtual machine is an offline state, instruct the virtual desktop management server to determine whether the target user is online in the third virtual machine according to the user information carried in the tag;
[0033] If the virtual desktop management server determines that the target user is online on the third virtual machine according to the user information carried in the tag, the virtual desktop management server is instructed to send the target data to the third virtual machine.
[0034] According to a second aspect of an embodiment of the present disclosure, a data transmission method is provided, which is applied to a virtual desktop management server, and the method includes:
[0035] Obtaining a query request sent by the first virtual machine, the query request being used to request the virtual desktop management server to send current status information of the second virtual machine to the first virtual machine; the virtual desktop management server stores current status information of at least one virtual machine;
[0036] Sending the current state information of the second virtual machine to the first virtual machine according to the query request;
[0037] Acquire a data transmission request sent by the first virtual machine, where the data transmission request is used to request the virtual desktop management server to send a target transmission path to the first virtual machine;
[0038] sending the target transmission path to the first virtual machine according to the data transmission request;
[0039] The first virtual machine is instructed to send target data to the second virtual machine according to the current state information of the second virtual machine and the target transmission path.
[0040] In one embodiment, instructing the first virtual machine to send target data to the second virtual machine according to the current state information of the second virtual machine and the target transmission path includes:
[0041] If the user status in the current status information of the second virtual machine is an offline state, instruct the first virtual machine to send both the target transmission path and the target data to the virtual desktop management server;
[0042] receiving the target data and the target transmission path, and monitoring whether the user status in the current status information of the second virtual machine is an online state;
[0043] If it is monitored that the user state in the current state information of the second virtual machine is an online state, and a request for obtaining target data sent by the second virtual machine is received, the target data is sent to the second virtual machine according to the target transmission path.
[0044] In one embodiment, the receiving the target data and the target transmission receiving path, and monitoring whether the user status in the current status information of the second virtual machine is an online state includes:
[0045] Receiving the target data, and storing the target data in an offline file storage area of a file storage server of a virtual desktop management server;
[0046] Determine whether the user status in the current status information of the second virtual machine is an online state;
[0047] If the user status in the current status information of the second virtual machine is an online state, and the virtual desktop management server receives a request for obtaining target data sent by the second virtual machine, sending the target data to the second virtual machine according to the target transmission path includes:
[0048] If it is monitored that the user status in the current status information of the second virtual machine is an online state, detecting whether a request for obtaining the target data sent by the second virtual machine is received;
[0049] If the virtual desktop management server receives the request sent by the second virtual machine to obtain the target data, the target data is sent to the second virtual machine according to the target transmission path.
[0050] In one embodiment, before receiving the target data and the target transmission path and determining whether the user status in the current status information of the second virtual machine is an online state, the method further includes:
[0051] Setting a tag for the target data, wherein the tag carries user information;
[0052] Receiving the target data and the target transmission path, and determining whether the user state in the current state information of the second virtual machine is an online state includes:
[0053] If the user status in the current status information of the second virtual machine is an offline state, determining whether the target user is online in the third virtual machine according to the user information carried in the tag;
[0054] If the virtual desktop management server determines that the target user is online on the third virtual machine according to the user information carried in the tag, the target data is sent to the third virtual machine.
[0055] According to a third aspect of an embodiment of the present disclosure, a first virtual machine is provided, the first virtual machine comprising:
[0056] A first sending unit sends a query request to a virtual desktop management server, wherein the query request is used to request the virtual desktop management server to send current status information of the second virtual machine to the first virtual machine; the virtual desktop management server stores current status information of at least one virtual machine;
[0057] A receiving unit, receiving current status information of the second virtual machine obtained by the virtual desktop management server according to the query request;
[0058] A second sending unit sends a data transmission request to the virtual desktop management server, where the data transmission request is used to request the virtual desktop management server to send a target transmission path to the first virtual machine;
[0059] A first acquisition unit acquires a target transmission path returned by the virtual desktop management server according to a data transmission request;
[0060] The third sending unit sends the target data to the second virtual machine according to the current state information of the second virtual machine and the target transmission path.
[0061] According to a fourth aspect of an embodiment of the present disclosure, a virtual desktop management server is provided, the virtual desktop management server comprising:
[0062] The second acquisition unit acquires a query request sent by the first virtual machine, the query request being used to request the virtual desktop management server to send current status information of the second virtual machine to the first virtual machine; the virtual desktop management server stores current status information of at least one virtual machine;
[0063] A query unit, sending the current state information of the second virtual machine to the first virtual machine according to the query request;
[0064] A third acquiring unit, acquiring a data transmission request sent by the first virtual machine, where the data transmission request is used to request the virtual desktop management server to send a target transmission path to the first virtual machine;
[0065] A fourth sending unit, sending the target transmission path to the first virtual machine according to the data transmission request;
[0066] The instructing unit instructs the first virtual machine to send target data to the second virtual machine according to the current state information of the second virtual machine and the target transmission path.
[0067] According to a fifth aspect of an embodiment of the present disclosure, a data transmission system is provided, the data transmission system comprising a management server and a cloud server; at least a first virtual machine and a second virtual machine are running on the cloud server, a virtual desktop management server is provided on the management server, and the virtual desktop management server stores at least current state information of the first virtual machine and current state information of the second virtual machine;
[0068] The first virtual machine is used to send a query request to the virtual desktop management server, the query request is used to request the virtual desktop management server to send the current state information of the second virtual machine to the first virtual machine; the virtual desktop management server stores the current state information of at least one virtual machine;
[0069] The virtual desktop management server is used to send the current state information of the second virtual machine to the first virtual machine according to the query request;
[0070] The first virtual machine is used to send a data transmission request to the virtual desktop management server, where the data transmission request is used to request the virtual desktop management server to send a target transmission path to the first virtual machine, where the target transmission path is an optimal transmission path between the first virtual machine and the second virtual machine;
[0071] The virtual desktop management server is used to send the target transmission path to the first virtual machine according to the data transmission request;
[0072] The first virtual machine is used to send target data to the second virtual machine according to the current state information of the second virtual machine and the target transmission path.
[0073] In one embodiment, the first virtual machine and the second virtual machine are further used to send current status information to the virtual desktop management server in real time or periodically;
[0074] The virtual desktop management server is also used to integrate the current status information of each virtual machine to form an information list.
[0075] In one embodiment, the first virtual machine and the second virtual machine are used to send json data to the virtual desktop management server, and the json data carries the current status information of the corresponding virtual machines;
[0076] The virtual desktop management server is used to receive JSON data, store the JSON data in a database, and update the data in the database.
[0077] In one embodiment, if the user status in the current status information of the second virtual machine is an offline state, the first virtual machine is used to send both the target transmission path and the target data to the virtual desktop management server;
[0078] The virtual desktop management server is used to receive the target data and the target transmission path, and monitor whether the user status in the current status information of the second virtual machine is online;
[0079] If the user status in the current status information of the second virtual machine is online, and the virtual desktop management server receives a request for obtaining target data sent by the second virtual machine, the virtual desktop management server is used to send the target data to the second virtual machine according to the target transmission path.
[0080] In one embodiment, the virtual desktop management server is used to receive the target data and store the target data in an offline file storage area in a file storage server of the virtual desktop management server;
[0081] The virtual desktop management server is further used to determine whether the user status in the current status information of the second virtual machine is an online status;
[0082] If the user status in the current status information of the second virtual machine is an online state, the virtual desktop management server is further used to detect whether a request for obtaining target data sent by the second virtual machine is received;
[0083] If the virtual desktop management server receives a request for obtaining target data sent by the second virtual machine, the virtual desktop management server is further configured to send the target data to the second virtual machine according to the target transmission path.
[0084] In one embodiment, the virtual desktop management server is further used to set a tag for the target data, wherein the tag carries user information;
[0085] If the user status in the current status information of the second virtual machine is an offline state, the virtual desktop management server is further used to determine whether the target user is online in the third virtual machine according to the user information carried in the tag;
[0086] If the virtual desktop management server determines, based on the user information carried in the tag, that the target user is online on the third virtual machine, the virtual desktop management server is further configured to send the target data to the third virtual machine.
[0087] In one embodiment, the current state information includes the virtual machine running state, connection state, current user state and the receiving end state of the current virtual machine; wherein,
[0088] The operating status includes booting, suspended, shutting down or unknown;
[0089] The connection status includes: connecting, not connected or unknown;
[0090] User status includes: logged in, offline, unknown, busy or busy;
[0091] The receiving end status includes: connection status, device type or physical location, etc.
[0092] The data transmission method provided by the embodiment of the present disclosure realizes communication between virtual machines based on a virtual desktop infrastructure, and the virtual desktop infrastructure manages the location information of all virtual machines connected to it. Thus, when a file needs to be transferred between two virtual machines, a transmission path suitable for the current virtual machine can be quickly determined, and the file transfer can be performed.
[0093] Therefore, the data transmission method provided by the embodiment of the present disclosure eliminates the cumbersome routing calculation steps at the sending end in the prior art, and all path calculations are performed on the virtual desktop management server; in addition, the method for determining the optimal path of the present invention is designed in consideration of the characteristics of the VDI system itself. BRIEF DESCRIPTION OF THE DRAWINGS
[0094] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0095] Figure 1 A flowchart of a data transmission method provided in an embodiment of the present disclosure.
[0096] Figure 2 A flowchart of a data transmission method provided in an embodiment of the present disclosure.
[0097] Figure 3 A flowchart of a data transmission method provided in an embodiment of the present disclosure.
[0098] Figure 4 A flowchart of a data transmission method provided in an embodiment of the present disclosure.
[0099] Figure 5 An architectural diagram of a data transmission device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0100] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0101] Figure 1 A flowchart of a data transmission method provided by an embodiment of the present disclosure. Figure 1 As shown, the method is applied to a first virtual machine, and includes:
[0102] Step 101: Send a query request to a virtual desktop management server, wherein the query request is used to request the virtual desktop management server to send current status information of a second virtual machine to a first virtual machine; the virtual desktop management server stores current status information of at least one virtual machine;
[0103] In this step, a virtual desktop management client can be installed on the first virtual machine. The virtual desktop management client can realize functions such as status viewing, instant messaging, file transfer, voice call, screen sharing, remote guidance, etc. between virtual machine users.
[0104] After the virtual desktop management client establishes a connection with the virtual desktop management server, communication and other related functions can be realized.
[0105] Exemplarily, the virtual desktop management tool in the embodiment of the present disclosure can be regarded as QQ software, the virtual desktop management client is QQ downloaded and installed on each desktop, and the virtual desktop management server is the Tencent computer room, which is responsible for the corresponding virtual desktop management client.
[0106] It should be noted that there is a one-to-one binding relationship between the virtual desktop management clients installed on the virtual machines, and the status information of the local virtual machines can be displayed.
[0107] The current status information includes the virtual machine running status, connection status, current user status and the receiving end status of the current virtual machine; wherein,
[0108] The operating status includes booting, suspended, shutting down or unknown;
[0109] The connection status includes: connecting, not connected or unknown;
[0110] The user status includes: logged in, offline, unknown, busy or busy;
[0111] The receiving end status includes: connection status, device type or physical location, etc.
[0112] Step 102: receiving the current status information of the second virtual machine obtained by the virtual desktop management server according to the query request;
[0113] For example, when user A (first user) queries the status of user B (second user), the user (first user) sends a query request to the virtual desktop management server, and the virtual desktop management server responds to the request and sends the status of user B (second user) to user A (first user).
[0114] Step 103: Send a data transmission request to the virtual desktop management server, where the data transmission request is used to request the virtual desktop management server to send a target transmission path to the first virtual machine;
[0115] Step 104: obtaining a target transmission path returned by the virtual desktop management server according to the data transmission request;
[0116] In this step, when the virtual desktop management server receives a data transmission request sent by the first virtual machine, the virtual desktop management server selects the optimal transmission path as the target transmission path according to the locations of the first virtual machine and the second virtual machine, and sends the target transmission path to the first virtual machine.
[0117] Specifically, the virtual desktop management server can obtain the specific location from the management server, and of course the most optimal transmission route can be obtained. For example, knowing the location from A to B, the transmission speed of multiple messages can be tested, and the fastest one can be selected and recorded as the optimal transmission path, and this path can be used when transferring files.
[0118] Step 305: Send target data to the second virtual machine according to the current state information of the second virtual machine and the target transmission path.
[0119] In this step, when performing file transfer or other communication operations, the virtual desktop management server selects the optimal transmission path for file transfer according to the locations of the two virtual machines.
[0120] In one embodiment, Figure 2 As shown, sending the target data to the second virtual machine according to the current state information of the second virtual machine and the target transmission path includes:
[0121] Step 1051: If the user status in the current status information of the second virtual machine is offline, the target transmission path and the target data are sent to the virtual desktop management server;
[0122] Step 1052: instruct the virtual desktop management server to receive the target data and the target transmission path, and monitor whether the user status in the current status information of the second virtual machine is online;
[0123] In one embodiment, instructing the virtual desktop management server to receive the target data and the target transmission receiving path, and monitoring whether the user status in the current status information of the second virtual machine is online includes:
[0124] Instructing the virtual desktop management server to receive the target data and store the target data in an offline file storage area in a file storage server of the virtual desktop management server;
[0125] Instructing the virtual desktop management server to determine whether the user status in the current status information of the second virtual machine is an online state;
[0126] If the user status in the current status information of the second virtual machine is an online state, and the virtual desktop management server receives a request for obtaining target data sent by the second virtual machine, at least the virtual desktop management server sends the target data to the second virtual machine according to the target transmission path, including:
[0127] If it is monitored that the user status in the current status information of the second virtual machine is an online state, instruct the virtual desktop management server to detect whether a request for obtaining the target data sent by the second virtual machine is received;
[0128] If the virtual desktop management server receives the request sent by the second virtual machine to obtain the target data, the virtual desktop management server is instructed to send the target data to the second virtual machine according to the target transmission path.
[0129] In this embodiment, after the virtual desktop management server receives the file, it actually stores the file in the file storage server of the virtual desktop management server. The file storage server includes two parts: an offline file storage area and a general file storage area. In terms of process, when a user sends information or a file to an offline address, the information and the file will be saved in this offline file storage area. The application for distribution will be made after the receiving user comes online. Specifically, the user can query the offline data once after coming online. If there is data to be received, the application for distribution can be made directly.
[0130] It should be noted that the offline file storage area is used to store offline files. Files are not saved indefinitely, but only data within a certain period of time (this time can be set, such as 30 days). Therefore, when storing offline files, time tags are required. The general file storage area is used to store sent or received files, similar to DingTalk. Users can download sent or received files within a limited time range.
[0131] Step 1053: If it is monitored that the user status in the current status information of the second virtual machine is online, and the virtual desktop management server receives a request for obtaining target data sent by the second virtual machine, instruct the virtual desktop management server to send the target data to the second virtual machine according to the target transmission path.
[0132] In this embodiment, when the receiving end virtual machine (second virtual machine) is offline, the virtual desktop management server receives the file, and then receives the file through application after the receiving end virtual machine (second virtual machine) comes online.
[0133] In one embodiment, before instructing the virtual desktop management server to receive the target data and the target transmission path and determining whether the user status in the current status information of the second virtual machine is an online state, the method further includes:
[0134] Instructing the virtual desktop management server to set a tag for the target data, wherein the tag carries user information;
[0135] Instructing the virtual desktop management server to receive the target data and the target transmission path, and determining whether the user status in the current status information of the second virtual machine is an online state includes:
[0136] If the user status in the current status information of the second virtual machine is an offline state, instruct the virtual desktop management server to determine whether the target user is online in the third virtual machine according to the user information carried in the tag;
[0137] If the virtual desktop management server determines that the target user is online on the third virtual machine according to the user information carried in the tag, the virtual desktop management server is instructed to send the target data to the third virtual machine.
[0138] In this embodiment, a label is added to the offline data, which contains user information. That is to say, if the user logs in on a different virtual machine (the third virtual machine), the application can also be received. As for the file storage server, it can be located on the management server, on a cluster, or on cluster servers distributed at corresponding locations (there may be more data interactions based on the same location).
[0139] Optionally, before sending the query request to the virtual desktop management server, the method further includes:
[0140] Send current status information to the virtual desktop management server in real time or at a scheduled time;
[0141] The virtual desktop management server is instructed to integrate the current status information of each virtual machine to form an information list.
[0142] In this embodiment, the virtual desktop management server may integrate the above status information for unified management and display through the UI of the virtual desktop management client side.
[0143] In one embodiment, sending the current status information to the virtual desktop management server in real time or periodically includes:
[0144] Sending JSON data to the virtual desktop management server, wherein the JSON data carries the current status information of the corresponding virtual machine;
[0145] The instructing the virtual desktop management server to integrate the current status information of each virtual machine to form an information list includes:
[0146] Instruct the virtual desktop management server to receive the JSON data, store the JSON data in a database, and update the data in the database.
[0147] In this embodiment, a json data can be used to briefly explain which user is currently connected to the virtual machine, the R terminal status, etc. This json data is sent to the virtual desktop management server and can be stored in the database, updated in real time according to the newly received data, and when this information needs to be queried, the latest information is also queried in real time from the database; and the data from the virtual machine to the virtual desktop management server can be implemented in a similar way to the heartbeat connection, such as sending a packet every 10 seconds. If it is not refreshed, the flag parameter is 0, and if it is refreshed, the flag parameter is 1, and the refreshed content is included; if the virtual machine is offline, the virtual desktop management server does not receive the information within a certain period of time (the setting itself is that the virtual machine sends the information to the virtual desktop management server through the virtual desktop management client), it is determined that the virtual machine is offline or unresponsive.
[0148] The data transmission method provided by the embodiment of the present disclosure can select the optimal path for file transfer between two virtual machines through the virtual desktop management server. In addition, the selection of the optimal path is more convenient than the prior art because the virtual desktop management server is located on the management server. When the management server directly uses the existing proxy server in the prior art, since the proxy server itself can obtain the location information of all virtual machines registered thereon, in this case, it is also very convenient for the virtual desktop management server to obtain the location information of each virtual machine. In addition, the method for determining the optimal path of the present disclosure is designed in consideration of the characteristics of the VDI system itself.
[0149] It should be noted that the virtual machine in the embodiment of the present disclosure refers to the cloud desktop management server responsible for managing all cloud desktops and users.
[0150] Specifically, if the two virtual machines are on the same server, there is no need to go through the network, and an internal data exchange can be performed based on the location of the data; if the two virtual machines are not on the same server, the virtual machines directly transmit data based on the peer information obtained from the virtual desktop management server.
[0151] Figure 3 A flowchart of a data transmission method provided by an embodiment of the present disclosure. Figure 3 As shown, the method is applied to a virtual desktop management server, and includes:
[0152] Step 301: Obtain a query request sent by a first virtual machine, wherein the query request is used to request a virtual desktop management server to send current status information of a second virtual machine to the first virtual machine; the virtual desktop management server stores current status information of at least one virtual machine;
[0153] Step 302: Send the current state information of the second virtual machine to the first virtual machine according to the query request;
[0154] Step 303: Obtain a data transmission request sent by the first virtual machine, where the data transmission request is used to request the virtual desktop management server to send a target transmission path to the first virtual machine;
[0155] Step 304: Send the target transmission path to the first virtual machine according to the data transmission request;
[0156] Step 305: Instruct the first virtual machine to send target data to the second virtual machine according to the current state information of the second virtual machine and the target transmission path.
[0157] In one embodiment, instructing the first virtual machine to send target data to the second virtual machine according to the current state information of the second virtual machine and the target transmission path includes:
[0158] If the user status in the current status information of the second virtual machine is an offline state, instruct the first virtual machine to send both the target transmission path and the target data to the virtual desktop management server;
[0159] receiving the target data and the target transmission path, and monitoring whether the user status in the current status information of the second virtual machine is an online state;
[0160] If it is monitored that the user state in the current state information of the second virtual machine is an online state, and a request for obtaining target data sent by the second virtual machine is received, the target data is sent to the second virtual machine according to the target transmission path.
[0161] In one embodiment, the receiving the target data and the target transmission receiving path, and monitoring whether the user status in the current status information of the second virtual machine is an online state includes:
[0162] Receiving the target data, and storing the target data in an offline file storage area of a file storage server of a virtual desktop management server;
[0163] Determine whether the user status in the current status information of the second virtual machine is an online state;
[0164] If the user status in the current status information of the second virtual machine is an online state, and the virtual desktop management server receives a request for obtaining target data sent by the second virtual machine, sending the target data to the second virtual machine according to the target transmission path includes:
[0165] If it is monitored that the user status in the current status information of the second virtual machine is an online state, detecting whether a request for obtaining the target data sent by the second virtual machine is received;
[0166] If the virtual desktop management server receives the request sent by the second virtual machine to obtain the target data, the target data is sent to the second virtual machine according to the target transmission path.
[0167] In one embodiment, before receiving the target data and the target transmission path and determining whether the user status in the current status information of the second virtual machine is an online state, the method further includes:
[0168] Setting a tag for the target data, wherein the tag carries user information;
[0169] Receiving the target data and the target transmission path, and determining whether the user state in the current state information of the second virtual machine is an online state includes:
[0170] If the user status in the current status information of the second virtual machine is an offline state, determining whether the target user is online in the third virtual machine according to the user information carried in the tag;
[0171] If the virtual desktop management server determines that the target user is online on the third virtual machine according to the user information carried in the tag, the target data is sent to the third virtual machine.
[0172] Figure 4 This is a structural diagram of a first virtual machine provided in an embodiment of the present disclosure. Figure 4As shown, the first virtual machine includes a first sending unit 401, a receiving unit 402, a second sending unit 403, a first obtaining unit 404 and a third sending unit 405; wherein the first sending unit 401 is used to send a query request to the virtual desktop management server, the query request is used to request the virtual desktop management server to send the current state information of the second virtual machine to the first virtual machine; the virtual desktop management server stores the current state information of at least one virtual machine; the receiving unit 402 is used to receive the current state information of the second virtual machine obtained by the virtual desktop management server according to the query request; the second sending unit 403 is used to send a data transmission request to the virtual desktop management server, the data transmission request is used to request the virtual desktop management server to send the target transmission path to the first virtual machine; the first obtaining unit 404 is used to obtain the target transmission path returned by the virtual desktop management server according to the data transmission request; the third sending unit 405 is used to send the target data to the second virtual machine according to the current state information of the second virtual machine and the target transmission path.
[0173] Figure 5 The following is an architecture diagram of a virtual desktop management server provided in an embodiment of the present disclosure. Figure 5 As shown, the virtual desktop management server includes a second acquisition unit 501, a query unit 502, a third acquisition unit 503, a fourth sending unit 504 and an indication unit 505; wherein the second acquisition unit 501 is used to acquire a query request sent by the first virtual machine, the query request is used to request the virtual desktop management server to send the current state information of the second virtual machine to the first virtual machine; the virtual desktop management server stores the current state information of at least one virtual machine; the query unit 502 is used to send the current state information of the second virtual machine to the first virtual machine according to the query request; the third acquisition unit 503 is used to acquire a data transmission request sent by the first virtual machine, the data transmission request is used to request the virtual desktop management server to send the target transmission path to the first virtual machine; the fourth sending unit 504 is used to send the target transmission path to the first virtual machine according to the data transmission request; the indication unit 505 is used to instruct the first virtual machine to send the target data to the second virtual machine according to the current state information of the second virtual machine and the target transmission path.
[0174] The embodiment of the present disclosure also provides a data transmission system, the data transmission system comprising a management server and a cloud server; at least a first virtual machine and a second virtual machine are running on the cloud server, a virtual desktop management server is provided on the management server, and the virtual desktop management server stores at least current status information of the first virtual machine and current status information of the second virtual machine;
[0175] The first virtual machine is used to send a query request to the virtual desktop management server, wherein the query request is used to request the virtual desktop management server to send the current status information of the second virtual machine to the first virtual machine; the virtual desktop management server stores the current status information of at least one virtual machine;
[0176] The virtual desktop management server is used to send the current state information of the second virtual machine to the first virtual machine according to the query request;
[0177] The first virtual machine is used to send a data transmission request to the virtual desktop management server, wherein the data transmission request is used to request the virtual desktop management server to send a target transmission path to the first virtual machine, wherein the target transmission path is an optimal transmission path between the first virtual machine and the second virtual machine;
[0178] The virtual desktop management server is used for sending the target transmission path to the first virtual machine according to the data transmission request;
[0179] The first virtual machine is used to send target data to the second virtual machine according to the current state information of the second virtual machine and the target transmission path.
[0180] In one embodiment, the first virtual machine and the second virtual machine are further used to send current status information to the virtual desktop management server in real time or periodically;
[0181] The virtual desktop management server is further used to integrate the current status information of each virtual machine to form an information list.
[0182] In one embodiment, the first virtual machine and the second virtual machine are used to send json data to the virtual desktop management server, wherein the json data carries current status information of the corresponding virtual machines;
[0183] The virtual desktop management server is used to receive the JSON data, store the JSON data in a database, and update the data in the database.
[0184] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The above-mentioned program can be pre-stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the above-mentioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0185] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the disclosure disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0186] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A data transmission method, applied to a first virtual machine, characterized in that: The method comprises: Sending a query request to a virtual desktop management server, wherein the query request is used to request the virtual desktop management server to send current status information of the second virtual machine to the first virtual machine; the virtual desktop management server stores current status information of at least one virtual machine; Receiving current status information of the second virtual machine obtained by the virtual desktop management server according to the query request; Sending a data transmission request to the virtual desktop management server, wherein the data transmission request is used to request the virtual desktop management server to send a target transmission path to the first virtual machine; the virtual desktop management server selects an optimal transmission path as the target transmission path according to the positions of the first virtual machine and the second virtual machine, and sends the target transmission path to the first virtual machine; Acquire the target transmission path returned by the virtual desktop management server according to the data transmission request; and send the target data to the second virtual machine according to the current state information of the second virtual machine and the target transmission path.
2. The method according to claim 1, characterized in that Before sending the query request to the virtual desktop management server, the method further includes: Send current status information to the virtual desktop management server in real time or at a scheduled time; The virtual desktop management server is instructed to integrate the current status information of each virtual machine to form an information list.
3. The method according to claim 2, characterized in that The sending of the current status information to the virtual desktop management server in real time or at a fixed time includes: Sending JSON data to the virtual desktop management server, wherein the JSON data carries the current status information of the corresponding virtual machine; The instructing the virtual desktop management server to integrate the current status information of each virtual machine to form an information list includes: Instruct the virtual desktop management server to receive the JSON data, store the JSON data in a database, and update the data in the database.
4. The method according to any one of claims 1 to 3, characterized in that: The sending the target data to the second virtual machine according to the current state information of the second virtual machine and the target transmission path includes: If the user status in the current status information of the second virtual machine is an offline state, sending both the target transmission path and the target data to the virtual desktop management server; Instructing the virtual desktop management server to receive the target data and the target transmission path, and monitoring whether the user status in the current status information of the second virtual machine is an online state; If it is monitored that the user status in the current status information of the second virtual machine is online, and the virtual desktop management server receives a request for obtaining target data sent by the second virtual machine, the virtual desktop management server is instructed to send the target data to the second virtual machine according to the target transmission path.
5. The method according to claim 4, characterized in that Before instructing the virtual desktop management server to receive the target data and the target transmission path and determining whether the user status in the current status information of the second virtual machine is an online state, the method further includes: Instructing the virtual desktop management server to set a tag for the target data, wherein the tag carries user information; Instructing the virtual desktop management server to receive the target data and the target transmission path, and determining whether the user status in the current status information of the second virtual machine is an online state includes: If the user status in the current status information of the second virtual machine is an offline state, instruct the virtual desktop management server to determine whether the target user is online in the third virtual machine according to the user information carried in the tag; If the virtual desktop management server determines that the target user is online on the third virtual machine according to the user information carried in the tag, the virtual desktop management server is instructed to send the target data to the third virtual machine.
6. A data transmission method, applied to a virtual desktop management server, characterized in that: The method comprises: Acquire a query request sent by the first virtual machine, wherein the query request is used to request the virtual desktop management server to send current status information of the second virtual machine to the first virtual machine; the virtual desktop management server stores current status information of at least one virtual machine; Sending the current state information of the second virtual machine to the first virtual machine according to the query request; Acquire a data transmission request sent by the first virtual machine, where the data transmission request is used to request the virtual desktop management server to send a target transmission path to the first virtual machine; According to the positions of the first virtual machine and the second virtual machine, selecting an optimal transmission path as a target transmission path, and sending the target transmission path to the first virtual machine; Instruct the first virtual machine to send target data to the second virtual machine according to the current state information of the second virtual machine and the target transmission path.
7. The method according to claim 6, characterized in that The instructing the first virtual machine to send target data to the second virtual machine according to the current state information of the second virtual machine and the target transmission path includes: If the user status in the current status information of the second virtual machine is an offline state, instruct the first virtual machine to send both the target transmission path and the target data to the virtual desktop management server; receiving the target data and the target transmission path, and monitoring whether the user status in the current status information of the second virtual machine is an online state; If it is monitored that the user state in the current state information of the second virtual machine is an online state, and a request for obtaining target data sent by the second virtual machine is received, the target data is sent to the second virtual machine according to the target transmission path.
8. The method according to claim 7, characterized in that Before receiving the target data and the target transmission path and determining whether the user status in the current status information of the second virtual machine is an online state, the method further includes: Setting a tag for the target data, wherein the tag carries user information; Receiving the target data and the target transmission path, and determining whether the user state in the current state information of the second virtual machine is an online state includes: If the user status in the current status information of the second virtual machine is an offline state, determining whether the target user is online in the third virtual machine according to the user information carried in the tag; If the virtual desktop management server determines that the target user is online on the third virtual machine according to the user information carried in the tag, the target data is sent to the third virtual machine.
9. A first virtual machine, characterized in that: The first virtual machine includes: A first sending unit sends a query request to a virtual desktop management server, wherein the query request is used to request the virtual desktop management server to send current status information of the second virtual machine to the first virtual machine; the virtual desktop management server stores current status information of at least one virtual machine; A receiving unit, receiving current status information of the second virtual machine obtained by the virtual desktop management server according to the query request; A second sending unit sends a data transmission request to the virtual desktop management server, wherein the data transmission request is used to request the virtual desktop management server to send a target transmission path to the first virtual machine; the virtual desktop management server selects an optimal transmission path as the target transmission path according to the positions of the first virtual machine and the second virtual machine, and sends the target transmission path to the first virtual machine; A first acquiring unit, acquiring a target transmission path returned by the virtual desktop management server according to the data transmission request; The third sending unit sends the target data to the second virtual machine according to the current state information of the second virtual machine and the target transmission path.
10. A virtual desktop management server, characterized in that: The virtual desktop management server includes: A second acquisition unit acquires a query request sent by the first virtual machine, wherein the query request is used to request the virtual desktop management server to send current status information of the second virtual machine to the first virtual machine; the virtual desktop management server stores current status information of at least one virtual machine; a query unit, sending the current state information of the second virtual machine to the first virtual machine according to the query request; A third acquiring unit, acquiring a data transmission request sent by the first virtual machine, wherein the data transmission request is used to request the virtual desktop management server to send a target transmission path to the first virtual machine; A fourth sending unit, selecting an optimal transmission path as a target transmission path according to the positions of the first virtual machine and the second virtual machine, and sending the target transmission path to the first virtual machine; The instructing unit instructs the first virtual machine to send target data to the second virtual machine according to the current state information of the second virtual machine and the target transmission path.
11. A data transmission system, characterized in that: The data transmission system includes a management server and a cloud server; at least a first virtual machine and a second virtual machine are running on the cloud server, a virtual desktop management server is provided on the management server, and the virtual desktop management server stores at least current status information of the first virtual machine and current status information of the second virtual machine; The first virtual machine is used to send a query request to the virtual desktop management server, wherein the query request is used to request the virtual desktop management server to send current status information of the second virtual machine to the first virtual machine; The virtual desktop management server stores current status information of at least one virtual machine; The virtual desktop management server is used to send the current state information of the second virtual machine to the first virtual machine according to the query request; The first virtual machine is used to send a data transmission request to the virtual desktop management server, wherein the data transmission request is used to request the virtual desktop management server to send a target transmission path to the first virtual machine, wherein the target transmission path is an optimal transmission path between the first virtual machine and the second virtual machine; The virtual desktop management server is used for sending the target transmission path to the first virtual machine according to the data transmission request; The first virtual machine is used to send target data to the second virtual machine according to the current state information of the second virtual machine and the target transmission path.
Citation Information
Patent Citations
Method and system for realizing data transmission between virtual machines
CN102075537A
Data transmission method and system, zero terminal and cloud server
CN113726852A