Cross-system target object dragging method and electronic device

By creating a virtual window in the second operating system and sending drag events, the problem of target object dragging across Android-Linux systems is solved, improving user experience and compatibility between the operating system.

WO2025044511A1PCT designated stage expired Publication Date: 2025-03-06HUAWEI TECH CO LTD

Patent Information

Application Number
PCT/CN2024/104040
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-08-29
Filing Date
2024-07-05
Publication Date
2025-03-06

AI Technical Summary

Technical Problem

The prior art is difficult to realize target object dragging across Android-Linux systems, resulting in poor user interaction 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

Improves user experience, realizes drag and drop across system target objects, and enhances compatibility and interoperability between operating systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024104040_06032025_PF_FP_ABST
    Figure CN2024104040_06032025_PF_FP_ABST
Patent Text Reader

Abstract

The present application provides a cross-system target object dragging method and an electronic device. The electronic device comprises a first operating system and a second operating system, wherein a first application runs on the first operating system, and a second application runs on the second operating system. The method comprises: in response to an operation that a user drags a target object in a first application to a second application, acquiring a drag event, the drag event comprising a drag event type and the target object; sending the drag event to a second operating system, and on the basis of the drag event, creating a virtual window of the first application in the second operating system; and 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. According to the method provided by the present application, the dragging of the target object between the first operating system and the second operating system can be implemented, thereby improving user experience.
Need to check novelty before this filing date? Find Prior Art

Description

A method for dragging target objects across systems and electronic device

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on August 29, 2023, with application number 2023111027007 and application name “A method for dragging target objects across systems and an electronic device”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] 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

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

[0004] 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.

[0005] As a type of operating system virtualization technology, containerization allows multiple applications to run in isolation within a shared host operating system (Host OS) kernel. The Host OS provides applications with isolated runtime environments, known as 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 fundamental difference between containerization and traditional virtualization is that traditional virtualization requires the installation of a guest operating system (Guest OS) to execute applications, while OS virtualization replaces the Guest OS with a shared host OS kernel.

[0006] By using virtualization technologies such as containerization, it is possible to run applications in a guest operating system on a host operating system. Therefore, how to achieve better compatibility between the host and guest operating systems and improve the user experience is a widely concerned issue in the industry.

[0007] Summary of the Invention

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

[0009] In the first aspect, the present application provides a method for dragging target objects across systems. The method provided in the first aspect can be executed by an electronic device, or by a module applied in the electronic device (such as a processor, chip, or chip system, etc.), 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.

[0010] 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: obtaining a drag event in response to a user dragging a target object in the first application to the second application; 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.

[0011] 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.

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

[0013] In one 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 one of the drag event types, a virtual window of the first application can be created in the second operating system, i.e., a virtual drag source is constructed in the second operating system.

[0014] For example, when the electronic device receives 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 receiving a move event or a release event, and this embodiment of the application does not specifically limit this.

[0015] In one possible implementation of the first aspect, a first application displays a first source window, a target object is displayed in the first source window, and a first operating system includes a shell application (shell APK) for a second application. In response to a user dragging the target object from the first application to the second application, obtaining a drag event includes: obtaining the drag event in response to the user dragging the target object 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 achieving drag event forwarding.

[0016] In a possible implementation of the first aspect, 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, where 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 establishing a complete X11 drag protocol and implementing cross-system drag operations.

[0017] In one 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 the drag source to send the drag event to the second application, thereby implementing a cross-system drag operation.

[0018] 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 a data structure of the drag event into a data structure supported by the second operating system. In this implementation, the drag event can be recognized in the second operating system through the conversion of the data structure.

[0019] 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 being used to indicate the path for the first operating system to obtain the target object in the shared directory; converting the first path to a second path, the second path being the path for 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, transmitting it via a shared directory can avoid occupying system memory, reduce the power consumption of the electronic device, and improve the user experience.

[0020] In a possible implementation of the first aspect, the virtual window of the first application includes a handle to 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 to the virtual window, which reduces implementation complexity.

[0021] In a possible implementation of the first aspect, the first operating system and the second operation are based on Remote Desktop Protocol (RDP) communication.

