Cross-system target object dragging method and electronic equipment

By creating a virtual window in the second operating system and sending drag and drop events, the problem of dragging and drop across target objects of Android-Linux system is solved, achieving better user experience and resource management.

CN119536897APending Publication Date: 2025-02-28HUAWEI TECH CO LTD
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202311102700.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-29
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

The prior art is difficult to realize target object dragging across Android-Linux systems, resulting in poor user experience.

Method used

Dragging across the system target object is achieved by creating a virtual window of the first operating system application in the second operating system and sending a drag event from the virtual window to the second application.

Benefits of technology

It realizes dragging and drop across the system target objects, improves the user experience, and avoids the problems of system memory usage and power consumption increase.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119536897A_ABST
    Figure CN119536897A_ABST
Patent Text Reader

Abstract

The invention provides a cross-system target object dragging method and electronic equipment, the electronic equipment comprises a first operating system and a second operating system, a first application program runs on the first operating system, and a second application program runs on the second operating system. The method comprises the steps that in response to the operation that a user drags a target object in a first application program to a second application program, a dragging event is obtained, and the dragging event comprises a dragging event type and the target object; sending the drag event to a second operating system, and creating a virtual window of the first application program in the second operating system based on the drag event; the dragging event is sent to the second application program from the virtual window of the first application program, the target object is displayed in the second application program, the method provided by the invention can realize dragging of the target object between the first operating system and the second operating system, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electronic technology, and more specifically, to a method for dragging a target object across systems and an electronic device. Background Art

[0002] An operating system is a set of interrelated system software programs that manage and control computer operations, use and run hardware and software resources, and provide public services to organize user interactions. Depending on the operating environment, operating systems can be divided into desktop operating systems, mobile operating systems, server operating systems, and embedded operating systems.

[0003] Operating system virtualization technology refers to dividing a real hardware resource into multiple virtual hardware resources through a virtualization technology so that multiple operating systems can use it simultaneously, thereby improving the resource utilization and efficiency of the entire system.

[0004] As a type of operating system virtualization technology, containerization technology allows multiple applications to run in isolation under the same host operating system (Host OS) kernel environment. The host operating system provides isolated operating environments for applications, namely container instances. The containerization technology architecture can be divided into the container instance layer, the container management layer, and the kernel resource layer. The most essential difference between containerization technology and traditional virtualization is that traditional virtualization requires the installation of a client operating system (Guest OS) to execute applications, while operating system virtualization replaces the Guest OS with a shared host operating system kernel.

[0005] By using virtualization technologies such as containerization, you can run client operating system applications on the host operating system. So how to achieve better compatibility between the host operating system and the client operating system and improve the user experience is a problem that the industry is widely concerned about. Summary of the invention

[0006] The present application provides a method for dragging a target object across systems and an electronic device, wherein the method can implement dragging of a target object across systems, thereby improving user experience.

[0007] In the first aspect, the present application provides a method for dragging a target object across systems. The method provided in the first aspect can be executed by an electronic device, or by a module (such as a processor, chip, or chip system, etc.) applied in the electronic device, or by a logical node, logical module or software that can realize all or part of the functions of the electronic device. The present application does not limit this.

[0008] Specifically, the electronic device includes a first operating system and a second operating system, a first application is running on the first operating system, and a second application is running on the second operating system. The method includes: in response to a user dragging a target object in the first application to the second application, obtaining a drag event; sending the drag event to the second operating system, and creating a virtual window of the first application in the second operating system based on the drag event; sending the drag event from the virtual window of the first application to the second application, and displaying the target object in the second application.

[0009] The method provided in the first aspect is that when a user initiates a drag event from an application of a first operating system to an application of a second operating system, the electronic device can obtain the drag event and send the drag event to the second operating system, build a virtual drag source of the application of the first operating system in the second operating system, and then send the drag event from the virtual drag source to the target application, thereby realizing a complete drag protocol. Based on the complete drag protocol, dragging of target objects across systems can be realized.

[0010] In a possible implementation manner of the first aspect, the drag event includes a drag event type and a target object.

[0011] In a possible implementation of the first aspect, the drag event type includes at least one of a drag-in event, a move event, and a release event. In this implementation, based on any event in the drag event type, a virtual window of the first application can be created in the second operating system, that is, a virtual drag source is constructed in the second operating system.

[0012] For example, when the electronic device obtains a drag event, the electronic device can create a virtual window of the first application in the second operating system in real time, thereby simulating the drag event of the first operating system in real time in the second operating system. Of course, the electronic device can also create a virtual window of the first application in the second operating system after obtaining a move event or a release event, and the embodiments of the present application do not specifically limit this.

[0013] In a possible implementation of the first aspect, a first application displays a first source window, a target object is displayed in the first source window, a first operating system includes a shell application shell APK of a second application, and in response to a user dragging the target object in the first application to the second application, a drag event is obtained, including: in response to the user dragging operation from the first source window to the shell application, the drag event is obtained. In this implementation, the shell application in the first operating system can obtain the drag event sent to the second application, thereby realizing the forwarding of the drag event.

[0014] In a possible implementation of the first aspect, the creating a virtual window of the first application in the second operating system based on the drag event includes: creating a second source window in the second operating system based on the drag event, the second source window corresponding to the first source window. In this implementation, the second source window of the second operating system simulates the first source window (drag source) of the first operating system, thereby constructing a complete x11 drag protocol and implementing a cross-system drag operation.

[0015] In a possible implementation of the first aspect, sending the drag event from the virtual window of the first application to the second application includes: sending the drag event from the second source window to the second application. In this implementation, the second source window simulated by the second operating system serves as a drag source to send the drag event to the second application, thereby implementing a cross-system drag operation.

[0016] In a possible implementation of the first aspect, before creating the virtual window of the first application in the second operating system based on the drag event, the method further includes: converting the data structure of the drag event into a data structure supported by the second operating system. In this implementation, the drag event can be identified in the second operating system through the conversion of the data structure.

[0017] In a possible implementation of the first aspect, the electronic device includes a shared directory of a first operating system and a second operating system, and sending the drag event from the virtual window of the first application to the second application includes: sending a first path to the second operating system, the first path is used to indicate the path of the first operating system to obtain the target object in the shared directory; converting the first path to a second path, the second path is the path of the second operating system to obtain the target object in the shared directory; and obtaining the target object from the shared directory based on the second path. In this implementation, when the target object data is too large, it is transmitted through a shared directory, which can avoid occupying system memory, reduce power consumption of the electronic device, and improve user experience.

[0018] In a possible implementation of the first aspect, the virtual window of the first application includes a handle of the virtual window of the first application. In this implementation, the virtual window of the first application created in the second operating system only needs to include the handle of the virtual window, which reduces implementation complexity.

