Method and system for realizing convenient transmission of remote file through dragging

By unifying the drag-and-drop operation entry in remote file transfer, automatically identifying and triggering the corresponding sharing method, the problem of complex remote desktop file transfer operations is solved, and convenient and efficient file sharing is achieved.

CN120780679AActive Publication Date: 2025-10-14XIAN WANXIANG ELECTRONICS TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202511159884.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-19
Publication Date
2025-10-14
Estimated Expiration
2045-08-19

AI Technical Summary

Technical Problem

Existing remote desktop file transfer technology requires users to switch between different interfaces to select the transfer method, which is complicated to operate and has low selection flexibility.

Method used

The object type is parsed on the local device through drag-and-drop behavior, and the location in the file manager is determined based on the screenshot of the remote device. Sharing methods such as clipboard redirection, USB redirection, or virtual file system mapping are automatically triggered to unify the operation entry.

Benefits of technology

It simplifies the operation steps, improves user selection flexibility and transmission efficiency, adapts to different operating systems and file managers, and supports two-way file sharing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120780679A_ABST
    Figure CN120780679A_ABST
Patent Text Reader

Abstract

The invention provides a method and a system for realizing convenient transmission of a remote file through dragging, relates to the technical field of cloud desktops, and can solve the problems of complex operation flow and low selection flexibility when a user selects a file transmission mode. According to the specific technical scheme, the method comprises the steps that after a dragging behavior on local equipment is detected, the type of a dragged object is analyzed; when the dragging behavior is ended, judging whether the ending position of the dragging behavior falls into a picture of the remote equipment displayed on the local equipment or not; if so, capturing a screen snapshot of the remote equipment; after it is judged that the file manager exists in the screen snapshot, the position where the end position falls in the file manager is determined; determining a target enabling region corresponding to the ending position according to file sharing enabling regions corresponding to different positions in the file manager; and triggering a file sharing mode corresponding to the target enabling region according to the type of the dragged object and the target enabling region.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of cloud desktop technology, and in particular to a method and system for conveniently transferring remote files by dragging and dropping. Background Art

[0002] With the rapid development of cloud computing technology, more and more desktop environments and applications are being migrated to cloud deployment. Local devices (such as personal computers, thin terminals or zero terminals) only need to retain basic resources to connect to and use cloud desktops through remote access protocols. Remote desktops have become a core way for users to work efficiently and share resources.

[0003] Currently, remote desktop file transfer mainly relies on the following technical solutions: First, clipboard sharing technology, which synchronizes clipboard content between the local device and the remote device through the clipboard-related user interface.

[0004] Second, disk mapping technology. Some fully functional remote desktop software allows users to map local disk drives (such as drive C or D) to the file system of the remote device. However, this requires providing a user interface corresponding to disk drive selection for users to select the disk they want to map.

[0005] Third, USB port redirection is a USB flash drive sharing technology. This technology physically redirects the USB flash drive connected to the local device to the USB bus of the remote device, allowing the remote device to recognize and use the USB flash drive. However, this technology also requires a user interface corresponding to USB port redirection to assist users in completing file sharing in this way.

[0006] In summary, various remote desktop file transfer technologies in related technologies need to rely on independent user operation interfaces. Users need to switch between different interfaces to select a transfer method. The operation process is complicated and the user's selection flexibility is low. Summary of the Invention

[0007] The disclosed embodiments provide a method and system for conveniently transferring remote files by dragging and dropping, which can solve the problem of complex operation procedures and low flexibility when users select file transfer methods. The technical solution is as follows: According to a first aspect of an embodiment of the present disclosure, a method for conveniently transferring remote files by dragging and dropping is provided, the method comprising: After detecting a dragging behavior on the local device, parsing the type of the dragged object, the type of the dragged object includes a file, a folder, and a disk icon; When the dragging behavior ends, determining whether the end position of the dragging behavior falls within the image of the remote device displayed on the local device; If it falls into the remote device's screen, capture the remote device's screen snapshot; Determining whether a file manager exists in the screenshot, and if so, determining where the end position falls in the file manager; Determining a target enable zone corresponding to the end position according to file sharing enable zones corresponding to different positions in the file manager; the file sharing enable zone includes: a clipboard redirection enable zone, a USB redirection enable zone, and a virtual file system enable zone; the clipboard redirection enable zone corresponds to a file sharing mode based on a clipboard or a file sharing mode based on a virtual file system function; the USB redirection enable zone corresponds to a file sharing mode based on a port redirection function of a USB flash drive; and the virtual file system enable zone corresponds to a file sharing mode based on a virtual file system function; According to the type of the dragged object and the target enabled area, the file sharing method corresponding to the target enabled area is triggered.

[0008] The present invention integrates the current multiple scattered operation methods such as clipboard sharing, USB port redirection and virtual file system mapping through a unified entrance of dragging and dropping, unifying the above three functions. Based on this method, users do not need to manually select or enable a specific redirection mode in the UI interface, thereby greatly simplifying the operation steps and improving the operation flexibility.

[0009] In one embodiment, determining whether a file manager exists in the screenshot includes: Identify whether the screenshot contains file manager-specific text; If it does, it determines that a file manager exists in the screenshot.

[0010] By identifying the characteristic text of the file manager to determine the existence of the file manager, the complexity of the technical implementation is reduced, while ensuring the accuracy of the identification, providing a reliable premise for the subsequent judgment of the shared area, and improving the efficiency of the process.

[0011] In one embodiment, determining the target enabled area corresponding to the end position includes: Get the coordinates of the end position; Compare the coordinates of the end position with the coordinates of the area corresponding to each file sharing enabled area; The file sharing enabled area where the coordinates of the end position fall is the target enabled area.

[0012] The target enabled area is determined by coordinate comparison, ensuring the accuracy of target area identification.

[0013] In one embodiment, triggering the file sharing mode corresponding to the target enabled area according to the type of the dragged object and the target enabled area includes: When the dragged object type is a file and the target enabled area is the clipboard redirect enabled area, copy and paste the file into the clipboard redirect enabled area.

