CN114546676A - Cloud desktop file copying method, device and equipment - Google Patents

Cloud desktop file copying method, device and equipment Download PDF

Info

Publication number
CN114546676A
CN114546676A CN202210109450.9A CN202210109450A CN114546676A CN 114546676 A CN114546676 A CN 114546676A CN 202210109450 A CN202210109450 A CN 202210109450A CN 114546676 A CN114546676 A CN 114546676A
Authority
CN
China
Prior art keywords
file
directory
local
cloud desktop
cloud
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210109450.9A
Other languages
Chinese (zh)
Inventor
吴宗森
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Cloud Technologies Co Ltd
Original Assignee
New H3C Cloud Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New H3C Cloud Technologies Co Ltd filed Critical New H3C Cloud Technologies Co Ltd
Priority to CN202210109450.9A priority Critical patent/CN114546676A/en
Publication of CN114546676A publication Critical patent/CN114546676A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/543User-generated data transfer, e.g. clipboards, dynamic data exchange [DDE], object linking and embedding [OLE]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45579I/O management, e.g. providing access to device drivers or storage
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45595Network integration; Enabling network access in virtual machine instances

Abstract

The invention provides a cloud desktop file copying method, a cloud desktop file copying device and cloud desktop file copying equipment, which are used for solving the technical problem of low cloud desktop file copying efficiency. The file copy detection service of the opposite terminal calls the directory mount interface to mount the directory of the copied file into the file system of the local terminal, generates a corresponding copy event in a simulated mode so as to enable a clipboard object, and can execute pasting processing through the clipboard object after the pasting event is detected. According to the technical scheme, the copied file does not need to be transferred in an intermediate medium, so that the copying efficiency is improved, and the user experience is improved.

Description