[0019] In a possible implementation manner of the first aspect, the first operating system and the second operation are based on remote desktop protocol RDP communication.

[0020] In a second aspect, an electronic device is provided, the electronic device comprising a first operating system and a second operating system. A first application is run on the first operating system, and a second application is run on the second operating system. The first operating system is used to obtain a drag event in response to a user dragging a target object in the first application to the second application; the first operating system is also used to send the drag event to the second operating system; the second operating system is used to create a virtual window of the first application in the second operating system based on the drag event; and the second operating system is also used to send the drag event from the virtual window of the first application to the second application to display the target object in the second application.

[0021] In the electronic device provided by the second aspect, the first operating system can respond to a user initiating a drag event from an application of the first operating system to an application of the second operating system, obtain the drag event, and send the drag event to the second operating system. The second operating system builds a virtual drag source of the application of the first operating system, and then sends the drag event from the virtual drag source to the target application, thereby implementing a complete drag protocol. The second operating system can implement dragging of target objects across systems based on the complete drag protocol.

[0022] In a possible implementation manner of the second aspect, the drag event includes a drag event type and a target object.

[0023] In a possible implementation of the second aspect, the drag event type includes at least one of a drag-in event, a move event, and a release event. In this implementation, based on any event in the drag event type, a virtual window of the first application can be created in the second operating system, that is, a virtual drag source is constructed in the second operating system.

[0024] For example, when the electronic device obtains a drag event, the electronic device can create a virtual window of the first application in the second operating system in real time, thereby simulating the drag event of the first operating system in real time in the second operating system. Of course, the electronic device can also create a virtual window of the first application in the second operating system after obtaining a move event or a release event, and the embodiments of the present application do not specifically limit this.

[0025] In a possible implementation of the second aspect, the first application displays a first source window, the first source window displays a target object, the first operating system includes a shell application of the second application, and the first operating system is used to obtain a drag event in response to a user's drag operation from the first source window to the shell application. In this implementation, the shell application in the first operating system can obtain the drag event sent to the second application, thereby realizing the forwarding of the drag event.

[0026] In a possible implementation of the second aspect, the second operating system is used to create a second source window based on the drag event, and the second source window corresponds to the first source window. In this implementation, the second source window of the second operating system simulates the first source window (drag source) of the first operating system, thereby building a complete x11 drag protocol and implementing a cross-system drag operation.

[0027] In a possible implementation of the second aspect, the second operating system is used to send the drag event from the second source window to the second application. In this implementation, the second source window simulated by the second operating system acts as a drag source to send the drag event to the second application, thereby implementing a cross-system drag operation.

[0028] In a possible implementation of the second aspect, the second operating system is used to convert the data structure of the drag event into a data structure supported by the second operating system. In this implementation, the drag event can be identified in the second operating system through the conversion of the data structure.

[0029] In a possible implementation of the second aspect, the electronic device includes a shared directory of a first operating system and a second operating system, the first operating system is used to send a first path to the second operating system, the first path is used to indicate the path of the first operating system to obtain a target object in the shared directory; the second operating system is used to convert the first path into a second path, the second path is the path of the second operating system to obtain the target object in the shared directory; the second operating system obtains the target object from the shared directory based on the second path. In this implementation, when the target object data is too large, it is transmitted through the shared directory, which can avoid occupying system memory, reduce power consumption of the electronic device, and improve user experience.

[0030] In a possible implementation of the second aspect, the virtual window of the first application includes a handle of the virtual window of the first application. In this implementation, the virtual window of the first application created in the second operating system only needs to include the handle of the virtual window, which reduces implementation complexity.

[0031] In a possible implementation manner of the second aspect, the first operating system and the second operation are based on remote desktop protocol RDP communication.

[0032] In a possible implementation manner of the second aspect, the shell application of the second application includes a drag and drop service module, and the drag and drop service module is used to obtain a drag event.

[0033] In a possible implementation of the second aspect, the first operating system includes an RDP client, the second operating system includes an RDP server, the RDP client is used to send a drag event to the second operating system, the RDP server is used to receive the drag event sent by the first operating system, and the RDP client and the RDP server communicate based on RDP.

[0034] According to a third aspect, a communication device is provided, which includes a unit for executing each step in the above first aspect or any possible implementation of the first aspect.

[0035] In a fourth aspect, a communication device is provided, which includes at least one processor and a memory, the processor and the memory are coupled, the memory stores program instructions, and when the program instructions stored in the memory are executed by the processor, the method in the above first aspect or any possible implementation of the first aspect is executed.

[0036] In a fifth aspect, a communication device is provided, comprising at least one processor and an interface circuit, wherein the at least one processor is used to execute the method in the above first aspect or any possible implementation of the first aspect.

[0037] In a sixth aspect, an electronic device is provided, which includes the communication device provided in the third aspect, or the electronic device includes the communication device provided in the third aspect, or the electronic device includes the communication device provided in the fourth aspect.

[0038] In a possible implementation of the sixth aspect, the electronic device may be any one of a mobile phone, a tablet, a personal computer or a car computer.

[0039] In a seventh aspect, a computer program product is provided, which includes a computer program. When the computer program is executed by a processor, it is used to execute the method in the above first aspect or any possible implementation of the first aspect.

[0040] In an eighth aspect, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed, it is used to execute the method in the above first aspect or any possible implementation of the first aspect.

[0041] In a ninth aspect, a chip is provided, comprising: a processor for calling and running a computer program from a memory, so that a communication device equipped with the chip executes a method for executing the above first aspect or any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 A schematic diagram of a cross-system target object dragging method provided in the related art is shown;

[0043] Figure 2 A schematic diagram of an interface for dragging and dropping files in an Android operating system and a Linux operating system in the related art is shown;

[0044] Figure 3 A schematic diagram showing the structure of an electronic device 100 provided in the present application;

[0045] Figure 4 A schematic diagram of the architecture of a method for dragging a target object across systems provided by an embodiment of the present application is shown;

[0046] Figure 5 A schematic diagram of the architecture of another method for dragging a target object across systems provided by an embodiment of the present application is shown;

[0047] Figure 6 A schematic diagram of a drag interface for a cross-system target object provided by an embodiment of the present application is shown;

[0048] Figure 7 A schematic diagram of a method for dragging a target object across systems provided by an embodiment of the present application is shown;

[0049] Figure 8 Another example of a cross-system target object dragging interface provided by an embodiment of the present application is shown;

[0050] Fig. 9 A schematic flowchart of a method 1000 for dragging a target object across systems provided by an embodiment of the present application is shown;

[0051] Fig.10 A schematic structural diagram of an electronic device provided by the present application is shown. DETAILED DESCRIPTION

