Data dragging method, and electronic device and storage medium

By introducing a drag and drop framework in electronic devices, the problem that applications in the existing technology need to adapt to support drag and drop is solved, and the application can support drag and drop without adapting, reducing development workload and improving user experience.

WO2025067441A1PCT designated stage expired Publication Date: 2025-04-03HUAWEI TECH CO LTD

Patent Information

Application Number
PCT/CN2024/121803
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-09-28
Filing Date
2024-09-27
Publication Date
2025-04-03

AI Technical Summary

Technical Problem

Applications on existing devices need to support drag and drop function through software adaptation, and users cannot share data through drag and drop.

Method used

Provides a data drag and drop method, by introducing a drag and drop framework in electronic devices, the application can support the drag and drop function without adaptation. The drag and drop framework includes a drag and drop operation recognition module that recognizes and processes drag and drop operations to realize data across applications and across devices.

Benefits of technology

It realizes that the application on the device can support drag and drop without adaptation, which reduces the workload of application development and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024121803_03042025_PF_FP_ABST
    Figure CN2024121803_03042025_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present application are a data dragging method, and an electronic device and a storage medium. The electronic device comprises a first application and a first drag operation recognition module. The first application receives a first operation for first data in the first application, wherein the first operation is a drag operation; the first application sends a first message to the first drag operation recognition module, wherein the first message is used for indicating that the first operation is the drag operation; and in response to the first message, the first drag operation recognition module acquires and saves first metadata information of the first data, wherein the metadata information of the first data comprises any one or more of the following: a first data type of the first data, a creation time of the first data, a file size of the first data, an identifier of an application to which the first data belongs, and a storage position of the first data. By means of the method, after an application recognizes a drag operation, the application does not need to execute the drag operation, but hands over the drag operation to a drag frame for execution, such that the workload of application development can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Data dragging method, electronic device and storage medium

[0001] This application claims priority to the Chinese patent application with application number 202311292320.4 filed with the State Intellectual Property Office of China on September 28, 2023, and priority to the Chinese patent application with the invention name “A data dragging method, electronic device and storage medium”, all contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of terminal technology, and in particular to a data dragging method, an electronic device, and a storage medium. Background Art

[0003] With the increasing popularity of terminal devices, smart terminal devices have become indispensable items in people's lives. Users have an increasing demand for drag-and-drop operations across multiple terminal devices. Users can share data between two applications on a device by dragging and dropping, which improves the user experience. However, the drag-and-drop functionality currently supported by applications on devices is application-defined. This means that applications must be adapted to support this functionality through software. If the application on the device is not adapted for drag-and-drop, users cannot share data by dragging and dropping.

[0004] Summary of the Invention

[0005] The present application provides a data dragging method, an electronic device, and a storage medium, which enable applications on a device to support the dragging function without adaptation, thereby reducing the workload of application development.

[0006] In a first aspect, the present application provides a data dragging method, which is applied to an electronic device, the electronic device including an application layer and an application framework, the application layer including a first application, the application framework including a first drag framework, the first drag operation identification module including a first drag operation identification module, wherein the first application receives a first operation on the first data in the first application, the method including: the first operation is a drag operation; the first application sends a first message to the first drag operation identification module, the first message is used to indicate that the first operation is a drag operation; in response to the first message, the first drag operation identification module obtains and saves first metadata information of the first data, the metadata information of the first data including any one or more of the following: the first data type of the first data, the creation time of the first data, the file size of the first data, the application identifier to which the first data belongs, and the storage location of the first data.

[0007] Through this method, after the application recognizes the drag operation, the application will hand over the drag operation to the drag framework for execution, and the application does not need to perform the drag operation. This enables applications on the device to support the drag function without adaptation. The application only needs to recognize the drag operation or non-drag operation, which can reduce the workload of application development.

[0008] In combination with the first aspect, in a possible implementation, after responding to the first message, the method further includes: the first drag operation identification module stores the event type of the first operation as a first event, and the first event is used to indicate that the first operation is a drag operation.

[0009] In this way, the first drag operation recognition module may store the operation type of the first operation of dragging as the first event to indicate that the first drag operation recognition module needs to respond to the first operation.

[0010] In combination with the first aspect, in a possible implementation, the application layer also includes a second application; the method also includes: the second application receives a second operation for the second application; when the second operation is a non-drag operation, the second application performs the second operation.

[0011] The second application may be the same as or different from the first application.

[0012] After the application recognizes the second operation that is not a drag operation, the second application may directly execute the second operation.

[0013] In some embodiments, while the first drag operation recognition module performs a drag operation, the second application can also perform a non-drag operation, that is, the electronic device can perform a drag operation and a non-drag operation at the same time, thereby improving the user's operating experience.

[0014] In combination with the first aspect, in a possible implementation, the application layer also includes a second application; the method also includes: the second application receives a third operation for the second application; when the third operation is a drag operation, the second application sends a second message to the first drag operation identification module, and the second message is used to indicate that the second operation is a drag operation; in response to the second message, the first drag operation identification module determines that the first event already exists and does not perform the third operation.

[0015] The first drag operation recognition module has recorded the first operation as a drag operation and cannot respond to the third operation, which is a drag operation. That is, the first drag operation recognition module can only respond to one drag operation at a time.

[0016] In other embodiments, the first drag operation recognition module can also respond to multiple drag operations at the same time, which is not limited in this application.

[0017] In combination with the first aspect, in a possible implementation, the first drag frame also includes a first drag animation display module; after the first application receives the first operation on the first data in the first application, the method also includes: the first application obtains and displays a first picture, and the first picture is obtained by the first application through a screenshot based on the display style of the first data; the first application sends the first picture to the first drag operation identification module; the first drag operation identification module sends the first picture to the first drag animation display module; the first drag animation display module controls the first picture to move with the movement of the drag operation.

[0018] In this way, during the dragging process, the electronic device can display the dragged image, which is obtained by the first application through the screenshot, thereby achieving the first image can be dragged across devices and applications.

[0019] In combination with the first aspect, in a possible implementation, the application layer also includes a second application, and the display area of ​​the second application is the first display area; after responding to the first message, the method also includes: when the first icon is located on the first display area, the first drag operation identification module sends the metadata information of the first data to the second application, and the first metadata information is used by the second application to confirm whether to receive the first data.

[0020] Since the device cannot know when the user stops dragging the first data, when the first data is dragged to other applications, the device sends the first metadata information of the first data to the other applications, and the other applications can determine whether they can receive the first data.

[0021] In combination with the first aspect, in one possible implementation, after the first drag operation identification module sends the metadata information of the first data to the second application, the method also includes: the second application obtains the second data type; the second application obtains the first data type from the metadata information of the first data; when the second data type includes the first data type, the second application determines to receive the first data.

[0022] In combination with the first aspect, in one possible implementation, after the second application determines to receive the first data, the method also includes: the second application sends a third message to the first drag operation identification module; in response to the third message, the first drag operation identification module displays a first icon on the first picture, and the first icon is used to indicate that the second application allows receiving the first data.

[0023] After the second application confirms that it can receive the first data, the first drag operation recognition module can refresh the display style of the drag image to prompt the user that the second application can receive the first data.

[0024] In combination with the first aspect, in a possible implementation, the method also includes: when the second data type does not include the first data type, the second application determines that the first data cannot be received; after determining that the first data cannot be received, the second application sends a fourth message to the first drag operation identification module; in response to the fourth message, the first drag operation identification module displays a second icon on the first picture, the second icon is used to indicate that the second application cannot receive the first data, and the second icon is different from the first icon.

[0025] After the second application confirms that it cannot receive the first data, the first drag operation recognition module may also refresh the display style of the drag image to prompt the user that the second application cannot receive the first data.

[0026] In combination with the first aspect, in a possible implementation, the second data type includes any one or more of the following: text, picture, hyperlink, video, file, icon, card, and folder.

[0027] In combination with the first aspect, in a possible implementation, the second application is further configured to display the first data in a user interface of the third application in response to receiving the first data.

[0028] In some embodiments, the electronic device can also share the first data to other devices by dragging. For example, the electronic device establishes a collaborative connection with other electronic devices, the first drag framework also includes a first drag intention recognition module; the other device includes an application layer and an application framework, the application layer of the other device includes a third application, the application framework of the other device includes a second drag framework, the second drag framework includes a second drag intention recognition module, a second drag operation recognition module and a second drag animation display module, wherein,

[0029] The first drag intention recognition module is used to send the first metadata information and the first image to the second drag intention recognition module through a collaborative connection when the first condition is met; the second drag intention recognition module is used to send the first metadata information to the second drag operation recognition module; the second drag intention recognition module is also used to send the first image to the second drag animation display module; the second drag animation display module is also used to control the movement of the first image as the drag operation moves.

[0030] In one possible implementation, the second drag intention recognition module is also used to stop the drag operation and send the first data to the third application when it is determined that the first image is located in the display area of ​​the third application; the third application is used to receive the first data when it is determined to receive the first data.

[0031] In a second aspect, the present application provides an electronic device, which includes a memory and a processor; wherein the memory and the processor are coupled, and the memory is used to store a computer program. When the processor executes and calls the computer program, the electronic device executes a data dragging method provided in any possible implementation of the above-mentioned first aspect.

[0032] In a third aspect, the present application provides a computer-readable storage medium comprising instructions. When the instructions are executed on an electronic device, the electronic device executes a data dragging method provided in any possible implementation of the first aspect.

[0033] In a fourth aspect, the present application provides a chip system, which includes one or more processors, and the processors are used to call computer instructions to enable an electronic device to execute a data dragging method provided in any possible implementation of the first aspect above.

[0034] In a fifth aspect, the present application provides a computer program product comprising instructions, which, when run on an electronic device, enables the electronic device to execute a data dragging method provided in any possible implementation of the first aspect.

[0035] For the description of the beneficial effects of the second to fifth aspects, reference may be made to the description of the beneficial effects in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figures 1A-1F illustrate a specific implementation of sharing pictures in a gallery application to an instant messaging application;