[0014] For scenarios where files match the clipboard redirection-enabled area, the copy and paste method is directly used, which meets the user's intuitive expectations for single file transfer. The operation is simple and efficient, does not require additional interaction, reduces user waiting time, and improves the convenience of small file transfer.

[0015] In one embodiment, triggering the file sharing mode corresponding to the target enabled area according to the type of the dragged object and the target enabled area includes: When the dragged object is a folder and the target enabled area is a clipboard redirect enabled area, a pop-up window is displayed to prompt the user to select a file sharing method based on the clipboard or a file sharing method based on the virtual file system function; When it is detected that the file sharing method based on the clipboard is selected, the folder is copied and pasted into the clipboard redirection enabling area; When it is detected that a file sharing mode based on a virtual file system function is selected, a folder is mapped to a clipboard redirection enabling area.

[0016] Two optional methods are provided for folder transfer (clipboard copy / virtual directory mapping), which take into account the needs of fast copying of small folders and efficient access to large folders. The user is prompted to make a selection through a pop-up window, which not only ensures operational flexibility but also avoids transfer efficiency issues caused by large folder size, and optimizes the user's personalized selection experience.

[0017] In one embodiment, triggering the file sharing mode corresponding to the target enabled area according to the type of the dragged object and the target enabled area includes: When the type of the dragged object is a disk icon and the target enabled area is a virtual file system enabled area, the disk is mapped to the virtual file system enabled area of ​​the remote device.

[0018] When dragging a disk icon to the virtual file system enabled area, mapping is used. This eliminates the need to copy large amounts of data on the disk, saving transmission time and storage space. It also enables real-time access to local disk content from remote devices, making it suitable for scenarios where the entire storage device content needs to be shared, and improving the feasibility of large-capacity data sharing.

[0019] In one embodiment, triggering the file sharing mode corresponding to the target enabled area according to the type of the dragged object and the target enabled area includes: When the type of the dragged object is a disk icon and the target enabled area is the USB redirect enabled area, check whether the disk corresponding to the disk icon is a USB disk; If not, output a prompt message that the current drag behavior is not supported; If so, redirect the USB flash drive to the USB redirection enabled area of ​​the remote device using port redirection.

[0020] Based on the matching of the disk icon and the USB redirection enable area, it is first determined whether it is a USB flash drive and only supports redirection of removable USB devices. This not only conforms to the physical characteristics of USB redirection technology (depending on the USB port), but also avoids invalid operations through prompt information, ensuring the rationality of the function and the clarity of user operations.

[0021] In one embodiment, the method further comprises: When the type of the dragged object does not match the target enabled area, a prompt message is output indicating that the current dragging behavior is not supported. Among them, the types that match the clipboard redirection enabled area are files and folders; the types that match the virtual file system enabled area are disks and folders; when the disk icon corresponds to a USB flash drive or a local disk, the type that matches the USB redirection enabled area is a USB flash drive.

[0022] When the type of the dragged object does not match the target enabled area, a prompt is output to clearly inform the user why the operation is not feasible, avoiding system unresponsiveness or erroneous execution, reducing user confusion, and at the same time, through preset matching rules, standardizing the boundaries of the drag operation, improving the ease of use and fault tolerance of the method.

[0023] According to a second aspect of an embodiment of the present disclosure, a system for conveniently transferring remote files by dragging and dropping is provided, the system comprising: A parsing module, configured to parse the type of the dragged object after detecting a dragging behavior on the local device, wherein the type of the dragged object includes a file, a folder, and a disk icon; The first judgment module is used to judge whether the end position of the dragging behavior falls within the screen of the remote device displayed on the local device when the dragging behavior ends; A capture module, configured to capture a screenshot of the remote device if the remote device falls within the screen of the remote device; a second determining module, configured to determine whether a file manager exists in the screenshot, and if so, to determine where the end position falls within the file manager; a determination module for determining a target enablement zone corresponding to the end position based on file sharing enablement zones corresponding to different positions in the file manager; the file sharing enablement zones comprising: a clipboard redirection enablement zone, a USB redirection enablement zone, and a virtual file system enablement zone; the clipboard redirection enablement zone corresponding to a file sharing mode based on a clipboard or a file sharing mode based on a virtual file system function; the USB redirection enablement zone corresponding to a file sharing mode based on a port redirection function of a USB flash drive; and the virtual file system enablement zone corresponding to a file sharing mode based on a virtual file system function; The trigger module is used to trigger the file sharing mode corresponding to the target enabled area according to the type of the dragged object and the target enabled area.

[0024] In one embodiment, in determining whether a file manager exists in the screenshot, the second determination module is specifically configured to: Identify whether the screenshot contains file manager-specific text; If it does, it determines that a file manager exists in the screenshot.

[0025] In one embodiment, in determining the target enabled area corresponding to the end position, the determination module is specifically configured to: Get the coordinates of the end position; Compare the coordinates of the end position with the coordinates of the area corresponding to each file sharing enabled area; The file sharing enabled area where the coordinates of the end position fall is the target enabled area.

[0026] In one embodiment, in terms of triggering the file sharing mode corresponding to the target enabled area according to the type of the dragged object and the target enabled area, the triggering module is specifically configured to: When the dragged object type is a file and the target enabled area is the clipboard redirect enabled area, copy and paste the file into the clipboard redirect enabled area.

[0027] In one embodiment, in terms of triggering the file sharing mode corresponding to the target enabled area according to the type of the dragged object and the target enabled area, the triggering module is specifically configured to: When the dragged object is a folder and the target enabled area is a clipboard redirect enabled area, a pop-up window is displayed to prompt the user to select a file sharing method based on the clipboard or a file sharing method based on the virtual file system function; When it is detected that the file sharing method based on the clipboard is selected, the folder is copied and pasted into the clipboard redirection enabling area; When it is detected that a file sharing mode based on a virtual file system function is selected, a folder is mapped to a clipboard redirection enabling area.