[0052] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0053] The terms used in the following embodiments are only for the purpose of describing specific embodiments and are not intended to be used as limitations on the present application. As used in the specification and appended claims of the present application, the singular expressions "one", "a kind", "above", "the" and "this" are intended to also include expressions such as "one or more", unless there is a clear contrary indication in the context. It should also be understood that in the embodiments of the present application, "one or more" refers to one or more (including two); "and / or" describes the association relationship of associated objects, indicating that three relationships may exist; for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship.

[0054] References to "one embodiment" or "some embodiments" etc. described in this specification mean that a particular feature, structure or characteristic described in conjunction with the embodiment is included in one or more embodiments of the present application. Thus, the phrases "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear at different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0055] The multiple involved in the embodiments of the present application means greater than or equal to two. It should be noted that in the description of the embodiments of the present application, the words "first", "second", etc. are only used for the purpose of distinguishing the description, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying an order.

[0056] With the emergence of personal computer (PC) application engines, PCs can achieve further ecological integration with mobile phones, that is, users can deploy virtual PC systems on mobile terminals. In the dual-frame HSL (Harmony Subsystem for Linux) project of a single terminal device, the compatibility of the Android operating system with the Linux operating system can be achieved. For example, Linux applications on the Linux operating system can be run on the Android operating system in the form of a client (virtual machine or container), and the Android operating system is also called a host operating system. Exemplarily, Linux applications such as WPS, CAJ Viewer, etc. can be run in the Android operating system through a container environment.

[0057] For example, in a scenario where the Android operating system is the host operating system and the Linux operating system is the client operating system, text, files, and images may need to be dragged and dropped between Android applications and Linux applications. Currently, the Android operating system provides native drag and drop capabilities, and Android applications can drag and drop text, files, images, and other objects. The Linux operating system also provides drag and drop of text, files, images, and other objects between Linux applications based on the x11 drag and drop protocol (x represents the x protocol, and 11 is the protocol version number). It is necessary to make the Android drag and drop protocol and the Linux drag and drop protocol more compatible, realize direct drag and drop across the Android operating system and the Linux operating system, and provide users with a better interactive experience.

[0058] It should be understood that the X11 protocol is the 11th version of the X Window System protocol, which is a standard protocol for graphical user interfaces. The design goal of the X11 protocol is to provide an extensible, network-transparent, cross-platform graphical user interface. In the X11 protocol, the client and the display server communicate through the network. The client sends a request, and the display server responds to the request and returns the result.

[0059] When the Android operating system runs Linux applications, the Android applications and Linux applications may need to drag and drop text, files, pictures and other data to share data. The Android operating system provides native drag and drop capabilities based on the Android Framework, so text, files, pictures and other data can be dragged and dropped between Android applications. The Linux operating system also provides drag and drop capabilities based on the x11 protocol, so Linux applications can drag and drop each other. However, since the Android operating system and the Linux operating system are two completely different systems, the implementation logic and included components are also different. The Android drag and drop protocol and the x11 protocol are not compatible, which ultimately makes it impossible to implement drag and drop across the Android-Linux system.

[0060] In one related technology, the Windows operating system is compatible with the Linux ecosystem through the WSLG system (Windows Subsystem for Linux GUI), which transforms the backend-x11 in the native weston and expands the clipboard sharing between Linux applications and Windows applications, that is, Linux applications can share file contents with Windows applications through the clipboard. However, direct drag and drop between the Windows operating system and the Linux operating system is still not supported.

[0061] In another related technology example, calling a system interface between the Android operating system and the Windows operating system can implement drag and drop capabilities across the Android operating system and the Windows operating system.

[0062] Figure 1 A schematic diagram of a cross-system target object dragging method provided in the related art is shown. Figure 1 As shown, the electronic device runs a Windows operating system, and an application program of the Android operating system runs on the Windows operating system based on an Android simulator, such as Figure 1 As shown, the Windows side includes a Windows drag capability interface, and the Android side includes an Android capability interface. The Windows side and the Android side implement dragging of Android and Windows through the Windows drag capability interface and the Android capability interface.

[0063] There is no existing system interface that can be called based on the Android operating system and the Linux operating system, so the Android operating system and the Linux operating system cannot implement cross-system drag and drop. For example, Figure 2 The following is a schematic diagram of the interface for dragging and dropping files in the Android operating system and the Linux operating system in the related art. Figure 2 As shown, a display window 203 of application 1 and a display window 204 of application 2 are displayed on the display screen 202 of tablet computer 201, wherein application 1 is an Android application developed based on the Android operating system, and application 2 is a Linux application developed based on the Linux operating system. Multiple documents (document 1, document 2, document 3, document 4, and document 5) are displayed on display window 203. When a user wants to drag document 4 from the multiple documents to display window 204 of the Linux application, the Linux side window does not allow the dragging, as shown in FIG. Figure 2 As shown, a drag-forbidden sign is displayed in the display window 204 to prompt the user.

[0064] It should be noted that the Android application mentioned in this application refers to an application developed based on the Android system and running in the operating environment provided by the Android system, and the Linux application refers to an application developed based on the Linux system and running in the operating environment provided by the Linux system.

[0065] In summary, how to implement dragging and dropping between Android applications and Linux application target objects when running Linux applications on the Android operating system is a problem that needs to be solved urgently.

[0066] It is worth noting that the Linux operating system supports the X11 drag protocol, which describes how to exchange messages between the client (application) and the display server. The complete X11 drag protocol points out that the implementation of the drag event should include the drag source (source window) and the target window. In order to provide the Linux application with the capability of being compatible with the X11 drag protocol, a virtual source window can be constructed in this application to implement dragging between the Android application and the target object of the Linux application.

[0067] In view of this, the present application provides a method for dragging a target object across systems, the method comprising: in response to a user's operation of dragging a target object in a first application to a second application, obtaining a drag event, the drag event including a drag event type and a target object, sending the drag event to the second operating system, and creating a virtual window of the first application in the second operating system based on the drag event, sending the drag event from the virtual window of the first application to the second application, and displaying the target object in the second application, wherein the first application runs on the first operating system and the second application runs in the second operating system. The method implements a complete x11 drag protocol by constructing a virtual drag source in the second operating system based on the drag event, thereby realizing the dragging of the target object between the first operating system and the second operating system.

[0068] The first operating system and the second operating system are different operating systems. For example, the first operating system may be a Windows operating system, an Android operating system, a Unix operating system, a DOS operating system, or a Mac OS operating system, etc.; the second operating system may be a Linux operating system, an iOS operating system, a Harmony operating system, a Symbian operating system, a BlackBerry operating system, a Windows Mobile operating system, or a Palm operating system, etc. The embodiments of the present application do not limit the specific types of the first operating system and the second operating system.