[0037] 2A-2I are schematic diagrams showing electronic device 100 and electronic device 200 establishing a cooperative connection;

[0038] Figures 3A-3D illustrate a specific implementation of sharing pictures in a gallery application to an instant messaging application;

[0039] FIG4 shows a schematic diagram of functional module interaction for sharing first data between two applications on the electronic device 100;

[0040] FIG5 is a flow chart of a method for sharing first data between two applications on an electronic device 100 provided by the present application;

[0041] FIG6 is a flowchart of a method for an electronic device 100 to simultaneously respond to a drag operation and a non-drag operation provided by the present application;

[0042] FIG7 shows a schematic diagram of functional module interaction for sharing first data between two applications on the electronic device 100 and the electronic device 200;

[0043] FIG8 is a flow chart of a method for sharing first data between two applications on electronic devices 100 and 200 provided by the present application;

[0044] FIG9 shows a schematic diagram of the hardware structure of an electronic device provided by the present application;

[0045] FIG10 shows a schematic diagram of a system framework provided by this application. DETAILED DESCRIPTION

[0046] The terms used in the following examples of the present application are for the purpose of describing specific embodiments only and are not intended to limit the present application. As used in the specification and appended claims of the present application, the singular expressions "a," "an," "said," "above," "the," and "this" are intended to include plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in the present application refers to and encompasses any or all possible combinations of one or more of the listed items.

[0047] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood to imply or suggest relative importance or implicitly indicate the number of the technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of this application, unless otherwise specified, "plurality" means two or more.

[0048] The term "user interface (UI)" in the following embodiments of this application refers to the media interface for interaction and information exchange between an application or operating system and a user, which realizes the conversion between the internal form of information and the form acceptable to the user. The commonly used form of user interface is the graphical user interface (GUI), which refers to a user interface related to computer operations displayed in a graphical manner. It can be a visual interface element such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, etc. displayed on the display screen of a wearable device.

[0049] The present application provides a dragging method that can be applied to data sharing between two applications on the same device, or between two applications on different devices.

[0050] Specifically, the electronic device 100 may receive a user's drag operation on first data in a first application, and share the first data with a second application on the electronic device 100. The first application may be the same as or different from the second application.

[0051] The electronic device 100 may also receive a user drag operation on the first data in the first application, and share the first data with the second application on the electronic device 200. The first application and the second application may be the same or different.

[0052] Among them, the drag operation includes but is not limited to: touch screen finger drag operation, stylus drag operation, mouse drag operation, touchpad drag operation, etc. This application does not limit the specific implementation of the drag operation.

[0053] This application provides a universal drag-and-drop framework that defines the specific implementation of data sharing between two applications via drag and drop, such as drag-start, drag-end, and drag-animation. When sharing data between two applications via drag and drop, the applications only need to connect to the drag-and-drop framework, without the need for application adaptation. The drag-and-drop framework handles drag-start, drag-animation rendering, drag-vibration feedback, and more. This saves application development workload.

[0054] First, a drag scenario provided by this application is introduced.

[0055] 1. Drag and drop scenario between two applications on the same device.

[0056] Exemplarily, the first application may be a gallery application, and the second application may be an instant messaging application.

[0057] 1A-1F illustrate a specific implementation of sharing pictures in a gallery application to an instant messaging application.

[0058] Exemplarily, as shown in FIG1A , a window 1001 and a window 1002 are displayed on the electronic device 100 .

[0059] Window 1001 displays an interface 1003 of a gallery application, and window 1002 displays an interface 1004 of an instant messaging application.

[0060] Interface 1003 displays multiple pictures, which may include picture 1005 .

[0061] Interface 1004 displays multiple chat records with the contact "Lisa".

[0062] The user can share the picture 1005 to the contact "Lisa" by dragging it. For example, as shown in FIG1A , the electronic device 100 can receive a long press operation by the user on the picture 1005 in the interface 1003 . In response to the long press operation by the user, the electronic device 100 can select the picture 1005 and drag it.

[0063] As shown in Figure 1B, in response to the operation of dragging the picture 1005, the electronic device 100 may display an icon 1006, which may be a screenshot of the picture 1005. The file type of the icon 1006 is a picture.

[0064] As shown in FIG1C , the user's finger touches the screen and moves into the interface 1004 , and the icon 1006 also moves with the movement of the user's finger. The icon 1006 is used to prompt the user the dragging trajectory of the image 1005 .

[0065] As shown in Figure 1D , when icon 1006 moves to interface 1004 and the user releases their finger, if the instant messaging application determines that the image can be received, electronic device 100 can send image 1005 to contact "Lisa" via the instant messaging application. Electronic device 100 can then display interface 1007 shown in Figure 1D . Interface 1007 is similar to interface 1004 , except that it includes image 1005 . This prompts the user that image 1005 has been shared from the gallery application to contact "Lisa" in the instant messaging application by dragging and dropping.

[0066] In some embodiments, a drag event can be sent to the second application before the drag operation is completed. While the user is dragging an icon and the dragged icon is located above the instant messaging application, for example, within the instant messaging application's interface 1004, the electronic device 100 can send the drag event to the instant messaging application. This allows the instant messaging application to determine whether to receive image 1005 based on the metadata of image 1005 included in the drag event. Because the electronic device 1000 has no way of knowing which application the user is sharing image 1005 to, the electronic device 100 can send the drag event to the instant messaging application as long as the dragged icon is within the display area of ​​another application while the user is dragging the icon. The instant messaging application can pre-determine whether to receive image 1005. Thus, when the user stops dragging the icon and the dragging is complete, the instant messaging application can determine whether to receive image 1005 based on its pre-determined determination, i.e., whether to receive or reject image 1005.

[0067] For example, when the instant messaging application confirms that it can receive image 1005, the instant messaging application can send a notification of permission to receive to the drag frame, and the drag frame can display a mark 1008 shown in FIG1E on icon 1006. Mark 1008 is used to indicate that the instant messaging application can receive image 1005. When image 1005 moves outside of interface 1004, mark 1008 stops being displayed on icon 1006.

[0068] For example, if the instant messaging application confirms that it cannot receive image 1005, the instant messaging application may send a notification of the inability to receive to the drag frame, and the drag frame may display a mark 1009 shown in FIG1F on icon 1006. Mark 1009 is used to indicate that the instant messaging application cannot receive image 1005. When image 1005 moves outside of interface 1004, mark 1009 stops being displayed on icon 1006.

[0069] The identifier 1008 is different from the identifier 1009 .

[0070] It should be noted that Figures 1A to 1F illustrate only one method of sharing data through multi-window dragging. In other embodiments, the electronic device 100 may also share data between two applications through other methods, such as sharing data through split-screen dragging, sharing data through transfer station dragging, etc., and this application does not limit this.

[0071] 2. Drag and drop scenarios between two applications on different devices.

[0072] A first application is installed on electronic device 100, and a second application is installed on electronic device 200. The first application and the second application establish a collaborative connection. For example, the collaborative connection can be a Bluetooth connection or other connection methods, and this application does not limit this.

[0073] 1. The electronic device 100 and the electronic device 200 establish a collaborative connection.

[0074] In a possible implementation, the electronic device 100 may establish a connection with the mouse 300 (not shown in the figure), and the electronic device 200 may also establish a connection with the mouse 300.

[0075] The mouse 300 controls the electronic device 100 , and a mouse indicator of the mouse 300 is displayed on the screen of the electronic device 200 .

[0076] When the user controls the mouse pointer through the mouse 300 to cross the screen boundary of the electronic device 100 and move to the screen of the electronic device 200 , the electronic device 100 can automatically establish a collaborative connection with the electronic device 200 .

[0077] After the electronic device 100 and the electronic device 200 establish a collaborative connection, the mouse 300 can switch to control the electronic device 100 and the electronic device 200 to achieve the purpose of controlling multiple devices with one mouse.

[0078] For example, as shown in FIG2A , electronic device 100 can establish a connection with mouse 300. Mouse 300 is used to control electronic device 100, and a mouse pointer 2001 of mouse 300 is displayed on the screen of electronic device 200. When a user controls mouse 300 to move mouse pointer 2001 toward electronic device 200, for example, as shown in FIG2A , the user can control mouse pointer 2001 through the right edge of electronic device 100 using mouse 300, and mouse pointer 2001 disappears from the screen of electronic device 100. Thereafter, mouse pointer 2001 passes through the left edge of electronic device 200 and is displayed on the screen of electronic device 200.

[0079] As shown in FIG2B , the user controls the mouse indicator 2001 through the right edge of the electronic device 100 and the left edge of the electronic device 200 through the mouse 300. After the mouse indicator 2001 is displayed on the screen of the electronic device 200, the electronic device 100 can automatically establish a collaborative connection with the electronic device 200.

[0080] Optionally, after the user uses mouse 300 to control mouse indicator 2001 across the right edge of electronic device 100 and the left edge of electronic device 200, and the mouse indicator 2001 is displayed on the screen of electronic device 200, electronic device 100 may display a special effect on the display screen of electronic device 100, and electronic device 200 may display a special effect on the display screen of electronic device 200. The special effect is used to indicate that electronic device 200 is about to establish a collaborative connection with electronic device 100. In some embodiments, the special effect may be a bubble effect. In some embodiments, electronic device 100 may display special effect 2111 shown in Figure 2C, and electronic device 200 may display special effect 2112 shown in Figure 2D. Special effect 2112 shows the text "Collaborating". Special effects 2111 and special effects 2112 are used to indicate that electronic devices 100 and 200 are establishing a collaborative connection. Optionally, after electronic devices 100 and 200 successfully establish a collaborative connection, electronic devices 100 and 200 may stop displaying special effects 2111 and special effects 2112.

[0081] In response to electronic device 100 and electronic device 200 establishing a collaborative connection, electronic device 100 may display prompt information 2002 shown in FIG2B , and electronic device 200 may display prompt information 2003 shown in FIG2D . Prompt information 2002 and prompt information 2003 are used to prompt electronic device 100 and electronic device 200 that a collaborative connection has been established.