[0028] In one embodiment, in terms of triggering the file sharing mode corresponding to the target enabled area according to the type of the dragged object and the target enabled area, the triggering module is specifically configured to: When the type of the dragged object is a disk icon and the target enabled area is a virtual file system enabled area, the disk is mapped to the virtual file system enabled area of ​​the remote device.

[0029] In one embodiment, in terms of triggering the file sharing mode corresponding to the target enabled area according to the type of the dragged object and the target enabled area, the triggering module is specifically configured to: When the type of the dragged object is a disk icon and the target enabled area is the USB redirect enabled area, check whether the disk corresponding to the disk icon is a USB disk; If not, output a prompt message that the current drag behavior is not supported; If so, redirect the USB flash drive to the USB redirection enabled area of ​​the remote device using port redirection.

[0030] In one embodiment, the system further comprises: an output module, The output module is used to output a prompt message indicating that the current dragging behavior is not supported when the type of the dragged object does not match the target enabled area. Among them, the files and folders are matched with the clipboard redirection enabled area; the disks and folders are matched with the virtual file system enabled area; when the disk corresponding to the disk icon is a USB flash drive or a local disk, the USB redirection enabled area is matched with the USB flash drive.

[0031] According to a third aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, in which at least one computer instruction is stored. The instruction is loaded and executed by a processor to implement the steps performed in the method for convenient remote file transfer by dragging and dropping described in the first aspect and any embodiment of the first aspect.

[0032] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0034] Figure 1 This is an architectural diagram of desktop sharing in a related technology provided by an embodiment of the present disclosure; Figure 2 This is an interface diagram of the Windows RDP remote desktop software provided by an embodiment of the present disclosure; Figure 3This is a process of a method for conveniently transferring remote files by dragging and dropping provided by the embodiment of the present disclosure. Figure 1 ; Figure 4 is a schematic diagram of different file sharing enabled areas in a file manager interface provided by an embodiment of the present disclosure; Figure 5 Schematic diagram of the USB redirection enabled area and the virtual file system enabled area in the file manager interface provided by an embodiment of the present disclosure; Figure 6 is a schematic diagram of a clipboard redirection enabling area in a file manager interface provided by an embodiment of the present disclosure; Figure 7 is a schematic diagram of dragging provided by an embodiment of the present disclosure; Figure 8 This is a process of a method for conveniently transferring remote files by dragging and dropping provided by the embodiment of the present disclosure. Figure 2 ; Figure 9 This is a process of a method for conveniently transferring remote files by dragging and dropping provided by the embodiment of the present disclosure. Figure 3 ; Figure 10 This is a schematic diagram of the logical layer structure of a system for conveniently transferring remote files by dragging and dropping, provided by an embodiment of the present disclosure; Figure 11 A schematic diagram of the structure of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0035] Exemplary embodiments will be described in detail herein, examples of which are illustrated in the accompanying drawings. In the following description, when referring to the drawings, like numbers in different figures represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all possible embodiments consistent with the present disclosure. Rather, they are merely examples of systems and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.

[0036] In the era of cloud computing, more and more desktops and applications are running in the cloud, and only a few resources are retained on the local PC, which only requires remote access to the cloud desktop.

[0037] There are many ways to share and connect cloud desktops. One of the most commonly used desktop sharing methods is as follows: Figure 1As shown, the remote device (denoted by S): defined as an independent physical host or virtual machine, is the target device connected by the user through the remote access protocol, stores the cloud desktop environment, application and related resources, and is the target end of file transfer. The local device (denoted by R): refers to the ordinary physical machine, which can also be a thin terminal or zero terminal, is the device directly operated by the user, and establishes a connection with the remote device through the remote access protocol, and is the initiator of file transfer. The desktop sharing form represented by the figure is the most commonly used basic architecture in the field of remote desktop, and the core scenario is that the user remotely accesses the desktop environment of the remote device (S) through the local device (R). Under this architecture, file transfer between local and remote desktops becomes an indispensable function of remote desktop, and is also the basic scenario for implementing various file transfer technologies (such as clipboard sharing, disk mapping, USB redirection, etc.).

[0038] Generally, the most commonly used file sharing method is clipboard sharing, that is, the clipboard redirection function. It can realize that the user copies the file on the R end, and then executes the file on the S end. Conversely, the same is true.

[0039] For a remote desktop software with complete functions, another option will be provided to allow the user to map the local drive (C, D, E, etc. local disk) on the R end to the remote desktop on the S end, so that the disk on the R can be accessed in the remote desktop on the S. As shown below Figure 2 As shown, the Figure 2 The disk mapping function provided by the Windows RDP (Remote Desktop Protocol) built-in remote desktop software will appear a dialog box as shown in Figure 2 after opening the remote desktop connection software on the R end. The user needs to select the disk on the R end to be used in the S end in the dialog box (create a virtual file system in the S end, which is a mapping (shadow) of the local disk on the R end in the S end. Both the R end and the S end can operate the disk).

[0040] However, the above operation method and implementation scheme have the following limitations: Firstly, the R end responsible for the remote desktop application program to the S end needs to provide a disk drive selection dialog box for the user to select the local disk to be mapped. In addition, if you want to map the disk on the S end to the R end, you also need to adapt the corresponding selection interface for the user to use.

[0041] Secondly, regarding clipboard sharing, mainstream remote desktop applications generally only support copy and paste operations on both sides to complete file sharing. Remote file drag and drop functions are generally not supported for file sharing, or support for drag and drop sharing is poor. This is because it relies on the operating system and file manager's drag and drop features to support the clipboard. Different operating systems and file managers have different drag and drop interfaces, making application adaptation difficult.

[0042] Again, for the newly added USB port redirection USB disk sharing method (the USB disk on the R side is physically directed to the USB bus on the S side, a real USB disk can be seen on the USB bus on the S side, and the USB disk on the R side will disappear), this method also needs to add a corresponding user-operable interface to assist users in selecting file sharing in this way.

[0043] All of the above will make the user's operation more complex, and when multiple sharing methods coexist, the flexibility of selection is low.