[0069] Before introducing the method for dragging a cross-system target object provided by the present application, the electronic device provided by the present application is first specifically described. An embodiment of the present application provides an electronic device, which is used to execute the method for dragging a cross-system target object provided by the present application. For example, the electronic device in the embodiment of the present application can be a personal computer, various portable notebooks, various tablet computers, mobile phones, car computers, etc. Optionally, the electronic device can also be a personal digital assistant (PDA), a handheld device with a larger display screen, a computing device, a vehicle-mounted device, a wearable device, an electronic device in a 5G network, or an electronic device in an evolved public land mobile communication network (public landmobile network, PLMN), etc., and the embodiment of the present application is not limited to this.

[0070] For example, Figure 3 The figure shows a schematic diagram of the structure of an electronic device 100 provided by the present application. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0071] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0072] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0073] In the embodiment of the present application, the processor 110 can run a first operating system, and an application program of a second operating system can be run on the first operating system based on a simulator.

[0074] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0075] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0076] Among them, the memory is used to store application code for executing the solution of the present application, and the execution is controlled by the processor 110. The processor 110 is used to execute the application code stored in the memory to control the electronic device 100 to implement the cross-system target object dragging method provided by the embodiment of the present application, thereby realizing the interaction of target objects between the first operating system application and the second operating system application based on the user's dragging operation.

[0077] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0078] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0079] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device through the power management module 141.

[0080] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0081] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

[0082] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0083] In an embodiment of the present application, the display screen 194 may be used to display multiple windows, including a window of an application of the first operating system and a window of an application of the second operating system.

[0084] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0085] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.

[0086] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0087] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0088] The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.

[0089] For example, in the embodiment of the present application, the user's drag operation can be acquired through the touch sensor 180K, and the touch sensor can be used to determine whether to drag from the first operating system to the virtual shell APK of the second operating system.

[0090] The buttons 190 include a power button, a volume button, etc. The motor 191 can generate a vibration prompt. The indicator 192 can be an indicator light, which can be used to indicate the charging status, power changes, messages, missed calls, notifications, etc. The SIM card interface 195 is used to connect a SIM card. It is understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.

[0091] For ease of understanding, the following embodiments of the present application will be described in detail with Figure 3 Taking the electronic device of the structure shown as an example, the method for dragging a target object across systems provided by the embodiment of the present application is specifically described in combination with the accompanying drawings and application scenarios. Before introducing the method for dragging a target object across systems provided by the present application, the electronic device, system architecture and application scenarios applicable to the method are first described.

[0092] Figure 4 The schematic diagram of the architecture of a method for dragging a target object across systems provided by an embodiment of the present application is shown. The execution subject of the method may be an electronic device. Figure 4As shown, a first operating system is running on the electronic device, and an application of a second operating system is running on the first operating system based on a simulator. The first operating system runs the first operating system application, and the first operating system includes a shell application (Android Package, APK) of the second application. The second operating system runs the second operating system application, and the second operating system includes a virtual source window.

[0093] The first operating system application is used to provide a source window of the first operating system, that is, the user triggers a drag operation in the source window of the first operating system application.

[0094] It should be noted that the shell in the first operating system is a shell protection tool of the second operating system kernel in the first operating system, which is used to complete the interaction between the user and the second operating system kernel. When the user's drag operation sends a request to the operating system, the shell can act as a command interpreter to parse the user's command into instructions that the operating system can understand, thereby realizing the interaction between the user and the operating system. The shell APK mentioned in this application can be understood as a shell protection tool corresponding to the second operating system application. There is a corresponding relationship between the shell APK and the application of the second operating system. Exemplarily, when the application of the second operating system is WPS, the shell APK is the shell APK of WPS. The shell APK is used to obtain the user's drag event, and package the drag event and send it to the second operating system, thereby triggering the second operating system to create a virtual source window.

[0095] It should also be noted that the virtual source window in the second operating system can be understood as a simulated virtual window of the first operating system application, and the virtual source window is used as a drag source to send drag events, thereby satisfying the complete x11 drag protocol.

[0096] It should be noted that the virtual source window is an invisible window to the user. Since the window is only for simulating the drag source (the window of the first operating system application), it is not necessary to draw the window. It is only necessary to assign a window identifier (ID) or handle to the window. Since the window does not display content, the window can also be understood as a virtual source window.

[0097] It should be understood that the event types of the drag event include a drag start event, a drag-in event, a move event, and a release event. The electronic device obtains the drag event and sends the drag event to the second operating system in real time synchronization with the user's drag operation in the first operating system. In other words, after the electronic device obtains the start event in the first operating system, it sends the start event to the second operating system in real time. After the electronic device obtains the drag-in event in the first operating system, it sends the drag-in event to the second operating system in real time, until the electronic device obtains the release event in the first operating system, indicating that the drag event ends, the electronic device sends all the drag event types and target objects corresponding to the drag event to the second operating system. The virtual source window of the second operating system synchronizes the drag event to the second operating system application in real time, thereby realizing the dragging of the target object from the first operating system application to the second operating system application.

[0098] It should be understood that in an embodiment of the present application, the target object may include files, text or other transferable objects. For example, the file may be a video file, an audio file, a document, a picture, a shortcut or a compressed file, etc., and the text may be a piece of text, a piece of numbers or a string, etc.

[0099] In a possible implementation, the execution subject of the method may also be a first operating system and a second operating system. The shell APK in the first operating system includes an event acquisition module and a first communication module, and the second operating system includes a second communication module. For example, Figure 5 FIG. 2 shows another schematic diagram of an architecture of a method for dragging a target object across systems provided by an embodiment of the present application. Figure 5 As shown, the shell APK in the first operating system includes a drag and drop (Dnd) service (Service) and a first communication module (e.g., a remote display protocol (RDP) client (Client)). The second operating system includes a second communication module (e.g., RDP Service). The RDP Client and RDP Service communicate via the RDP protocol. Of course, the first communication module and the second communication module can also communicate via other communication methods, which is not limited in the embodiments of the present application.

[0100] Among them, Dnd Service is used to obtain the user's drag event and package the user's drag event. RDPClient is used to send the packaged drag event to the second operating system. RDP Service is used to receive the drag event sent by the first operating system, and then the second operating system creates a virtual source window based on the received drag event, and sends the drag event corresponding to the virtual source window to the second operating system application to realize the dragging of the target object of the first operating system application to the second operating system application.

[0101] Combine the following Figure 4 and Figure 5 The architecture diagram shown, taking the electronic device as a tablet computer, the first operating system as an Android operating system, and the second operating system as a Linux operating system as an example, specifically illustrates the application scenarios to which the cross-system target object dragging method provided in the embodiment of the present application is applicable.