[0022] In a second aspect, an electronic device is provided, comprising 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 first operating system is configured to receive a drag event in response to a user dragging a target object from the first application to the second application; the first operating system is further configured to send the drag event to the second operating system; the second operating system is configured 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 further configured to send the drag event from the virtual window of the first application to the second application, so as to display the target object in the second application.

[0023] The electronic device provided by the second aspect is that the first operating system can respond to the user initiating a drag event from the application of the first operating system to the application of the second operating system, obtain the drag event, and send the drag event to the second operating system. The second operating system constructs 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.

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

[0025] In one 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 of the drag event types, a virtual window of the first application can be created in the second operating system, i.e., a virtual drag source is constructed in the second operating system.

[0026] For example, when the electronic device receives 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 receiving a move event or a release event, and this embodiment of the application does not specifically limit this.

[0027] In one possible implementation of the second 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 for the second application, and the first operating system is configured to receive a drag event in response to a user dragging operation from the first source window to the shell application. In this implementation, the shell application in the first operating system can receive the drag event sent to the second application, thereby forwarding the drag event.

[0028] In one possible implementation of the second aspect, the second operating system is configured to create a second source window based on a drag event, where 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 establishing a complete X11 drag protocol and implementing cross-system drag operations.

[0029] In one possible implementation of the second aspect, the second operating system is configured to send the drag event from the second source window to the second application. In this implementation, the second operating system simulates the second source window as the drag source to send the drag event to the second application, thereby implementing a cross-system drag operation.

[0030] In a possible implementation of the second aspect, the second operating system is configured 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.

[0031] In one possible implementation of the second aspect, an electronic device includes a shared directory between a first operating system and a second operating system. The first operating system is configured to send a first path to the second operating system, the first path indicating the path the first operating system uses to obtain a target object in the shared directory. The second operating system is configured to convert the first path into a second path, the second path being the path the second operating system uses to obtain the target object in the shared directory. The second operating system then obtains the target object from the shared directory based on the second path. In this implementation, when the target object data is too large, transmitting it through the shared directory can avoid occupying system memory, reduce power consumption of the electronic device, and improve the user experience.

[0032] In a possible implementation of the second aspect, the virtual window of the first application includes a handle to 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 to the virtual window, which reduces implementation complexity.

[0033] In a possible implementation of the second aspect, the first operating system and the second operation communicate based on the Remote Desktop Protocol (RDP).

[0034] In a possible implementation 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 drag events.

[0035] 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.

[0036] In 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.

[0037] 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.

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

[0039] 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.

[0040] 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.

[0041] 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.

[0042] 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.

[0043] In the ninth aspect, a chip is provided, which includes: 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

[0044] FIG1 is a schematic diagram showing a cross-system target object dragging method provided in the related art;

[0045] FIG2 shows a schematic diagram of an interface for dragging and dropping files in an Android operating system and a Linux operating system in related art;

[0046] FIG3 shows a schematic diagram of the structure of the electronic device 100 provided in this application;

[0047] FIG4 shows a schematic diagram of the architecture of a method for dragging a target object across systems provided by an embodiment of the present application;

[0048] FIG5 shows a schematic diagram of the architecture of another method for dragging a target object across systems provided by an embodiment of the present application;

[0049] FIG6 shows a schematic diagram of a drag interface for a cross-system target object provided by an embodiment of the present application;

[0050] FIG7 shows a schematic diagram of a method for dragging a target object across systems provided by an embodiment of the present application;

[0051] FIG8 shows another example of a cross-system drag interface diagram of a target object provided by an embodiment of the present application;

[0052] FIG9 shows a schematic flowchart of a method 900 for dragging a target object across systems provided by an embodiment of the present application;

[0053] FIG10 shows a schematic structural diagram of an electronic device provided by the present application. DETAILED DESCRIPTION

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

[0055] The terms used in the following embodiments are only for the purpose of describing specific embodiments and are not intended to be limiting of the present application. As used in the specification and appended claims of this application, the singular expressions "a", "an", "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: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the related objects before and after are in an "or" relationship.

[0056] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in yet other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0057] 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" and "second" are only used for the purpose of distinguishing the description and cannot be understood as indicating or implying relative importance or order.

[0058] 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 for a single terminal device, the Android operating system can be made compatible with the Linux operating system. 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). The Android operating system is also called the host operating system. For example, Linux applications such as WPS and CAJ Viewer can be run on the Android operating system through a container environment.