[0044] This disclosure mainly addresses the above limitations. By determining when to drag and drop files to different locations in the file manager, the present invention combines clipboard redirection, USB redirection, and disk mapping (disk mapping can also be called a virtual file system function) to complete file transfer and sharing between local and remote devices, effectively solving the above usage limitations.

[0045] The technical solution of the present disclosure is described in detail below.

[0046] The present disclosure provides a method for conveniently transferring remote files by dragging and dropping. Figure 3 As shown, the method for conveniently transferring remote files by dragging and dropping includes the following steps: 101. After detecting a dragging behavior on a local device, analyze the type of the dragged object, where the type of the dragged object includes a file, a folder, and a disk icon.

[0047] When a user performs a drag operation on a local device, the system first identifies the type of object being dragged: Files: such as documents, pictures, installation packages and other single files; Folder: A directory containing multiple files or subfolders; Disk icons: icons of storage devices such as local hard disks (C drive, D drive), external USB drives, etc.

[0048] In one embodiment, the local device can sense the dragged object on its own device in real time by registering the drag event, and accurately determine the object type (file, folder, or disk icon) by parsing the path information of the dragged file. Specifically: First, the local device will "listen" in advance for drag-related system events on its own device (such as signals when the drag starts, moves, and ends). When the user initiates a drag operation on the local device and the dragged object enters a specific interaction area, the R side will obtain the original path of the object in the local device (similar to an "identity identifier").

[0049] Next, determine the type of the dragged object by the path characteristics: If the path points to a specific file name (such as "D:\Documents\Report.pdf"; "C:\Pictures\Landscape.jpg"), and the path ends with a file format suffix (.pdf, .jpg, etc.), it is determined to be a file.

[0050] If the path points to a directory name without a suffix (such as "D:\Work Materials" or "C:\Downloads Folder"), and the path hierarchy contains index information for multiple sub-files / sub-directories, it is determined to be a folder.