[0082] In some embodiments, after electronic device 100 and electronic device 200 establish a collaborative connection, the user can use mouse 300 to control electronic device 200 and electronic device 400 to establish a collaborative connection. Optionally, after electronic device 200 and electronic device 400 establish a collaborative connection, electronic device 100 can automatically establish a collaborative connection with electronic device 400, and electronic device 100, electronic device 200, and electronic device 400 establish collaborative connections in pairs.

[0083] 2E , the user can control the mouse pointer 2001 to pass through the right edge of the electronic device 100 using the mouse 300, and the mouse pointer 2001 disappears from the screen of the electronic device 200. Thereafter, the mouse pointer 2001 passes through the left edge of the electronic device 400 and is displayed on the screen of the electronic device 400.

[0084] As shown in FIG2E , the user controls the mouse indicator 2001 through the right edge of the electronic device 200 and the left edge of the electronic device 400 through the mouse 300. After the mouse indicator 2001 is displayed on the screen of the electronic device 400, the electronic device 400 can automatically establish a collaborative connection with the electronic device 200.

[0085] Optionally, after the electronic device 400 establishes a collaborative connection with the electronic device 200, and the electronic device 100 establishes a collaborative connection with the electronic device 200, the electronic device 400 can automatically establish a collaborative connection with the electronic device 100, and the electronic device 100, the electronic device 200 and the electronic device 400 establish collaborative connections in pairs.

[0086] In response to the electronic device 400 and the electronic device 200 establishing a collaborative connection, the electronic device 400 may display the prompt information 2004 shown in FIG. 2F . The prompt information 2004 is used to prompt that the electronic device 400 has established a collaborative connection with the electronic device 100 and the electronic device 200.

[0087] This method can save user operations of establishing collaborative connections between multiple devices, thereby improving the efficiency of device collaboration.

[0088] In some embodiments, after multiple devices establish collaborative connections with each other, a user can operate on any device to disconnect the collaborative connection between the device and the other multiple devices, while the collaborative connections between the other multiple devices are still established.

[0089] For example, as shown in FIG2G , the electronic device 200 may receive a user input operation for the prompt information 2003. The input operation may be a user controlling the mouse indicator 2001 through the mouse 300 to be located on the prompt information 2003 and clicking on the prompt information 2003. In response to the user's input operation, the electronic device 200 may display the prompt bar 2005 shown in FIG2G . The prompt bar 2005 includes a disconnect option. The user may use the disconnect option to disconnect the electronic device 200 from the collaborative connection with the electronic device 100 and the electronic device 400 respectively.

[0090] For example, as shown in FIG2H , the electronic device 200 may receive a user input operation for the disconnect option in the prompt bar 2005. The input operation may be a user controlling the mouse indicator 2001 through the mouse 300 to be located on the disconnect option and clicking the disconnect option. In response to the user's input operation, the electronic device 200 may disconnect the collaborative connection with the electronic device 100 and the electronic device 400, respectively.

[0091] As shown in Figure 2I, in response to the electronic device 200 disconnecting the collaborative connection with the electronic device 100 and the electronic device 400 respectively, the electronic device 200 can stop displaying the prompt information 2004 to prompt the user that the electronic device 200 has not established a collaborative connection with the electronic device 100 and the electronic device 400.

[0092] After electronic device 200 disconnects from electronic device 100 and electronic device 400 respectively, prompt message 2002 is still displayed on electronic device 100, and prompt message 2004 is still displayed on electronic device 400 to remind the user that electronic device 100 still establishes a collaborative connection with electronic device 400.

[0093] 2. The electronic device 100 shares the first data in the first application with the second application on the electronic device 200.

[0094] In other embodiments, after the electronic device 100 establishes a collaborative connection with the electronic device 200 and the electronic device 200 establishes a collaborative connection with the electronic device 400, the electronic device 100 can automatically establish a collaborative connection with the electronic device 400, and the electronic device 100 can receive a user operation and directly share the first data on the electronic device 100 to the electronic device 400 through a drag operation, without the need to share the first data on the electronic device 100 to the electronic device 400 through the electronic device 200 through a drag operation, thereby saving user operations.

[0095] Exemplarily, the first application may be a gallery application, and the second application may be an instant messaging application.

[0096] 3A-3D illustrate a specific implementation of sharing pictures in a gallery application to an instant messaging application.

[0097] Exemplarily, as shown in FIG3A , a window 1001 is displayed on the electronic device 100 , and a window 1002 is displayed on the electronic device 200 .

[0098] Window 1001 displays an interface 1003 of a gallery application, and window 1002 displays an interface 1004 of an instant messaging application.

[0099] Interface 1003 displays multiple pictures, which may include picture 1005 .

[0100] Interface 1004 displays multiple chat records with the contact "Lisa".

[0101] The user can share the picture 1005 to the contact "Lisa" by dragging it. For example, as shown in FIG3A , the electronic device 100 can receive a long press of the picture 1005 in the interface 1003 by the user using the mouse 300. In response to the long press, the electronic device 100 can select the picture 1005 and drag it.

[0102] As shown in Figure 3B, in response to the operation of dragging the picture 1005, the electronic device 100 may display an icon 1006, which may be a screenshot of the picture 1005. The file type of the icon 1006 is a picture.

[0103] As shown in FIG3B , the user can control the right edge of the electronic device 100 to move the icon 1006 by the mouse 300 , and the icon 1006 also moves with the movement of the user's mouse indicator 2001 . The icon 1006 is used to prompt the user the dragging trajectory of the picture 1005 .

[0104] As shown in Figure 3C, when icon 1006 moves to pass through the right edge of electronic device 100 and the left edge of electronic device 200 and is displayed on the screen of electronic device 200, the user can control electronic device 200 through mouse 300. When the user controls icon 1006 to continue to move onto user interface 1004 through mouse 300 and places icon 1006 on user interface 1004, the user releases the mouse. If the instant messaging application determines that picture 1005 can be received, electronic device 200 can send picture 1005 to contact "Lisa" through the instant messaging application. Electronic device 200 can display interface 1007 shown in Figure 3D. Interface 1007 is similar to interface 1004, except that interface 1007 includes picture 1005. This prompts the user that picture 1005 in the gallery application on electronic device 100 has been shared to contact "Lisa" in the instant messaging application on electronic device 200 by dragging.

[0105] In some embodiments, the icons shown in Figures 1E-1F may also be displayed on the electronic device 200, which will not be described in detail in this application.

[0106] It should be noted that Figures 3A to 3D only illustrate an exemplary method of sharing data between two devices by dragging. In other embodiments, the electronic device 100 can also share data between the two devices in other ways, and this application does not limit this. In other embodiments, the user can also control the mouse 300 through a touchpad or touch screen to drag the image 1005 to share between the two devices. In other embodiments, it is not limited to controlling the electronic device through the mouse 300. The electronic device may also not be connected to a mouse. The user can drag the image 1005 to share between the two devices by directly acting on the touch screen.

[0107] The following details the specific implementation of sharing data by dragging and dropping on a single device and the specific implementation of sharing data by dragging and dropping on multiple devices.

[0108] First, the specific implementation of sharing the first data by dragging and dropping on a single device is introduced.

[0109] FIG. 4 shows a schematic diagram of functional module interaction for sharing first data between two applications on the electronic device 100 .

[0110] As shown in FIG4 , the functional modules include but are not limited to a drag operation recognition module, a drag intention recognition module, a drag motion effect display module, and a drag vibration feedback module.

[0111] The two applications may be a first application and a second application on the electronic device 100. The user may share the first data in the first application to the second application through a drag operation.

[0112] Specifically, the first application is configured to receive a first operation on the first data and identify the first operation as a drag operation.

[0113] The first application is further configured to create a drag icon in response to the first operation, wherein the drag icon is obtained by taking a screenshot of the display style of the first data displayed by the electronic device 100, and the file type of the drag icon is a picture. In this way, the drag icon can be used across applications and devices.

[0114] The first application is further configured to send a first message and a drag icon to the drag operation recognition module after recognizing a drag operation, wherein the first message is configured to indicate to the drag operation recognition module that the first operation is a drag operation.

[0115] The drag operation recognition module is further configured to execute one or more events corresponding to the drag operation after recognizing the drag operation. The one or more events corresponding to the drag operation may include the following:

[0116] The drag operation recognition module is also used to modify the event type of the drag operation to a pull-move event after recognizing the drag operation. In this way, when the electronic device 100 receives the user's drag operation, it can also respond to the user's non-drag operations, such as sliding operations, single-click operations, double-click operations, triple-click operations, etc., thereby improving the user's operating experience. The reason is that when the electronic device 100 receives the user's drag operation, the electronic device 100 also receives the user's non-drag operation. The drag operation recognition module can modify the event type of the non-drag operation to a move event. The pull-move event is different from the move event. The move event is responded to by the first application, and the pull-move event is responded to by the drag framework. That is to say, the move event and the pull-move event are responded by different entities. Therefore, the electronic device 100 can respond to pull-move events and move events of different event types at the same time.

[0117] The drag operation recognition module is further configured to create and save a drag event in response to the drag operation, wherein the drag event includes metadata information of the first data. The metadata information of the first data includes, but is not limited to, any one or more of the following: a data type of the first data, a creation time of the first data, a file size of the first data, an identifier of an application to which the first data belongs, a storage location of the first data, and the like.

[0118] The drag operation identification module is further used to monitor the type of drag operation, which includes any one of drag end, drag completion, and drag cancellation.

[0119] The drag operation recognition module is further used to report the drag operation to the drag intention recognition module after recognizing the drag operation.

[0120] The drag intent recognition module is also used to monitor the drag trajectory and determine whether the drag operation is a single-device drag operation or a cross-device drag operation.

[0121] The dragging intention recognition module is further used to monitor the dragging trajectory, determine the dragging direction, and determine the target sharing device of the first data.