[0102] For example, Figure 6 A schematic diagram of a drag interface for a cross-system target object provided by an embodiment of the present application is shown. Figure 6 As shown, a display window 603 of application 1 and a display window 604 of application 2 are displayed on the display screen 602 of tablet computer 601, wherein application 1 is an Android application developed based on the Android operating system, and application 2 is a Linux application developed based on the Linux operating system. Multiple documents (Document 1, Document 2, Document 3, Document 4, and Document 5) are displayed on display window 603. When a user wants to drag document 4 from among multiple documents to display window 604 of the Linux application, the user can use an input device such as a mouse or a touch screen to drag the target object (e.g., document 4) in display window 603 of the Android application to display window 604 of the Linux application of the Linux operating system. Figure 6 As shown, a drag-allowed mark is displayed in the display window 604 to prompt the user to remind the user that the document can be dragged in.

[0103] In some embodiments, in response to the user's drag operation on the display window 603, the shell APK in the Android operating system obtains the user's drag start event. As the user drags on the display screen 602, the drag event enters the shell APK window (invisible to the user), that is, the drag event enters the Linux application corresponding to the shell APK.

[0104] Specifically, when the user Figure 6When the touch screen of the electronic device shown is touched, the touch sensor can detect the touch operation of the user on the touch screen. The touch sensor can transmit the detected touch operation to the processor to determine the type of touch event. Specifically, from the time the user starts to touch the touch screen and slides until the hand is lifted, the reporting events generated by the kernel layer include: Start event, several Move events and Release event, where the number of Move events depends on the time of touching the screen.

[0105] Continue to see Figure 6 , assuming that the coordinate system of the touch screen based on the tablet computer is based on the vertex of the lower left corner of the touch screen as the origin, the length direction of the tablet computer as the X axis, and the width direction of the tablet computer as the Y axis, then position point 1 is the position coordinate corresponding to the Start event on the touch screen, position point 2, position point 3, position point 4, and position point 5 are the coordinate positions corresponding to the Move event on the touch screen after the Start event, and position point 6 is the coordinate position corresponding to the Release event on the touch screen. The electronic device can determine whether the drag event enters the shell APK window based on the position coordinates corresponding to the user's touch operation and the position coordinates corresponding to the shell APK. The event of entering the shell APK window is also called an Inter event, that is, the drag-in event enters the coordinate position corresponding to position point 4, then position point 5 is the Move event after entering the shell APK.

[0106] It should be understood that the shell APK is a shell application of the second operating system application, so the target object of the first operating system application cannot be displayed in the shell APK. When the drag event enters the shell APK window, the shell APK packages the acquired drag event and sends it to the second operating system. Figure 6 In the example shown, the shell APK is a shell APK of a Linux application, so the target object of the Android application cannot be displayed in the shell APK.

[0107] It should be noted that the shell application can be understood as a window frame of the second operating system, which runs as a blank window in the first operating system to display the display window of the second operating application on the first operating system.

[0108] Specifically, the drag event includes a drag event type, and the drag event type includes: a start (Start) event, a plurality of move (Move) events and a release (Release) event, and a final determined drag (Inter) event, etc., for example, Figure 6The drag event also includes the drag target object, for example, Figure 6 As shown, the target object is document 4.

[0109] It should be understood that the drag event type sent by the first operating system to the second operating system can also be understood as a drag position. When the user drags the target object with a mouse, the drag position is the mouse drag position, and when the user drags the target object with a finger or a stylus, the drag position is the touch drag position.

[0110] In a possible implementation, the shell APK of the Android operating system may include a DndService, which uses the Dnd Service to obtain and package the drag event. The shell APK may also include an RDP Client, which uses the RDP Client to send the obtained drag event to the second operating system.

[0111] After the second operating system receives the drag event sent by the first operating system, the second operating system can create a window object based on the obtained drag event and use a unique window ID as an identifier. The window corresponds to the source window in the first operating system. Since the window is not visible to the user, the window can also be called a virtual source window.

[0112] For example, after the shell APK of the Android operating system sends the drag event to the Linux operating system, the Linux operating system can create a window object based on the acquired drag event and use a unique window ID as an identifier. The window object corresponds to the window of the Android operating system application. Figure 6 , the window object created by the Linux operating system corresponds to the display window 603. In other words, since the display window 603 runs in the Android operating system, in order to realize the dragging of documents, based on the dragging protocol supported by the Linux operating system, the Linux operating system needs to simulate a virtual display window (invisible to the user) in its own system, thereby realizing the interaction between the virtual display window and the display window 604 of the Linux operating system application.

[0113] In some possible implementations, the interaction between the virtual display window and the display window 604 of the Linux operating system application is implemented based on the X11 server. In other words, in order to meet the drag protocol of X11, after building a virtual display window corresponding to the source window, the Linux operating system first sends the acquired drag event from the virtual display window to the X11 server, and then the X11 server forwards the drag event to the Linux application.

[0114] It should be noted that the drag event includes a Start event, several Move events, a Release event, and a final Inter event. The shell APK sends the drag event to the Linux operating system in real time. The Linux operating system can create a window object and assign a window ID to the virtual window corresponding to the source window after obtaining the Inter event, or it can create a window object and assign a window ID to the virtual window corresponding to the source window after receiving the Move event. The embodiment of the present application does not specifically limit the timing of assigning the window ID to the Linux operating system.

[0115] In an embodiment of the present application, the target object corresponding to the drag event can be a video file, an audio file, a document, a picture, a shortcut or a compressed file, etc., or it can be a piece of text, a piece of numbers or a string, etc.

[0116] Therefore, when the target object is a text such as a paragraph of words, a paragraph of numbers or a paragraph of strings, the text data is small, and the shell APK of the first operating system can directly send the text to the second operating system, which will not occupy the system process and waste user time. However, when the target object is a file such as a video file, an audio file, a document, a picture, a shortcut or a compressed file, the file data is large. If the shell APK of the first operating system directly sends the file to the second operating system, it will occupy the system process, take a certain amount of time and increase the power consumption of the electronic device, thereby reducing the user experience.

[0117] Based on this, a shared directory can be established between the first operating system and the second operating system. The first operating system can use the shell APK to send the path for obtaining the target object in the shared directory to the second operating system. After the second operating system converts the path into the path for obtaining the target object in the shared directory, the target object is obtained in the shared directory based on the converted path. This method can avoid occupying system memory, reduce power consumption of electronic devices, and improve user experience.

[0118] It should be noted that the physical path of the target object in the shared directory is the same, and the path in the shared directory where the first operating system obtains the target object is different from the path in the shared directory where the second operating system obtains the target object.

[0119] It should also be noted that the first operating system may also send the number of files of the target object, the type of files, the total size of files, etc. to the second operating system. Of course, other information related to the target object may also be sent, which is not specifically limited in the present embodiment of the application.

[0120] For example, in Figure 6 In the example shown, the target object that the Android operating system application drags to the Linux operating system application is document 4, so a shared directory can be established between the Android operating system and the Linux operating system, and the Android operating system sends a drag event to the Linux operating system, which includes the Start event mentioned above, several Move events, Release events, and Inter events. The Android operating system also needs to send the Linux operating system the path where the Android operating system obtains document 4 in the shared directory. The Android operating system can also send information to the Linux operating system that the number of files is 1, the document type is Docx, and the document size is 68k.