[0051] If the path is presented as a disk root directory (such as "C:\", "D:\", or "USB Drive (E:)\") and is directly associated with the partition information of the storage device (such as a hard disk partition or the mount point of an external USB drive), it is determined to be a disk icon.

[0052] 102. When the dragging behavior ends, determine whether the end position of the dragging behavior falls within the screen of the remote device displayed on the local device.

[0053] When the user releases the mouse to complete dragging, the system will check whether the "end point" falls on the "remote device screen" displayed on the local device screen (such as the remote desktop window, virtual machine interface, etc., which are the visual areas for local and remote interaction).

[0054] If the end location is outside the remote screen (such as the local desktop or local folder window), it is judged as a "local operation" and the cross-device sharing logic is not triggered; if it falls within the remote screen, it is judged as a "cross-device sharing intention" and proceeds to the next step.

[0055] 103. If the user falls into the screen of the remote device, a screenshot of the remote device is captured.

[0056] Once the drag is confirmed to be within the remote device screen, the system will capture the current screen of the remote device (i.e. the remote desktop or application window status) in real time.

[0057] 104. Determine whether a file manager exists in the screenshot. If so, determine where the end position falls in the file manager.

[0058] In the acquired remote screenshot, the system determines whether the remote has opened a file manager through image recognition and text recognition technology.

[0059] If it is determined that there is a file manager, the specific area in the file manager interface where the drag end position is located (for example, the "network location" of the left navigation bar or the "download" folder of the right list) is further analyzed.

[0060] In one embodiment, determining whether there is a file manager in the screenshot includes: identifying whether the screenshot contains file manager characteristic text, and if so, determining that the screenshot contains a file manager.

[0061] The method of combining image processing technology and OCR text recognition technology can be used to identify whether the screenshot contains file manager characteristic text, specifically: Since the file manager always exists as a separate window, the "window" and "non-window area" in the screenshot can be separated to locate all rectangular areas that may be application windows, excluding pure background or scattered icons that are interference items.

[0062] In the located window, image processing technology is used to find the "typical appearance of the file manager". For example, the file manager usually has a fixed layout: the left side is the navigation bar (listing options such as "this computer" and "folder"), and the right side is the file list (displaying various file icons), and inside it will repeatedly appear iconic icons such as "folder" and "hard disk". Through these visual features, it is initially determined whether the window is likely to be a file manager.

[0063] In the suspected window, the text content is extracted: for example, whether the top title bar of the window has a name such as "file explorer"; whether the left navigation bar has "devices and drives" and "network location"; and whether the right list has column titles such as "name" and "modified date". If the suspected window includes these file manager characteristic texts, it is determined that the suspected window is the file manager.

[0064] After determining that there is a file manager in the screenshot, it is also necessary to determine which position in the file manager the drop point is in, in order to decide different "file sharing enabling areas".

[0065] 105. Determine a target enable area corresponding to an end position based on file sharing enable areas corresponding to different positions in the file manager; the file sharing enable area includes: a clipboard redirection enable area, a USB redirection enable area, and a virtual file system enable area; the clipboard redirection enable area corresponds to a file sharing method based on a clipboard or a file sharing method based on a virtual file system function; the USB redirection enable area corresponds to a file sharing method based on a USB flash drive port redirection function; and the virtual file system enable area corresponds to a file sharing method based on a virtual file system function.

[0066] This disclosure introduces the concept of "file sharing enabled zone" and defines different locations of the file manager as different "file sharing enabled zones": This article divides the file manager interface into three different "file sharing enabled areas". Figure 4 As shown, they are "clipboard redirection enable area", "USB redirection enable area" and "virtual file system enable area".

[0067] Here we take the file manager interface of Windows 10 operating system as an example. Figure 5 and Figure 6 As shown: Define the area between "Devices and Drives" and "Network Locations" in the file manager interface as the "USB redirection enable area".

[0068] Define the area below "Network Location" on the file manager interface as "Virtual File System Enabled Area".

[0069] After the file manager enters a directory, it defines the area as the "clipboard redirection enabled area". Figure 6 shown.

[0070] It is worth noting that the various file sharing enabled areas in the examples disclosed herein are merely examples, and other different locations may also be set in actual applications.

[0071] Since different locations in the file manager correspond to different file sharing enabled areas, in one embodiment, text recognition technology can be used to determine in which "file sharing enabled area" the current drag drop point is located by judging keywords such as "folder", "device and drive", "network location", "name", and "modification date".

[0072] In another embodiment, determining the target enabled area corresponding to the end position includes the following sub-steps A1-A3: A1. Get the coordinates of the end position.

[0073] When the user finishes the file dragging operation (releases the mouse or stops touching), the system captures the precise position of the "end position" on the screen in real time and records it in the form of coordinates.

[0074] A2, compares the coordinates of the end position with the area coordinates corresponding to each file sharing enabled area.

[0075] The system pre-stores the coordinate range of each "file sharing enabled area" on the screen, wherein each enabled area occupies a fixed rectangular area in the file manager interface, and the boundary of the area is recorded as "area coordinates".

[0076] The "end position coordinates" obtained in A1 are compared with the preset "area coordinate range" one by one to see if the end position coordinates fall within the area coordinate range of a certain area.

[0077] A3, the file sharing enabled area where the end position coordinates fall is the target enabled area.

[0078] After the comparison in A2, as long as the end position coordinates completely fall within the coordinate range of a certain enabled area, the enabled area is directly determined as the "target enabled area".

[0079] For example, when the user wants to perform the virtual file system function on the local disk D, the user only needs to drag the local disk D to the position corresponding to the virtual file system enabled area in the file manager on the S end, as shown by the red arrow in Figure 7 For example, when the user wants to perform the U disk port redirection function on the U disk H, the user only needs to drag the U disk H to the position corresponding to the usb redirection enabled area in the file manager on the S end, as shown by the blue arrow in Figure 7 .

[0080] 106, according to the type of the dragged object and the target enabled area, trigger the file sharing mode corresponding to the target enabled area.

[0081] In the present disclosure, different target enabled areas correspond to fixed types of dragged objects: The file and folder matched with the clipboard redirection enabled area; The disk and folder matched with the virtual file system enabled area; The U disk matched with the usb redirection enabled area when the disk corresponding to the disk icon is a U disk or a local disk; If the type of the dragged object does not match the target enabled area, output a prompt information that the current dragging behavior is not supported.

[0082] That is, in the present disclosure, dragging the local disk or U disk icon on the R side to the "virtual file system enabling area" of the file manager on the S side triggers the virtual file system function.

[0083] Drag the USB disk icon on the R side to the "USB redirection enable area" of the file manager on the S side to trigger the port redirection function of the USB disk.

[0084] Drag the local file on the R side to the "Clipboard Redirection Enable Area" of the file manager on the S side to trigger the file copy function.

[0085] Drag the local folder on the R side to the "Clipboard Redirection Enable Area" of the file manager on the S side to trigger the folder copy or mapping function.

[0086] In one embodiment, when the type of the dragged object is a file and the target enabled area is a clipboard redirect enabled area, the file is copied and pasted into the clipboard redirect enabled area.

[0087] When a user drags a specific file (such as a document, picture, etc.) to the "clipboard redirection enabled area" (this area is essentially a functional area that uses the "clipboard" to achieve cross-device / cross-environment sharing, such as the clipboard-associated area used to transfer content in a remote desktop), the "copy and paste" operation will be directly performed, and the file content or path will be transferred to the target location corresponding to the enabled area (such as the clipboard-associated directory of the remote device) through clipboard redirection technology.

[0088] Files are usually small in size and simple in structure, so copying and pasting them directly through the clipboard is highly efficient without requiring any additional operations.

[0089] In one embodiment, when the type of the dragged object is a folder and the target enabled area is a clipboard redirect enabled area, a pop-up window is output to prompt the user to select a file sharing method based on the clipboard or a file sharing method based on the virtual file system function; When it is detected that the file sharing method based on the clipboard is selected, the folder is copied and pasted into the clipboard redirection enabling area; When it is detected that a file sharing mode based on a virtual file system function is selected, a folder is mapped to a clipboard redirection enabling area.

[0090] When the user drags a folder (containing multiple files or subfolders) and the target is still the "Clipboard Redirection Enabled Area", the system will pop up a prompt box, allowing the user to choose two sharing methods: Clipboard-based file sharing: This is a clipboard-based transfer method, similar to file processing. The entire folder content is directly copied and pasted through the clipboard to the clipboard redirection enabled area (suitable for small folders, the content will be actually copied).

[0091] File sharing mode based on virtual file system function: that is, transmission mode based on virtual shared directory, without actually copying folder content, but establishing "mapping relationship" in clipboard redirection enabling area. Clipboard redirection enabling area displays shortcut access entry of the folder, and actual content still exists in original location, and access is through virtual path association (suitable for large folder, saving transmission time and space).

[0092] According to user selection, corresponding operation is performed: if clipboard mode is selected, copy and paste are performed; if virtual sharing mode is selected, mapping is created.

[0093] The folder can contain a large amount of content, and direct copying can consume time and occupy space, and providing selection can meet the needs of "fast transmission" and "efficient access".

[0094] In one embodiment, when the type of the dragged object is a disk icon and the target enabling area is a virtual file system enabling area, the disk is mapped to the virtual file system enabling area of the remote device.

[0095] The user drags a local disk icon (such as C disk, D disk, or external hard disk), and the target is a "virtual file system enabling area", and the disk is "mapped" to the virtual file system enabling area of the remote device.

[0096] "Mapping" means that the files in the disk are not copied, but an "entry" is created in the virtual file system of the remote device, and the remote device can access the content of the original disk through the entry (similar to "network mapped drive", which sees the real-time content of the original disk).

[0097] The disk usually stores a large amount of data, and direct copying is not realistic, and the mapping mode can allow the remote device to conveniently access, while avoiding repeated storage.

[0098] In one embodiment, when the type of the dragged object is a disk icon and the target enabling area is a usb redirection enabling area, it is detected whether the disk corresponding to the disk icon is a U disk; If not, output prompt information that the current drag behavior is not supported; If yes, the U disk is redirected to the usb redirection enabling area of the remote device using the port redirection mode.

[0099] The user drags the disk icon to the "usb redirection enabling area" (which is used to "redirect" the local USB device to the remote device, so that the remote device can access it like using the local USB device).

[0100] First, it is judged whether the disk is a U disk (a removable USB storage device): If it is not a USB drive (such as a local hard drive or fixed hard drive): a prompt will pop up saying "The current drag and drop behavior is not supported" (because USB redirection is mainly for removable USB devices, local hard drives are usually not connected through USB ports and cannot be redirected).

[0101] If it is a USB flash drive, the USB port signal of the USB flash drive is transmitted to the "USB redirection enable area" of the remote device through the "port redirection" technology. At this time, the remote device will recognize the USB flash drive as a "locally connected USB device" and can directly read and write the contents of the USB flash drive.

[0102] USB redirection relies on physical USB ports and only supports removable devices connected via USB (such as USB flash drives). Non-USB devices such as local hard drives cannot be shared this way. Therefore, you must first determine the type of device to avoid invalid operations.

[0103] It is worth noting that the present disclosure also supports the dragging and dropping function of S-side files to R-side. At this time, the S-side performs the same operations as the R-side in the above embodiments of the present disclosure. Please see the description of the above embodiments for details, which will not be repeated here.

[0104] The present disclosure combines the transfer and sharing of files between a local device and a remote device by determining the different locations of the file manager by dragging the file and using clipboard redirection, USB redirection, and virtual file system functions. The technical effects are as follows: (1) The current multiple scattered operation methods of clipboard sharing, USB port redirection and virtual file system mapping are integrated through a unified entrance of drag and drop, unifying the above three functions. There is no need to manually select or enable a specific redirection mode in the UI interface, which greatly simplifies the operation steps and improves flexibility.

[0105] (2) Some operating systems and file managers only support the clipboard drag and drop function, and the drag and drop interfaces vary, making drag and drop adaptation difficult. This solution does not rely on or is limited by the clipboard drag and drop function of the remote operating system and file manager. It uses image recognition and text processing technology to independently determine the sharing method (such as clipboard transfer, USB redirection, virtual file system mapping, etc.), significantly reducing the adaptation difficulty.

[0106] (3) By unifying the operation path, not only forward file sharing is simplified, but also the convenience of reverse file sharing (from the S-end to the R-end) is significantly improved. Users can directly drag and drop files from the S-end to the R-end without the need for additional selection steps, thus achieving efficient simplification of two-way operations.

[0107] The present disclosure provides a method for conveniently transferring remote files by dragging and dropping. Figure 8 As shown, the method for conveniently transferring remote files by dragging and dropping includes the following steps: 2001, User drag behavior happens on R side.

[0108] User selects a file, folder or disk icon on local device (R side) with mouse or touch operation and starts dragging, at this moment, system starts to monitor the following operation and prepare to track it.

[0109] 2002, User releases the mouse.

[0110] User finishes the drag operation and releases the mouse / finger, the position at the moment of releasing determines the final target area of the drag behavior.

[0111] 2003, Judge whether the releasing point is in S side screen.

[0112] System detects the coordinate of the releasing point in real time and confirms whether it is in the "remote device (S side) screen" displayed on local device screen (such as remote desktop window, application interface of S side, etc.). This step is the core of distinguishing "local operation" and "cross-device sharing intention": if it is out of S side screen, it means that the user is just moving the object locally; if it is in the screen, it may be to transmit content to S side.

[0113] 2004, If it is not in S side screen, the process ends.

[0114] If the releasing point is out of S side screen, it is determined as a normal local drag (such as arranging local files), and there is no need to trigger cross-device sharing logic, and the process terminates.

[0115] 2005, If it is in S side screen, capture S side screenshot.

[0116] When it is confirmed that the releasing point is in S side screen, the system immediately intercepts the current screen of S side for analyzing the interface state of S side (such as whether the file manager is opened).

[0117] 2006, Judge whether the snapshot picture contains file manager by combining image processing technology and OCR text recognition technology.

[0118] Through image processing (such as recognizing window frame, layout features) and OCR text recognition (such as detecting "file manager" "this computer" and other feature words), analyze whether there is a file manager in S side snapshot.

[0119] 2007, If there is no file manager, the process ends.

[0120] If S side does not open the file manager (such as currently displaying a browser, a document, and other non-file management interfaces), it is impossible to complete the file receiving, and the process terminates.

[0121] 2008, if there is a file manager, further, determine whether the drop point falls into the file manager.

[0122] After confirming that there is a file manager on the S side, it is further necessary to check whether the drop point is within the window range of the file manager (rather than other interface areas of the S side). For example, if the file manager and the browser are displayed simultaneously in the S side screen, only the drop point within the file manager window is valid.

[0123] 2009, if the drop point does not fall into the file manager, the process ends.

[0124] If the drop point is in the S side screen but not in the file manager window (such as falling on the desktop or other applications of the S side), it is determined that there is no valid sharing target, and the process terminates.

[0125] 2010, if the drop point falls into the file manager, identify the area coordinates of each "file sharing enabled area" in the diagram, and determine which file sharing enabled area the drop point belongs to.

[0126] When the drop point is in the file manager, the system locates the preset "file sharing enabled area" (such as the clipboard redirection area, the USB redirection area, and the virtual file system area) in the file manager through coordinate recognition technology, and determines which area the drop point specifically belongs to.

[0127] 2011, the process ends.

[0128] After completing all the judgment steps, the system executes the corresponding file sharing logic (such as copying, mapping, and redirecting) according to the result of 2010, and the drag-and-drop judgment process terminates.

[0129] The embodiment of the present disclosure provides a method for realizing convenient transmission of remote files through dragging, as shown in Figure 9 The method for realizing convenient transmission of remote files through dragging includes the following steps: The user performs a drag-and-drop action.

[0130] If the user drags a file and the destination is the "clipboard redirection enabled area", the file is directly copied and pasted to the clipboard redirection enabled area, and the process ends.

[0131] Otherwise, the user is prompted that dragging is not supported, and the process ends.

[0132] If the user drags a folder and the destination is the "clipboard redirection enabled area", a pop-up box prompts the user to select the clipboard redirection function or the virtual file system function. If the user selects the clipboard redirection function, the folder is directly copied to the clipboard redirection enabled area directory. If the user selects the virtual file system function, the folder is mapped to the clipboard redirection enabled area.

[0133] Otherwise, prompt the user that the drag is not supported, and the process ends.

[0134] If the user drags a disk icon. If the destination is the "virtual file system enabled area", the disk is directly mapped to the S-end "network location". If the destination is the "usb redirection enabled area", it is necessary to determine whether the disk is a U disk. If it is a U disk, the U disk is redirected to the S-end "device and drive" using the port redirection method. If it is not a U disk but a local disk, the user is prompted that the drag is not supported, and the process ends.

[0135] Based on the above Figure 3 The method for realizing convenient remote file transmission by dragging described in the corresponding embodiment, the following is a system embodiment of the present disclosure, which can be used to execute the method embodiment of the present disclosure.

[0136] The embodiment of the present disclosure provides a system for realizing convenient remote file transmission by dragging, as shown in the figure, the system comprises: Figure 10 The parsing module 31 is configured to parse the type of the dragged object after detecting the dragging behavior on the local device, the type of the dragged object comprising a file, a folder, and a disk icon. The first judgment module 32 is configured to determine whether the end position of the dragging behavior falls within the picture of the remote device displayed on the local device when the dragging behavior ends. The capturing module 33 is configured to capture a screenshot of the remote device if the end position falls within the picture of the remote device. The second judgment module 34 is configured to determine whether there is a file manager in the screenshot, and if there is, determine the position of the end position in the file manager. The determining module 35 is configured to determine the target enabled area corresponding to the end position according to the file sharing enabled area corresponding to different positions in the file manager; the file sharing enabled area comprises a clipboard redirection enabled area, a USB redirection enabled area, and a virtual file system enabled area, the clipboard redirection enabled area corresponds to a file sharing mode based on the clipboard or a file sharing mode based on the virtual file system function, the USB redirection enabled area corresponds to a file sharing mode based on the port redirection function of the U disk, and the virtual file system enabled area corresponds to a file sharing mode based on the virtual file system function. The triggering module 36 is configured to trigger the file sharing mode corresponding to the target enabled area according to the type of the dragged object and the target enabled area.

[0137] In one embodiment, in terms of determining whether there is a file manager in the screenshot, the second judgment module 34 is specifically configured to: ​Identify whether the screenshot contains file manager-specific text; If it does, it determines that a file manager exists in the screenshot.

[0138] In one embodiment, in determining the target enabled area corresponding to the end position, the determination module 35 is specifically configured to: Get the coordinates of the end position; Compare the coordinates of the end position with the coordinates of the area corresponding to each file sharing enabled area; The file sharing enabled area where the coordinates of the end position fall is the target enabled area.

[0139] In one embodiment, in terms of triggering the file sharing mode corresponding to the target enabled area according to the type of the dragged object and the target enabled area, the triggering module 36 is specifically configured to: When the dragged object type is a file and the target enabled area is the clipboard redirect enabled area, copy and paste the file into the clipboard redirect enabled area.

[0140] In one embodiment, in terms of triggering the file sharing mode corresponding to the target enabled area according to the type of the dragged object and the target enabled area, the triggering module 36 is specifically configured to: When the dragged object is a folder and the target enabled area is a clipboard redirect enabled area, a pop-up window is displayed to prompt the user to select a file sharing method based on the clipboard or a file sharing method based on the virtual file system function; When it is detected that the file sharing method based on the clipboard is selected, the folder is copied and pasted into the clipboard redirection enabling area; When it is detected that a file sharing mode based on a virtual file system function is selected, a folder is mapped to a clipboard redirection enabling area.

[0141] In one embodiment, in terms of triggering the file sharing mode corresponding to the target enabled area according to the type of the dragged object and the target enabled area, the triggering module 36 is specifically configured to: When the type of the dragged object is a disk icon and the target enabled area is a virtual file system enabled area, the disk is mapped to the virtual file system enabled area of ​​the remote device.

[0142] In one embodiment, in terms of triggering the file sharing mode corresponding to the target enabled area according to the type of the dragged object and the target enabled area, the triggering module 36 is specifically configured to: When the type of the dragged object is a disk icon and the target enabled area is the USB redirect enabled area, check whether the disk corresponding to the disk icon is a USB disk; If not, output a prompt message that the current drag behavior is not supported; If yes, the U disk uses the port redirection mode to redirect to the usb redirection enabled area of the remote device.

[0143] In one embodiment, the system further comprises an output module; The output module is configured to output a prompt message indicating that the current drag operation is not supported when the type of the dragged object does not match the target enabled area, wherein the file and folder match the clipboard redirection enabled area; the disk and folder match the virtual file system enabled area; and the U disk matches the usb redirection enabled area when the disk corresponding to the disk icon is a U disk or a local disk.

[0144] In an exemplary embodiment, a computer device, which can be a server or a terminal, is provided, and an internal structure diagram of the computer device can be as shown in Figure 11 The computer device includes a processor, a memory, an input / output interface (I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The input / output interface of the computer device is configured to exchange information between the processor and external devices. The communication interface of the computer device is configured to communicate with external terminals through a network connection. The computer program is executed by the processor to implement a method for realizing remote file convenient transmission through dragging.

[0145] Those skilled in the art can understand that Figure 11 The structure shown in the above

[0146] In an exemplary embodiment, a computer readable storage medium is provided, which stores a computer program. The computer program is executed by a processor to implement the steps in the above method embodiments.

[0147] In an exemplary embodiment, a computer program product is provided, which includes a computer program. The computer program is executed by a processor to implement the steps in the above method embodiments.

[0148] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiments. Any reference to memory, database or other medium used in the embodiments provided by the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

[0149] The database involved in the embodiments provided by the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a blockchain, etc., without being limited thereto. The processor involved in the embodiments provided by the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.

[0150] Those skilled in the art can understand that all or part of the steps of the above-mentioned embodiments can be completed by hardware or by a program instructing related hardware. The program can be stored in a computer readable storage medium, and the storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.

[0151] Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the concepts disclosed herein. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims

1. A method for conveniently transferring remote files by dragging and dropping, characterized in that: The method comprises: After detecting a dragging behavior on the local device, parsing the type of the dragged object, the type of the dragged object includes a file, a folder, and a disk icon; When the dragging behavior ends, determining whether the end position of the dragging behavior falls within the image of the remote device displayed on the local device; If it falls into the remote device's screen, capture the remote device's screen snapshot; Determining whether a file manager exists in the screenshot, and if so, determining where the end position falls in the file manager; Determining a target enable zone corresponding to the end position according to file sharing enable zones corresponding to different positions in the file manager; the file sharing enable zone includes: a clipboard redirection enable zone, a USB redirection enable zone, and a virtual file system enable zone; the clipboard redirection enable zone corresponds to a file sharing mode based on a clipboard or a file sharing mode based on a virtual file system function; the USB redirection enable zone corresponds to a file sharing mode based on a port redirection function of a USB flash drive; and the virtual file system enable zone corresponds to a file sharing mode based on a virtual file system function; According to the type of the dragged object and the target enabled area, the file sharing method corresponding to the target enabled area is triggered.

2. The method according to claim 1, characterized in that The determining whether a file manager exists in the screenshot includes: Identify whether the screenshot contains file manager-specific text; If it does, it determines that a file manager exists in the screenshot.

3. The method according to claim 1, characterized in that The determining of the target enabled area corresponding to the end position includes: Get the coordinates of the end position; Compare the coordinates of the end position with the coordinates of the area corresponding to each file sharing enabled area; The file sharing enabled area where the coordinates of the end position fall is the target enabled area.

4. The method according to claim 1, wherein The triggering of the file sharing mode corresponding to the target enabled area according to the type of the dragged object and the target enabled area includes: When the dragged object type is a file and the target enabled area is the clipboard redirect enabled area, copy and paste the file into the clipboard redirect enabled area.

5. The method according to claim 1, wherein The triggering of the file sharing mode corresponding to the target enabled area according to the type of the dragged object and the target enabled area includes: When the dragged object is a folder and the target enabled area is a clipboard redirect enabled area, a pop-up window is displayed to prompt the user to select a file sharing method based on the clipboard or a file sharing method based on the virtual file system function; When it is detected that the file sharing method based on the clipboard is selected, the folder is copied and pasted into the clipboard redirection enabling area; When it is detected that a file sharing mode based on a virtual file system function is selected, a folder is mapped to a clipboard redirection enabling area.

6. The method according to claim 1, characterized in that The triggering of the file sharing mode corresponding to the target enabled area according to the type of the dragged object and the target enabled area includes: When the type of the dragged object is a disk icon and the target enabled area is a virtual file system enabled area, the disk is mapped to the virtual file system enabled area of ​​the remote device.

7. The method according to claim 1, characterized in that The triggering of the file sharing mode corresponding to the target enabled area according to the type of the dragged object and the target enabled area includes: When the type of the dragged object is a disk icon and the target enabled area is the USB redirect enabled area, check whether the disk corresponding to the disk icon is a USB disk; If not, output a prompt message that the current drag behavior is not supported; If so, redirect the USB flash drive to the USB redirection enabled area of ​​the remote device using port redirection.

8. The method according to claim 1, characterized in that The method further comprises: When the type of the dragged object does not match the target enabled area, a prompt message is output indicating that the current dragging behavior is not supported. Among them, the types that match the clipboard redirection enabled area are files and folders; the types that match the virtual file system enabled area are disks and folders; when the disk icon corresponds to a USB flash drive or a local disk, the type that matches the USB redirection enabled area is a USB flash drive.

9. A system for conveniently transferring remote files by dragging and dropping, characterized in that: The system comprises: A parsing module, configured to parse the type of the dragged object after detecting a dragging behavior on the local device, wherein the type of the dragged object includes a file, a folder, and a disk icon; The first judgment module is used to judge whether the end position of the dragging behavior falls within the screen of the remote device displayed on the local device when the dragging behavior ends; A capture module, configured to capture a screenshot of the remote device if the remote device falls within the screen of the remote device; a second determining module, configured to determine whether a file manager exists in the screenshot, and if so, to determine where the end position falls within the file manager; A determination module is configured to determine a target enablement zone corresponding to an end position based on file sharing enablement zones corresponding to different positions in the file manager; the file sharing enablement zones include: a clipboard redirection enablement zone, a USB redirection enablement zone, and a virtual file system enablement zone; the clipboard redirection enablement zone corresponds to a file sharing mode based on a clipboard or a file sharing mode based on a virtual file system function; the USB redirection enablement zone corresponds to a file sharing mode based on a port redirection function of a USB flash drive; and the virtual file system enablement zone corresponds to a file sharing mode based on a virtual file system function; The trigger module is used to trigger the file sharing mode corresponding to the target enabled area according to the type of the dragged object and the target enabled area.

10. A computer-readable storage medium, characterized in that The storage medium stores at least one computer instruction, which is loaded and executed by the processor to implement the steps performed in the method for conveniently transferring remote files by dragging and dropping as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Local display method for remote desktop in medical consultation system

    CN103631551A

  • Icon dragging method and system based on HTML5 virtual operation system

    CN104216607A

  • File sending method and device, computer equipment and storage medium

    CN109582187A

  • File dragging method and device for application virtualization, equipment and readable storage medium

    CN114138145A

  • Data transmission method and device, computer equipment and storage medium

    CN115334074A