[0122] The drag operation recognition module is further used to send the drag operation and the drag operation type to the drag motion effect display module and the drag vibration feedback module respectively.

[0123] Among them, the dragging animation effect display module is used to display the dragging operation start animation effect based on the dragging operation after obtaining the dragging operation and the dragging operation type sent by the dragging operation identification module.

[0124] The drag animation display module is also used to monitor the drag trajectory, and the drag icon moves along the drag trajectory.

[0125] The dragging animation display module is also used to display the dragging completion animation when the dragging operation type is a dragging completion operation.

[0126] The drag animation display module is also used to display the drag cancel operation animation when the drag operation is a drag cancel operation.

[0127] The drag animation display module is also used to display cross-device drag animation when the drag operation is a cross-device drag operation.

[0128] Among them, the drag vibration feedback module is used to display a drag operation start vibration effect based on the drag operation after obtaining the drag operation and the drag operation type sent by the drag operation recognition module.

[0129] The drag vibration feedback module is also used to display a drag completion vibration effect when the drag operation is a drag completion operation.

[0130] The drag vibration feedback module is also used to display a drag cancel operation vibration effect when the drag operation is a drag cancel operation.

[0131] The drag vibration feedback module is also used to display cross-device drag vibration effects when the drag operation is a cross-device drag operation.

[0132] The drag operation recognition module is further configured to send a drag event and a drag completion operation to the second application.

[0133] In some embodiments, the drag event and the drag completion operation may be sent to the second application separately, or may be sent to the second application together, which is not limited in this application.

[0134] Optionally, when the drag icon is within the display area of ​​the second application, the drag operation recognition module may send the drag event to the second application. Optionally, when the drag operation recognition module recognizes that the drag operation is a drag completion operation, the drag operation recognition module further sends the drag event to the second application, which is not limited in this application.

[0135] Optionally, when the drag operation recognition module recognizes that the drag operation is a drag completion operation, the drag operation recognition module sends the drag event to the second application.

[0136] The second application is configured to obtain the target data type supported by the second application after obtaining the drag event sent by the drag operation recognition module.

[0137] The second application is further used to obtain the data type of the first data from the drag event.

[0138] The second application is further configured to receive the first data when the target data type includes the data type of the first data. Optionally, in response to receiving the first data, the second application may display the first data within the second application.

[0139] Based on this, it is achieved that the first data in the first application is shared to the second application based on the drag operation through the drag framework.

[0140] FIG5 is a flow chart of a method for sharing first data between two applications on an electronic device 100 provided by the present application.

[0141] As shown in FIG5 , the electronic device 100 includes a first application, a second application, and a drag framework, wherein the drag framework includes a drag operation recognition module, a drag motion effect display module, and a drag vibration feedback module.

[0142] The first application and the second application may be the same or different.

[0143] S501: A first application receives a first operation on first data.

[0144] Exemplarily, the first data may be the picture 1005 shown in FIG. 1A .

[0145] S502: The first application needs to determine whether the first operation is a drag operation.

[0146] The first application can identify the operation type of the first operation, for example, the first application can identify a drag operation and a non-drag operation. Non-drag operations may include but are not limited to: a single-click operation, a double-click operation, a triple-click operation, a multi-click operation (more than three clicks), and a sliding operation.

[0147] In a case where it is determined that the first operation is a drag operation, S504 to S520 are executed.

[0148] If it is determined that the first operation is a non-drag operation, S503 is executed.

[0149] S503: The first application executes a first operation.

[0150] In a case where it is determined that the first operation is a non-drag operation, the first application directly executes the first operation.

[0151] S504: The first application creates a drag icon.

[0152] In some embodiments, the drag icon may also be referred to as a first picture.

[0153] S505: The first application sends the drag icon and the first message to the drag operation recognition module.

[0154] In other words, the drag operation recognition module can intercept the drag operation and hand over multiple matters of the drag operation to the drag framework for processing, without the need for application processing, which can reduce the workload of application development.

[0155] Optionally, after the drag operation identification module intercepts the first operation, the drag operation identification module may also send a second message to the first application, where the second message is used to indicate that the drag framework has intercepted the first operation and the first application does not need to respond to the first operation.

[0156] The drag icon is obtained by the first application through a screenshot of the display style of the first data displayed by the electronic device 100, and the file type of the drag icon is a picture. In this way, the drag icon can be cross-application and cross-device.

[0157] S506: In response to the first message, the drag operation identification module determines that the first operation is a drag operation.

[0158] S507: In response to determining that the first operation is a drag operation, the drag operation recognition module modifies the event type of the first operation to a pull-move event.

[0159] In some embodiments, the pull-move event may also be referred to as a first event.

[0160] In response to determining that the first operation is a drag operation, the drag operation recognition module modifies the event type of the first operation to a pull-move event. In this way, after the drag operation recognition module modifies the event type of the first operation to a pull-move event, while the electronic device 100 receives the user's drag operation, it can also respond to the user's non-drag operations, such as sliding operations, single-click operations, double-click operations, triple-click operations, etc., thereby improving the user's operating experience. The reason is that when the electronic device 100 receives the user's drag operation, the electronic device 100 also receives the user's non-drag operation. The drag operation recognition module can modify the event type of the non-drag operation to a move event. The pull-move event is different from the move event. The move event is responded to by the first application, and the pull-move event is responded to by the drag framework. That is to say, the move event and the pull-move event are responded to by different entities. Therefore, the electronic device 100 can respond to pull-move events and move events of different event types at the same time.

[0161] S508: In response to the drag operation, the drag operation recognition module creates and saves a drag event, where the drag event includes metadata information of the first data.

[0162] In some embodiments, the metadata information of the first data may also be referred to as first metadata information.

[0163] The metadata information of the first data includes, but is not limited to, any one or more of the following: the data type of the first data, the creation time of the first data, the file size of the first data, the application identifier to which the first data belongs, the storage address of the first data, etc. The metadata information of the first data is used by other applications to confirm whether to receive the first data.

[0164] S509: The drag operation recognition module monitors the drag operation type, where the drag operation type includes either drag completion or drag cancellation.

[0165] In some embodiments, during the process of dragging the first data, the user may also stop dragging the first data, that is, stop sharing the first data, that is, the first operation is a drag cancel operation.

[0166] In some embodiments, during the process of dragging the first data, the user may also drag the first data and successfully share it to the second application, that is, the first operation is a drag completion operation.

[0167] Any one or more steps in S506-S509 may be executed simultaneously or one after another. This application does not limit the execution order of any one of the steps in S506-S509.

[0168] S510: The drag operation recognition module sends the drag icon to the drag motion effect display module.

[0169] S511: The drag operation recognition module sends the drag operation and the drag operation type to the drag motion effect display module.

[0170] Optionally, the drag icon may be sent to the drag animation display module simultaneously with the drag operation and the drag operation type.

[0171] S512: The dragging animation display module displays the dragging animation based on the dragging operation and the dragging operation type.

[0172] After the drag operation recognition module recognizes that the first operation is a drag operation, the drag operation recognition module can send the drag operation to the drag animation display module, and the drag animation display module can display the drag operation start animation based on the drag operation.

[0173] The drag operation recognition module can continuously monitor the drag operation and determine the type of the drag operation.

[0174] In the case where the drag operation type is a drag-cancel operation, the drag animation display module may display a drag-cancel operation animation.

[0175] When the drag operation type is a drag completion operation, the drag animation display module may display a drag completion animation.

[0176] S513: The drag operation recognition module sends the drag operation and the drag operation type to the drag vibration feedback module.

[0177] S514: The drag vibration feedback module displays a drag vibration effect based on the drag operation and the drag operation type.

[0178] After the drag operation recognition module recognizes that the first operation is a drag operation, the drag operation recognition module can send the drag operation to the drag vibration feedback module, and the drag vibration feedback module can display a drag operation start vibration effect based on the drag operation.

[0179] The drag operation recognition module can continuously monitor the drag operation and determine the type of the drag operation.

[0180] If the drag operation type is a drag-cancel operation, the drag vibration feedback module can display a drag-cancel operation vibration effect. If the drag operation type is a drag-complete operation, the drag vibration feedback module can display a drag-complete operation vibration effect.

[0181] S513 and S514 may also be executed before S511 and S512, and S513 and S514 may also be executed simultaneously with S511 and S512, which is not limited in this application.

[0182] S515: The drag operation recognition module sends the drag event to the second application.

[0183] In some embodiments, the drag event can be sent to the second application before the drag operation is completed. In the process of the user dragging the icon to move the dragged icon, when the dragged icon is located above the second application, for example, when the dragged icon is located in the display area of ​​the second application, the drag operation identification module can send the drag event to the second application so that the second application can determine whether the first data can be received based on the metadata information of the first data in the drag event. Because the electronic device 100 cannot know which application the user will share the first data with. Therefore, in the process of the user dragging the icon, as long as the dragged icon is located in the display area of ​​other applications, the drag operation identification module can send the drag event to the second application. The second application can pre-judge whether the first data can be received. In this way, when the user stops dragging the icon and the dragging is completed, the second application can judge whether the first data can be received based on the pre-judgement, that is, whether to receive the first data or refuse to receive the first data.

[0184] Optionally, when the drag icon is located in the display area of ​​the second application, if it is determined that the second application can receive the first data, the second application can send a third message to the drag operation identification module, and the drag operation identification module can display a first mark on the drag image. The first mark can be the logo 1008 shown in Figure 1E, to prompt the second application that it can receive the first data.

[0185] In some embodiments, the first mark may also be referred to as a first icon.

[0186] Optionally, when the drag icon is located in the display area of ​​the second application, if it is determined that the second application cannot receive the first data, the second application can send a fourth message to the drag operation identification module, and the drag operation identification module can display a second mark on the drag image. The second mark can be the logo 1009 shown in Figure 1F, to prompt that the second application cannot receive the first data.

[0187] In some embodiments, the second mark may also be referred to as a second icon.