[0059] For example, in a scenario where the Android operating system is the host operating system and the Linux operating system is the guest operating system, text, files, and images may need to be dragged and dropped between Android and Linux applications. Currently, the Android operating system provides native drag and drop capabilities, allowing Android applications to drag and drop text, files, images, and other objects. The Linux operating system also supports 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). There is a need to make the Android and Linux drag and drop protocols more compatible, enabling direct drag and drop across the Android and Linux operating systems to provide users with a better interactive experience.

[0060] The X11 protocol, version 11 of the X Window System (X Window System), is a standard protocol for graphical user interfaces (GUIs). The X11 protocol is designed to provide a scalable, network-transparent, and cross-platform GUI. In the X11 protocol, clients and display servers communicate over the network. Clients send requests, and display servers respond and return results.

[0061] When running Linux applications on the Android operating system, Android and Linux applications may need to drag and drop text, files, images, and other data to share data. The Android operating system provides native drag-and-drop capabilities based on the Android Framework, allowing for dragging and dropping of text, files, images, and other data between Android applications. The Linux operating system also provides drag-and-drop capabilities based on the X11 protocol, allowing for drag-and-drop between Linux applications. However, because the Android and Linux operating systems are completely different systems with different implementation logic and components, the Android drag-and-drop protocol and the X11 protocol are incompatible, ultimately preventing cross-Android-Linux drag-and-drop.

[0062] In one related technology, the Windows operating system integrates with the Linux ecosystem through the WSLG system (Windows Subsystem for Linux GUI). This system modifies the backend-x11 within native weston and expands clipboard sharing between Linux and Windows applications, allowing Linux applications to share file contents with Windows applications via the clipboard. However, direct drag-and-drop between Windows and Linux operating systems is still not supported.

[0063] In another related technology, 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.

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

[0065] 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 achieve cross-system dragging. Exemplarily, Figure 2 shows an interface diagram of file dragging of the Android operating system and the Linux operating system in the related art. As shown in Figure 2, a display window 203 of application one is displayed on the display screen 202 of the tablet computer 201, and a display window 204 of application two is also displayed, wherein application one is an Android application developed based on the Android operating system, and application two 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 the display window 203. When the user wants to drag document 4 from the multiple documents to the display window 204 of the Linux application, the Linux side window does not allow dragging in. As shown in Figure 2, a drag-forbidden mark is displayed in the display window 204 to prompt the user.

[0066] 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.

[0067] 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.

[0068] It's worth noting that the Linux operating system supports the X11 drag protocol, which describes how messages are exchanged between the client (application) and the display server. The complete X11 drag protocol specifies that drag events must include a drag source (source window) and a target window. To provide Linux applications with X11 drag protocol compatibility, this application constructs a virtual source window to enable dragging between the Android application and the target object of the Linux application.

[0069] 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 dragging of the target object between the first operating system and the second operating system.

[0070] 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; and 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. The embodiments of this application do not limit the specific types of the first operating system and the second operating system.

[0071] Before introducing the method for dragging a target object across systems provided by the present application, the electronic device provided by the present application will first be described in detail. An embodiment of the present application provides an electronic device for executing the method for dragging a target object across systems provided by the present application. For example, the electronic device in the embodiment of the present application may be a personal computer, various portable notebooks, various tablet computers, mobile phones, car computers, etc. Optionally, the electronic device may 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 (PLMN), etc., and the embodiment of the present application is not limited to this.

[0072] For example, FIG3 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 194, and a subscriber identification module (SIM) card interface 195. 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.

[0073] It should be understood that the structures illustrated in the embodiments of the present application do 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, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0074] 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 processing unit (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). The different processing units may be independent devices or integrated into one or more processors.

[0075] 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.

[0076] 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.

[0077] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.

[0078] Among them, the memory is used to store the 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.

[0079] In some embodiments, the processor 110 may include one or more interfaces. The interfaces 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.

[0080] It is understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is merely an illustrative 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 from the above embodiments, or a combination of multiple interface connection methods.

[0081] The charging management module 140 is configured to receive charging input from a charger. The charger can be either a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 can receive wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also provide power to the electronic device via the power management module 141.

