Desktop cloud file transmission method and desktop cloud system
By splitting the files into file combinations and file slices, and transmitting them in the order of combination identification, if the transmission fails, retransmission starts from the interrupted file combination, which solves the problem of low file transfer efficiency between the virtual machine and the thin terminal, and realizes the More efficient transmission process.
Patent Information
- Application Number
- CN202411530498.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2024-12-31
AI Technical Summary
In a desktop cloud system, the file transfer between the virtual machine and the thin terminal is slow due to the isolation between the service network and the management network, and large files are easily interrupted, resulting in retransmission, which takes a long time and is inefficient.
Split the target file into multiple file combinations. Each file combination consists of multiple file slices and is transmitted through the remote desktop protocol in the order of combination identification. If the transmission fails, retransmission will start from the interrupted file combination to avoid full retransmission.
It improves the efficiency of file transmission, reduces transmission time, and enhances the stability of transmission, especially when the service network is isolated from the management network.
Smart Images

Figure CN119232729A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a desktop cloud file transmission method and a desktop cloud system. Background Art
[0002] At present, desktop cloud mainly distributes server-side virtual machines to various office users through virtualization technology. Users can use simple office computers, namely thin terminals, to access corresponding virtual machines through configured client programs. There is no need to frequently update office computers of office users. Flexible upgrades of virtual machine configurations can be achieved on the server side. At this time, a management network is formed between the server side and the thin terminal, and a business network is formed between the virtual machines. The management network and the business network are isolated from each other to ensure the security of virtual machine data.
[0003] However, when the virtual machine in the business network transfers files to the thin terminal in the management network, the business network and the management network are isolated from each other, so the rate of file transfer between the virtual machine and the thin terminal through the virtual serial port is slow. If the transferred file is large, it is inevitable that the transmission will be interrupted. At this time, the file needs to be retransmitted, resulting in a very high time consumption and poor transmission efficiency. Summary of the invention
[0004] In view of this, the present application provides a desktop cloud file transmission method and a desktop cloud system, as follows:
[0005] A file transmission method for a desktop cloud is applied to a virtual machine deployed on a first device, the virtual machine is allocated to a second device, and a transmission channel based on a remote desktop protocol is provided between an operating system of the second device and the virtual machine;
[0006] The method comprises:
[0007] The virtual machine splits the target file to be transmitted to obtain a plurality of file combinations, each of which has a combination identifier, and each of which is composed of at least one file piece; the size of the file piece is related to the data size allowed to be transmitted by the transmission channel;
[0008] The virtual machine transmits each file fragment in each file combination to the second device through the transmission channel in sequence according to the order of the file combinations represented by the combination identifiers. When the second device detects that the transmission of a first file combination fails, it transmits the combination identifier of the first file combination to the virtual machine.
[0009] In response to the received combination identifier of the first file combination, the virtual machine transmits the first file combination and a second file combination starting from the first file combination, where the second file combination is a file combination sorted after the first file combination.
[0010] The above method, preferably, further comprises:
[0011] The virtual machine transmits the first verification information corresponding to each of the file combinations to the second device;
[0012] After obtaining second verification information according to the received file combination, the second device determines whether the file combination fails to be transmitted according to the second verification information and the first verification information.
[0013] In the above method, preferably, before the virtual machine splits the target file to be transmitted, the method further includes:
[0014] The virtual machine generates a permission request according to the target file; the permission request includes at least one application parameter;
[0015] The virtual machine sends the permission request to the server deployed on the first device, the server sends the permission request to the control end deployed on the third device, the control end feeds back the request result to the server according to the application parameters in the permission request, and the server feeds back the request result to the virtual machine;
[0016] The virtual machine executes the splitting of the target file to be transmitted if the request result indicates that the target file can be transmitted.
[0017] In the above method, preferably, the application parameters include: the file path of the target file and the complete verification information of the target file;
[0018] Wherein, the control end saves the application parameters locally.
[0019] The above method, preferably, further comprises:
[0020] The virtual machine transmits the third verification information corresponding to the target file to the second device;
[0021] Among them, when the second device determines that the target file is successfully transferred according to the third verification information, the second device sends a file landing request to the control end, and the file landing request includes at least fourth verification information; when the control end obtains a landing judgment result based on the received fourth verification information and the complete verification information stored locally, the control end feeds back the landing judgment result to the second device; the second device stores the target file to the hard disk according to the landing judgment result.
[0022] A file transmission method for a desktop cloud is applied to a second device, a virtual machine is deployed on a first device, the virtual machine is allocated to the second device, and a transmission channel based on a remote desktop protocol is provided between an operating system of the second device and the virtual machine;
[0023] The method comprises:
[0024] The second device receives each file slice in each file combination transmitted sequentially by the virtual machine through the transmission channel; wherein the virtual machine splits the target file to be transmitted to obtain a plurality of the file combinations, each of the file combinations has a combination identifier, and each of the file combinations is composed of at least one file slice; the size of the file slice is related to the data size allowed to be transmitted by the transmission channel; the virtual machine sequentially transmits each of the file combinations according to the order between the file combinations represented by the combination identifier;
[0025] The second device detects whether each file combination fails in transmission;
[0026] When the second device detects that the transmission of the first file combination fails, it transmits the combination identifier of the first file combination to the virtual machine; in response to the received combination identifier of the first file combination, the virtual machine transmits the first file combination and a second file combination starting from the first file combination, where the second file combination is a file combination sorted after the first file combination.
[0027] In the above method, preferably, the second device detects whether each file combination fails to be transmitted, including:
[0028] The second device receives first verification information corresponding to each file combination transmitted by the virtual machine;
[0029] The second device obtains second verification information according to the received file combination;
[0030] The second device determines whether the file combination fails to be transmitted according to the first verification information and the second verification information.
[0031] The above method, preferably, further comprises:
[0032] The second device receives third verification information corresponding to the target file transmitted by the virtual machine;
[0033] The second device determines whether the target file is successfully transferred according to the third verification information;
[0034] When determining that the target file is successfully transferred, the second device sends a file landing request to the control end deployed on the third device, wherein the file landing request includes at least fourth verification information; when the control end obtains a landing judgment result according to the received fourth verification information and the complete verification information stored locally, the control end feeds back the landing judgment result to the second device; the complete verification information is transmitted from the virtual machine to the control end through the server end deployed by the first device;
[0035] The second device stores the target file in a hard disk according to the landing determination result.
[0036] A file transmission method for a desktop cloud is applied to a third device, wherein a control terminal is deployed on the third device, a server and a virtual machine are deployed on a first device, the virtual machine is allocated to a second device, and a transmission channel based on a remote desktop protocol is provided between an operating system of the second device and the virtual machine;
[0037] The method comprises:
[0038] The control end receives the permission request sent by the server end, wherein the permission request is generated by the virtual machine according to the target file to be transmitted and transmitted to the server end;
[0039] The control end feeds back a request result to the server end according to the application parameters in the permission request, wherein the request result indicates whether the target file is allowed to be transferred;
[0040] The server feeds back the request result to the virtual machine, and the virtual machine executes the following process if the request result indicates that the target file can be transferred:
[0041] The virtual machine splits the target file to be transmitted to obtain a plurality of file combinations, each of which has a combination identifier, and each of which is composed of at least one file piece; the size of the file piece is related to the data size allowed to be transmitted by the transmission channel;
[0042] The virtual machine transmits each file fragment in each file combination to the second device through the transmission channel in sequence according to the order of the file combinations represented by the combination identifiers. When the second device detects that the transmission of a first file combination fails, it transmits the combination identifier of the first file combination to the virtual machine.
[0043] In response to the received combination identifier of the first file combination, the virtual machine transmits the first file combination and a second file combination starting from the first file combination, where the second file combination is a file combination sorted after the first file combination.
[0044] A desktop cloud system comprises: a first device and a second device; a virtual machine is deployed on the first device, the virtual machine is allocated to the second device, and a transmission channel based on a remote desktop protocol is provided between an operating system of the second device and the virtual machine;
[0045] in:
[0046] The virtual machine splits the target file to be transmitted to obtain a plurality of file combinations, each of which has a combination identifier, and each of which is composed of at least one file piece; the size of the file piece is related to the data size allowed to be transmitted by the transmission channel;
[0047] The virtual machine transmits each file piece in each file combination to the second device through the transmission channel in sequence according to the order of the file combinations represented by the combination identifiers;
[0048] When the second device detects that the transmission of the first file combination fails, the second device transmits the combination identifier of the first file combination to the virtual machine;
[0049] In response to the received combination identifier of the first file combination, the virtual machine transmits the first file combination and a second file combination starting from the first file combination, where the second file combination is a file combination sorted after the first file combination.
[0050] It can be seen from the above technical solutions that in a desktop cloud file transmission method and desktop cloud system disclosed in the present application, when a virtual machine needs to transmit a target file to a second device deployed thereon, namely a thin terminal, the target file can be split into multiple file combinations, and the size of the file fragments in each file combination can be transmitted by a transmission channel based on the remote desktop protocol between the virtual machine and the thin terminal. Thus, the virtual machine sequentially transmits the file fragments in each file combination to the thin terminal according to the order between the file combinations. Thus, when the thin terminal detects that a certain file combination fails to be transmitted, it notifies the virtual machine to transmit the file combination that failed to be transmitted and other file combinations that are arranged after the file combination that failed to be transmitted. The virtual machine does not need to retransmit all the files starting from the first file combination, so that other file combinations arranged before the file combination that failed to be transmitted do not need to be retransmitted. Therefore, in this embodiment, under the premise of isolation between the business network (the network where the virtual machine is located) and the management network (the network where the thin terminal is located), when transmitting files through the transmission channel between the virtual machine and the thin terminal, if there is an interruption, retransmission starts from the interrupted file combination, and all retransmission is not required, thereby reducing the time consumption of file transmission, thereby improving transmission efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0052] Figure 1 A flowchart of a desktop cloud file transmission method provided in Embodiment 1 of the present application;
[0053] Figure 2 This is a schematic diagram of the desktop cloud architecture;
[0054] Figure 3 This is an example diagram of splitting the target file in Example 1 of the present application;
[0055] Figure 4 Another flow chart of a desktop cloud file transmission method provided in the first embodiment of the present application;
[0056] Figure 5 Another flow chart of a desktop cloud file transmission method provided in the first embodiment of the present application;
[0057] Figure 6 Another flow chart of a desktop cloud file transmission method provided in the first embodiment of the present application;
[0058] Figure 7 A flowchart of a desktop cloud file transmission method provided in Embodiment 2 of the present application;
[0059] Figure 8 A partial flow chart of a desktop cloud file transfer method provided in Embodiment 2 of the present application;
[0060] Fig. 9 Another flow chart of a desktop cloud file transmission method provided in Embodiment 2 of the present application;
[0061] Fig.10 A flowchart of a desktop cloud file transmission method provided in Embodiment 3 of the present application;
[0062] Fig.11 This is a schematic diagram of the architecture of the desktop cloud in an embodiment of the present application;
[0063] Fig.12 Another flow chart of a desktop cloud file transmission method provided in Embodiment 3 of the present application;
[0064] Fig.13 A schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present application;
[0065] Fig.14A schematic diagram of the structure of an electronic device provided in Embodiment 5 of the present application;
[0066] Fig.15 A schematic diagram of the structure of an electronic device provided in Embodiment 6 of the present application;
[0067] Fig.16 A schematic diagram of the architecture of a desktop cloud system provided in Embodiment 7 of the present application;
[0068] Fig.17 Another schematic diagram of the architecture of a desktop cloud system provided in Embodiment 7 of the present application;
[0069] Fig.18 This is an example diagram of the four parts involved in file transmission in an embodiment of the present application;
[0070] Fig.19 A schematic diagram of the process included in the embodiment of the present application;
[0071] Fig. 20 A schematic diagram of the permission application process for file export in an embodiment of the present application;
[0072] Fig.21 It is a schematic diagram of the process of breakpoint resume in the embodiment of the present application. DETAILED DESCRIPTION
[0073] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0074] refer to Figure 1 As shown, it is a flowchart of a desktop cloud file transfer method provided in the first embodiment of the present application. The method can be applied to a virtual machine deployed on a first device. The first device can be an electronic device capable of deploying a virtual machine, such as a server. One or more virtual machines are deployed on the first device. The virtual machines are assigned to the second device, such as Figure 2As shown in , the second device can be a device with relatively simple hardware resource configuration, such as a thin terminal. A first network is deployed between the first device and the second device, so that there is a data connection between the first device and the second device, that is, a management network. In the management network, the first device can allocate and manage virtual machines for the second device, such as the first device enables the virtual machine allocated to the second device or the first device disables the virtual machine allocated to the second device. There is a second network, that is, a business network, between each virtual machine allocated to the second device, that is, a virtual machine deployed on the first device. In the business network, virtual machines can communicate with each other. However, the business network and the management network are isolated from each other. For example, the operating system of the second device can be connected to the first device through the management network, but the virtual machine accessed by the client program on the second device is in the business network and is not interconnected with the operating system of the second device. A client program that can access the virtual machine can be installed on the operating system of the second device, and a transmission channel based on the remote desktop protocol, that is, a transmission channel based on spice, is provided between the operating system of the second device and the virtual machine allocated to it. The transmission channel based on the remote desktop protocol is specifically: a transmission channel established between the virtual machine and the thin terminal based on the virtual serial port inside the virtual machine and with the help of the spice-port method. Thus, spice-port uses the spice transmission protocol between the desktop cloud thin terminal and the server deployed on the first device, without the need to use an external network for direct connection, thereby ensuring the security of data transmission. The technical solution in this embodiment is mainly used to improve the efficiency of file transmission between the virtual machine and the thin terminal under the premise that the management network and the business network are isolated from each other.
[0075] Specifically, the method in this embodiment may include the following steps:
[0076] Step 101: The virtual machine splits the target file to be transmitted to obtain a plurality of file combinations.
[0077] Each file combination has a combination identifier, which can uniquely represent the file combination to which it belongs, such as a combination code or a combination number. Figure 3 0 to n. Each file combination is composed of at least one file slice, and the size of each file slice is related to the data size allowed to be transmitted through the transmission channel. For example, the maximum amount of data allowed to be transmitted through the spice-based transmission channel between the virtual machine and the first device is 64KB. Accordingly, each file slice in the split file combination in this embodiment is at most 64KB.
[0078] It should be noted that the maximum number of file pieces included in the file combination can be set according to business needs. For example, in this embodiment, the maximum number of file pieces included in the file combination can be set to 50. Since the file size of the target file may not be evenly divided by the maximum data amount of the file piece, and the size of the target file may not be evenly divided by the maximum value of the combined data of the file combination, the file combination with the maximum combined data value here is: the file combination contains a maximum number of file pieces, such as 50, and each file piece is a file piece with a maximum data amount, such as 64KB. At this time, the number of file pieces included in the last file combination split from the target file is less than or equal to the maximum number, and the size of the last file piece included in the last file combination is less than or equal to the maximum data amount allowed to be transmitted by the transmission channel. For example, the last file combination split from the target file may contain 26 file pieces (less than 50 file pieces), and the size of the last file piece included in the last file combination may be 32KB (less than 64KB). Figure 3 as shown in .
[0079] In one implementation, the virtual machine can find the target file according to the file path of the target file and read the file size of the target file; then, according to the maximum data size of the file slice, such as 64KB, the target file is split into multiple file slices, and the last file in the target file whose size is less than the maximum data size is used as a file slice (the file size of the target file cannot be evenly divided by the maximum data size of the file slice); then, according to the maximum number of file slices included in the file combination, such as 50, the file slices are combined into multiple file combinations, and each file combination is identified so that each file combination has a combination identification, and the last file slices in the target file whose number is less than the maximum number form a file combination (the number of file slices cannot be evenly divided by the maximum number), thereby, the number of file slices included in the last file combination is less than or equal to the maximum number, and the size of the last file slice included in the last file combination is less than or equal to the maximum data amount allowed to be transmitted by the transmission channel.
[0080] In another implementation, the virtual machine can find the target file according to the file path of the target file, and read the file size of the target file; then, according to the maximum value of the combined data of the file combination (the file combination contains a maximum number of file pieces, such as 50, and each file piece is a file piece with a maximum data amount, such as 64KB), such as 64KB×50, the target file is split into multiple file combinations, and each file combination is identified so that each file combination has a combination identification, and the last files in the target file whose data amount is less than the maximum value of the combined data are combined into one file combination (the size of the target file cannot be divided by the maximum value of the combined data of the file combination); then, according to the maximum data amount of the file piece, such as 64KB, each of the file combinations is split into multiple file pieces, and the last file in the last file combination whose size is less than the maximum data amount is used as one file piece (the size of the file combination cannot be divided by the maximum data amount of the file piece); thus, the number of file pieces contained in the last file combination is less than or equal to the maximum number, and the size of the last file piece contained in the last file combination is less than or equal to the maximum data amount allowed to be transmitted by the transmission channel.
[0081] Step 102: The virtual machine transmits each file slice in each file combination to the second device through the transmission channel in sequence according to the order of the file combinations represented by the combination identifiers.
[0082] The second device sequentially receives each file fragment in each file combination transmitted by the virtual machine, and after receiving each file combination, detects whether the file combination fails to be transmitted, and transmits the combination identifier of the first file combination to the virtual machine when it is detected that the transmission of the first file combination fails.
[0083] Specifically, the combination identifier represents the order between the file combinations to which it belongs through the coding sequence or numbering sequence it represents. For example, the combination identifier is a code consisting of only letters, a number consisting of only values, or a code consisting of letters and values, and the order between the letters a to z or the order between 0 to 9 represents the order between the file combinations to which the combination identifier belongs.
[0084] For example, the maximum value of the combination number of the file combination can be: the file size of the target file is divided by the maximum value of the combination data of the file combination, the quotient is rounded up and then subtracted by 1. Taking the maximum value of the combination data of the file combination as 64KB×50 as an example, the file size of the target file, such as 20G, is divided by 3200KB, and then the quotient is rounded up and then subtracted by 1 to obtain the maximum value of the combination number of the file combination. According to the maximum number, each file combination can be numbered starting from 0 to obtain the combination number of each file combination.
[0085] Based on this, the virtual machine first transmits each file piece in the first file combination whose combination identifier is ranked first, and after transmitting each file piece in the first file combination, it transmits each file piece in the second file combination whose combination identifier is ranked second, and so on, until the combination identifier of the file combination whose transmission failed is fed back by the second device or until each file piece of the last file is transmitted. After receiving the maximum number of file pieces, the second device can determine that these file pieces are file pieces included in the first file combination, and then detect whether the first file combination fails to be transmitted. If the transmission fails, stop receiving other file pieces subsequently transmitted by the virtual machine, and feedback the combination identifier of the first file combination to the virtual machine; if the first file combination does not fail to be transmitted, the second device continues to wait for the next maximum number of file pieces to be received, and then use these file pieces as file pieces included in the second file combination, detect whether the second file combination fails to be transmitted, if the transmission fails, stop receiving other file pieces subsequently transmitted by the virtual machine, and feedback the combination identifier of the second file combination to the virtual machine; if the second file combination does not fail to be transmitted, the second device continues to wait for the next maximum number of file pieces to be received, and then use these file pieces as file pieces included in the third file combination, detect whether the third file combination fails to be transmitted, and so on, until a transmission failure is detected, and the combination identifier of the file combination that failed to be transmitted, i.e., the first file combination, is fed back to the virtual machine or until it is detected that the last file combination does not fail to be transmitted.
[0086] In one implementation, when the second device detects that the transmission of the first file combination fails, it may divide the sum of the file sizes of all received file fragments by the maximum value of the combined data of the file combination, and then determine the combination identifier of the first file combination based on the obtained quotient.
[0087] For example, if the file combination is numbered starting from 0, the second device may divide the sum of the file sizes of all the received file fragments by the maximum value of the combination data of the file combination, round up the obtained quotient and then subtract 1 to determine the value obtained as the combination number of the first file.
[0088] In another implementation, the combination identifier of the file combination is carried in a certain file piece in the file combination, so that when the second device detects that the transmission of the first file combination fails, it extracts the combination identifier carried in the file piece in the first file combination. If the combination identifier is not extracted from all the file pieces of the first file combination, it means that the file piece carrying the combination identifier has not been successfully transmitted. At this time, the combination identifier can be extracted from the previously received file combination, and the combination identifier of the first file combination can be obtained based on the extracted combination identifier. For example, the combination number of the previously received file combination is increased by 1, which is the combination identifier of the first file combination.
[0089] In another implementation, the combination identifier of the file combination is transmitted to the second device before the first file fragment in the file combination is transmitted. Therefore, when the second device detects that the transmission of the first file combination fails, it directly obtains the combination identifier of the first file combination from the received combination identifier, that is, the combination identifier received most recently.
[0090] Step 103: In response to the received combination identifier of the first file combination, the virtual machine transmits the first file combination and the second file combination starting from the first file combination.
[0091] The second file combination is a file combination that is sorted after the first file combination. That is, after the virtual machine receives the combination identifier of the first file combination, no matter which file combination or file fragment the virtual machine transmits to, the virtual machine starts to retransmit the file combination from which the target file is split from the first file combination, that is, the file combination sorted before the first file combination is not transmitted, thereby reducing the number of retransmitted file combinations.
[0092] It should be noted that, after receiving the file pieces in the file combination, the second device may perform file splicing between the file pieces and between the file combination to obtain the target file.
[0093] It can be seen from the above technical solution that in a file transmission method for a desktop cloud provided by an embodiment of the present application, when a virtual machine needs to transmit a target file to a second device, i.e., a thin terminal, on which the virtual machine is deployed, the target file can be split into multiple file combinations, and the size of the file fragments in each file combination can be transmitted by a transmission channel based on the remote desktop protocol between the virtual machine and the thin terminal. Thus, the virtual machine transmits the file fragments in each file combination to the thin terminal in sequence according to the order between the file combinations. In this way, when the thin terminal detects that a certain file combination fails to be transmitted, it notifies the virtual machine to transmit the file combination that failed to be transmitted and other file combinations that are sorted after the file combination that failed to be transmitted. The virtual machine does not need to retransmit all the files starting from the first file combination, so that other file combinations that are sorted before the file combination that failed to be transmitted do not need to be retransmitted. Therefore, in this embodiment, under the premise of isolation between the business network (the network where the virtual machine is located) and the management network (the network where the thin terminal is located), when transmitting files through the transmission channel between the virtual machine and the thin terminal, if there is an interruption, retransmission starts from the interrupted file combination, and all retransmission is not required, thereby reducing the time consumption of file transmission, thereby improving transmission efficiency.
[0094] In one implementation, in order to enable the second device to determine whether the file combination fails to be transmitted, the virtual machine may also perform the following processing, such as Figure 4 As shown in:
[0095] Step 104: The virtual machine transmits the first verification information corresponding to each file combination to the second device.
[0096] The first verification information may be verification information obtained by the virtual machine performing verification calculation on the file combination, such as an MD5 verification code.
[0097] In one implementation, the virtual machine may transmit the first verification information corresponding to the file combination to the second device through a transmission channel before transmitting the file combination;
[0098] In another implementation, the virtual machine may transmit the first verification information corresponding to the file combination to the second device through the transmission channel after all the file pieces in the file combination are transmitted;
[0099] In another implementation, the virtual machine may transmit the first verification information corresponding to the file combination to the second device along with the file piece while transmitting each file piece in the file combination;
[0100] In another implementation, the virtual machine may pre-transmit first verification information corresponding to all file combinations to the second device before transmitting the first file combination.
[0101] Based on this, after receiving the first verification information corresponding to the file combination, the second device determines whether the file combination fails to be transmitted according to the first verification information.
[0102] Specifically, after receiving all the file pieces in the file combination, the second device may obtain the second verification information according to the received file combination, such as performing MD5 calculation on the file combination to obtain the MD5 verification code as the second verification information; then, according to the second verification information and the first verification information, determine whether the file combination fails to be transmitted. For example, the second device compares the first verification information with the second verification information. If the first verification information and the second verification information are consistent, then it can be determined that the file combination is successfully transmitted. If the first verification information and the second verification information are inconsistent, then it can be determined that the file combination fails to be transmitted.
[0103] It should be noted that the larger the maximum number of file fragments contained in the file combination, the smaller the number of file combinations obtained by splitting the target file. Correspondingly, the fewer the number of verifications performed after the second device receives the file combination. In this way, by setting a larger maximum number, the verification time can be reduced, thereby further improving the transmission efficiency.
[0104] In one implementation, before step 101, the method in this embodiment may further include the following processing: Figure 5 As shown in:
[0105] Step 105: The virtual machine generates a permission request according to the target file.
[0106] Among them, the permission request may include at least one application parameter, and the application parameter is information that represents the target file. For example, the application parameter may include: at least one of the file path of the target file and the complete verification information of the target file. The file path represents the storage path of the target file, and of course also includes the file name of the target file. The complete verification information of the target file can be obtained by the virtual machine performing a verification calculation on the target file. For example, the virtual machine performs MD5 calculation on the target file to obtain the complete MD5 verification code of the target file.
[0107] Step 106: The virtual machine sends the permission request to the server deployed on the first device.
[0108] The server is used to manage the virtual machine, such as enabling or disabling the virtual machine, etc. Specifically, the virtual machine can send a permission request to the server through a connection channel such as an http channel between the virtual machine and the server.
[0109] Based on this, the server sends a permission request to the control end deployed on the third device. The control end feeds back the request result to the server according to the application parameters in the permission request. The request result indicates whether the control end allows the virtual machine to transfer the target file to the second device. The server feeds back the request result to the virtual machine.
[0110] The third device may be an electronic device independent of the first device. The server may send the permission request to the control terminal through a connection channel such as an HTTP channel between the server and the control terminal. The control terminal may feed back the request result to the server through a connection channel between the server and the control terminal. Correspondingly, the server may send the permission request to the virtual machine through a connection channel between the server and the virtual machine.
[0111] In one implementation, the control end can search for permission information corresponding to the target file represented by the application parameters in a pre-set permission list. If the permission information corresponding to the target file found indicates that the virtual machine is allowed to transfer the target file to the thin terminal, then a request result indicating that the control end allows the virtual machine to transfer the target file to the second device can be obtained. The control end feeds back the request result to the server, and the server feeds back the request result to the virtual machine. If the permission information corresponding to the target file is not found or the permission information corresponding to the target file found indicates that the virtual machine is prohibited from transferring the target file to the thin terminal, then a request result indicating that the control end prohibits the virtual machine from transferring the target file to the second device can be obtained. The control end feeds back the request result to the server, and the server feeds back the request result to the virtual machine.
[0112] In another implementation, the control end may output the request information to the user terminal of the audit user, such as a mobile phone, by short message, email, etc., and the user terminal responds to the input operation of the audit user on the request information and feeds back the request result to the control end. The request result indicates whether the control end allows the virtual machine to transfer the target file to the second device. The control end feeds back the request result to the service end, and the service end feeds back the request result to the virtual machine.
[0113] Step 107: When the request result indicates that the target file can be transferred, the virtual machine executes step 101.
[0114] It can be seen that in this embodiment, before the virtual machine splits the target file, it first requests the control end through the server end for permission to transfer the target file. When the control end allows the virtual machine to transfer the target file to the second device, the virtual machine starts to split the target file. If the control end prohibits the virtual machine from transmitting the target file to the second device, then the virtual machine does not need to split the target file, let alone transmit the file combination to the second device, thereby avoiding the leakage of the target file and further improving the security of the target file.
[0115] Based on the above implementation, after the permission request is transmitted to the control end, the control end saves the application parameters in the permission request, such as the file path and integrity verification information, locally, i.e., the third device, so that the control end can control whether the second device can save the target file to the local hard disk.
[0116] Specifically, the virtual machine can also perform the following processing, such as Figure 6 As shown in:
[0117] Step 108: The virtual machine transmits the third verification information corresponding to the target file to the second device.
[0118] The third verification information corresponding to the target file may be verification information obtained by the virtual machine performing verification calculation on the target file. For example, the virtual machine performs MD5 calculation on the target file to obtain an MD5 verification code as the third verification information.
[0119] In one implementation, the virtual machine may transmit the third verification information to the second device through the transmission channel after transmitting the last file combination to the second device;
[0120] In another implementation, the virtual machine may transmit the third verification information to the second device through the transmission channel before transmitting the first file combination to the second device;
[0121] In another implementation, the virtual machine may transmit the third verification information along with the file combination to the second device through the transmission channel when transmitting any file combination.
[0122] Based on this, after receiving the third verification information corresponding to the target file, the second device determines whether the target file is successfully transmitted according to the third verification information.
[0123] Specifically, after receiving all the file pieces in all the file combinations of the target file, the second device may obtain the fifth verification information according to the file pieces in the received file combinations, such as performing MD5 calculation on all the file pieces in all the file combinations to obtain the MD5 verification code as the fifth verification information; then, according to the fifth verification information and the third verification information, determine whether the target file is successfully transmitted. For example, the second device compares the third verification information with the fifth verification information. If the third verification information is consistent with the fifth verification information, then it can be determined that the target file is successfully transmitted. If the third verification information is inconsistent with the fifth verification information, then it can be determined that the target file is failed to be transmitted.
[0124] It should be noted that if the second device determines that each file combination is transmitted successfully when it receives each file combination, then errors may occur in the splicing of file fragments in the file combination, resulting in errors in the target file. At this time, the second device can perform integrity verification on the target file through the third verification information transmitted by the virtual machine and the fifth verification information obtained by the second device itself to determine whether the target file is transmitted successfully, thereby improving the reliability of data transmission.
[0125] Based on this, when the second device determines that the target file is successfully transferred according to the third verification information, the second device can send a file landing request to the control end, and the file landing request is used to request that the target file be stored on the local hard disk, that is, the hard disk of the second device.
[0126] Among them, the file landing request contains at least the fourth verification information. The fourth verification information can be the third verification information, or the fourth verification information can be the verification information obtained by the second device according to the received target file verification calculation, that is, the fifth verification information. Since the second device determines that the target file is successfully transferred, the third verification information and the fifth verification information are consistent. Therefore, the fourth verification information in the file landing request can be the fifth verification information recalculated by the second device or the third verification information transmitted by the virtual machine directly used by the second device.
[0127] Based on this, the control end obtains the landing judgment result according to the received fourth verification information and the locally stored complete verification information. Specifically, the control end compares the fourth verification information with the locally stored complete verification information. If the comparison is consistent, then the landing judgment result indicating that the target file is allowed to land is obtained; if the comparison is inconsistent, then the landing judgment result indicating that the target file is prohibited from landing is obtained. Afterwards, when the control end obtains the landing judgment result, it feeds back the landing judgment result to the second device, so that the second device can store the target file to the hard disk according to the landing judgment result.
[0128] Specifically, if the landing judgment result indicates that the target file is allowed to be landed, then the second device stores the target file in a corresponding storage area of the hard disk;
[0129] If the landing judgment result indicates that the target file is prohibited from landing, the second device cannot save the target file to the hard disk. At this time, the second device can delete the target file currently in the memory area, or the second device can re-join the file fragments in the received file combination, and then request landing to the control end again until the number of requests reaches the threshold.
[0130] refer to Figure 7 , is a flowchart of a desktop cloud file transfer method provided in Embodiment 2 of the present application, which can be applied to Figure 2The second device shown in the figure. The technical solution in this embodiment is mainly used to improve the file transmission efficiency between the virtual machine and the thin terminal under the premise that the management network and the business network are isolated from each other.
[0131] Specifically, the method in this embodiment may include the following steps:
[0132] Step 701: The second device receives each file piece in each file combination transmitted sequentially by the virtual machine through a transmission channel.
[0133] The virtual machine splits the target file to be transmitted to obtain multiple file combinations, each of which has a combination identifier, and each of which is composed of at least one file slice. The size of the file slice is related to the data size allowed to be transmitted by the transmission channel; the virtual machine sequentially transmits each file combination to the second device according to the order between the file combinations represented by the combination identifier.
[0134] Step 702: the second device detects whether the transmission of each file combination fails. If it is detected that the transmission of the first file combination fails, step 703 is executed;
[0135] Step 703: The second device transmits the combination identifier of the first file combination to the virtual machine.
[0136] The virtual machine responds to the received combination identifier of the first file combination, starts from the first file combination, and transmits the first file combination and the second file combination, where the second file combination is a file combination sorted after the first file combination.
[0137] It can be seen from the above technical solution that in a file transmission method for a desktop cloud provided by an embodiment of the present application, when a virtual machine needs to transmit a target file to a second device, i.e., a thin terminal, on which the virtual machine is deployed, the target file can be split into multiple file combinations, and the size of the file fragments in each file combination can be transmitted by a transmission channel based on the remote desktop protocol between the virtual machine and the thin terminal. Thus, the virtual machine transmits the file fragments in each file combination to the thin terminal in sequence according to the order between the file combinations. In this way, when the thin terminal detects that a certain file combination fails to be transmitted, it notifies the virtual machine to transmit the file combination that failed to be transmitted and other file combinations that are sorted after the file combination that failed to be transmitted. The virtual machine does not need to retransmit all the files starting from the first file combination, so that other file combinations that are sorted before the file combination that failed to be transmitted do not need to be retransmitted. Therefore, in this embodiment, under the premise of isolation between the business network (the network where the virtual machine is located) and the management network (the network where the thin terminal is located), when transmitting files through the transmission channel between the virtual machine and the thin terminal, if there is an interruption, retransmission starts from the interrupted file combination, and all retransmission is not required, thereby reducing the time consumption of file transmission, thereby improving transmission efficiency.
[0138] Based on the above implementation scheme, in step 702, the second device can detect whether the transmission of each file combination fails in the following manner, such as Figure 8 As shown in:
[0139] Step 801: The second device receives first verification information corresponding to each file combination transmitted by the virtual machine.
[0140] Step 802: The second device obtains second verification information according to the received file combination.
[0141] For example, the second device performs MD5 calculation on the file combination to obtain an MD5 check code as the second check information.
[0142] Wherein, step 802 is performed after a complete file combination is received.
[0143] Step 803: The second device determines whether the file combination fails to be transmitted based on the first verification information and the second verification information.
[0144] For example, the second device compares the first verification information with the second verification information. If the first verification information and the second verification information are consistent, it can be determined that the file combination transmission is successful. If the first verification information and the second verification information are inconsistent, it can be determined that the file combination transmission fails.
[0145] Based on the above implementation, the second device may also perform the following processing, such as Fig. 9 As shown in:
[0146] Step 704: The second device receives third verification information corresponding to the target file transmitted by the virtual machine.
[0147] Step 705: The second device determines whether the target file is successfully transferred based on the third verification information. If the second device determines that the target file is successfully transferred, it executes step 706;
[0148] Step 706: The second device sends a file landing request to the control terminal deployed on the third device.
[0149] Among them, the file landing request includes at least fourth verification information; when the control end obtains the landing judgment result according to the received fourth verification information and the complete verification information stored locally, the control end feeds back the landing judgment result to the second device.
[0150] The complete verification information is transmitted from the virtual machine to the control end through the server end deployed by the first device. Specifically, the complete verification information is included in the permission request generated by the virtual machine. The virtual machine sends the permission request to the server end, and the server end sends the permission request to the control end. The control end saves the complete verification information and the file path in the permission request locally. The control end feeds back the request result to the server end according to the application parameters in the permission request, and the server end feeds back the request result to the virtual machine. Therefore, the virtual machine executes the request when the request result indicates that the target file can be transferred. Figure 1 This can prevent the target file from being leaked, thereby improving the security of the target file.
[0151] Step 707: The second device receives the landing judgment result fed back by the control end.
[0152] Step 708: The second device stores the target file to the hard disk according to the landing determination result.
[0153] Specifically, if the landing judgment result indicates that the target file is allowed to land, the second device stores the target file in the corresponding storage area of the hard disk. If the landing judgment result indicates that the target file is prohibited from landing, the second device cannot save the target file to the hard disk. At this time, the second device can delete the target file currently in the memory area, or the second device can re-join the file pieces in the received file combination and then re-request the landing to the control end until the number of requests reaches the threshold.
[0154] refer to Fig.10 , is a flowchart of a desktop cloud file transfer method provided in Embodiment 3 of the present application, which can be applied to Fig.11 The third device shown has a control terminal deployed therein, which is used to control the transmission of the target file and to control whether the target file is landed after the target file transmission is completed. The technical solution in this embodiment is mainly used to improve the file transmission efficiency between the virtual machine and the thin terminal under the premise that the management network and the business network are isolated from each other.
[0155] Specifically, the method in this embodiment may include the following steps:
[0156] Step 1001: The control end receives a permission request sent by the server end.
[0157] The permission request is generated by the virtual machine according to the target file to be transmitted and transmitted to the server.
[0158] Step 1002: The control end feeds back the request result to the server end according to the application parameters in the permission request.
[0159] The request result indicates whether the virtual machine is allowed to transfer the target file to the second device. The server feeds back the request result to the virtual machine, and the virtual machine executes Figure 1 The process shown.
[0160] In addition, the control end can also have the following processing, such as Fig.12 As shown in:
[0161] Step 1003: The control end receives a file landing request sent by the second device.
[0162] Among them, after receiving the third verification information corresponding to the target file transmitted by the virtual machine, the second device determines whether the target file is transmitted successfully based on the third verification information. Then, when the second device determines that the target file is transmitted successfully, it sends a file landing request to the control end deployed on the third device.
[0163] Among them, the file landing request includes at least fourth verification information.
[0164] Step 1004: the control end obtains a landing determination result according to the received fourth verification information and the complete verification information stored locally;
[0165] The complete verification information is transmitted from the virtual machine to the control end through the server end deployed by the first device.
[0166] Step 1005: The control end feeds back the landing determination result to the second device.
[0167] Among them, the second device stores the target file to the hard disk according to the landing judgment result.
[0168] It can be seen that in the embodiment of the present application, by deploying a control terminal, the transmission of the target file is controlled and after the target file transmission is completed, whether the target file is landed on the second device is controlled to improve file security.
[0169] refer to Fig.13 , is a schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present application, the electronic device is used as a first device, a virtual machine is deployed on the first device, and the virtual machine is allocated to a second device, such as Figure 2 As shown in , there is a transmission channel based on the remote desktop protocol between the operating system of the second device and the virtual machine. The technical solution in this embodiment is mainly used to improve the file transmission efficiency between the virtual machine and the thin terminal under the premise that the management network and the business network are isolated from each other.
[0170] Specifically, the first device may include the following structure:
[0171] Transmission module 1301, such as a wireless communication module or a wired communication module;
[0172] Processor 1302 is used to control the virtual machine to execute the following process:
[0173] The virtual machine splits the target file to be transmitted to obtain a plurality of file combinations, each of which has a combination identifier, and each of which is composed of at least one file piece; the size of the file piece is related to the data size allowed to be transmitted by the transmission channel;
[0174] The virtual machine transmits each file fragment in each file combination to the second device through the transmission channel in sequence according to the order of the file combinations represented by the combination identifiers based on the transmission module 1301. When the second device detects that the transmission of the first file combination fails, it transmits the combination identifier of the first file combination to the virtual machine.
[0175] In response to the received combination identifier of the first file combination, the virtual machine transmits the first file combination and a second file combination starting from the first file combination, where the second file combination is a file combination sorted after the first file combination.
[0176] It can be seen from the above technical solution that in an electronic device provided by an embodiment of the present application, when a virtual machine needs to transmit a target file to a second device, i.e., a thin terminal, where it is deployed, the target file can be split into multiple file combinations, and the size of the file fragments in each file combination can be transmitted by a transmission channel based on the remote desktop protocol between the virtual machine and the thin terminal. Thus, the virtual machine transmits the file fragments in each file combination to the thin terminal in sequence according to the order between the file combinations. In this way, when the thin terminal detects that a certain file combination fails to be transmitted, it notifies the virtual machine to transmit the file combination that failed to be transmitted and other file combinations that are sorted after the file combination that failed to be transmitted. The virtual machine does not need to retransmit all the files starting from the first file combination, so that other file combinations that are sorted before the file combination that failed to be transmitted do not need to be retransmitted. Therefore, in this embodiment, under the premise of isolation between the business network (the network where the virtual machine is located) and the management network (the network where the thin terminal is located), when transmitting files through the transmission channel between the virtual machine and the thin terminal, if there is an interruption, retransmission starts from the interrupted file combination, and all retransmission is not required, thereby reducing the time consumption of file transmission and improving transmission efficiency.
[0177] In one implementation, the processor 1302 is further configured to control the virtual machine to transmit the first verification information corresponding to each of the file combinations to the second device;
[0178] After obtaining second verification information according to the received file combination, the second device determines whether the file combination fails to be transmitted according to the second verification information and the first verification information.
[0179] In one implementation, before the virtual machine splits the target file to be transmitted, the processor 1302 is further configured to control the virtual machine to execute the following process:
[0180] The virtual machine generates a permission request according to the target file; the permission request includes at least one application parameter;
[0181] The virtual machine sends the permission request to the server deployed on the first device, the server sends the permission request to the control end deployed on the third device, the control end feeds back the request result to the server according to the application parameters in the permission request, and the server feeds back the request result to the virtual machine;
[0182] The virtual machine executes the splitting of the target file to be transmitted if the request result indicates that the target file can be transmitted.
[0183] Wherein, the application parameters include: the file path of the target file and the complete verification information of the target file; the control end saves the application parameters locally.
[0184] Based on the above implementation, the processor 1302 is further configured to control the virtual machine to transmit the third verification information corresponding to the target file to the second device;
[0185] Among them, when the second device determines that the target file is successfully transferred according to the third verification information, the second device sends a file landing request to the control end, and the file landing request includes at least fourth verification information; when the control end obtains a landing judgment result based on the received fourth verification information and the complete verification information stored locally, the control end feeds back the landing judgment result to the second device; the second device stores the target file to the hard disk according to the landing judgment result.
[0186] It should be noted that the specific implementation of each module of the first device in this embodiment can refer to the corresponding content in the previous text and will not be described in detail here.
[0187] refer to Fig.14, is a structural diagram of an electronic device provided in an embodiment of the present application, the electronic device serves as a second device, the second device is assigned a virtual machine by the first device, the virtual machine is deployed on the first device, and a transmission channel based on the remote desktop protocol is provided between the operating system of the second device and the virtual machine. The technical solution in this embodiment is mainly used to improve the efficiency of file transmission between the virtual machine and the thin terminal under the premise that the management network and the business network are isolated from each other.
[0188] Specifically, the second device may include the following structure:
[0189] A transmission module 1401, configured to receive each file piece in each file combination transmitted sequentially by the virtual machine through the transmission channel;
[0190] The virtual machine splits the target file to be transmitted to obtain a plurality of the file combinations, each of which has a combination identifier, and each of which is composed of at least one file slice; the size of the file slice is related to the data size allowed to be transmitted by the transmission channel; the virtual machine sequentially transmits each of the file combinations according to the order of the file combinations represented by the combination identifier;
[0191] The processor 1402 is used to detect whether the transmission of each of the file combinations fails; when it is detected that the transmission of the first file combination fails, the combination identifier of the first file combination is transmitted to the virtual machine through the transmission module 1401; in response to the received combination identifier of the first file combination, the virtual machine transmits the first file combination and a second file combination starting from the first file combination, where the second file combination is a file combination sorted after the first file combination.
[0192] It can be seen from the above technical solution that in an electronic device provided by an embodiment of the present application, when a virtual machine needs to transmit a target file to a second device, i.e., a thin terminal, where it is deployed, the target file can be split into multiple file combinations, and the size of the file fragments in each file combination can be transmitted by a transmission channel based on the remote desktop protocol between the virtual machine and the thin terminal. Thus, the virtual machine transmits the file fragments in each file combination to the thin terminal in sequence according to the order between the file combinations. In this way, when the thin terminal detects that a certain file combination fails to be transmitted, it notifies the virtual machine to transmit the file combination that failed to be transmitted and other file combinations that are sorted after the file combination that failed to be transmitted. The virtual machine does not need to retransmit all the files starting from the first file combination, so that other file combinations that are sorted before the file combination that failed to be transmitted do not need to be retransmitted. Therefore, in this embodiment, under the premise of isolation between the business network (the network where the virtual machine is located) and the management network (the network where the thin terminal is located), when transmitting files through the transmission channel between the virtual machine and the thin terminal, if there is an interruption, retransmission starts from the interrupted file combination, and all retransmission is not required, thereby reducing the time consumption of file transmission and improving transmission efficiency.
[0193] In one implementation, when detecting whether the transmission of each file combination fails, the processor 1402 is specifically used to: receive first verification information corresponding to each file combination transmitted by the virtual machine; obtain second verification information based on the received file combination; and determine whether the transmission of the file combination fails based on the first verification information and the second verification information.
[0194] In one implementation, the transmission module 1401 is further used to: receive third verification information corresponding to the target file transmitted by the virtual machine;
[0195] Based on this, the processor 1402 is also used to: determine whether the target file is successfully transmitted based on the third verification information; when it is determined that the target file is successfully transmitted, send a file landing request to the control end deployed on the third device through the transmission module 1401, and the file landing request includes at least the fourth verification information; when the control end obtains the landing judgment result based on the received fourth verification information and the locally stored complete verification information, the landing judgment result is fed back to the second device; the complete verification information is transmitted from the virtual machine to the control end through the server deployed by the first device; thus, the processor 1402 stores the target file on the hard disk according to the landing judgment result.
[0196] It should be noted that the specific implementation of each module of the second device in this embodiment can refer to the corresponding content in the previous text and will not be described in detail here.
[0197] refer to Fig.15, is a structural diagram of an electronic device provided in Example 6 of the present application. The electronic device serves as a third device, and a control terminal is deployed in the third device. The control terminal is used to control the transmission of the target file and to control whether the target file is landed after the target file transmission is completed. The technical solution in this embodiment is mainly used to improve the file transmission efficiency between the virtual machine and the thin terminal under the premise that the management network and the business network are isolated from each other.
[0198] Specifically, the third device may include the following structure:
[0199] The transmission module 1501 is used to receive the permission request sent by the server, where the permission request is generated by the virtual machine according to the target file to be transmitted and transmitted to the server;
[0200] Processor 1502, used to implement the control end, wherein the control end feeds back a request result to the server end according to the application parameters in the permission request, wherein the request result indicates whether the target file is allowed to be transferred;
[0201] The server feeds back the request result to the virtual machine, and the virtual machine executes the request result when the request result indicates that the target file can be transferred. Figure 1 The process shown.
[0202] In addition, the control end implemented by the processor 1502 is also used to: receive a file landing request sent by the second device; obtain a landing judgment result according to the received fourth verification information and the complete verification information stored locally; and then feed back the landing judgment result to the second device. Thus, the second device stores the target file to the hard disk according to the landing judgment result.
[0203] It can be seen that in the embodiment of the present application, by deploying a control terminal on the third device, the transmission of the target file is controlled and after the target file transmission is completed, whether the target file is landed on the second device is controlled to improve file security.
[0204] refer to Fig.16 , is a schematic diagram of the architecture of a desktop cloud system provided in Embodiment 7 of the present application, the system may include: a first device 1601 and a second device 1602; a virtual machine 1603 is deployed on the first device 1601, the virtual machine 1603 is assigned to the second device 1602, and a transmission channel based on the remote desktop protocol is provided between the operating system of the second device 1602 and the virtual machine 1603;
[0205] in:
[0206] The virtual machine 1603 splits the target file to be transmitted to obtain a plurality of file combinations, each of which has a combination identifier, and each of which is composed of at least one file piece; the size of the file piece is related to the data size allowed to be transmitted by the transmission channel;
[0207] The virtual machine 1603 transmits each file piece in each file combination to the second device 1602 through the transmission channel in sequence according to the order of the file combinations represented by the combination identifiers;
[0208] When the second device 1602 detects that the transmission of the first file combination fails, the second device 1602 transmits the combination identifier of the first file combination to the virtual machine 1603;
[0209] In response to the received combination identifier of the first file combination, the virtual machine 1603 transmits the first file combination and a second file combination starting from the first file combination, where the second file combination is a file combination sorted after the first file combination.
[0210] It can be seen from the above technical solution that in a desktop cloud system provided by an embodiment of the present application, when a virtual machine needs to transmit a target file to a second device, i.e., a thin terminal, on which the virtual machine is deployed, the target file can be split into multiple file combinations, and the size of the file fragments in each file combination can be transmitted by a transmission channel based on the remote desktop protocol between the virtual machine and the thin terminal. Thus, the virtual machine transmits the file fragments in each file combination to the thin terminal in sequence according to the order between the file combinations. Thus, when the thin terminal detects that a certain file combination fails to be transmitted, it notifies the virtual machine to transmit the file combination that failed to be transmitted and other file combinations that are sorted after the file combination that failed to be transmitted. The virtual machine does not need to retransmit all the files starting from the first file combination, so that other file combinations that are sorted before the file combination that failed to be transmitted do not need to be retransmitted. Therefore, in this embodiment, under the premise of isolation between the business network (the network where the virtual machine is located) and the management network (the network where the thin terminal is located), when transmitting files through the transmission channel between the virtual machine and the thin terminal, if there is an interruption, retransmission starts from the interrupted file combination, and all retransmission is not required, thereby reducing the time consumption of file transmission, thereby improving transmission efficiency.
[0211] In addition, a third device 1604 may also be deployed in the desktop cloud system, such as Fig.17 As shown in , a control terminal 1641 is deployed in the third device;
[0212] The control terminal 1641 receives a permission request sent by the server 1605 deployed on the first device 1601, wherein the permission request is generated by the virtual machine 1603 according to the target file to be transmitted and transmitted to the server 1605;
[0213] The control end 1641 feeds back a request result to the server end 1605 according to the application parameters in the permission request, wherein the request result indicates whether the target file is allowed to be transferred;
[0214] The server 1605 feeds back the request result to the virtual machine 1603. When the request result indicates that the target file can be transmitted, the virtual machine 1603 executes the following process:
[0215] The virtual machine splits the target file to be transmitted to obtain a plurality of file combinations, each of which has a combination identifier, and each of which is composed of at least one file piece; the size of the file piece is related to the data size allowed to be transmitted by the transmission channel;
[0216] The virtual machine transmits each file fragment in each file combination to the second device through the transmission channel in sequence according to the order of the file combinations represented by the combination identifiers. When the second device detects that the transmission of a first file combination fails, it transmits the combination identifier of the first file combination to the virtual machine.
[0217] In response to the received combination identifier of the first file combination, the virtual machine transmits the first file combination and a second file combination starting from the first file combination, where the second file combination is a file combination sorted after the first file combination.
[0218] In addition, the control terminal 1641 is also used to: receive a file landing request sent by the second device 1602; obtain a landing judgment result according to the received fourth verification information and the complete verification information stored locally; and then feed back the landing judgment result to the second device 1602. Thus, the second device 1602 stores the target file to the hard disk according to the landing judgment result.
[0219] It can be seen that in the embodiment of the present application, by deploying a control terminal on the third device, the transmission of the target file is controlled and after the target file transmission is completed, whether the target file is landed on the second device is controlled to improve file security.
[0220] Taking the first device as a server (i.e., the device where the server and the virtual machine are located) and the second device as a thin terminal (i.e., the device where the client program is located) as an example, the implementation scheme of transmitting large files from the virtual machine to the thin terminal in this application is described in detail below:
[0221] First of all, the technical solution of this application is mainly based on virtualization technology to solve the problem that when the business network and the management network are isolated, the large file transmission is interrupted and must be retransmitted after the disconnection caused by external reasons during the transmission of large files. After the file starts to be transmitted, it can be completely transmitted from the cloud virtual machine to the local client. At the same time, a verification and approval process is established on the control end, so that the file transfer must pass the security verification and approval before it can be transmitted, so as to achieve the purpose of security control.
[0222] Based on the network environment of isolated business network and management network, the technical solution of the present application is to realize large file transmission based on spice transmission channel. This transmission mode is slower than direct network transmission. Therefore, different from the breakpoint and resume transmission directly transmitted through the network, the technical solution of the present application divides the file into a secondary splitting mode of file combination and file fragment to judge the breakpoint and resume transmission mark, reduce the verification time, and effectively improve the transmission efficiency.
[0223] The technical solution of the present application adopts the method of breakpoint resume, decomposing large files into a series of file combinations, and then further decomposing each file combination into transmittable file pieces, while each file combination record number and MD5 value (i.e. MD5 checksum) for breakpoint resume recording. The technical solution of the present application adopts the method of virtual serial port, establishes a transmission channel based on spice protocol in the cloud and the client locally, and can start the transmission mode when it meets the control requirements of file transmission.
[0224] The technical solution of this application consists of the following four parts: Fig.18 As shown in:
[0225] a. Cloud virtual machine: A virtual machine running in the cloud with an operating system that can be used by local users.
[0226] b. Server: Authentication service connected to the cloud virtual machine, isolating the cloud virtual machine from the control end. Generates the exported work order number. A business network is formed between the server and the virtual machine.
[0227] c. Control end: Control whether there is permission to export large files, and confirm the integrity and security of the files. The control end and the local client are connected through an external network such as an http channel. The control end and the server are connected through an external network such as an http channel.
[0228] d. Local client (i.e. thin terminal): the target device where large files on the cloud are to be placed.
[0229] Among them, the virtual machine sends a request to export the cloud file to the server (i.e., a permission request), and the server applies for permission from the control end. After receiving the permission reply from the control end, the server exchanges the corresponding approval message with the virtual machine. After receiving the approval message that the transmission is allowed, the virtual machine transmits the file to the client through breakpoint resumption. After the client receives the cloud file, it sends a request to the control end to land the cloud file. The control end confirms the integrity of the cloud file received by the client. Further, the client exchanges integrity messages with the virtual machine to end the current file transfer process.
[0230] The technical solution of this application mainly consists of the following processes: Fig.19 As shown in:
[0231] 1. Establish a channel:
[0232] Since the network condition of the technical solution of the present application is based on the isolation of the virtual machine business network and the client management network, an information channel between the virtual machine and the external management network is required. The technical solution of the present application adopts a virtual serial port inside the virtual machine and uses the spice-port method to transfer large files between the virtual serial port and the spice channel established by spice-port. Spice-port uses the spice transmission protocol between the desktop cloud terminal and the server, without the need for direct connection through an external network, to ensure the security of file transfer. The code for creating a virtual serial port configuration is as follows:
[0233] <serial type='spiceport'> / / How to create a channel
[0234] <source channel='org.spice-space.redirserial.0'> / / Channel name
[0235] <target type='isa-serial'port='1'> / / Number of channels, such as 1
[0236] <model name='isa-serial' / > / / Serial port name
[0237]
[0238]
[0239] 2. Permission application:
[0240] When users use a virtual machine to export large files, they need to submit an export application.
[0241] The application process includes: from cloud virtual machine -> server -> control end. The technical solution of this application develops an application software in the cloud virtual machine, which selects the file path of the large file to be exported and calculates the MD5 value of the complete file. At the same time, these two pieces of data are sent to the server through http (the connection channel between the virtual machine and the server), and these two pieces of data are used as application parameters for file export.
[0242] The server transmits these two pieces of data (i.e. permission request) to the control end through HTTP. The server, as the middleman of the virtual machine permission application, turns to the control end to request permission. After the control end finds the permission to export the file, it stores the above two pieces of data, and writes the export file path into the audit log for use as audit information. The MD5 value is used as the integrity check of the subsequent process. At the same time, the permission (i.e. request result) is passed to the virtual machine through the server. The permission application process for file export is as follows: Fig. 20 as shown in .
[0243] 3. Resume downloading:
[0244] The step of resuming the transfer is the key point in this application, especially when transferring large files, it can greatly optimize the transfer efficiency between the virtual machine and the terminal. Fig.21 As shown, the specific process is as follows:
[0245] 3.1. Transmission starts:
[0246] After the virtual machine obtains the export permission for the large file, it finds the large file according to the file path and reads the file size. It completes a series of initialization actions such as clearing the transmission channel, clearing the counter, and clearing the status bit flag. The purpose is to restore the flags and counts that affect the breakpoint resume transmission to the initialization state before the breakpoint resume transmission to avoid state errors during transmission.
[0247] 3.2 File Slicing:
[0248] When transmitting, a large file is first divided into a file combination, and then split into file pieces from the file combination. The present invention first divides the file into a file combination of 64KB*50 size, and numbers each combination, and then splits each combination into 50 pieces of 64KB each, and reads all the tail files less than 64KB. This design is mainly to avoid that there are many file pieces of a large file, and multiple integrity checks are required, which affects the overall transmission efficiency. At the same time, the small file pieces of 64KB are suitable for the transmission rate of spice-port.
[0249] 3.3、Fragmented transmission:
[0250] During the segmented transmission process, first a file combination is placed in the cache to be transmitted, and the virtual machine software starts the parameter interaction with the local client, and the application parameters include the MD5 integrity check value of the file. After the local client confirms that the transmission conditions are met, that is, the request result indicates that the virtual machine is allowed to transfer large files (the control end notifies the local client that the virtual machine is allowed to transfer large files to the local client), the command of the 0-nth package is sent to the virtual machine. The maximum value of the file combination number is calculated as follows: the quotient obtained by rounding up the file size / (50*64KB) and then subtracting 1. When the virtual machine starts the transmission, the 50 64K file packages in the file combination are sent out sequentially. Since the technical solution of the present application designs a file combination, there is no need for interactive confirmation after each file combination is sent, which greatly saves desktop cloud interaction messages and improves interaction efficiency.
[0251] 3.4, combined verification:
[0252] Since each 64K file fragment has a counter to calculate the number of file fragments currently successfully transmitted, when the 50th packet is transmitted, the local client combines the 50 file fragments, performs the MD5 value of the file combination, and compares it with the value in the application parameter for verification. If the comparison passes, the file combination is cached in the client's memory. If the comparison fails, the entire file combination is discarded. The local client reissues the command to transmit the package.
[0253] When the transmission is abnormally disconnected, the local client calculates the number of packets currently transmitted by obtaining the current file size. Due to the transmission design of the file combination, the last file combination received by the local client is discarded during retransmission, and the cycle of process 3.3 is entered, that is, retransmission starts from the file combination that failed to be transmitted, or it can be said that retransmission starts from the next file combination of the last file combination that was successfully transmitted.
[0254] 3.5、Whole package verification:
[0255] When the virtual machine successfully transmits the last package of file combination data, the local client needs to verify the MD5 value of the entire file package. If the verification passes, it can be determined that the large file has been successfully transferred.
[0256] 3.6. End of transmission:
[0257] During the transmission process, the data is cleared and the status is set to idle to prepare for the next transmission.
[0258] 4. Document landing confirmation:
[0259] The local client needs to apply to the control end for file landing to ensure the integrity and security of the file. The local client sends the file parameters with the MD5 value (calculated by itself, i.e. the fourth verification information mentioned above) to the controller. Since the control end stores the MD5 value of the large file, the control end first verifies the integrity. After the verification is passed, the control end notifies the local client that the file has been landed. At this time, the local client writes the file from the memory to the hard disk, and the entire file transfer process ends.
[0260] In summary, the technical solution of this application has the following advantages:
[0261] This application transfers files in an isolated environment of the desktop cloud network and lands them safely after review, solving the problem of exporting desktop cloud files.
[0262] This application solves the problem of abnormal disconnection of large files (such as files larger than 10GB) during transmission and inability to retransmit after disconnection through the development of breakpoint resume technology, greatly improving the efficiency of desktop cloud file transfer.
[0263] Through mutual communication verification among the local client, cloud virtual machine, server, and control end, the problems of file transfer integrity and security are solved, making desktop cloud file transfer more efficient.
[0264] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0265] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0266] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0267] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A desktop cloud file transmission method, characterized in that: A virtual machine deployed on a first device is applied, the virtual machine is allocated to a second device, and a transmission channel based on a remote desktop protocol is provided between an operating system of the second device and the virtual machine; The method comprises: The virtual machine splits the target file to be transmitted to obtain a plurality of file combinations, each of which has a combination identifier, and each of which is composed of at least one file piece; the size of the file piece is related to the data size allowed to be transmitted by the transmission channel; The virtual machine transmits each file fragment in each file combination to the second device through the transmission channel in sequence according to the order of the file combinations represented by the combination identifiers. When the second device detects that the transmission of a first file combination fails, it transmits the combination identifier of the first file combination to the virtual machine. In response to the received combination identifier of the first file combination, the virtual machine transmits the first file combination and a second file combination starting from the first file combination, where the second file combination is a file combination sorted after the first file combination.
2. The method according to claim 1, characterized in that: The method further comprises: The virtual machine transmits the first verification information corresponding to each of the file combinations to the second device; After obtaining second verification information according to the received file combination, the second device determines whether the file combination fails to be transmitted according to the second verification information and the first verification information.
3. The method according to claim 1, characterized in that Before the virtual machine splits the target file to be transmitted, the method further includes: The virtual machine generates a permission request according to the target file; the permission request includes at least one application parameter; The virtual machine sends the permission request to the server deployed on the first device, the server sends the permission request to the control end deployed on the third device, the control end feeds back the request result to the server according to the application parameters in the permission request, and the server feeds back the request result to the virtual machine; The virtual machine executes the splitting of the target file to be transmitted if the request result indicates that the target file can be transmitted.
4. The method according to claim 3, characterized in that: The application parameters include: the file path of the target file and the complete verification information of the target file; Wherein, the control end saves the application parameters locally.
5. The method according to claim 4, characterized in that The method further comprises: The virtual machine transmits the third verification information corresponding to the target file to the second device; Among them, when the second device determines that the target file is successfully transferred according to the third verification information, the second device sends a file landing request to the control end, and the file landing request includes at least fourth verification information; when the control end obtains a landing judgment result based on the received fourth verification information and the complete verification information stored locally, the control end feeds back the landing judgment result to the second device; the second device stores the target file to the hard disk according to the landing judgment result.
6. A desktop cloud file transmission method, characterized in that: Applied to a second device, a virtual machine is deployed on the first device, the virtual machine is allocated to the second device, and a transmission channel based on a remote desktop protocol is provided between an operating system of the second device and the virtual machine; The method comprises: The second device receives each file slice in each file combination transmitted sequentially by the virtual machine through the transmission channel; wherein the virtual machine splits the target file to be transmitted to obtain a plurality of the file combinations, each of the file combinations has a combination identifier, and each of the file combinations is composed of at least one file slice; the size of the file slice is related to the data size allowed to be transmitted by the transmission channel; the virtual machine sequentially transmits each of the file combinations according to the order between the file combinations represented by the combination identifier; The second device detects whether each file combination fails in transmission; When the second device detects that the transmission of the first file combination fails, it transmits the combination identifier of the first file combination to the virtual machine; in response to the received combination identifier of the first file combination, the virtual machine transmits the first file combination and a second file combination starting from the first file combination, where the second file combination is a file combination sorted after the first file combination.
7. The method according to claim 6, characterized in that The second device detects whether each file combination fails to be transmitted, including: The second device receives first verification information corresponding to each file combination transmitted by the virtual machine; The second device obtains second verification information according to the received file combination; The second device determines whether the file combination fails to be transmitted according to the first verification information and the second verification information.
8. The method according to claim 6, characterized in that The method further comprises: The second device receives third verification information corresponding to the target file transmitted by the virtual machine; The second device determines whether the target file is successfully transferred according to the third verification information; When determining that the target file is successfully transferred, the second device sends a file landing request to the control end deployed on the third device, wherein the file landing request includes at least fourth verification information; when the control end obtains a landing judgment result according to the received fourth verification information and the complete verification information stored locally, the control end feeds back the landing judgment result to the second device; the complete verification information is transmitted from the virtual machine to the control end through the server end deployed by the first device; The second device stores the target file in a hard disk according to the landing determination result.
9. A desktop cloud file transmission method, characterized in that: Applied to a third device, the third device is deployed with a control terminal, the first device is deployed with a server and a virtual machine, the virtual machine is allocated to the second device, and a transmission channel based on the remote desktop protocol is provided between the operating system of the second device and the virtual machine; The method comprises: The control end receives the permission request sent by the server end, wherein the permission request is generated by the virtual machine according to the target file to be transmitted and transmitted to the server end; The control end feeds back a request result to the server end according to the application parameters in the permission request, wherein the request result indicates whether the target file is allowed to be transferred; The server feeds back the request result to the virtual machine, and the virtual machine executes the following process if the request result indicates that the target file can be transferred: The virtual machine splits the target file to be transmitted to obtain a plurality of file combinations, each of which has a combination identifier, and each of which is composed of at least one file piece; the size of the file piece is related to the data size allowed to be transmitted by the transmission channel; The virtual machine transmits each file fragment in each file combination to the second device through the transmission channel in sequence according to the order of the file combinations represented by the combination identifiers. When the second device detects that the transmission of a first file combination fails, it transmits the combination identifier of the first file combination to the virtual machine. In response to the received combination identifier of the first file combination, the virtual machine transmits the first file combination and a second file combination starting from the first file combination, where the second file combination is a file combination sorted after the first file combination.
10. A desktop cloud system, characterized in that: include: A first device and a second device; a virtual machine is deployed on the first device, the virtual machine is assigned to the second device, and a transmission channel based on the remote desktop protocol is provided between the operating system of the second device and the virtual machine; in: The virtual machine splits the target file to be transmitted to obtain a plurality of file combinations, each of which has a combination identifier, and each of which is composed of at least one file piece; the size of the file piece is related to the data size allowed to be transmitted by the transmission channel; The virtual machine transmits each file piece in each file combination to the second device through the transmission channel in sequence according to the order of the file combinations represented by the combination identifiers; When the second device detects that the transmission of the first file combination fails, the second device transmits the combination identifier of the first file combination to the virtual machine; In response to the received combination identifier of the first file combination, the virtual machine transmits the first file combination and a second file combination starting from the first file combination, where the second file combination is a file combination sorted after the first file combination.