[0188] In other embodiments, the drag event may be sent to the second application after the drag operation is completed. After the drag operation recognition module detects the completion of the drag operation, the drag operation recognition module sends the drag event to the second application. The second application then determines whether it can receive the first data, that is, determines whether to accept the first data or refuse to receive the first data.

[0189] This application does not limit the timing of sending the drag event by the drag operation recognition module.

[0190] S516: The second application obtains the target data type supported for reception.

[0191] In some embodiments, the target data type may also be referred to as a second data type.

[0192] S517: The second application obtains the data type of the first data from the drag event.

[0193] S518 : In response to the drag completion operation, if the target data type includes the data type of the first data, confirm that the first data can be received.

[0194] The target data type includes but is not limited to one or more of the following: text, image, hyperlink, video, file, icon, card, folder, etc.

[0195] After the second application obtains the drag event sent by the drag operation recognition module, it obtains the target data type supported by the second application. The target data types supported by different applications can be the same or different.

[0196] The drag event includes metadata information of the first data, and the metadata information of the first data includes the data type of the first data. When the target data type includes the data type of the first data, the second application confirms that it can receive the first data.

[0197] S519: The drag operation recognition module sends the drag completion operation to the second application.

[0198] S520: The second application receives the first data.

[0199] The user releases the drag icon in the display area of ​​the second application, that is, the user confirms to share the first data with the second application. The drag operation recognition module can confirm that the first operation is a drag completion operation, and the drag operation recognition module sends the drag completion operation to the second application.

[0200] In response to the drag completion operation, based on the aforementioned confirmation that the first data can be received, the second application receives the first data.

[0201] In some embodiments, in response to receiving the first data, the second application may display the first data within the second application.

[0202] Optionally, S515 may also be executed simultaneously with S519.

[0203] Optionally, S516 to S518 may also be executed after S519.

[0204] This application does not limit the execution order of one or more steps in the embodiment of Figure 5.

[0205] In some embodiments, while the electronic device 100 responds to the first operation as a drag operation, the electronic device 100 can also respond to a non-drag operation. In other words, the electronic device 100 can respond to two different types of user operations at the same time, thereby improving the user experience.

[0206] Based on the above description, it can be seen that the drag operation is responded to by the drag framework, and the non-drag operation is responded to by the application. That is, the drag operation and the non-drag operation are responded to by different entities, so the electronic device 100 can respond to drag operations and non-drag operations of different event types at the same time.

[0207] FIG6 is a flowchart of a method provided by the present application for an electronic device 100 to simultaneously respond to a drag operation and a non-drag operation.

[0208] As shown in FIG6 , the electronic device 100 includes a third application and a drag framework, and the drag framework includes a drag operation recognition module.

[0209] The first application and the third application may be the same or different. In some embodiments, the third application in FIG6 may also be the second application.

[0210] S601: The drag framework responds to a drag operation on first data.

[0211] S602: The third application receives the second operation and determines that the second operation is a non-drag operation.

[0212] S603: In response to the non-drag operation, the third application performs a second operation.

[0213] The second operation may be a user operation on the second data. The third application may identify the type of the second operation. For example, when the second operation is a non-drag operation, the second operation may include but is not limited to any one of a single-click, a double-click, a triple-click, a multi-click (for a triple-click), and a sliding operation.

[0214] In the case that the second operation is a non-drag operation, the third application may directly execute the second operation.

[0215] Optionally, during the execution of S601-S602, the drag framework responds to a drag operation on the first data. The event type for a non-drag operation may be a move event. Move events and pull-move events are responded to by different entities, so the electronic device 100 can simultaneously respond to pull-move events and move events of different event types. In other words, the electronic device 100 can simultaneously respond to drag operations and non-drag operations, thereby improving the user experience.

[0216] Next, we will introduce the specific implementation of sharing the first data on multiple devices through the drag-and-drop operation.

[0217] FIG. 7 shows a schematic diagram of functional module interaction for sharing first data between two applications on the electronic device 100 and the electronic device 200 .

[0218] As shown in Figure 7, the functional modules on the electronic device 100 include but are not limited to the first application and the drag framework. The drag framework includes but is not limited to the drag operation recognition module, the drag intention recognition module, the drag animation display module and the drag vibration feedback module.

[0219] The functional modules on the electronic device 200 include but are not limited to the second application and the drag framework. The drag framework includes but is not limited to a drag operation recognition module, a drag intention recognition module, a drag motion effect display module, and a drag vibration feedback module.

[0220] For the convenience of description, the functional modules on the electronic device 100 are referred to as a first drag operation recognition module, a first drag intention recognition module, a first drag motion effect display module, a first drag vibration feedback module, etc.

[0221] The functional modules on the electronic device 200 are called a second drag operation recognition module, a second drag intention recognition module, a second drag motion effect display module, a second drag vibration feedback module, etc.

[0222] The first application on the electronic device 100 and the second application on the electronic device 200 may be the same or different.

[0223] In sharing the first data on multiple devices through a drag operation, the drag operation is initiated on the electronic device 100 .

[0224] Specifically, the first application is configured to receive a first operation on the first data and identify the first operation as a drag operation.

[0225] The first application is further configured to create a drag icon in response to the first operation, wherein the drag icon is obtained by taking a screenshot of the display style of the first data displayed by the electronic device 100, and the file type of the drag icon is a picture. In this way, the drag icon can be extended across applications and devices.

[0226] The first application is further configured to send a first message and a drag icon to the drag operation recognition module after recognizing a drag operation, wherein the first message is configured to indicate to the drag operation recognition module that the first operation is a drag operation.

[0227] The drag operation recognition module is further configured to execute one or more events corresponding to the drag operation after recognizing the drag operation. The one or more events corresponding to the drag operation may include the following:

[0228] The first drag operation recognition module is also used to modify the event type of the drag operation to a pull-move event after recognizing the drag operation. In this way, while the electronic device 100 receives the user's drag operation, it can also respond to the user's non-drag operations, such as sliding operations, single-click operations, double-click operations, triple-click operations, etc., thereby improving the user's operating experience. The reason is that when the electronic device 100 receives the user's drag operation, the electronic device 100 also receives the user's non-drag operation. The drag operation recognition module can modify the event type of the non-drag operation to a move event. The pull-move event is different from the move event. The move event is responded to by the first application, and the pull-move event is responded to by the drag framework. That is to say, the move event and the pull-move event are responded by different entities. Therefore, the electronic device 100 can respond to pull-move events and move events of different event types at the same time.

[0229] The first drag operation recognition module is further configured to create and save a drag event in response to the drag operation, wherein the drag event includes metadata information about the first data. The metadata information about the first data includes, but is not limited to, any one or more of the following: a data type of the first data, a creation time of the first data, a file size of the first data, an identifier of an application to which the first data belongs, a storage address of the first data, and the like.

[0230] The first drag operation recognition module is further used to send the drag operation to the first drag motion effect display module, the first drag vibration feedback module and the first drag intention recognition module respectively after recognizing that the first operation is a drag operation.

[0231] The first drag animation effect display module is used to display a drag operation start animation effect based on the drag operation after obtaining the drag operation and the drag operation type sent by the drag operation recognition module.

[0232] The first drag motion effect display module is also used to monitor the drag track, and the drag icon moves along the drag track.

[0233] The first drag animation display module is further used to display a cross-device drag animation when the drag operation is a cross-device drag operation.

[0234] Among them, the first drag vibration feedback module is used to display a drag operation start vibration effect based on the drag operation after obtaining the drag operation and the drag operation type sent by the drag operation recognition module.

[0235] The first drag vibration feedback module is further used to display a cross-device drag vibration effect when the drag operation is a cross-device drag operation.

[0236] The first drag intention recognition module is also used to monitor the drag trajectory and determine whether the drag operation is a single-device drag operation or a cross-device drag operation. After determining the cross-device drag operation, the cross-device drag operation is sent to the first drag effect display module and the first drag vibration feedback module respectively. This allows the first drag effect display module to display the cross-device drag effect when the drag operation is a cross-device drag operation, and allows the first drag vibration feedback module to display the cross-device drag vibration effect when the drag operation is a cross-device drag operation.

[0237] The first drag intention recognition module is further configured to monitor the drag trajectory, determine the drag direction, and determine the target sharing device of the first data. For example, the first drag intention recognition module determines that the target sharing device of the first data is the electronic device 200.

[0238] When a cross-device drag operation is determined and the first condition is met, the first drag intention recognition module sends the drag icon and the drag event to the second drag intention recognition module on the electronic device 200. The drag icon and the drag event can be sent by the first drag operation recognition module to the first drag intention recognition module.

[0239] After obtaining the drag icon and drag event sent by the first drag intention recognition module, the second drag intention recognition module sends the drag icon to the drag animation display module, and the second drag intention recognition module sends the drag event to the drag operation recognition module.

[0240] The second drag effect display module is used to display the cross-device drag effect after obtaining the drag icon sent by the second drag intention recognition module. The cross-device drag effect displayed on the electronic device 200 and the cross-device drag effect displayed on the electronic device 100 can be the same or different.

[0241] The second drag motion effect display module is also used to monitor the drag track and control the drag icon to move along the drag track.

[0242] The second drag animation effect display module is further used to display the drag completion animation effect when the drag operation is a drag completion operation.

[0243] The second drag animation effect display module is further used to display the drag cancel operation animation effect when the drag operation is a drag cancel operation.

[0244] The second drag vibration feedback module is used to display a cross-device drag vibration effect. The cross-device drag vibration effect displayed on the electronic device 200 and the cross-device drag vibration effect displayed on the electronic device 100 can be the same or different.

[0245] The second drag vibration feedback module is further used to display a drag completion vibration effect when the drag operation is a drag completion operation.

[0246] The second drag vibration feedback module is further used to display a drag cancel operation vibration effect when the drag operation is a drag cancel operation.

[0247] The second drag operation recognition module is configured to save the event type of the first operation as a pull-move event after receiving the drag event sent by the second drag intention recognition module.