[0121] In some embodiments, the Linux operating system may receive the drag event and the path corresponding to the target object sent by the Android operating system.

[0122] In a possible implementation, the Linux operating system may include an RDP Service, and utilize the RDP Service to receive the drag event and path sent by the RDP Client in the Android operating system.

[0123] After the second operating system obtains the drag event type and the target object, it converts the drag event type and the target object of the first operating system into the drag event type and the target object of the second operating system. The data structure of the converted drag event type and the target object is a type that the second operating system can recognize. In addition, the second operating system sends the drag event type and the target object to the target application for display in real time.

[0124] For example, the Linux operating system converts the acquired data structure type of the drag events at position 4, position 5, and position 6 into a type that the Linux operating system can recognize. And the drag events at position 4, position 5, and position 6 are sent to the display window 604 of the Linux operating system application in real time, such as Figure 6 As shown, the document dragging process can be seen in the display window 604, and finally the data type of the acquired document 4 is converted into a type recognizable by the Linux operating system and the document 4 is sent to the display window 604 of the Linux operating system application in real time. After the release operation is performed at position 6, the document 4 is successfully dragged to the display window 604 of the Linux operating system application.

[0125] For ease of understanding, Figure 7 The schematic diagram of the method for dragging a target object across systems provided by an embodiment of the present application is shown below. Figure 7 The schematic diagram shown in FIG. 1 illustrates the dragging method of the cross-system target object provided by the present application. Figure 7 As shown, a first operating system and a second operating system are running on an electronic device. Application A is running in the first operating system, and application B is running in the second operating system. Since application B in the second operating system is running in the first operating system as a container, the first operating system includes a shell application B1 of application B. When a user drags a target object from the window of application A running in the first operating system to the window of application B in the second operating system, shell application B1 in the first operating system obtains the user's drag event, which includes a drag start event, a drag-in event (position a), a move event (position b), and a release event (position c). After the release event occurs, shell application B1 also obtains the target object. After shell application B1 obtains the drag event, shell application B1 sends the drag event to the second operating system, and the second operating system creates a virtual drag window based on the received drag event, that is, Figure 7 The application window A1 shown in the figure simulates the window of application A. After receiving the drag event, the second operating system sends the drag event from the application window A1 to application B of the second operating system, and finally displays the target object on application B.

[0126] Combination of the above Figure 4 , Figure 5 , Figure 6 as well as Figure 7The method of dragging a target object across systems is introduced, that is, in response to a user's dragging operation from a first source window in a first operating system to a shell application window in the first operating system, the shell application window corresponds to the target window in a second operating system. The shell application window obtains a drag event and sends the drag event and the target file to the second operating system. The second operating system creates a second source window based on the received drag event, the second source window corresponds to the first source window, and then the second operating system sends the received target file from the second source window to the target window, and finally realizes the dragging of the target object. The method realizes the dragging of the target object across systems by simulating the same window as the drag source of the first operating system in the second operating system, realizing a complete x11 drag protocol.

[0127] In some embodiments, the present application also provides another example of an application scenario where the method for dragging a target object across systems is applicable. Figure 4 and Figure 5 The architecture diagram shown takes a tablet computer as an example of an electronic device to specifically illustrate another application scenario in which the method for dragging a target object across systems provided in an embodiment of the present application is applicable.

[0128] For example, Figure 8 Another example of a cross-system target object drag interface diagram provided by an embodiment of the present application is shown. Figure 8 As shown in FIG. (a), a display window 803 of application 1, a transfer station 804, and a display window 805 of application 2 are displayed on the display screen 802 of tablet computer 801, wherein application 1 is an Android application developed based on the Android operating system, and application 2 is a Linux application developed based on the Linux operating system. Display window 803 displays a paragraph of text "PC-level UI interactive interface brings you a familiar office environment, and the office operation habits on the computer are continued", and the transfer station displays a paragraph of text dragged from the display window 803 of the Android application and a paragraph of text dragged from other applications.

[0129] It should be understood that the transfer station can be an application running in the Android operating system. Then, when the Android operating system drags a text in the display window 803 of the Android application to the display window of the transfer station 804, the text can be directly dragged without passing through the Android operating system. Figure 4 as well as Figure 5 The shell APK in the architecture diagram shown obtains the drag event and forwards it to the Linux operating system.

[0130] When the user drags the text "The office operation habits on the computer are continued" from the transfer station to the display window 805 of the Linux application of the Linux operating system, the display interface of the electronic device changes from Figure 8 The interface shown in Figure (a) switches to Figure 8 The interface shown in Figure (b).

[0131] The display interface of electronic equipment Figure 8 Switch to the figure (a) in Figure 8 The specific process of Figure (b) can be found in Figure 6 The corresponding description will not be repeated here.

[0132] based on Figure 8 As can be seen from the scene diagram, when the drag operation occurs in the same operating system, the electronic device will not trigger the shell application to forward the drag event, and the drag can be performed directly based on the existing drag protocol. However, when the drag operation occurs in different operating systems, the shell application of the electronic device will obtain the drag event and forward the drag event to the other operating system, so that the other operating system creates a drag source based on the drag event, thereby realizing the cross-system drag operation.

[0133] The following will be combined Figure 6 and Figure 8 The scene diagram illustrates the cross-system target object dragging method provided by the embodiment of the present application. Fig. 9 FIG. 1 is a schematic flow chart of a method 1000 for dragging a target object across systems provided by an embodiment of the present application. Fig. 9 As shown, Fig. 9 The method 900 shown in FIG. 1 may include steps S910 to S930. Fig. 9 Each step in method 900 is described in detail.

[0134] It should be understood that in the embodiment of the present application, the electronic device is taken as an example to illustrate the method 900. As an example but not a limitation, the execution subject of the method 900 may also be a chip used in the electronic device.

[0135] S910: In response to a user dragging a target object in a first application to a second application, a drag event is acquired, where the drag event includes a drag event type and a target object.

[0136] It should be noted that the first application is an application running on the first operating system, and the second application is an application running on the second operating system. The application on the second operating system can run on the first operating system in the form of a client, a virtual machine, or a container.

[0137] In the embodiment of the present application, the drag event type includes a drag start event, a drag-in event, a move event, and a release event, etc. Of course, the drag event type may also include other event types, such as a leave event, etc., which is not limited in the embodiment of the present application.

[0138] In some embodiments, the target object may include a file, text or other transferable object. For example, the file may be a video file, an audio file, a document, a picture, a shortcut or a compressed file, etc., and the text may be a piece of text, a piece of numbers or a string, etc.