Cloud desktop file copying method, device and equipment
Technical Field
The invention relates to the technical field of communication and cloud computing, in particular to a method, a device and equipment for copying a cloud desktop file.
Background
The use of the current Linux operating systems (Ubuntu, CentOS, kylin, UOS, etc.) is becoming widespread, and institutions, enterprises and institutions using the Linux systems are becoming more and more popular. Increasingly higher requirements are being placed on the ease of use and ease of use.
In a cloud scene, a terminal system and a virtual machine system run on different hosts, so that a common system clipboard function is learned in a local system, the clipboard is not available in the cloud scene, and a user cannot realize copying and pasting operations like the local system, namely, the user cannot directly paste files in the virtual machine after the terminal system copies the files, and conversely, the files copied from the virtual machine cannot be pasted on the terminal.
In order to copy and paste files between a terminal system and a virtual machine, a common method is to map an intermediate storage medium inside the virtual machine through remote file system sharing or redirection of a storage device, and a user realizes the copy and paste of the files through the intermediate medium, and the method needs to store the copied files in the intermediate medium and then paste the files from the intermediate medium into a cloud desktop provided by the virtual machine. The implementation scheme needs to be transferred and stored through an intermediate medium, needs a user to mount the intermediate storage medium manually at first, is complex to operate and low in efficiency, cannot achieve the simple and easy-to-use clipboard function in a single machine system, and is poor in user experience.
Disclosure of Invention
In view of this, the invention provides a method, a device and equipment for copying a cloud desktop file, which are used for solving the technical problem of low copying efficiency of the cloud desktop file.
Based on one aspect of the embodiments of the present invention, the present invention provides a cloud desktop file copying apparatus, where the apparatus is applied to a local terminal, and the apparatus includes:
the cloud desktop client 110 is used for establishing a communication protocol connection with a cloud desktop to realize access of the cloud desktop;
the local copy event detection service 112 is configured to detect a file copy event for a local file generated by a local operating system, and send a file list of the local copy and a directory where the file is located to a virtual machine providing a cloud desktop, so that the virtual machine simulates and generates a corresponding file copy event in the cloud desktop; the cloud desktop file replication system is also used for receiving a file list replicated in the cloud desktop and a directory where the file is located, which are sent by the virtual machine, and simulating to generate a corresponding file replication event in the local terminal; when the remote directory needs to be mounted, a mounting interface provided by the local file system mounting service 113 is called to execute the mounting of the remote directory;
a local file system mount service 113 for providing a mount interface for the local copy event detection service 112.
Further, the local copy event detection service 112 calls a mount interface provided by the local file system mount service 113 to mount the directory where the file copied in the cloud desktop is located in a specified hidden directory in the local file system in a read-only manner.
Further, each time the local copy event detection service 112 receives a file list copied in the cloud desktop and a directory where the file is located, which are sent by the virtual machine, the local copy event detection service calls a mount interface provided by the local file system mount service 113 to mount the received directory where the file is located into a specified directory in the local file system; and uninstalls the mounted directory each time the file paste process and clipboard object disable are completed.
Further, when receiving a file list copied in the cloud desktop and a directory where the file is located, which are sent by the virtual machine, for the first time, the local copy event detection service 112 invokes a mount interface provided by the local file system mount service 113 to mount a root directory of the cloud desktop virtual file system into an assigned directory in the local file system; and uninstalling the mounted root directory when the cloud desktop client exits.
Further, configuration parameters are provided for the cloud desktop client 110 and the cloud desktop monitoring service 120 through the configuration files, and the number of parallel copy files and the bandwidth occupied when the files are copied and transmitted are limited.
Based on another aspect of the embodiments of the present invention, the present invention further provides a cloud desktop file copying apparatus, where the apparatus is applied to a virtual machine that provides a cloud desktop, and the apparatus includes:
the cloud desktop monitoring service 120 is used for establishing a communication protocol connection with the cloud desktop client 110 in the local terminal and providing cloud desktop service for the local terminal;
the cloud copy event detection service 122 is configured to detect a file copy event, which is generated by the cloud desktop operating system and is for a file in the cloud desktop virtual file system, and send a copied file list and a directory where the file is located to the local terminal, so that the local terminal simulates and generates a corresponding file copy event; the cloud desktop is also used for receiving a file list copied at the local terminal and a directory where the file is located, which are sent by the local terminal, and simulating and generating a corresponding file copying event in the cloud desktop; when the remote directory needs to be mounted, a mounting interface provided by the cloud file system mounting service 123 is called to carry out remote directory mounting;
and the cloud file system mount service 123 is configured to provide a mount interface for the cloud copy event detection service 122.
Further, the cloud copy event detection service 122 calls a mount interface provided by the cloud file system mount service 123 to mount the directory where the file copied in the local terminal is located in the specified hidden directory in the virtual file system of the virtual machine in a read-only manner.
Further, each time the cloud copy event detection service 122 receives a file list copied in the local terminal and a directory where the file is located, which are sent by the local terminal, the cloud copy event detection service calls a mount interface provided by the cloud file system mount service 123 to mount the received directory where the file is located into an appointed directory in the virtual file system of the virtual machine; and unloads the mounted directory each time the file paste process and clipboard object disable are completed.
Further, when the cloud copy event detection service 122 receives a file list copied in the local terminal and a directory where the file is located, which are sent by the local terminal for the first time, the cloud file system mount service 123 is called to mount a root directory of the file system of the local terminal into an assigned directory in the virtual file system of the virtual machine; and uninstalling the mounted root directory when the user exits the cloud desktop.
On the other hand, the invention also provides a cloud desktop file copying method, which is applied to the local terminal and comprises the following steps:
detecting a file duplication event by the local copy event detection service 112; when a file copying event aiming at a local file generated by a local operating system is detected, sending a file list of the local copying and a directory where the file is located to a virtual machine providing a cloud desktop;
when the local copy event detection service 112 receives a file list copied in the cloud desktop and a directory where the file is located, which are sent by the virtual machine, a file copy event is generated in a simulation manner to enable a clipboard object in the local terminal; when the remote directory needs to be mounted, a mounting interface provided by the local file system mounting service 113 is called to execute the mounting of the remote directory;
upon detecting a file paste event, a file in the clipboard object is pasted into a destination directory in the local file system.
Further, when receiving a file list copied in the cloud desktop and a directory where the file is located, which are sent by the virtual machine, for the first time, the local copy event detection service 112 invokes a mount interface provided by the local file system mount service 113 to mount a root directory of the cloud desktop virtual file system to a specified hidden directory in the local file system in a read-only manner, and unloads the mounted root directory when exiting from the cloud desktop client.
Based on another aspect of the embodiments of the present invention, the present invention further provides a cloud desktop file copying method, where the method is applied to a virtual machine providing a cloud desktop, and the method includes:
detecting a file copy event for a file in the cloud desktop virtual file system by the cloud copy event detection service 122;
when the cloud copy event detection service 122 detects a file copy event for a file in the cloud desktop virtual file system, sending a copied file list and a directory where the file is located to the local terminal;
when the cloud copy event detection service 122 receives a file list and a directory where files are located, which are sent by a local terminal, a clipboard object in a corresponding copy event enabled virtual machine is generated in a simulation manner; when the remote directory needs to be mounted, a mounting interface provided by the cloud file system mounting service 123 is called to carry out remote directory mounting;
when a file paste event is detected, the file in the clipboard object is pasted into a target directory in the virtual file system of the virtual machine.
Further, when the cloud copy event detection service 122 receives a file list copied in the local terminal and a directory where the file is located, which are sent by the local terminal for the first time, the mount interface provided by the cloud file system mount service 123 is called to mount the root directory of the file system of the local terminal to the specified hidden directory in the virtual file system of the virtual machine in a read-only manner, and the mounted root directory is unloaded when the user exits the cloud desktop.
Based on another aspect of the embodiments of the present invention, the present invention further provides an electronic device, which includes a processor, a communication interface, a storage medium, and a communication bus, where the processor, the communication interface, and the storage medium complete communication with each other through the communication bus;
a storage medium for storing a computer program;
and the processor is used for implementing the steps of any one of the cloud desktop file copying methods when executing the computer program stored on the storage medium.
The file copy detection service of the opposite terminal calls the directory mount interface to mount the directory of the copied file into the file system of the local terminal, generates a corresponding copy event in a simulated mode so as to enable a clipboard object, and can execute pasting processing through the clipboard object after the pasting event is detected. According to the technical scheme, the copied file does not need to be transferred in an intermediate medium, so that the copying efficiency is improved, and the user experience is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments of the present invention or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present invention, and for those skilled in the art, other drawings may be obtained according to the drawings of the embodiments of the present invention.
Fig. 1 is a schematic structural diagram of a cloud desktop access framework on which a cloud desktop file copying method according to an embodiment of the present invention is based;
fig. 2 is a schematic structural diagram of an electronic device for implementing the cloud desktop file copying method provided by the embodiment of the present invention.
Detailed Description
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the embodiments of the invention. As used in this embodiment of the invention, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. The term "and/or" as used herein is meant to encompass any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used to describe various information in embodiments of the present invention, the information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of embodiments of the present invention. Depending on the context, moreover, the word "if" as used may be interpreted as "at … …" or "when … …" or "in response to a determination".
The invention aims to realize a convenient and fast Copy function between a local terminal (a local hardware terminal device for accessing a cloud desktop, also called a cloud desktop terminal) and a virtual machine (a virtual host which is positioned at a cloud end and provides the cloud desktop, and is equivalent to the cloud desktop). In the embodiment of the present invention, a complete process of copying and pasting a file is referred to as a file copy, and accordingly, the file copy event mentioned herein also includes a file copy event and a file paste event.
In order to achieve the purpose of the invention, the invention provides a cloud desktop file copying method, a device and equipment for achieving the method, and the basic idea of the invention is as follows: the file copy detection service is respectively deployed in the local terminal and the cloud desktop, when a file copy event is detected, the copied file list and the directory where the file is located are transmitted to the opposite terminal, the file copy detection service of the opposite terminal calls a directory mount interface to mount the directory where the copied file is located in a file system of the local terminal, a corresponding copy event is generated in a simulated mode so that a clipboard object can be enabled, and when a pasting event is detected, pasting processing can be executed through the clipboard object. According to the technical scheme, the copied file does not need to be transferred in an intermediate medium, so that the copying efficiency is improved, and the user experience is improved.
Based on the basic idea of the invention, specific implementation procedures of the invention are described below in conjunction with the accompanying drawings and specific embodiments.
Fig. 1 is a schematic structural diagram of a cloud desktop access framework on which a cloud desktop file copying method provided by an embodiment of the present invention is based. The functions of the modules or components involved in the embodiments of the present invention are described below with reference to the drawings. The local terminal 101 includes a cloud desktop client 110, a local copy event detection service 112, and a local file mount service 113.
The cloud desktop client 110 is used for establishing a communication protocol connection with the cloud desktop monitoring service 120 in the cloud desktop to realize access of the cloud desktop;
after a user starts a cloud desktop client 110 (client for short) at a local terminal, the cloud desktop client 110 may start a local copy event detection service 112 and a local file system mount service 113 in a correlated manner.
The local copy event detection service 112 is configured to detect a file copy event for a local file generated by a local operating system, and send a file list of the local copy and a directory where the file is located to the cloud desktop, so that the cloud copy event detection service 122 simulates in the cloud desktop to generate a corresponding file copy event. When the file is copied from the cloud desktop to the local terminal, the module is further configured to receive, through the cloud desktop client 110, a file list copied in the cloud desktop and a directory where the file is located, which are sent by the virtual machine, and simulate and generate a corresponding file copying event in the local terminal.
And the local file system mount service 113 is configured to provide a mount interface for the local copy event detection service 112, and mount a file directory in the cloud desktop virtual file system to a file system of the local terminal.
The cloud desktop monitoring service 120 is used for establishing a communication protocol connection with the cloud desktop client 110 in the local terminal and providing cloud desktop service for the local terminal;
after the virtual machine on the server side providing the cloud desktop for the user is started, the cloud desktop monitoring service 120 is started in a correlated manner. Cloud desktop monitoring service 120 may associate cloud copy event detection service 122 with cloud file system mount service 123.
Based on the design of a Virtual Desktop Infrastructure (VDI), when a user accesses a cloud Desktop through the cloud Desktop client 110, the cloud Desktop management platform may assist the cloud Desktop client in establishing a Virtual Desktop Protocol (VDP) connection with a bound Virtual machine.
In the implementation of the present invention, the message interaction between the local copy event detection service 112 and the cloud copy event detection service 122 can be forwarded through the communication connection between the cloud desktop client 110 and the cloud desktop monitoring service 120.
The cloud copy event detection service 122 is configured to detect a file copy event, which is generated by the cloud desktop operating system and is for a file in the cloud desktop virtual file system, and send the copied file list and the directory where the file is located to the local terminal, so that the local copy event detection service 112 simulates in the local terminal to generate a corresponding file copy event. When the file is copied from the local terminal to the cloud desktop, the module is configured to receive a file list copied at the local terminal and a directory where the file is located, which are sent by the local terminal, through the cloud desktop monitoring service 120, and simulate and generate a corresponding file copying event in the cloud desktop.
And the cloud file system mounting service 123 is configured to provide a mounting interface for the cloud copy event detection service 122, and mount a file directory in the local terminal file system to the cloud desktop virtual file system.
In order to make the technical solution of the present invention clearer, the file copying process is divided into two directions from the local terminal 101 to the cloud desktop 102 and from the cloud desktop 102 to the local terminal 101, and is described separately below.
The steps of the process of copying the file from the local terminal 101 to the cloud desktop 102 are as follows:
step s101, when the local copy event detection service 112 detects a file copy event for a local file generated by a local operating system, sending a file list of the local copy and a directory where the file is located to the cloud copy event detection service 122;
the cloud desktop client 110 runs on an operating system of the local terminal in the local terminal, and a user may perform a copy operation on a local file in a file browser of the local operating system, or may perform a copy operation on a file located on a cloud desktop virtual file system in a cloud desktop client window.
The copy operation for the local file in the local terminal operating system generates a copy event in the local operating system, and the local copy event detection service 112 detects and captures the copy event generated by the local operating system through an API interface provided by the operating system, and obtains a list of copied files and a directory (absolute path directory) where the files are located.
Based on the implementation logic of the virtual desktop infrastructure, a keyboard or a mouse event generated by mouse and keyboard operations in a cloud desktop client window, that is, a cloud desktop, is redirected to the virtual machine, the virtual machine generates a corresponding replication event in a virtual machine operating system after receiving the redirected keyboard or mouse event, and the cloud copy event detection service 122 can detect the replication event in the virtual machine.
Step s102, after receiving the file list and the directory where the file is located sent by the local terminal, the cloud copy event detection service 122 invokes a mount interface provided by the cloud file system mount service 123 to perform remote directory mount, and generates a clipboard object in the copy event enabled virtual machine in a simulated manner;
cloud copy event detection service 122 uses the received list of files and the directory of the files to simulate generating a copy event in the virtual machine, where generating the copy event enables the virtual machine clipboard object. The copy event generated by simulation records the received information of the file list, the directory of the file and the like into the clipboard object, so that the state of the clipboard object is in a pasting state. For example, in Windows, when a clipboard object of an operating system is in a paste-able state, and a user clicks a right mouse button in a file browser, a "paste" menu item in a pop-up menu is in an available state.
Optionally, in an embodiment of the present invention, the virtual machine mounts the directory where the file of the local terminal is located to a specified hidden directory in the cloud desktop virtual file system in a read-only manner, so as to avoid misoperation and ensure file security.
In an embodiment of the present invention, the cloud copy event detection service 122 executes the mount operation of the directory where the copied file is located each time the file list and the directory where the file is located sent from the local terminal are received, and accordingly, the mounted directory needs to be unloaded when the paste processing and the clipboard object disabling are completed. This approach is complicated and inefficient. In this case, the clipboard object is disabled by the user pressing the copy key and then not pressing the paste key, and then performing a processing action to disable the previous copy operation. For example, after the user presses the Ctrl + C copy key on the selected file in the browser, the Ctrl + V paste key is not pressed on the local terminal or the cloud desktop, and then a text segment is copied into the document, and the previous file copy operation is disabled by the copy operation for copying the text.
In order to simplify the processing process and improve the efficiency of file replication, in another embodiment of the present invention, when the cloud copy event detection service 122 receives the file list and the directory where the file is located sent by the local terminal for the first time, the root directory of the file system of the local terminal is mounted in the specified hidden directory in the cloud desktop virtual file system in a read-only manner, and since the root directory is mounted to the specified hidden directory, the directory does not need to be mounted every time after the file list and the directory where the file is located for the replication operation of other files sent by the local terminal are subsequently received, and when the cloud desktop is pasted, the replicated file can be read from the specified hidden directory mounted in the local terminal virtual file system directly according to the directory where the file is located. Accordingly, only when the cloud desktop client is closed or the virtual machine is closed, the uninstalling operation of the mounted root directory is executed.
Step s103, the cloud copy event detection service 122 pastes the file in the clipboard object to a target directory in the virtual file system of the virtual machine when detecting a file paste event.
After a user selects a target directory of a file to be pasted in a window of the cloud desktop client 110, pressing a paste button or executing a paste operation with a mouse generates a keyboard or mouse event, the generated keyboard or mouse event is redirected to the cloud desktop, the virtual machine generates a corresponding paste event in the virtual machine operating system after receiving the redirected keyboard or mouse event, and the cloud desktop operating system can complete a paste processing process through a clipboard object. And calling the clipboard object in the process of executing the pasting processing, reading the file from the specified hidden directory mounted in the virtual file system according to the copied file list and the directory where the file is located, which are stored in the object and sent by the local terminal, and copying and writing the file into the target directory.
The process of copying the file from the cloud desktop to the local terminal 101 is as follows:
step s201, when the cloud copy event detection service 122 detects a file copy event for a file in the cloud desktop virtual file system, sending a copied file list and a directory where the file is located to the local copy event detection service 112 in the local terminal;
when a user performs a copy operation on a local file located in a cloud desktop virtual file system in a cloud desktop client window, as described above, a copy event is generated in the cloud desktop operating system in the redirection process, and after detecting the copy event, the cloud copy event detection service 122 obtains a copied file list and a directory where the file is located based on the copy event and sends the copied file list and the directory where the file is located to the local copy event detection service 112.
Step S202, when receiving a file list copied in a cloud desktop and a directory where a file is located, which are sent by a cloud-end copy event detection service 122 in a virtual machine, a local copy event detection service 112 calls a mount interface provided by a local file system mount service 113 to mount a remote directory, and simulates to generate a file copy event to enable a clipboard object in a local terminal;
the local copy event detection service 112 uses the received list of files and the directory of the files to simulate generating a corresponding file copy event in the local terminal, the operation of generating the file copy event enabling the local clipboard object.
In an embodiment of the present invention, the local copy event detection service 112 mounts the directory of the received file sent by the virtual machine to the designated hidden directory in the local file system in a read-only manner each time, and the mounted directory needs to be unloaded when the file paste processing and the clipboard object disabling are completed.
In another embodiment of the present invention, when the local copy event detection service 112 receives the copied file list and the directory where the file is located sent by the virtual machine for the first time, the root directory of the virtual file system of the virtual machine is mounted in the specified hidden directory in the local file system in a read-only manner, and since the root directory of the virtual file system of the virtual machine is already mounted in the local specified hidden directory, the directory does not need to be mounted each time after the copied file list and the directory where the file is located sent by the cloud desktop terminal are subsequently received, and the copied file can be read from the specified hidden directory directly according to the directory where the file is located when pasting. When the cloud desktop client is closed, the local terminal needs to execute the uninstalling operation of the mounted root directory.
Step S203, when the file pasting event is detected, pasting the file in the clipboard object to a target directory in the local file system.
When a user selects a target directory of a file to be pasted in a local file browser, and presses a paste key or executes a paste operation by using a mouse, an operating system generates a file paste event, and the local file browser executes a paste process after responding to the paste event. A file paste event in the local operating system may also be detected by the local copy event detection service 112, and the paste process performed by the local copy event detection service 112. And calling the clipboard object in the pasting process, reading the file from the specified hidden directory mounted in the local file system according to the copied file list and the file directory which are stored in the object and transmitted by the virtual machine, and copying and writing the file into the target directory.
Some clients have a large network bandwidth, and if a file is copied between a cloud desktop and a local terminal, the file occupies a large bandwidth, and affects other functions, such as a mouse and a keyboard cannot respond in time, a display is stuck, and the like, but the effect is larger when a large file is copied, so in an embodiment of the present invention, the file copying process performed based on the embodiment of the present invention is limited to occupy the bandwidth, for example, a message of the copied file is transmitted through a channel between the cloud desktop client 110 and the cloud desktop monitoring service 120, configuration parameters can be provided for the cloud desktop client 110 and the cloud desktop monitoring service 12 through the configuration file, and the number of parallel copied files and the bandwidth occupied when the file is copied and transmitted are limited, so as to reduce the network bandwidth occupied by the file.
Fig. 2 is a schematic structural diagram of an electronic device for implementing a cloud desktop file copying method provided by an embodiment of the present invention, where the device 200 includes: a processor 210 such as a Central Processing Unit (CPU), a communication bus 220, a communication interface 240, and a storage medium 230. Wherein the processor 210 and the storage medium 230 may communicate with each other through the communication bus 220. The storage medium 230 stores therein a computer program, and when the computer program is executed by the processor 210, the functions of the steps of the cloud desktop file copying method provided by the present invention can be implemented.
The storage medium may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. In addition, the storage medium may be at least one memory device located remotely from the processor. The Processor may be a general-purpose Processor including a Central Processing Unit (CPU), a Network Processor (NP), etc.; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
It should be recognized that embodiments of the present invention can be realized and implemented by computer hardware, a combination of hardware and software, or by computer instructions stored in a non-transitory memory. The method may be implemented in a computer program using standard programming techniques, including a non-transitory storage medium configured with the computer program, where the storage medium so configured causes a computer to operate in a specific and predefined manner. Each program may be implemented in a high level procedural or object oriented programming language to communicate with a computer system. However, the program(s) can be implemented in assembly or machine language, if desired. In any case, the language may be a compiled or interpreted language. Furthermore, the program can be run on a programmed application specific integrated circuit for this purpose. Further, operations of processes described herein may be performed in any suitable order unless otherwise indicated herein or otherwise clearly contradicted by context. The processes described herein (or variations and/or combinations thereof) may be performed under the control of one or more computer systems configured with executable instructions and may be implemented as code (e.g., executable instructions, one or more computer programs, or one or more applications) collectively executed on one or more processors, by hardware, or combinations thereof. The computer program includes a plurality of instructions executable by one or more processors.
Further, the method may be implemented in any type of computing platform operatively connected to a suitable interface, including but not limited to a personal computer, mini computer, mainframe, workstation, networked or distributed computing environment, separate or integrated computer platform, or in communication with a charged particle tool or other imaging device, and the like. Aspects of the invention may be embodied in machine-readable code stored on a non-transitory storage medium or device, whether removable or integrated into a computing platform, such as a hard disk, optically read and/or write storage medium, RAM, ROM, or the like, such that it may be read by a programmable computer, which when read by the storage medium or device, is operative to configure and operate the computer to perform the procedures described herein. Further, the machine-readable code, or portions thereof, may be transmitted over a wired or wireless network. The invention described herein includes these and other different types of non-transitory computer-readable storage media when such media include instructions or programs that implement the steps described above in conjunction with a microprocessor or other data processor. The invention also includes the computer itself when programmed according to the methods and techniques described herein.
The above description is only an example of the present invention, and is not intended to limit the present invention. Various modifications and alterations to this invention will become apparent to those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (14)