[0248] The second drag operation recognition module is further configured to save the drag event after receiving the drag event sent by the second drag intention recognition module.

[0249] The second drag operation recognition module is further used to monitor the operation type of the drag operation, where the operation type of the drag operation includes any one of drag completion and drag cancellation.

[0250] The second drag operation recognition module is also used to send the drag operation type to the second drag vibration feedback module and the second drag motion effect display module respectively, so that the second drag vibration feedback module can display different vibration feedback effects based on different drag operation types, and the second drag motion effect display module can display different motion effects based on different drag operation types.

[0251] The second drag operation recognition module is further configured to send the drag event and the drag completion operation to the second application.

[0252] In some embodiments, the drag event and the drag completion operation may be sent to the second application separately, or may be sent to the second application together, which is not limited in this application.

[0253] Optionally, when the drag icon is within the display area of ​​the second application, the second drag operation recognition module may send the drag event to the second application. Optionally, when the second drag operation recognition module recognizes that the drag operation is a drag completion operation, the drag operation recognition module further sends the drag event to the second application, which is not limited in this application.

[0254] Optionally, when the second drag operation recognition module recognizes that the drag operation is a drag completion operation, the second drag operation recognition module sends the drag event to the second application.

[0255] The second application is configured to obtain the target data type supported by the second application after obtaining the drag event sent by the second drag operation recognition module.

[0256] The second application is further used to obtain the data type of the first data from the drag event.

[0257] The second application is further configured to receive the first data when the target data type includes the data type of the first data. Optionally, in response to receiving the first data, the second application may display the first data within the second application.

[0258] Based on this, it is possible to share data between two applications on different devices through the drag-and-drop framework based on drag operations.

[0259] FIG8 is a flow chart of a method for sharing first data between two applications on electronic device 100 and electronic device 200 provided by the present application.

[0260] As shown in FIG8 , the electronic device 100 includes a first application, a first drag operation recognition module, a first drag motion effect display module, a first drag intention recognition module, and a first drag vibration feedback module.

[0261] The electronic device 200 includes a second application, a second drag intention recognition module, a second drag operation recognition module, a second drag motion effect display module, and a second drag vibration feedback module.

[0262] The first application and the second application may be the same or different. The first application and the second application being the same may mean that the first application and the second application are the same or similar applications.

[0263] S801: A first application receives a first operation on first data, and determines that the first operation is a drag operation.

[0264] Exemplarily, the first data may be the picture 1005 shown in FIG. 3A .

[0265] The first operation may be a user operation of long pressing the first data as shown in FIG3A .

[0266] S802: The first application creates a drag icon.

[0267] S803: The first application sends the drag icon and the first message to the drag operation recognition module.

[0268] In other words, the drag operation recognition module can intercept the drag operation and hand over multiple matters of the drag operation to the drag framework for processing, without the need for application processing, which can reduce the workload of application development.

[0269] Optionally, after the drag operation identification module intercepts the first operation, the drag operation identification module may also send a second message to the first application, where the second message is used to indicate that the drag framework has intercepted the first operation and the first application does not need to respond to the first operation.

[0270] The drag icon is obtained by the first application through a display style screenshot of the first data displayed by the electronic device 100, and the file type of the drag icon is a picture. In this way, the drag icon can be used across applications and devices.

[0271] In some embodiments, the first drag operation recognition module may further send the drag operation to the first drag motion effect display module and the first drag vibration feedback module respectively.

[0272] In response to the drag operation, the first drag animation display module can display the drag operation start animation, monitor the drag track, and control the drag icon to move along the drag track.

[0273] In response to the drag operation, the first drag vibration feedback module may display a drag operation-initiated vibration effect.

[0274] S804: In response to determining that the first operation is a drag operation, the first drag operation recognition module modifies the event type of the first operation to a pull-move event.

[0275] In response to determining that the first operation is a drag operation, the first drag operation recognition module modifies the event type of the first operation to a pull-move event. In this way, after the first drag operation recognition module modifies the event type of the first operation to a pull-move event, while the electronic device 100 receives the user's drag operation, it can also respond to the user's non-drag operations, such as sliding operations, single-click operations, double-click operations, triple-click operations, etc., thereby improving the user's operating experience. The reason is that when the electronic device 100 receives the user's drag operation, the electronic device 100 also receives the user's non-drag operation. The first drag operation recognition module can modify the event type of the non-drag operation to a move event. The pull-move event is different from the move event. The move event is responded to by the first application, and the pull-move event is responded to by the drag framework. That is, the move event and the pull-move event are responded to by different entities. Therefore, the electronic device 100 can respond to pull-move events and move events of different event types at the same time.

[0276] S805: In response to the drag operation, the first drag operation recognition module creates and saves a drag event, where the drag event includes metadata information of the first data.

[0277] The metadata information of the first data includes, but is not limited to, any one or more of the following: the data type of the first data, the creation time of the first data, the file size of the first data, the application identifier to which the first data belongs, the storage address of the first data, etc. The metadata information of the first data is used by other applications to confirm whether to receive the first data.

[0278] S806: The first drag operation recognition module sends the drag operation to the first drag intention recognition module.

[0279] Optionally, S806 may also be executed after S803.

[0280] S807: The first drag intention recognition module monitors the drag trajectory and determines that the drag operation is a cross-device drag operation.

[0281] In some embodiments, the first condition may be that at least a first area display area in the complete display area of ​​the dragged icon exceeds an edge of the display screen of the electronic device 100. For example, the first area display area may be half of the complete display area.

[0282] The first condition may also be other conditions, and this application does not limit this.

[0283] S808 , the first drag intention recognition module monitors the drag trajectory, determines the drag direction, and determines that the target sharing device is the electronic device 200 .

[0284] For example, as shown in FIG2D , when the drag trajectory moves toward the right edge of electronic device 100, the first drag intention recognition module can determine that the target sharing device is electronic device 200. When the drag trajectory moves toward the left edge of electronic device 100, the first drag intention recognition module can determine that the target sharing device is electronic device 200.

[0285] In other embodiments, when the electronic device 200 establishes a collaborative connection with only one device, when the dragging trajectory moves toward the right edge, left edge, upper edge, or lower edge of the electronic device 100, it can be confirmed that the target sharing device is the electronic device 200.

[0286] The electronic device 100 may also identify the target sharing device based on other methods, which is not limited in this application.

[0287] In some embodiments, after the first drag intention recognition module determines the cross-device drag operation, the first drag intention recognition module can send the cross-device drag operation to the first drag motion effect display module and the first drag vibration feedback module respectively.

[0288] The first drag animation display module is further used to display a cross-device drag animation in response to a cross-device drag operation.

[0289] The first drag vibration feedback module is further configured to display a cross-device drag vibration effect in response to a cross-device drag operation.

[0290] S809: The first drag intention recognition module sends a drag icon to the second drag intention recognition module.

[0291] S810: The first drag intention recognition module sends a drag event to the second drag intention recognition module.

[0292] Optionally, the first drag intention recognition module may send a drag icon and a drag event to the second drag intention recognition module through a collaborative connection.

[0293] S811. The second drag intention recognition module sends the drag icon and the drag event to the second drag operation recognition module.

[0294] After receiving the drag icon and drag event sent by the first drag intention recognition module, the second drag operation recognition module sends the drag icon and drag event to the second drag operation recognition module.

[0295] Optionally, after receiving the drag icon and drag event sent by the second drag intent recognition module, the second drag operation recognition module is further configured to save the event type of the first operation as a pull-move event and save the drag event. In this way, after the second drag operation recognition module modifies the event type of the first operation to a pull-move event, while the electronic device 200 receives the user's drag operation, it can also respond to the user's non-drag operations, such as sliding operations, single-click operations, double-click operations, triple-click operations, etc., thereby improving the user's operating experience. The reason is that when the electronic device 200 receives the user's drag operation and the electronic device 200 also receives the user's non-drag operation, the second drag operation recognition module can modify the event type of the non-drag operation to a move event. The pull-move event is different from the move event. The move event is responded to by the first application, and the pull-move event is responded to by the drag framework. That is, the move event and the pull-move event are responded to by different entities. Therefore, the electronic device 100 can respond to pull-move events and move events of different event types at the same time.

[0296] S812: The second drag operation recognition module monitors the operation type of the drag operation, where the operation type of the drag operation includes any one of drag completion and drag cancellation.

[0297] After obtaining the drag icon and drag event sent by the second drag intention recognition module, the second drag operation recognition module can determine the drag operation. The second drag operation recognition module can monitor the operation type of the drag operation, which includes any one of drag completion and drag cancellation.

[0298] S813: The second drag operation recognition module sends the drag icon and the drag operation type to the second drag animation effect display module.

[0299] S814. The second drag animation display module displays the drag animation based on the drag operation type.

[0300] The drag operation type includes any one of a drag completion operation and a drag cancellation operation.

[0301] After obtaining the drag icon and drag operation type sent by the second drag intention recognition module, the second drag effect display module displays the cross-device drag effect. The cross-device drag effect displayed on the electronic device 200 and the cross-device drag effect displayed on the electronic device 100 can be the same or different.

[0302] The second drag motion effect display module can monitor the drag track and control the drag icon to move along the drag track.

[0303] The second drag animation effect display module may display a drag completion animation effect when the drag operation is a drag completion operation.

[0304] The second drag animation effect display module may display a drag cancel operation animation effect when the drag operation is a drag cancel operation.

[0305] S815: The second drag operation recognition module sends the drag operation type to the second drag vibration feedback module.

[0306] S816: The second drag vibration feedback module displays a drag vibration effect based on the drag operation type.

[0307] The drag operation type includes any one of a drag completion operation and a drag cancellation operation.

[0308] After obtaining the drag operation type sent by the second drag intention recognition module, the second drag vibration feedback module displays a cross-device drag vibration effect. The cross-device drag vibration effect displayed on electronic device 200 and the cross-device drag vibration effect displayed on electronic device 100 can be the same or different.

[0309] The second drag vibration feedback module is further used to display a drag completion vibration effect when the drag operation is a drag completion operation.