[0082] 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.

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

[0084] Display screen 194 is used to display images, videos, and the like. 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 (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-oLed, or a quantum dot light-emitting diode (QLED). In some embodiments, electronic device 100 may include one or N display screens 194, where N is a positive integer greater than one.

[0085] 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.

[0086] The electronic device 100 can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.

[0087] 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 via the external memory interface 120 to implement data storage functions. For example, files such as music and videos can be stored on the external memory card.

[0088] 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 can 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 can 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.

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

[0090] The touch sensor 180K is also called a "touch panel." The touch sensor 180K can be disposed on the display screen 194. 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 applied thereto or in the vicinity thereof. The touch sensor can transmit the detected touch operations to the application processor to determine the type of touch event. Visual output related to the touch operations can be provided via the display screen 194. In other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device 100, in a location different from that of the display screen 194.

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

[0092] 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 will 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 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.

[0093] For ease of understanding, the following embodiments of this application will take an electronic device having the structure shown in Figure 3 as an example, and combine the accompanying drawings and application scenarios to specifically explain the method for dragging a target object across systems provided by the embodiments of this application. Before introducing the method for dragging a target object across systems provided by this application, the electronic device, system architecture, and application scenarios to which this method is applicable will be first explained.

[0094] Figure 4 shows an architectural diagram of a method for dragging a target object across systems, provided by an embodiment of the present application. The execution subject of the method may be an electronic device. As shown in Figure 4, 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.

[0095] 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.

[0096] 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, parsing the user 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 the 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. For example, 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.

[0097] 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, which is used as a drag source to send drag events, thereby meeting the complete X11 drag protocol.

[0098] It should be noted that the virtual source window is a window that is invisible to the user. Since the window is only used to simulate 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.

[0099] It should be understood that the event types of the drag event include drag start event, drag-in event, move event and 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.

[0100] It should be understood that in an embodiment of the present application, the target object may include a file, 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 of characters, etc.

[0101] 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, FIG5 shows an architectural diagram of another example of a method for dragging a target object across systems provided in an embodiment of the present application. As shown in FIG5 , the shell APK in the first operating system includes a drag and drop (Dnd) service (Service) and a first communication module (for example, a remote display protocol (RDP) client (Client)). The second operating system includes a second communication module (for example, an RDP Service). The RDP Client and the RDP Service communicate via the RDP protocol. Of course, the first communication module and the second communication module may also communicate via other communication methods, which is not limited in the embodiment of the present application.

[0102] The Dnd Service is used to obtain and package user drag events. The RDP Client is used to send the packaged drag events to the second operating system. The RDP Service is used to receive the drag events sent by the first operating system. The second operating system then creates a virtual source window based on the received drag events and sends the drag events corresponding to the virtual source window to the second operating system application to enable the dragging of the target object of the first operating system application to the second operating system application.

[0103] Below, in combination with the architectural diagrams shown in Figures 4 and 5, taking the electronic device as a tablet computer, the first operating system as the Android operating system, and the second operating system as the Linux operating system as an example, the application scenarios to which the cross-system target object dragging method provided in the embodiment of the present application is applicable are specifically described.

[0104] Exemplarily, FIG6 shows a schematic diagram of the drag interface of the cross-system target object provided by an embodiment of the present application. As shown in FIG6 , a display window 603 of application one is displayed on the display screen 602 of the tablet computer 601, and a display window 604 of application two is also displayed, wherein application one is an Android application developed based on the Android operating system, and application two 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 the display window 603. When the user wants to drag document 4 from the multiple documents to the 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 (for example, document 4) in the display window 603 of the Android application to the display window 604 of the Linux application of the Linux operating system. As shown in FIG6 , 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.

[0105] 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.

[0106] Specifically, when a user touches the touch screen of the electronic device shown in Figure 6, the touch sensor can detect the user's touch operation 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 touches the touch screen, slides, and lifts their hand, the kernel layer generates a series of reporting events, including a Start event, several Move events, and a Release event. The number of Move events depends on the duration of the touch screen touch.

[0107] Continuing with Figure 6, assuming the coordinate system of the tablet computer's touch screen is based on the vertex at the lower left corner of the touch screen as the origin, the length of the tablet as the X-axis, and the width of the tablet as the Y-axis, then point 1 is the coordinate position corresponding to the Start event on the touch screen, points 2, 3, 4, and 5 are the coordinate positions corresponding to the Move event on the touch screen after the Start event, and 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 coordinate position corresponding to the user's touch operation and the coordinate position corresponding to the shell APK. The event of entering the shell APK window is also called an Inter event, that is, the drag event enters at the coordinate position corresponding to point 4. Therefore, point 5 is the Move event after entering the shell APK.

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

[0109] 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.

[0110] Specifically, the drag event includes drag event types, which include: a Start event, several Move events, a Release event, and a final Inter event, etc., exemplarily, events generated at position 1, position 2, position 3, position 4, position 5, and position 6 in FIG6 . The drag event also includes a target object of the drag, exemplarily, as shown in FIG6 , the target object is document 4.

[0111] 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. When the user drags the target object with a finger or stylus, the drag position is the touch drag position.

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

[0113] 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.

[0114] For example, after the Android operating system's shell APK 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. This window object corresponds to the window of the Android operating system application. Continuing with Figure 6, the window object created by the Linux operating system corresponds to display window 603. In other words, since display window 603 runs in the Android operating system, in order to implement document dragging, based on the drag 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 enabling interaction between the virtual display window and the display window 604 of the Linux operating system application.

[0115] In some possible implementations, the interaction between the virtual display window and the Linux operating system application's display window 604 is implemented based on the X11 server. In other words, to meet the X11 drag protocol, after constructing a virtual display window corresponding to the source window, the Linux operating system first sends the acquired drag events from the virtual display window to the X11 server, and then the X11 server forwards the drag events to the Linux application.

[0116] 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.

[0117] 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 of characters, etc.

[0118] Therefore, when the target object is text such as a paragraph of words, a number, or a string of characters, the text data is relatively small, and the shell APK of the first operating system can directly send the text to the second operating system without occupying system processes or wasting user time. However, when the target object is a file such as a video file, audio file, document, image, shortcut, or compressed file, the file data is relatively large. If the shell APK of the first operating system directly sends the file to the second operating system, it will occupy system processes, take a certain amount of time, and increase the power consumption of the electronic device, thereby reducing the user experience.

[0119] Based on this, a shared directory can be established between the first and second operating systems. The first operating system can use the shell APK to send the second operating system a path to retrieve the target object in the shared directory. The second operating system then converts this path into a path for retrieving the target object in the shared directory. The second operating system then retrieves the target object from the shared directory based on the converted path. This approach avoids occupying system memory, reduces power consumption in electronic devices, and improves the user experience.

[0120] It should be noted that the physical path of the target object in the shared directory is the same, but the path used by the first operating system to obtain the target object in the shared directory is different from the path used by the second operating system to obtain the target object in the shared directory.

[0121] It should also be noted that the first operating system may also send the number of target object files, file types, and total file sizes to the second operating system. Of course, other information related to the target object may also be sent, which is not specifically limited in this embodiment of the present application.

[0122] For example, in the example shown in Figure 6, the target object dragged by the Android operating system application to the Linux operating system application is Document 4. A shared directory can then be established between the Android and Linux operating systems, and the Android operating system sends a drag event to the Linux operating system. The drag event includes the aforementioned Start event, several Move events, a Release event, and an Inter event. The Android operating system also needs to send the Linux operating system the path to Document 4 in the shared directory. The Android operating system can also send the Linux operating system information such as the number of files, the document type, and the document size, which is 68k.

[0123] 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.

[0124] 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.

[0125] After the second operating system receives the drag event type and target object, it converts the drag event type and target object from the first operating system into the data structure of the second operating system. The converted drag event type and target object have a data structure recognizable by the second operating system. Furthermore, the second operating system sends the drag event type and target object to the target application in real time for display.

[0126] Exemplarily, the Linux operating system converts the data structure type of the acquired drag events at positions 4, 5, and 6 into a type recognizable by the Linux operating system. Furthermore, the drag events at positions 4, 5, and 6 are sent in real time to the display window 604 of the Linux operating system application. As shown in FIG6 , the document dragging process can be seen in the display window 604. Finally, after converting the acquired data type of document 4 into a type recognizable by the Linux operating system, document 4 is sent in real time to the display window 604 of the Linux operating system application. After performing the release operation at position 6, document 4 is successfully dragged onto the display window 604 of the Linux operating system application.

[0127] For ease of understanding, FIG7 shows a schematic diagram of a cross-system target object dragging method provided by an embodiment of the present application. The cross-system target object dragging method provided by the present application is described below in conjunction with the schematic diagram shown in FIG7. As shown in FIG7, a first operating system and a second operating system are running on an electronic device. Application A runs in the first operating system, and application B runs in the second operating system. Since application B in the second operating system runs 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, the shell application B1 in the first operating system receives 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, the shell application B1 also receives the target object. When the shell application B1 receives the drag event, the shell application B1 sends the drag event to the second operating system. The second operating system creates a virtual drag window based on the received drag event, i.e., the application window A1 shown in FIG7, which 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 the application B of the second operating system, and finally displays the target object on the application B.

[0128] The above describes the method of dragging target objects across systems in combination with Figures 4, 5, 6 and 7, that is, in response to the user's drag operation from the first source window in the first operating system to the shell application window in the first operating system, the shell application window corresponds to the target window in the second operating system. The shell application window obtains the 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. 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. This method realizes the complete x11 drag protocol by simulating the same window as the drag source of the first operating system in the second operating system, thereby realizing the dragging of target objects across systems.

[0129] In some embodiments, the present application also provides another application scenario in which the method for dragging a target object across systems is applicable. Below, in combination with the architecture diagrams shown in Figures 4 and 5, taking the electronic device as a tablet computer as an example, another application scenario in which the method for dragging a target object across systems provided in an embodiment of the present application is applicable is specifically described.

[0130] Exemplarily, FIG8 shows another example of a schematic diagram of a drag interface for a cross-system target object provided by an embodiment of the present application. As shown in FIG8 (a), a display window 803 of application one, a transfer station 804, and a display window 805 of application two are displayed on the display screen 802 of the tablet computer 801, wherein application one is an Android application developed based on the Android operating system, and application two is a Linux application developed based on the Linux operating system. Displayed on the display window 803 is 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 displayed on the transfer station is a paragraph of text dragged from the display window 803 of the Android application and a paragraph of text dragged from other applications.

[0131] 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 piece of text in the display window 803 of the Android application to the display window of the transfer station 804, it can drag it directly without going through the shell APK in the architecture diagram shown in Figures 4 and 5 to obtain the drag event and forward it to the Linux operating system.

[0132] When the user drags the text "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 switches from the interface shown in (a) of Figure 8 to the interface shown in (b) of Figure 8.

[0133] The specific process of switching the display interface of the electronic device from FIG. 8 (a) to FIG. 8 (b) can be referred to the corresponding description of FIG. 6 , which will not be repeated here.

[0134] Based on the scenario diagram shown in Figure 8, it can be seen that when a drag operation occurs within the same operating system, the electronic device does 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 between different operating systems, the electronic device's shell application will receive the drag event and forward it to the other operating system, allowing the other operating system to create a drag source based on the drag event, thereby achieving cross-system drag operations.

[0135] The following describes the cross-system target object dragging method provided by an embodiment of the present application in conjunction with the scene diagrams of Figures 6 and 8. Figure 9 shows a schematic flow chart of a cross-system target object dragging method 900 provided by an embodiment of the present application. As shown in Figure 9, the method 900 shown in Figure 9 may include steps S910 to S930. The various steps in method 900 are described in detail below in conjunction with Figure 9.

[0136] It should be understood that in the embodiments of the present application, the method 900 is described by taking an electronic device as an example of an execution subject of the method 900. As an example and not a limitation, the execution subject of the method 900 may also be a chip used in the electronic device.

[0137] 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.

[0138] 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.

[0139] In the embodiment of the present application, the drag event types include drag start event, drag in event, move event and release event, etc. Of course, the drag event types may also include other event types, such as leave event, etc., which are not limited in the embodiment of the present application.

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

[0141] 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 the Android application shown in FIG6 , and the second application may be the Linux application shown in FIG6 . In response to the user dragging a target object from the first application to the second application, the operation may be to drag document 4 from display window 603 of the Android application to display window 604 of the Linux application, as shown in FIG6 .

[0142] 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 the description of FIG6 and will not be repeated here.

[0143] 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.

[0144] In an embodiment of the present application, since the second application runs 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 needs to send the drag event obtained on the first operating system to the second operating system. 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.

[0145] In some embodiments, the electronic device may assign a window ID to the virtual window created for the first application and send a drag event to the second application based on the window ID. The window ID may also be understood as a window handle.

[0146] Exemplarily, as shown in FIG6 , after the electronic device sends the drag operation of the 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.

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

[0148] 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.

[0149] 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.

[0150] The present application provides a method for dragging target objects across systems. After an electronic device receives a user's cross-system drag operation, it sends the drag event to a second operating system. By simulating the same window as the drag source of the first operating system in the second operating system, a complete X11 drag protocol is implemented, thereby realizing the dragging of target objects across systems.

[0151] 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 the user's drag operation from the first source window to the shell application.

[0152] 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 building a complete X11 drag protocol and implementing cross-system drag operations.

[0153] 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 acts as a drag source to send the drag event to the second application, thereby implementing a cross-system drag operation.

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

[0155] In some possible implementations, the electronic device sends a first path to the second operating system, indicating the path the first operating system should use to retrieve the target object from the shared directory. The first path is converted into a second path, indicating the path the second operating system should use to retrieve the target object from the shared directory. The target object is then retrieved from the shared directory based on the second path. In this implementation, if the target object data is too large, transferring it through the shared directory can avoid occupying system memory, reduce power consumption of the electronic device, and improve the user experience.

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

[0157] 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 a hardware or computer software driven hardware manner 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.

[0158] This application can divide the drag method of cross-system target objects into functional units based on the above method examples. For example, each function can be divided into various functional units, or two or more functions can be integrated into one unit. The above integrated units 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 this application is schematic and is only a logical functional division. There may be other division methods in actual implementation.

[0159] Figure 10 shows a schematic diagram of the structure of an electronic device provided by the present application. The dotted line in Figure 10 indicates that the unit or 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.

[0160] The electronic device 1000 includes one or more processors 1001, which can support the electronic device 1000 to implement the method in the method embodiment corresponding to Figure 9. 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).