[0139] For example, the first operating system may be an Android operating system, and the second operating system may be a Linux operating system. The first application may be Figure 6 The Android application shown, the second application can be Figure 6 In response to the user dragging the target object in the first application to the second application, it can be Figure 6 The operation shown is to drag the document 4 in the display window 603 of the Android application to the display window 604 of the Linux application.

[0140] In step S910, in response to the user dragging the target object in the first application to the second application, the specific process of obtaining the drag event can be referred to in Figure 6 The description will not be repeated here.

[0141] S920: Send the drag event to the second operating system, and create a virtual window of the first application in the second operating system based on the drag event.

[0142] In the embodiment of the present application, since the second application is running on the first operating system in the form of a client, a virtual machine or a container, when the electronic device obtains a drag event, it is necessary to send the drag event obtained on the first operating system to the second operating system, and then when the second operating system obtains the drag event, it creates a virtual window corresponding to the first application, thereby constructing a complete x11 drag protocol, and finally realizing the dragging of the target object between the first operating system and the second operating system.

[0143] In some embodiments, the virtual window of the first application created may be a window ID assigned by the electronic device to the virtual window, and a drag event is sent to the second application based on the window ID. The window ID may also be understood as a window handle.

[0144] For example, Figure 6As shown, after the electronic device sends the drag operation of document 4 to the Linux operating system, the electronic device creates a window ID in the second operating system as a virtual window of the Android application.

[0145] In step S920, the specific process of how to send the drag event to the operating system and how to create a virtual window of the first application in the second operating system based on the drag event can be referred to Figure 6 The description in will not be repeated here.

[0146] S930: Send a drag event from the virtual window of the first application to the second application, and display the target object in the second application.

[0147] In step S930, the virtual source window (virtual window of the first application) created in the second application is used to send a drag event to the second application, thereby dragging the target object of the first application to the second application, and finally displaying the dragged target object in the second application.

[0148] The cross-system target object dragging method provided by the present application is that after the electronic device obtains the user's cross-system dragging operation, the dragging event is sent to the second operating system, and the complete x11 dragging protocol is implemented by simulating the same window as the drag source of the first operating system in the second operating system, thereby realizing the dragging of the target object across the system.

[0149] In some possible implementations, the first application displays a first source window, a target object is displayed in the first source window, the first operating system includes a shell application shell APK of the second application, and the electronic device obtains a drag event in response to a user dragging operation from the first source window to the shell application.

[0150] In some possible implementations, the electronic device creates a second source window in the second operating system based on the drag event, and the second source window corresponds to the first source window. In this implementation, the second source window of the second operating system simulates the first source window (drag source) of the first operating system, thereby constructing a complete x11 drag protocol and realizing cross-system drag operations.

[0151] In some possible implementations, the electronic device sends the drag event from the second source window to the second application. In this implementation, the second source window simulated by the second operating system sends the drag event to the second application as a drag source, thereby implementing a cross-system drag operation.

[0152] In some possible implementations, the electronic device converts the data structure of the drag event in the first operating system into a drag event of a data structure supported by the second operating system.

[0153] In some possible implementations, the electronic device sends a first path to the second operating system, the first path is used to indicate the path of the first operating system to obtain the target object in the shared directory; the first path is converted into a second path, the second path is the path of the second operating system to obtain the target object in the shared directory; the target object is obtained from the shared directory based on the second path. In this implementation, when the target object data is too large, it is transmitted through a shared directory, which can avoid occupying system memory, reduce power consumption of the electronic device, and improve user experience.

[0154] In some possible implementations, the first operating system and the second operation are based on Remote Desktop Protocol RDP communication.

[0155] The above describes in detail an example of a method for dragging a target object across systems provided by the present application. It is understandable that, in order to implement the above functions, the electronic device includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.

[0156] The present application can divide the drag method of the cross-system target object into functional units according to the above method example. For example, each function can be divided into each functional unit, or two or more functions can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of units in the present application is schematic and is only a logical functional division. There may be other division methods in actual implementation.

[0157] Fig.10 A schematic structural diagram of an electronic device provided by the present application is shown. Fig.10The dotted line in the figure indicates that the unit or the module is optional. The electronic device 1000 can be used to implement the method described in the above method embodiment. The electronic device 1000 can be a terminal device or a server, or a module (such as a processor, a chip, or a chip system, etc.) applied to a terminal device or a server, or a logical node, a logical module or software that can implement all or part of the terminal functions, or a logical node, a logical module or software that can implement all or part of the server functions.

[0158] The electronic device 1000 includes one or more processors 1001, and the one or more processors 1001 can support the electronic device 1000 to implement Fig. 9 The method in the corresponding method embodiment. The processor 1101 can be a general-purpose processor or a special-purpose processor. For example, the processor 1001 can be a central processing unit (CPU). The CPU can be used to control the electronic device 1000, execute software programs, and process data of software programs. The electronic device 1000 can also include a communication unit 1005 to implement signal input (reception) and output (transmission).

[0159] The electronic device 1000 may be a chip (system) including a memory and a processor, wherein the processor is configured to execute a computer program stored in the memory to implement the methods shown in the above embodiments.

[0160] The communication unit 1005 may be an input and / or output circuit of the chip (system), or the communication unit 1005 may be a communication interface of the chip (system), and the chip (system) may be a component of the electronic device 1000 .

[0161] For another example, the communication unit 1005 may be a transceiver of the electronic device 1000 , or the communication unit 1005 may be a transceiver circuit of the electronic device 1000 .

[0162] The electronic device 1000 may include one or more memories 1002, on which a program 1004 is stored. The program 1004 can be executed by the processor 1001 to generate instructions 1003, so that the processor 1001 performs the method described in the above method embodiment according to the instructions 1003. Optionally, data may also be stored in the memory 1002. Optionally, the processor 1001 may also read the data stored in the memory 1002, and the data may be stored at the same storage address as the program 1004, or the data may be stored at a different storage address from the program 1004.

[0163] The processor 1001 and the memory 1002 may be provided separately or integrated together, for example, integrated on a system on chip (System On Chip, SOC) of the electronic device.

[0164] The specific manner in which the processor 1001 executes the method for dragging the cross-system target object may refer to the relevant description in the method embodiment.

[0165] It should be understood that each step of the above method embodiment can be completed by a hardware-based logic circuit or a software-based instruction in the processor 1001. The processor 1001 can be a CPU, a digital signal processor (DSP), a field programmable gate array (FPGA), or other programmable logic devices, such as discrete gates, transistor logic devices, or discrete hardware components.

[0166] The present application also provides a computer program product, which, when executed by the processor 1001, implements the method of any method embodiment in the present application.

[0167] The computer program product may be stored in the memory 1002 , for example, a program 1004 , which is converted into an executable target file that can be executed by the processor 1001 after preprocessing, compiling, assembling, and linking.