[0310] The second drag vibration feedback module is further used to display a drag cancel operation vibration effect when the drag operation is a drag cancel operation.

[0311] S817: The second drag operation recognition module sends the drag event to the second application.

[0312] In some embodiments, the drag event can be sent to the second application before the drag operation is completed. In the process of the user dragging the icon to move the dragged icon, when the dragged icon is located above the second application, for example, when the dragged icon is located in the display area of ​​the second application, the drag operation identification module can send the drag event to the second application so that the second application can determine whether the first data can be received based on the metadata information of the first data in the drag event. Because the electronic device 200 cannot know which application the user will share the first data with. Therefore, in the process of the user dragging the icon, as long as the dragged icon is located in the display area of ​​other applications, the drag operation identification module can send the drag event to the second application. The second application can pre-judge whether the first data can be received. In this way, when the user stops dragging the icon and the dragging is completed, the second application can judge whether the first data can be received based on the pre-judgement, that is, whether to receive the first data or refuse to receive the first data.

[0313] Optionally, when the drag icon is located in the display area of ​​the second application, when it is determined that the second application can receive the first data, the drag operation identification module can display a first mark on the drag image. The first mark can be similar to the logo 1008 shown in Figure 1E, to prompt the second application that the first data can be received.

[0314] Optionally, when the drag icon is located in the display area of ​​the second application, if it is determined that the second application cannot receive the first data, the drag operation identification module can display a second mark on the drag image. The second mark can be similar to the mark 1009 shown in Figure 1F to prompt the second application that it cannot receive the first data.

[0315] In other embodiments, the drag event may be sent to the second application after the drag operation is completed. After the drag operation recognition module detects the completion of the drag operation, the drag operation recognition module sends the drag event to the second application. The second application then determines whether it can receive the first data, that is, determines whether to accept the first data or refuse to receive the first data.

[0316] This application does not limit the timing of sending the drag event by the drag operation recognition module.

[0317] S818: The second application obtains the target data type supported for reception.

[0318] S819: The second application obtains the data type of the first data from the drag event.

[0319] S820: In response to the drag completion operation, if the target data type includes the data type of the first data, confirm that the first data can be received.

[0320] The target data type includes but is not limited to one or more of the following: text, image, hyperlink, video, file, icon, card, folder, etc.

[0321] After acquiring the drag event sent by the second drag operation recognition module, the second application acquires the target data type supported by the second application. The target data types supported by different applications can be the same or different.

[0322] The drag event includes metadata information of the first data, and the metadata information of the first data includes the data type of the first data. When the target data type includes the data type of the first data, the second application confirms that it can receive the first data.

[0323] S821: The second drag operation recognition module sends the drag completion operation to the second application.

[0324] S822. The second application receives the first data.

[0325] The user releases the drag icon in the display area of ​​the second application, that is, the user confirms to share the first data to the second application, and the second drag operation recognition module can confirm that the first operation is a drag completion operation, and the second drag operation recognition module sends the drag completion operation to the second application.

[0326] In response to the drag completion operation, based on the aforementioned confirmation that the first data can be received, the second application receives the first data.

[0327] In some embodiments, in response to receiving the first data, the second application may display the first data within the second application.

[0328] Optionally, S817 may also be executed simultaneously with S821.

[0329] Optionally, S818 to S820 may also be executed after S821.

[0330] This application does not limit the execution order of one or more steps in the embodiment of Figure 8.

[0331] In some embodiments, while the electronic device 200 is responding to a drag operation, the electronic device 200 may also respond to a non-drag operation. In other words, the electronic device 200 may simultaneously respond to two different types of user operations. For details, please refer to the description in the embodiment of FIG. 6 , which will not be repeated herein.

[0332] FIG9 shows a schematic diagram of the hardware structure of an electronic device provided in this application.

[0333] The electronic device 100 may be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a wearable device, an in-vehicle device, a smart home device, and / or a smart city device. The embodiments of the present application do not impose any particular restrictions on the specific type of the electronic device. The following embodiments of the present application are described using the electronic device 100 as a mobile phone as an example.

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

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

[0336] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.

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

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

[0339] The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C bus lines. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, and the like via different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 180K via the I2C interface, enabling communication between the processor 110 and the touch sensor 180K via the I2C bus interface, thereby implementing the touch function of the electronic device 100.

[0340] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the I2S interface, enabling the function of answering calls through a Bluetooth headset.

[0341] The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface, enabling the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.

[0342] The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the UART interface, enabling the function of playing music through Bluetooth headphones.

[0343] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display 194 and the camera 193. MIPI interfaces include the camera serial interface (CSI) and the display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the camera function of the electronic device 100. The processor 110 and the display 194 communicate via the DSI interface to implement the display function of the electronic device 100.

[0344] The GPIO interface can be configured via software. The GPIO interface can be configured as either a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to the camera 193, display 194, wireless communication module 160, audio module 170, sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0345] The USB interface 130 is an interface that complies with USB standards and may be a Mini USB interface, a Micro USB interface, a USB Type-C interface, or the like. The USB interface 130 can be used to connect a charger to charge the electronic device 100, or to transfer data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio. This interface can also be used to connect other electronic devices, such as augmented reality devices.

[0346] It is understood that the interface connection relationship between the modules illustrated in the embodiment of the present invention 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.

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

[0348] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and provides power to the processor 110, the internal memory 121, the display 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage, impedance). In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.

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

[0350] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.

[0351] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0352] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0353] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0354] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, so that electronic device 100 can communicate with a network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).

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

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

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

[0358] The ISP processes data fed back by camera 193. For example, when taking a photo, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, which is then passed to the ISP for processing and converted into a visible image. The ISP can also perform algorithmic optimization on image noise and brightness. It can also optimize parameters such as exposure and color temperature of the captured scene. In some embodiments, the ISP can be located within camera 193.

[0359] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then passes the electrical signal to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0360] The digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0361] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. This allows electronic device 100 to play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, and MPEG4.

[0362] The NPU is a neural network (NN) computing processor. Drawing on the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it rapidly processes input information and can continuously self-learn. The NPU can enable intelligent cognitive applications in electronic device 100, such as image recognition, face recognition, speech recognition, and text comprehension.

[0363] The internal memory 121 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM).

[0364] Random access memory may include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM, for example, the fifth generation DDR SDRAM is generally referred to as DDR5 SDRAM), etc.; non-volatile memory may include disk storage devices and flash memory.

[0365] Flash memory can be divided into NOR FLASH, NAND FLASH, 3D NAND FLASH, etc. according to the operating principle; single-level cell (SLC), multi-level cell (MLC), triple-level cell (TLC), quad-level cell (QLC), etc. according to the storage cell potential level; universal flash storage (UFS) and embedded multi media card (eMMC) can be divided into UFS and eMMC according to the storage specification.

[0366] The random access memory can be directly read and written by the processor 110, and can be used to store executable programs (such as machine instructions) of the operating system or other running programs, and can also be used to store user and application data.

[0367] The non-volatile memory may also store executable programs and user and application data, etc., and may be loaded into the random access memory in advance for direct reading and writing by the processor 110 .

[0368] The external memory interface 120 can be used to connect to an external non-volatile memory to expand the storage capacity of the electronic device 100. The external non-volatile memory communicates with the processor 110 via the external memory interface 120 to implement data storage. For example, files such as music and videos can be stored in the external non-volatile memory.

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

[0370] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be provided in the processor 110, or some functional modules of the audio module 170 can be provided in the processor 110.

[0371] The speaker 170A, also called a "speaker", is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music or listen to hands-free calls through the speaker 170A.

[0372] The receiver 170B, also called a "handset", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or a voice message, the user can place the receiver 170B close to the ear to hear the voice.

[0373] Microphone 170C, also known as "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to the microphone 170C to input the sound signal into the microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the source of sound, realize directional recording function, etc.

[0374] The headphone jack 170D is used to connect a wired headphone and can be the USB interface 130 or a 3.5mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0375] The pressure sensor 180A is used to sense pressure signals and convert the pressure signals into electrical signals.

[0376] The gyroscope sensor 180B can be used to determine the motion posture of the electronic device 100. The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude based on the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.

[0377] The magnetic sensor 180D includes a Hall sensor.

[0378] Accelerometer 180E can detect the magnitude of acceleration of electronic device 100 in all directions (generally three axes). It can also detect the magnitude and direction of gravity when electronic device 100 is stationary. It can also be used to identify the electronic device's posture, enabling applications such as switching between landscape and portrait modes and pedometers.

[0379] The distance sensor 180F is used to measure distance. The electronic device 100 can measure distance using infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure distance to achieve fast focusing.

[0380] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodetector.

[0381] The ambient light sensor 180L is used to sense the brightness of the ambient light.

[0382] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.

[0383] The temperature sensor 180J is used to detect temperature.

[0384] Touch sensor 180K, also known as "touch device".

[0385] The bone conduction sensor 180M can acquire vibration signals.

[0386] The buttons 190 include a power button, a volume button, and the like. The buttons 190 may be mechanical buttons or touch buttons. The electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100.

[0387] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

[0388] The indicator 192 may be an indicator light, which may be used to indicate the charging status, power level changes, messages, missed calls, notifications, etc.

[0389] The SIM card interface 195 is used to connect a SIM card.

[0390] It should be understood that the structure illustrated in the embodiments of the present invention 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, 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.

[0391] FIG10 shows a schematic diagram of a system framework provided by this application.

[0392] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present invention, the Android system with a layered architecture is used as an example to illustrate the software structure of the electronic device 100.

[0393] FIG10 is a block diagram of the software structure of the electronic device 100 according to an embodiment of the present invention.

[0394] A layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.

[0395] The application layer can include a series of application packages.

[0396] As shown in FIG10 , the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and short message.

[0397] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions.

[0398] As shown in Figure 10, the application framework layer may include a drag framework, which can interface with applications in the application layer to implement drag operation recognition, drag animation display, drag intent recognition, and drag vibration display.