[0161] 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.

[0162] 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 .

[0163] 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 .

[0164] 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 data stored in the memory 1002. 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 than the program 1004.

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

[0166] The specific manner in which the processor 1001 executes the method for dragging a target object across systems may refer to the relevant description in the method embodiment.

[0167] It should be understood that each step of the above method embodiment can be completed by hardware logic circuits or software instructions 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.

[0168] 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.

[0169] The computer program product may be stored in the memory 1002 , for example, a program 1004 . The program 1004 is converted into an executable target file that can be executed by the processor 1001 after undergoing processes such as preprocessing, compilation, assembly, and linking.

[0170] The present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a computer, implements any method embodiment of the present application. The computer program may be a high-level language program or an executable target program.

[0171] The computer-readable storage medium is, for example, memory 1002. Memory 1002 may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory. 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 (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SynchLink DRAM, SLDRAM) and direct RAM bus random access memory (Direct Rambus RAM, DRRAM).

[0172] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes 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.

[0173] In several embodiments provided in this 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 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.

[0174] The above embodiments are intended only to illustrate the technical solutions of the present application and are not intended to limit the same. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they may still modify the technical solutions described in the above embodiments or replace some of the technical features therein with equivalents, and that such modifications or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present application and are therefore intended to be included within the scope of protection of the present application.

[0175] Finally, the above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be covered by the scope of protection of the present application. Therefore, the scope of protection of the present application shall be based on the scope of protection 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 to create the first application in the second operating system based on the drag event. Virtual windows; 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, and the second operating system includes an RDP server. The RDP client is used to send the drag event to the second operating system, and the RDP server is used to receive the drag event. 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

Patent Citations

  • Cross-system target object dragging method and electronic equipment

    CN119536897A

  • Object dragging method and device and storage medium

    CN113407086A

  • Cross-device object dragging method and device

    CN114089901A

  • Cross-system target object transmission method and device

    CN115700453A

  • Cross-device dragging method, electronic device and storage medium

    CN115993924A

Cited By

  • Method and system for optimizing remote desktop display rear end in wayland environment and medium

    CN120704787A