[0168] The present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a computer, the method of any method embodiment of the present application is implemented. The computer program can be a high-level language program or an executable target program.

[0169] The computer-readable storage medium is, for example, a memory 1002. The memory 1002 may be a volatile memory or a non-volatile memory, or the memory 1002 may include both a volatile memory and a non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SynchLinkDRAM, SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DRRAM).

[0170] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described devices and equipment and the technical effects produced can refer to the corresponding processes and technical effects in the aforementioned method embodiments, and will not be repeated here.

[0171] In several embodiments provided in the present application, the disclosed systems, devices and methods can be implemented in other ways. For example, some features of the method embodiments described above can be ignored or not executed. The device embodiments described above are merely schematic, and the splitting of the units is only a logical function splitting. There may be other splitting methods in actual implementation, and multiple units or components may be combined or integrated into another system. In addition, the coupling between the units or the coupling between the components may be direct coupling or indirect coupling, and the above coupling includes electrical, mechanical or other forms of connection.

[0172] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application is described in detail with reference to the above embodiments, a person skilled in the art should understand that the technical solutions described in the above embodiments can still be modified, or some of the technical features can be replaced by equivalents, and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.

[0173] Finally, the above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto, and any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for dragging a target object across systems, characterized in that: The method is applied to an electronic device, the electronic device includes a first operating system and a second operating system, a first application program is running on the first operating system, and a second application program is running on the second operating system, the method includes: In response to a user dragging a target object in the first application to the second application, acquiring a drag event; Sending the drag event to the second operating system, and creating a virtual window of the first application in the second operating system based on the drag event; The drag event is sent from the virtual window of the first application to the second application, and the target object is displayed in the second application.

2. The method according to claim 1, characterized in that: The drag event includes: a drag event type and a target object.

3. The method according to claim 2, characterized in that The drag event type includes at least one of a drag-in event, a move event, and a release event.

4. The method according to any one of claims 1 to 3, characterized in that The first application displays a first source window, the target object is displayed in the first source window, the first operating system includes a shell application of the second application, and in response to a user dragging the target object in the first application to the second application, acquiring a drag event includes: In response to a drag operation performed by the user from the first source window to the shell application, a drag event is acquired.

5. The method according to claim 4, characterized in that The step of creating a virtual window of the first application in the second operating system based on the drag event includes: Based on the drag event, a second source window is created in the second operating system, and the second source window corresponds to the first source window.

6. The method according to claim 5, characterized in that Sending the drag event from the virtual window of the first application to the second application comprises: The drag event is sent from the second source window to the second application.

7. The method according to any one of claims 1 to 6, characterized in that Before creating a virtual window of the first application in the second operating system based on the drag event, the method further includes: The data structure of the drag event is converted into a data structure supported by the second operating system.

8. The method according to any one of claims 1 to 7, characterized in that The electronic device includes a shared directory of a first operating system and a second operating system, and sending the drag event from the virtual window of the first application to the second application includes: Sending a first path to the second operating system, where the first path is used to instruct the first operating system to obtain a path for the target object in the shared directory; Convert the first path to a second path, where the second path is a path for the second operating system to obtain the target object in the shared directory; The target object is obtained from the shared directory based on the second path.

9. The method according to any one of claims 1 to 8, characterized in that The virtual window of the first application includes a handle of the virtual window of the first application.

10. The method according to any one of claims 1 to 9, characterized in that The first operating system and the second operation are based on Remote Desktop Protocol RDP communication.

11. An electronic device, characterized in that: The electronic device comprises a first operating system and a second operating system, a first application program is running on the first operating system, and a second application program is running on the second operating system; The first operating system is used for acquiring a drag event in response to a user dragging a target object in the first application to the second application; The first operating system is further used to send the drag event to the second operating system; The second operating system is used for creating a virtual window of the first application in the second operating system based on the drag event; The second operating system is further configured to send the drag event from the virtual window of the first application to the second application, and display the target object in the second application.

12. The electronic device according to claim 11, characterized in that: The drag event includes: a drag event type and a target object.

13. The electronic device according to claim 11, characterized in that: The drag event type includes at least one of a drag-in event, a move event, and a release event.

14. The electronic device according to any one of claims 11 to 13, characterized in that: The first application displays a first source window, the first source window displays the target object, and the first operating system includes a shell application of the second application; The first operating system is used for acquiring a drag event in response to a drag operation performed by the user from the first source window to the shell application.

15. The electronic device according to claim 14, characterized in that: The second operating system is used to create a second source window based on the drag event, and the second source window corresponds to the first source window.

16. The electronic device according to claim 15, characterized in that: The second operating system is used to send the drag event from the second source window to the second application program.

17. The electronic device according to any one of claims 11 to 16, characterized in that: The second operating system is used to convert the data structure of the drag event into a data structure supported by the second operating system.

18. The electronic device according to any one of claims 11 to 17, characterized in that: The electronic device includes a shared directory of a first operating system and a shared directory of the second operating system; The first operating system is used to send a first path to the second operating system, where the first path is used to instruct the first operating system to obtain a path for the target object in the shared directory; The second operating system is used to convert the first path into a second path, where the second path is a path for the second operating system to obtain the target object in the shared directory; The second operating system obtains the target object from the shared directory based on the second path.

19. The electronic device according to any one of claims 11 to 18, characterized in that: The virtual window of the first application includes a handle of the virtual window of the first application.

20. The electronic device according to any one of claims 11 to 19, characterized in that: The first operating system and the second operation are based on Remote Desktop Protocol RDP communication.

21. The electronic device according to any one of claims 14 to 20, characterized in that: The shell application of the second application includes a drag and drop service module, and the drag and drop service module is used to obtain the drag event.

22. The electronic device according to any one of claims 11 to 21, characterized in that: The first operating system includes an RDP client, the second operating system includes an RDP server, the RDP client is used to send the drag event to the second operating system, the RDP server is used to receive the drag event, and the RDP client and the RDP server communicate based on the RDP.

23. An electronic device, characterized in that: include: A memory and a processor, wherein the memory is used to store a computer program; and the processor is used to execute the method according to any one of claims 1 to 10 when calling the computer program.

24. The electronic device according to claim 23, characterized in that: The electronic device is any one of a mobile phone, a tablet, a personal computer or a car computer.

25. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.

26. A computer program product, characterized in that When the computer program product is executed on an electronic device, the electronic device is enabled to execute the method according to any one of claims 1 to 10.

Citation Information

Cited By

  • Method and device for dragging and dropping file in compatible layer environment, equipment and medium

    CN120832180A

  • Method and system for dragging X application data in wayland environment

    CN120872472A

  • Cross-system target object dragging method and electronic device

    EP4685638A1

  • Cross-system target object dragging method and electronic device

    WO2025044511A1