[0399] The drag framework may include but is not limited to a drag operation recognition module, a drag intention recognition module, a drag motion effect display module, and a drag vibration feedback module.

[0400] The drag operation recognition module includes but is not limited to a drag start module, a drag end module, a drag cancel module and a drag update module.

[0401] The drag start module is used to intercept drag operation events.

[0402] The drag-end module is used to identify the drag-end operation, which can also be called the drag-completion operation. The drag-end operation can refer to the user pressing and holding the first data and dragging the first data to move the first data to the second application after the drag-initiated operation. After the first data moves to the second application, the user stops pressing and holding the first data, causing the second application to receive the first data. Optionally, after the second application receives the first data, the second application can display the first data in its user interface.

[0403] The drag-cancel operation is used to identify the drag-cancel operation. The drag-cancel operation may refer to a user operation in which the user stops sharing the first data with the second application after the drag-start operation.

[0404] A drag update module is used to send the drag event of the first data to other applications when the user drags the first data through other applications. The drag event is used by other applications to determine whether they can receive the first data shared by the user. In some embodiments, other applications can also change the display style of the application icon of other applications when it is determined that they can receive the first data shared by the user, to prompt the user that the application can receive the first data. In some embodiments, other applications can also change the display style of the application icon of other applications when it is determined that they cannot receive the first data shared by the user, to prompt the user that the application cannot receive the first data. The drag event includes metadata information of the first data, and the metadata information of the first data includes but is not limited to one or more of the following: the data type of the first data, the creation time of the first data, the file size of the first data, the application identifier to which the first data belongs, the storage location of the first data, etc.

[0405] The drag intention recognition module includes but is not limited to a cross-device drag intention recognition module and a drag direction recognition module.

[0406] Among them, the cross-device drag intention recognition module can be used to determine whether the drag operation is a drag operation on a single device or a drag operation on multiple devices based on the movement trajectory of the drag operation.

[0407] The drag direction recognition module can be used to determine the drag direction based on the position relationship of multiple devices, and determine the first data sharing device based on the drag direction.

[0408] The drag animation display module includes but is not limited to the drag start animation display module, the drag end animation display module, the drag cancel animation display module and the cross-device drag animation display module.

[0409] Among them, the drag start animation effect display module is used to display the drag start animation effect after recognizing the drag start operation.

[0410] The drag-end animation display module is used to display the drag-end animation after recognizing the drag-end operation.

[0411] The drag-cancel animation display module is used to display the drag-cancel animation after recognizing the drag-cancel operation.

[0412] The cross-device drag animation display module is used to display the cross-device drag animation after recognizing the cross-device drag operation.

[0413] It should be noted that the drag start animation, drag end animation, drag cancel animation, and cross-device drag animation can be partially the same, can be different, or can be completely the same, and this application does not limit this. For example, the drag start animation and the drag end animation are different, which may mean that the animation display style of the drag start vibration is different from the animation display style of the drag end animation.

[0414] The drag vibration feedback module includes but is not limited to a drag start vibration feedback module, a drag end vibration feedback module, a drag cancel vibration feedback module, and a cross-device drag vibration feedback module.

[0415] Among them, the drag-start vibration feedback module is used to output a drag-start vibration after recognizing the drag-start operation.

[0416] The drag-end vibration feedback module is used to output the drag-end vibration after recognizing the drag-end operation.

[0417] The drag-cancel vibration feedback module is used to output a drag-cancel vibration after recognizing a drag-cancel operation.

[0418] The cross-device drag vibration feedback module is used to output a cross-device drag vibration after recognizing a cross-device drag operation.

[0419] It should be noted that the drag-start vibration, drag-end vibration, drag-cancel vibration, and cross-device drag vibration can be partially the same, can be different, or can be completely the same, and this application does not limit this. For example, the drag-start vibration and the drag-end vibration are different, which can mean that the frequency, intensity, and duration of the drag-start vibration are partially or completely different from the frequency, intensity, and duration of the drag-end vibration.

[0420] The application framework layer may also include a window manager, content provider, view system, telephony manager, resource manager, notification manager, etc.

[0421] The window manager is used to manage window programs. It can obtain the display size, determine whether there is a status bar, lock the screen, take screenshots, etc.

[0422] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0423] The view system includes visual controls, such as those for displaying text and images. The view system is used to build applications. A display interface can consist of one or more views. For example, a display interface containing a text notification icon might include a view for displaying text and a view for displaying images.

[0424] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including answering, hanging up, etc.).

[0425] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0426] The Notification Manager allows applications to display notifications in the status bar. These messages can be displayed briefly and then disappear automatically without user interaction. For example, the Notification Manager is used to notify users of completed downloads and message reminders. The Notification Manager can also display notifications in the top status bar of the system as icons or scrolling text, such as notifications from background applications, or as dialog windows on the screen. Examples include displaying text messages in the status bar, emitting alert sounds, vibrating electronic devices, or flashing indicator lights.

[0427] Android Runtime includes core libraries and a virtual machine. Android runtime is responsible for scheduling and management of the Android system.

[0428] The core library consists of two parts: one is the function that needs to be called by the Java language, and the other is the Android core library.

[0429] The application layer and application framework layer run in a virtual machine. The virtual machine executes Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.

[0430] The system library can include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

[0431] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.

[0432] The media library supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0433] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0434] A 2D graphics engine is a drawing engine for 2D drawings.

[0435] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, audio driver, and sensor driver.

[0436] The various implementation modes of this application can be combined arbitrarily to achieve different technical effects.

[0437] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described herein are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated therein. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).

[0438] Those skilled in the art will appreciate that all or part of the process steps in the above-described method embodiments can be implemented by a computer program instructing the relevant hardware. The program can be stored in a computer-readable storage medium, and when executed, the program can include the process steps in the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.

[0439] In short, the above description is only an embodiment of the technical solution of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent replacements, improvements, etc. made based on the disclosure of the present invention should be included in the scope of protection of the present invention.

Claims

1. A data dragging method, characterized in that: The method is applied to an electronic device, the electronic device includes an application layer and an application framework, the application layer includes a first application, the application framework includes a first drag framework, and the first drag framework includes a first drag operation identification module; the method includes: The first application receives a first operation on first data in the first application, wherein the first operation is a drag operation; The first application sends a first message to the first drag operation identification module, where the first message is used to indicate that the first operation is the drag operation; In response to the first message, the first drag operation identification module obtains and saves first metadata information of the first data, and the metadata information of the first data includes any one or more of the following: the first data type of the first data, the creation time of the first data, the file size of the first data, the application identifier to which the first data belongs, and the storage location of the first data.

2. The method according to claim 1, characterized in that After responding to the first message, the method further includes: The first drag operation identification module stores the event type of the first operation as a first event, where the first event is used to indicate that the first operation is a drag operation.

3. The method according to claim 1 or 2, characterized in that: The application layer also includes a second application; and the method further includes: The second application receives a second operation for the second application; When the second operation is a non-drag operation, the second application performs the second operation.

4. The method according to claim 2, characterized in that: The application layer also includes a second application; and the method further includes: The second application receives a third operation for the second application; When the second operation is a drag operation, the second application sends a second message to the first drag operation identification module, where the second message is used to indicate that the second operation is a drag operation; In response to the second message, the first drag operation recognition module determines that the first event already exists and does not perform the third operation.

5. The method according to any one of claims 1 to 4, characterized in that: The first drag framework also includes a first drag motion effect display module; After the first application receives the first operation on the first data in the first application, the method further includes: The first application obtains and displays a first picture, where the first picture is obtained by the first application through a screenshot based on a display style of the first data; The first application sends the first picture to the first drag operation recognition module; The first drag operation recognition module sends the first picture to the first drag motion effect display module; The first dragging motion effect display module controls the first image to move along with the movement of the dragging operation.

6. The method according to claim 5, characterized in that The application layer further includes a second application, and the display area of ​​the second application is the first display area; After responding to the first message, the method further includes: When the first icon is located on the first display area, the first drag operation recognition module sends metadata information of the first data to the second application, where the first metadata information is used by the second application to confirm whether to receive the first data.

7. The method according to claim 6, characterized in that After the first drag operation recognition module sends the metadata information of the first data to the second application, the method further includes: The second application obtains a second data type; The second application obtains the first data type from metadata information of the first data; In a case where the second data type includes the first data type, the second application determines to receive the first data.

8. The method according to claim 7, characterized in that After the second application determines to receive the first data, the method further includes: The second application sends a third message to the first drag operation identification module; In response to the third message, the first drag operation recognition module displays a first icon on the first picture, where the first icon is used to indicate that the second application allows receiving the first data.

9. The method according to claim 7 or 8, characterized in that: The method further comprises: In the case where the second data type does not include the first data type, the second application determines that the first data cannot be received; After determining that the first data cannot be received, the second application sends a fourth message to the first drag operation identification module; In response to the fourth message, the first drag operation recognition module displays a second icon on the first picture, where the second icon is used to indicate that the second application cannot receive the first data, and the second icon is different from the first icon.

10. The method according to any one of claims 7 to 9, characterized in that: The second data type includes any one or more of the following: text, picture, hyperlink, video, file, icon, card and folder.

11. An electronic device, characterized in that: The electronic device comprises a memory and a processor; wherein the memory is coupled to the processor, and the memory is used to store a computer program. When the processor executes and calls the computer program, the electronic device executes the method described in any one of claims 1 to 10.

12. A computer-readable storage medium comprising instructions, characterized in that: When the instructions are executed on an electronic device, the electronic device executes the method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Data dragging method, electronic equipment and storage medium

    CN119718149A

  • File transmission method and apparatus for mobile terminal

    CN107066172A

  • Interface display method and electronic equipment

    CN114237778A

  • Dragging method of control content, electronic equipment and system

    CN115729431A

  • Window content dragging method and electronic equipment

    CN116069226A

Cited By

  • Tree table data processing method and device, electronic equipment and readable storage medium

    CN120030020A