1. A cloud desktop file copying device is applied to a local terminal and comprises:
the cloud desktop client is used for establishing communication protocol connection with the cloud desktop and realizing access of the cloud desktop;
the local copy event detection service is used for detecting a file copy event aiming at a local file and generated by a local operating system, and sending a file list of the local copy and a directory where the file is located to a virtual machine providing a cloud desktop so that the virtual machine can simulate and generate a corresponding file copy event in the cloud desktop; the cloud desktop file replication system is also used for receiving a file list replicated in the cloud desktop and a directory where the file is located, which are sent by the virtual machine, and simulating to generate a corresponding file replication event in the local terminal; when the remote directory needs to be mounted, a mounting interface provided by the local file system mounting service is called to carry out remote directory mounting;
and the local file system mounting service is used for providing a mounting interface for the local copy event detection service.
2. The apparatus of claim 1,
and the local copy event detection service calls a mount interface provided by a local file system mount service to mount the directory of the file copied in the cloud desktop into a specified hidden directory in the local file system in a read-only mode.
3. The apparatus of claim 1,
when the local copy event detection service receives a file list copied in the cloud desktop and a directory where the file is located, wherein the file list and the directory where the file is located are sent by the virtual machine, a mounting interface provided by a local file system mounting service is called to mount the received directory where the file is located into an appointed directory in a local file system; and uninstalls the mounted directory each time the file paste process and clipboard object disable are completed.
4. The device of claim 1, wherein the device is a magnetic disk drive
When the local copy event detection service receives a file list which is copied in the cloud desktop and sent by the virtual machine for the first time and a directory where the file is located, a mount interface provided by a local file system mount service is called to mount a root directory of the cloud desktop virtual file system into a specified directory in the local file system; and uninstalling the mounted root directory when the cloud desktop client exits.
5. The device of claim 1, wherein the device is a magnetic disk drive
Configuration parameters are provided for the cloud desktop client and the cloud desktop monitoring service through the configuration files, and the number of parallel copy files and the occupied bandwidth when the files are copied and transmitted are limited.
6. A cloud desktop file copying device is applied to a virtual machine providing a cloud desktop, and comprises:
the cloud desktop monitoring service is used for establishing communication protocol connection with a cloud desktop client in the local terminal and providing cloud desktop service for the local terminal;
the cloud copy event detection service is used for detecting a file copy event aiming at a file in a cloud desktop virtual file system, which is generated by a cloud desktop operating system, and sending a copied file list and a directory where the file is located to the local terminal so that the local terminal can simulate to generate a corresponding file copy event; the cloud desktop is also used for receiving a file list copied at the local terminal and a directory where the file is located, which are sent by the local terminal, and simulating and generating a corresponding file copying event in the cloud desktop; when the remote directory needs to be mounted, a mounting interface provided by the cloud file system mounting service is called to carry out remote directory mounting;
and the cloud file system mounting service is used for providing a mounting interface for the cloud copy event detection service.
7. The apparatus of claim 6,
and the cloud copy event detection service calls a mount interface provided by a cloud file system mount service to mount the directory of the file copied in the local terminal into a specified hidden directory in the virtual file system of the virtual machine in a read-only mode.
8. The apparatus of claim 6,
the cloud copy event detection service calls a mount interface provided by a cloud file system mount service to mount the received directory of the file into a specified directory in a virtual file system of a virtual machine when receiving a file list which is copied in a local terminal and sent by the local terminal and the directory where the file is located; and uninstalls the mounted directory each time the file paste process and clipboard object disable are completed.
9. The apparatus of claim 6, wherein the apparatus is a portable electronic device
When the cloud copy event detection service receives a file list which is sent by a local terminal and is copied in the local terminal and a directory where the file is located for the first time, a mounting interface provided by a cloud file system mounting service is called to mount a root directory of a file system of the local terminal into a specified directory in a virtual file system of a virtual machine; and uninstalling the mounted root directory when the user exits the cloud desktop.
10. A cloud desktop file copying method is applied to a local terminal and comprises the following steps:
detecting a file duplication event by a local copy event detection service; when a file copying event aiming at a local file generated by a local operating system is detected, sending a file list of the local copying and a directory where the file is located to a virtual machine providing a cloud desktop;
when the local copy event detection service receives a file list copied in the cloud desktop and a directory where the file is located, wherein the file list and the directory are sent by a virtual machine, a file copy event is generated in a simulation mode, and a clipboard object in a local terminal is enabled; when the remote directory needs to be mounted, a mounting interface provided by a local file system mounting service is called to carry out remote directory mounting;
and when the file pasting event is detected, pasting the file in the clipboard object into a target directory in the local file system.
11. The method of claim 10, wherein the step of determining the target position is performed by a computer
When the local copy event detection service receives a file list which is copied in the cloud desktop and is sent by the virtual machine for the first time and a directory where the file is located, a mount interface provided by the local file system mount service is called to mount a root directory of the cloud desktop virtual file system into a specified hidden directory in the local file system in a read-only mode, and the mounted root directory is unloaded when the cloud desktop client exits.
12. A cloud desktop file copying method is applied to a virtual machine providing a cloud desktop, and comprises the following steps:
detecting a file copying event aiming at a file in a cloud desktop virtual file system through a cloud copying event detection service;
when the cloud copy event detection service detects a file copy event aiming at a file in the cloud desktop virtual file system, sending a copied file list and a directory where the file is located to a local terminal;
when the cloud copy event detection service receives a file list and a directory where files are located, which are sent by a local terminal, a clipboard object in a corresponding copy event enabling virtual machine is generated in a simulation mode; when the remote directory needs to be mounted, a mounting interface provided by a cloud file system mounting service is called to carry out remote directory mounting;
when a file paste event is detected, the file in the clipboard object is pasted into a target directory in the virtual file system of the virtual machine.
13. The method of claim 12, wherein the step of determining the target position is performed by a computer
When the cloud copy event detection service receives a file list which is sent by a local terminal and is copied in the local terminal and a directory where the file is located for the first time, a mount interface provided by a cloud file system mount service is called to mount a root directory of the local terminal file system into a specified hidden directory in a virtual file system of a virtual machine in a read-only mode, and the mounted root directory is unloaded when a user exits from a cloud desktop.
14. An electronic device is characterized by comprising a processor, a communication interface, a storage medium and a communication bus, wherein the processor, the communication interface and the storage medium are communicated with each other through the communication bus;
a storage medium for storing a computer program;
a processor for performing the method steps of any one of claims 10-13 when executing a computer program stored on a storage medium.
CN202210109450.9A 2022-01-28 2022-01-28 Cloud desktop file copying method, device and equipment Pending CN114546676A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210109450.9A CN114546676A (en) 2022-01-28 2022-01-28 Cloud desktop file copying method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210109450.9A CN114546676A (en) 2022-01-28 2022-01-28 Cloud desktop file copying method, device and equipment

Publications (1)

Publication Number Publication Date
CN114546676A true CN114546676A (en) 2022-05-27

Family

ID=81673510

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210109450.9A Pending CN114546676A (en) 2022-01-28 2022-01-28 Cloud desktop file copying method, device and equipment

Country Status (1)

Country Link
CN (1) CN114546676A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115543663A (en) * 2022-12-01 2022-12-30 北京志翔科技股份有限公司 Data processing method and device, electronic equipment and storage medium
CN116701299A (en) * 2022-12-09 2023-09-05 荣耀终端有限公司 Catalog management method and related device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115543663A (en) * 2022-12-01 2022-12-30 北京志翔科技股份有限公司 Data processing method and device, electronic equipment and storage medium
CN115543663B (en) * 2022-12-01 2023-08-01 北京志翔科技股份有限公司 Data processing method, device, electronic equipment and storage medium
CN116701299A (en) * 2022-12-09 2023-09-05 荣耀终端有限公司 Catalog management method and related device
CN116701299B (en) * 2022-12-09 2024-03-26 荣耀终端有限公司 Catalog management method and related device

Similar Documents

Publication Publication Date Title
CN107463499B (en) ADB remote connection method, device, equipment and storage medium
US9083608B2 (en) Automatically selecting appropriate platform to run application in cloud computing environment
CN113190464B (en) mock testing method and device, electronic equipment and medium
US20140081615A1 (en) Virtual systems testing
US9122793B2 (en) Distributed debugging of an application in a distributed computing environment
CN114546676A (en) Cloud desktop file copying method, device and equipment
US10108501B2 (en) Terminal backup and recovery method
US20180315024A1 (en) Systems and Methods Enabling Secure Transactions from Terminal Window
US10114724B1 (en) Techniques for real time server testing in a production environment
US20170153909A1 (en) Methods and Devices for Acquiring Data Using Virtual Machine and Host Machine
CN107509051A (en) Long-range control method, device, terminal and computer-readable recording medium
CN109144776A (en) Virtual machine image file processing method and processing device
US10027692B2 (en) Modifying evasive code using correlation analysis
CN109117153A (en) Processing method, device, terminal and the storage medium of application program
CN110677307A (en) Service monitoring method, device, equipment and storage medium
CN114356521A (en) Task scheduling method and device, electronic equipment and storage medium
WO2021135326A1 (en) Data backup method, apparatus and device, and medium
CN108170605A (en) Submission method, client and the computer readable storage medium of bug information
CN117041111A (en) Vehicle cloud function test method and device, electronic equipment and storage medium
CN113590564B (en) Data storage method, device, electronic equipment and storage medium
US11093292B2 (en) Identifying recurring actions in a hybrid integration platform to control resource usage
WO2017096889A1 (en) Method and device for upgrading and downgrading system
CN114499984A (en) Identity authentication method, device, equipment and medium based on AI and RPA
KR102368826B1 (en) Cloud Server And Method of Thereof
CN114328272B (en) Application testing method, device and system and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination