Data dragging method, electronic equipment and storage medium

By introducing a drag and drop framework in terminal devices, the problem that applications in the prior art need to adapt by themselves to support drag and drop functions is solved, and the function of supporting drag and drop without adaptation is realized, reducing the workload of application development and improving user experience.

CN119718149APending Publication Date: 2025-03-28HUAWEI TECH CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202311292320.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-28
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

In existing terminal devices, applications need to adapt themselves to support the drag and drop function, which makes users unable to share data through drag and drop, which increases the workload of application development.

Method used

Provides a data drag and drop method. By introducing a drag and drop framework in an electronic device, the application only needs to recognize the drag and drop operation without adapting it by itself. The drag frame includes a drag operation recognition module, a drag effect display module and a drag vibration feedback module, which handles drag operations and provides dynamic and vibration feedback.

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 CN119718149A_ABST
    Figure CN119718149A_ABST
Patent Text Reader

Abstract

The invention provides a data dragging method, electronic equipment and a storage medium. The electronic equipment comprises a first application and a first dragging operation identification module. The first application receives a first operation for first data in the first application, and the first operation is a dragging operation; the first application sends a first message to a first drag operation identification module, wherein the first message is used for indicating that the first operation is a drag operation; in response to the first message, the first dragging operation identification module obtains and stores first metadata information of the first data, the metadata information of the first data comprises any one or more of the following items: 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 position of the first data. Through the method, after the application recognizes the dragging operation, the application submits the dragging operation to the dragging framework for execution, the application does not need to execute the dragging operation, and the workload of application development can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] With the increasing popularity of terminal devices, smart terminal devices have become indispensable items in people's lives. Users have an increasingly strong demand for drag-and-drop operations on multiple terminal devices. Users can share data between two applications on the device by dragging and dropping, which improves the user experience. However, the drag-and-drop function currently supported by applications on the device is an application-defined function, that is, the application needs to support the drag-and-drop function through software adaptation. If the application on the device is not adapted to the drag-and-drop function, the user cannot share data by dragging and dropping. Summary of the invention

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

[0004] 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 framework including a first drag operation identification module, wherein the first application receives a first operation on 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.

[0005] 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 the application on the device to support the drag function without adaptation. The application only needs to recognize the drag operation or the non-drag operation, which can reduce the workload of application development.

[0006] In combination with the first aspect, in a possible implementation, after responding to the first message, the method further includes: a first drag operation identification module stores an 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.

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

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

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

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

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

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

[0013] 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 the same time.

[0014] 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 the present application.

[0015] 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 a 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 a first drag operation identification module; the first drag operation identification module sends the first picture to a first drag animation display module; the first drag animation display module controls the first picture to move as the drag operation moves.

[0016] In this way, during the dragging process, the electronic device can display the dragging picture, which is obtained by the first application through the screenshot, so that the first picture can be dragged across devices and applications.

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

[0018] Since the device cannot know that the user is suitable to stop 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.

[0019] In combination with the first aspect, in a possible implementation method, 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.

[0020] In combination with the first aspect, in a 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.

[0021] 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 picture to prompt the user that the second application can receive the first data.

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

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

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

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

[0026] 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,

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

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

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

[0030] In a third aspect, the present application provides a computer-readable storage medium, comprising instructions, which, when executed on an electronic device, enables the electronic device to execute a data dragging method provided in any possible implementation of the first aspect.

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

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

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

[0034] Figure 1A-1F Shows the specific implementation of sharing pictures in the gallery application to the instant messaging application;

[0035] Figure 2A-2I A schematic diagram showing the establishment of a cooperative connection between the electronic device 100 and the electronic device 200;

[0036] Figure 3A-3D Shows the specific implementation of sharing pictures in the gallery application to the instant messaging application;

[0037] Figure 4 A schematic diagram of functional module interaction for sharing first data between two applications on the electronic device 100 is shown;

[0038] Figure 5 A schematic flow chart of a method for sharing first data between two applications on an electronic device 100 provided by the present application;

[0039] Figure 6 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;

[0040] Figure 7 A schematic diagram of functional module interaction for sharing first data between two applications on the electronic device 100 and the electronic device 200 is shown;

[0041] Figure 8 A schematic flow chart of a method for sharing first data between two applications on an electronic device 100 and an electronic device 200 provided in the present application;

[0042] Fig. 9 A schematic diagram of the hardware structure of an electronic device provided by the present application is shown;

[0043] Fig.10 A schematic diagram of a system framework provided by the present application is shown. DETAILED DESCRIPTION

[0044] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to be used as limitations to the present application. As used in the specification and appended claims of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to also include plural expressions, unless there is a clear indication to the contrary in the context. It should also be understood that the term "and / or" used in the present application refers to and includes any or all possible combinations of one or more listed items.

[0045] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.

[0046] The term "user interface (UI)" in the following embodiments of the present application refers to a medium 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 operation 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.

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

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

[0049] The electronic device 100 may also receive a user's 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.

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

[0051] This application provides a universal drag framework, which defines the specific implementation of sharing data between two applications by dragging, such as drag start, drag end, and drag animation. When two applications share data by dragging, the application only needs to connect to the drag framework, and the application does not need to adapt. The drag framework completes the drag start, drag dynamic drawing, drag vibration feedback, etc. This saves the workload of application development.

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

[0053] 1. Drag scenario between two applications on the same device.

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

[0055] Figure 1A-1F The specific implementation of sharing pictures in the gallery application to the instant messaging application is shown.

[0056] For example, Figure 1A As shown, a window 1001 and a window 1002 are displayed on the electronic device 100 .

[0057] The window 1001 displays an interface 1003 of a gallery application, and the window 1002 displays an interface 1004 of an instant messaging application.

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

[0059] Interface 1004 displays multiple chat records with the contact “Lisa”.

[0060] The user can share the picture 1005 to the contact "Lisa" by dragging. For example, Figure 1A As shown, 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 the picture 1005 .

[0061] like Figure 1B As shown, in response to the operation of dragging the picture 1005, the electronic device 100 may display an icon 1006, and the icon 1006 may be obtained by screenshotting the picture 1005. The file type of the icon 1006 is a picture.

[0062] like Figure 1C As shown, 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 .

[0063] like Figure 1D As shown, when icon 1006 moves to interface 1004, the user releases his finger, and if the instant messaging application determines that the picture can be received, the electronic device 100 can send the picture 1005 to the contact "Lisa" through the instant messaging application. The electronic device 100 can display Figure 1D The interface 1007 shown is similar to the interface 1004, except that the interface 1007 includes a picture 1005, so as to prompt the user that the picture 1005 in the gallery application has been shared to the contact "Lisa" in the instant messaging application by dragging.

[0064] 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 drag icon, when the drag icon is located above the instant messaging application, for example, when the drag icon is located in the interface 1004 of the instant messaging application, the electronic device 100 can send the drag event to the instant messaging application so that the instant messaging application can determine whether the image 1005 can be received based on the metadata information of the image 1005 in the drag event. Because the electronic device 100 cannot know which application the user shared the image 1005 to. Therefore, in the process of the user dragging the icon, as long as the drag icon is located in the display area of ​​other applications, the electronic device 100 can send the drag event to the instant messaging application. The instant messaging application can pre-determine whether the image 1005 can be received. In this way, when the user stops dragging the icon, when the dragging is completed, the instant messaging application can pre-determine whether the image 1005 can be received, that is, determine whether to receive the image 1005 or refuse to receive the image 1005.

[0065] For example, when the instant messaging application confirms that it can receive the picture 1005, the instant messaging application can send a notification of allowing reception to the drag frame, and the drag frame can display the picture 1005 on the icon 1006. Figure 1E The logo 1008 is shown, and the logo 1008 is used to indicate that the instant messaging application can receive the picture 1005. When the picture 1005 moves outside the interface 1004, the logo 1008 stops being displayed on the icon 1006.

[0066] For example, when the instant messaging application confirms that the image 1005 cannot be received, the instant messaging application may send a notification of the inability to receive the image to the drag frame, and the drag frame may display the image 1006 on the icon. Figure 1F The logo 1009 shown is used to indicate that the instant messaging application cannot receive the picture 1005. When the picture 1005 moves outside the interface 1004, the logo 1009 stops being displayed on the icon 1006.

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

[0068] It should be noted that Figure 1A-1F Only one method of sharing data by dragging multiple windows is exemplified. In other embodiments, the electronic device 100 may also share data between two applications by other methods, such as sharing data by dragging a split screen or by dragging a transfer station, etc., which is not limited in this application.

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

[0070] The electronic device 100 is installed with a first application, and the electronic device 200 is installed with a second application. The first application and the second application establish a collaborative connection. Exemplarily, the collaborative connection may be a Bluetooth connection or other connection methods, and the present application does not limit this.

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

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

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

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

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

[0076] For example, Figure 2A As shown, the electronic device 100 can establish a connection with the mouse 300, and the mouse 300 is used to control the electronic device 100. The screen of the electronic device 200 displays a mouse indicator 2001 of the mouse 300. When the user controls the mouse 300 to move the mouse indicator 2001 toward the electronic device 200, for example Figure 2A As shown, the user can control the mouse indicator 2001 to cross the right edge of the electronic device 100 through the mouse 300, and the mouse indicator 2001 disappears from the screen of the electronic device 100. Afterwards, the mouse indicator 2001 crosses the left edge of the electronic device 200 and is displayed on the screen of the electronic device 200.

[0077] like Figure 2B As shown, 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 indicator 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.

[0078] Optionally, after 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 and displays it on the screen of the electronic device 200, the electronic device 100 may display a special effect on the display screen of the electronic device 100, and the electronic device 200 may display a special effect on the display screen of the electronic device 200, and the special effect is used to indicate that the electronic device 200 is about to establish a collaborative connection with the electronic device 100. In some embodiments, the special effect may be a bubble special effect. In some embodiments, the electronic device 100 may display a special effect. Figure 2C As shown in the special effect 2111, the electronic device 200 can display Figure 2D The text "in collaboration" is shown in the special effect 2112, and the special effects 2111 and 2112 are used to indicate that the electronic device 100 and the electronic device 200 are establishing a collaborative connection. Optionally, after the electronic device 100 and the electronic device 200 successfully establish a collaborative connection, the electronic device 100 and the electronic device 200 can stop displaying the special effects 2111 and 2112.

[0079] In response to the electronic device 100 and the electronic device 200 establishing a cooperative connection, the electronic device 100 may display Figure 2B The prompt information 2002 shown in the electronic device 200 may be displayed Figure 2D The prompt information 2003 is shown. The prompt information 2002 and the prompt information 2003 are used to prompt that the electronic device 100 and the electronic device 200 have established a collaborative connection.

[0080] In some embodiments, after the electronic device 100 and the electronic device 200 establish a collaborative connection, the user can control the electronic device 200 and the electronic device 400 to establish a collaborative connection through the mouse 300. Optionally, after the electronic device 200 and the electronic device 400 establish a collaborative connection, the electronic device 100 can automatically establish a collaborative connection with the electronic device 400, and the electronic device 100, the electronic device 200 and the electronic device 400 are each connected to each other.

[0081] For example, Figure 2EAs shown, the user can control the mouse indicator 2001 to cross the right edge of the electronic device 100 through the mouse 300, and the mouse indicator 2001 disappears from the screen of the electronic device 200. Afterwards, the mouse indicator 2001 crosses the left edge of the electronic device 400 and is displayed on the screen of the electronic device 400.

[0082] like Figure 2E As shown, 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 indicator 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.

[0083] 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 devices 100, 200 and 400 establish collaborative connections in pairs.

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

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

[0086] In some embodiments, after multiple devices have established 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 other multiple devices still have established collaborative connections.

[0087] For example, Figure 2G As shown, the electronic device 200 can receive an input operation of the user for the prompt information 2003. The input operation can be a single click operation of the user controlling the mouse pointer 2001 to be located on the prompt information 2003 by using the mouse 300. In response to the input operation of the user, the electronic device 200 can display Figure 2G The prompt bar 2005 shown includes a disconnection option, and the user can use the disconnection option to disconnect the electronic device 200 from the collaborative connection with the electronic device 100 and the electronic device 400 respectively.

[0088] For example, Figure 2HAs shown, the electronic device 200 can receive a user input operation for the disconnect option in the prompt bar 2005. The input operation can be a single click operation of the user controlling the mouse indicator 2001 through the mouse 300 to be located on the disconnect option. In response to the user's input operation, the electronic device 200 can disconnect the collaborative connection with the electronic device 100 and the electronic device 400, respectively.

[0089] like Fig.2I As shown, 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 may 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.

[0090] After electronic device 200 disconnects the collaborative connection with 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 prompt the user that electronic device 100 still establishes a collaborative connection with electronic device 400.

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

[0092] 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 by dragging and dropping, without the need to share the first data on the electronic device 100 to the electronic device 400 by dragging and dropping through the electronic device 200, thereby saving user operations.

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

[0094] Figure 3A-3D The specific implementation of sharing pictures in the gallery application to the instant messaging application is shown.

[0095] For example, Figure 3A As shown, a window 1001 is displayed on the electronic device 100 , and a window 1002 is displayed on the electronic device 200 .

[0096] The window 1001 displays an interface 1003 of a gallery application, and the window 1002 displays an interface 1004 of an instant messaging application.

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

[0098] Interface 1004 displays multiple chat records with the contact “Lisa”.

[0099] The user can share the picture 1005 to the contact "Lisa" by dragging. For example, Figure 3A As shown, the electronic device 100 can receive a long press of the image 1005 in the interface 1003 by the user through the mouse 300. In response to the long press operation of the user, the electronic device 100 can select the image 1005 and drag the image 1005.

[0100] like Figure 3B As shown, in response to the operation of dragging the picture 1005, the electronic device 100 may display an icon 1006, and the icon 1006 may be obtained by screenshotting the picture 1005. The file type of the icon 1006 is a picture.

[0101] like Figure 3B As shown, 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 .

[0102] like Figure 3C As shown, 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, and 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 Figure 3D Interface 1007 is shown, which is similar to interface 1004, except that interface 1007 includes picture 1005, which prompts the user to share picture 1005 in the gallery application on electronic device 100 to contact "Lisa" in the instant messaging application on electronic device 200 by dragging.

[0103] In some embodiments, the electronic device 200 may also display Figure 1E-1F The icons shown are not described in detail in this application.

[0104] It should be noted that Figure 3A-3DOnly one method of sharing data between two devices by dragging is exemplified. In other embodiments, the electronic device 100 can also share data between the two devices by other methods, which is not limited in this application. In other embodiments, the user can also control the mouse 300 to drag the picture 1005 to share between the two devices by means of a touch pad or a touch screen. In other embodiments, it is not limited to controlling the electronic device by the mouse 300, and the electronic device may not be connected to the mouse. The user can drag the picture 1005 to share between the two devices by means of touch operations directly acting on the touch screen.

[0105] Next, we will introduce in detail 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.

[0106] First, the specific implementation of sharing the first data through the drag operation on a single device is introduced.

[0107] Figure 4 A schematic diagram of functional module interaction for sharing first data between two applications on the electronic device 100 is shown.

[0108] like Figure 4 As shown, 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.

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

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

[0111] The first application is further used to respond to the first operation and create a drag icon, 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 cross-application and cross-device.

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

[0113] The drag operation recognition module is further used to execute one or more items corresponding to the drag operation after recognizing the drag operation. The one or more items corresponding to the drag operation may include the following:

[0114] The drag operation recognition module is also used to modify the event type of the drag operation to a pull-move event after the drag operation is recognized. In this way, when the electronic device 100 receives the user's drag operation, it can also respond to the user's non-drag operation, such as a sliding operation, a single-click operation, a double-click operation, a triple-click operation, 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 subjects, so the electronic device 100 can respond to pull-move events and move events of different event types at the same time.

[0115] The drag operation recognition module is further used to create and save a drag event in response to the drag operation, and 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: data type of the first data, creation time of the first data, file size of the first data, application identifier to which the first data belongs, storage location of the first data, etc.

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

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

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

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

[0120] The drag operation recognition module is also 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.

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

[0122] The dragging animation display module is also used to monitor the dragging track, and the dragging icon moves along the dragging track.

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

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

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

[0126] Among them, the drag vibration feedback module is used to display the 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 identification module.

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

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

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

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

[0131] 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, and this application does not limit this.

[0132] Optionally, when the drag icon is located in the display area of ​​the second application, the drag operation recognition module can 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 sends the drag event to the second application, which is not limited in this application.

[0133] Optionally, when the drag operation identification module identifies that the drag operation is a drag completion operation, the drag operation identification module sends the drag event to the second application.

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

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

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

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

[0138] Figure 5 A flowchart of a method for sharing first data between two applications on an electronic device 100 provided in the present application.

[0139] like Figure 5 As shown, 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.

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

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

[0142] Exemplarily, the first data may be Figure 1A Picture 1005 shown.

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

[0144] 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. The non-drag operation may include but is not limited to: a single-click operation, a double-click operation, a triple-click operation, a multi-click (more than three clicks) operation, and a sliding operation.

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

[0146] In a case where it is determined that the first operation is a non-drag operation, S503 is executed.

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

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

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

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

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

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

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

[0154] 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 cross-application and cross-device.

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

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

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

[0158] 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 operation, such as a sliding operation, a single-click operation, a double-click operation, a triple-click operation, etc., thereby improving the user's operation 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 subjects, so the electronic device 100 can respond to the pull-move event and the move event of different event types at the same time.

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

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

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

[0162] S509: The drag operation identification module monitors the drag operation type, where the drag operation type includes any one of drag completion and drag cancellation.

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

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

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

[0166] S510: The drag operation recognition module sends the drag icon to the drag animation display module.

[0167] S511. The drag operation recognition module sends the drag operation and the drag operation type to the drag animation display module.

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

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

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

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

[0172] When the drag operation type is a drag-cancel operation, the drag animation display module may display a drag-cancel operation animation.

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

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

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

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

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

[0178] When the drag operation type is a drag cancel operation, the drag vibration feedback module can display a drag cancel operation vibration effect. When the drag operation type is a drag completion operation, the drag vibration feedback module can display a drag completion vibration effect.

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

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

[0181] 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 drag icon, when the drag icon is located above the second application, for example, when the drag icon is located in the display area of ​​the second application, the drag operation recognition 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 shares the first data with. Therefore, in the process of the user dragging the icon, as long as the drag icon is located in the display area of ​​other applications, the drag operation recognition module can send the drag event to the second application. The second application can pre-determine whether the first data can be received. In this way, when the user stops dragging the icon, when the dragging is completed, the second application can determine whether the first data can be received based on the pre-determination, that is, whether to receive the first data or refuse to receive the first data.

[0182] 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 recognition module, and the drag operation recognition module can display a first mark on the drag image. The first mark can be Figure 1E The logo 1008 is shown to prompt that the second application can receive the first data.

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

[0184] 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 recognition module, and the drag operation recognition module can display a second mark on the drag image. The second mark can be Figure 1F The mark 1009 shown is used to prompt that the second application cannot receive the first data.

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

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

[0187] This application does not limit the timing when the drag operation identification module sends a drag event.

[0188] S516: The second application obtains the target data type that it supports receiving.

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

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

[0191] S518: In response to the drag completion operation, when the target data type includes the data type of the first data, confirming that the first data can be received.

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

[0193] After acquiring the drag event sent by the 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 may be the same or different.

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

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

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

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

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

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

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

[0201] Optionally, S516-S518 may also be executed after S519.

[0202] This application is for Figure 5 The execution order of one or more steps in the embodiments is not limited.

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

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

[0205] Figure 6 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.

[0206] like Figure 6 As shown, the electronic device 100 includes a third application and a drag framework, and the drag framework includes a drag operation identification module.

[0207] The first application and the third application may be the same or different. In some embodiments, Figure 6 The third application in can also be the second application.

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

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

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

[0211] The second operation may be a user operation on the second data. The third application may identify the second operation type. Exemplarily, 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.

[0212] When the second operation is a non-drag operation, the third application may directly execute the second operation.

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

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

[0215] Figure 7 A schematic diagram of functional module interaction for sharing first data between two applications on the electronic device 100 and the electronic device 200 is shown.

[0216] like Figure 7 As shown, the functional modules on the electronic device 100 include but are not limited to the first application and the drag framework, and 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.

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

[0218] 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 animation display module, a first drag vibration feedback module, etc.

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

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

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

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

[0223] The first application is further used to respond to the first operation and create a drag icon, where 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 cross-application and cross-device.

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

[0225] The drag operation recognition module is further used to execute one or more items corresponding to the drag operation after recognizing the drag operation. The one or more items corresponding to the drag operation may include the following:

[0226] The first drag operation recognition module is also used to modify the event type of the drag operation to a pull-move event after the drag operation is recognized. In this way, while the electronic device 100 receives the user's drag operation, it can also respond to the user's non-drag operation, such as a sliding operation, a single-click operation, a double-click operation, a triple-click operation, 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 subjects, so the electronic device 100 can respond to pull-move events and move events of different event types at the same time.

[0227] The first drag operation recognition module is further used to create and save a drag event in response to the drag operation, and 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: data type of the first data, creation time of the first data, file size of the first data, application identifier to which the first data belongs, storage address of the first data, etc.

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

[0229] The first dragging animation effect display module is used to display the dragging operation start animation effect based on the dragging operation after acquiring the dragging operation and the dragging operation type sent by the dragging operation identification module.

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

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

[0232] 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 identification module.

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

[0234] 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 animation display module and the first drag vibration feedback module respectively. When the drag operation is a cross-device drag operation, the first drag animation display module can display the cross-device drag animation, and when the drag operation is a cross-device drag operation, the first drag vibration feedback module can display the cross-device drag vibration special effect.

[0235] The first 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. For example, the first dragging intention recognition module determines that the target sharing device of the first data is the electronic device 200.

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

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

[0238] The second dragging animation display module is used to display the cross-device dragging animation after acquiring the dragging icon sent by the second dragging intention recognition module. The cross-device dragging animation displayed on the electronic device 200 and the cross-device dragging animation displayed on the electronic device 100 may be the same or different.

[0239] The second dragging animation display module is also used to monitor the dragging track and control the dragging icon to move along the dragging track.

[0240] The second dragging animation effect display module is also used to display the dragging completion animation effect when the dragging operation is a dragging completion operation.

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

[0242] The second drag vibration feedback module is used to display cross-device drag vibration effects. The cross-device drag vibration effects displayed on the electronic device 200 and the cross-device drag vibration effects displayed on the electronic device 100 may be the same or different.

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

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

[0245] The second drag operation recognition module is used 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.

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

[0247] The second drag operation identification 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.

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

[0249] The second drag operation identification module is further used to send the drag event and the drag completion operation to the second application.

[0250] 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, and this application does not limit this.

[0251] Optionally, when the drag icon is located in the display area of ​​the second application, the second drag operation recognition module can 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 sends the drag event to the second application, which is not limited in this application.

[0252] Optionally, when the second drag operation identification module identifies that the drag operation is a drag completion operation, the second drag operation identification module sends the drag event to the second application.

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

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

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

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

[0257] Figure 8 A flowchart of a method for sharing first data between two applications on an electronic device 100 and an electronic device 200 provided in the present application.

[0258] like Figure 8As shown, 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.

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

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

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

[0262] Exemplarily, the first data may be Figure 3A Picture 1005 shown.

[0263] The first operation can be Figure 3A The user operation of long pressing the first data is shown.

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

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

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

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

[0268] The drag icon is obtained by the first application through the 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 cross-application and cross-device.

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

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

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

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

[0273] 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 operation, such as a sliding operation, a single-click operation, a double-click operation, a triple-click operation, etc., thereby improving the user's operation 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 to say, the move event and the pull-move event are responded to by different subjects, so the electronic device 100 can respond to the pull-move event and the move event of different event types at the same time.

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

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

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

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

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

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

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

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

[0282] For example, Figure 2D As shown, when the dragging track moves toward the right edge of the electronic device 100, the first dragging intention recognition module can determine that the target sharing device is the electronic device 200. When the dragging track moves toward the left edge of the electronic device 100, the first dragging intention recognition module can determine that the target sharing device is the electronic device 200.

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

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

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

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

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

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

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

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

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

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

[0293] Optionally, after receiving the drag icon and drag event sent by the second drag intention recognition module, the second drag operation recognition module is also used 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 operation, such as a sliding operation, a single-click operation, a double-click operation, a triple-click operation, etc., thereby improving the user's operation experience. The reason is that when the electronic device 200 receives the user's drag operation, the electronic device 200 also receives the user's non-drag operation, and 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 subjects, so the electronic device 100 can respond to the pull-move event and the move event of different event types at the same time.

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

[0295] 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, and 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.

[0296] S813: The second drag operation identification module sends the drag icon and the drag operation type to the second drag animation display module.

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

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

[0299] After acquiring the drag icon and the 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 may be the same or different.

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

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

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

[0303] S815. The second drag operation identification module sends the drag operation type to the second drag vibration feedback module.

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

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

[0306] After acquiring 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 the electronic device 200 and the cross-device drag vibration effect displayed on the electronic device 100 may be the same or different.

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

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

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

[0310] 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 drag icon, when the drag icon is located above the second application, for example, when the drag icon is located in the display area of ​​the second application, the drag operation recognition 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 shared the first data with. Therefore, in the process of the user dragging the icon, as long as the drag icon is located in the display area of ​​other applications, the drag operation recognition module can send the drag event to the second application. The second application can pre-determine whether the first data can be received. In this way, when the user stops dragging the icon, when the dragging is completed, the second application can determine whether the first data can be received based on the pre-determination, that is, whether to receive the first data or refuse to receive the first data.

[0311] 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 drag operation recognition module can display a first mark on the drag image. The first mark can be similar to Figure 1E The logo 1008 is shown to prompt that the second application can receive the first data.

[0312] 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 recognition module may display a second mark on the drag image. The second mark may be similar to Figure 1F The mark 1009 shown is used to prompt that the second application cannot receive the first data.

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

[0314] This application does not limit the timing when the drag operation identification module sends a drag event.

[0315] S818: The second application obtains the target data type that it supports receiving.

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

[0317] S820: In response to the drag completion operation, when the target data type includes the data type of the first data, confirming that the first data can be received.

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

[0319] 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 may be the same or different.

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

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

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

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

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

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

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

[0327] Optionally, S818-S820 may also be executed after S821.

[0328] This application is for Figure 8 The execution order of one or more steps in the embodiments is not limited.

[0329] In some embodiments, during the period when the electronic device 200 responds to the drag operation, the electronic device 200 can also respond to the non-drag operation. That is, the electronic device 200 can respond to two different types of user operations at the same time. For details, please refer to Figure 6 The description in the embodiments will not be repeated in this application.

[0330] Fig. 9 A schematic diagram of the hardware structure of an electronic device provided by the present application is shown.

[0331] 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, a vehicle-mounted device, a smart home device and / or a smart city device. The embodiments of the present application do not impose any special restrictions on the specific type of the electronic device. The following embodiments of the present application are described by taking the electronic device 100 as a mobile phone as an example.

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

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

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

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

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

[0337] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, thereby realizing the touch function of the electronic device 100.

[0338] 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 achieve communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 via the I2S interface to achieve the function of answering a call through a Bluetooth headset.

[0339] 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 to realize the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.

[0340] The UART interface is a universal serial data bus for asynchronous communication. The 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 generally 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 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.

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

[0342] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the 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.

[0343] The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.

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

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

[0346] 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 supplies power to the processor 110, the internal memory 121, the display screen 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 number, battery health status (leakage, impedance), etc. 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.

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

[0348] 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 the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0349] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., 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.

[0350] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent 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 the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a 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.

[0351] 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 integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0352] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the 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).

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

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

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

[0356] The ISP is used to process the data fed back by the camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. The ISP can also perform algorithm optimization on the noise and brightness of the image. The ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP can be set in the camera 193.

[0357] 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 optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted 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.

[0358] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0359] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0360] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

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

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

[0363] 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 unit potential level; universal flash storage (UFS), embedded multi media card (eMMC), etc. according to the storage specification.

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

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

[0366] 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 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos are stored in the external non-volatile memory.

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

[0368] 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 arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.

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

[0370] The receiver 170B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the human ear.

[0371] Microphone 170C, also called "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 microphone 170C to input the sound signal into 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 sound source, realize directional recording function, etc.

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

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

[0374] 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 through the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.

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

[0376] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in all directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.

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

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

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

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

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

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

[0383] Bone conduction sensor 180M can obtain vibration signals.

[0384] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.

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

[0386] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.

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

[0388] It is to be understood that the structure illustrated in the embodiment 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 in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0389] Fig.10 A schematic diagram of a system framework provided by the present application is shown.

[0390] The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present invention, the Android system of the layered architecture is taken as an example to exemplify the software structure of the electronic device 100.

[0391] Fig.10 1 is a software structure block diagram of the electronic device 100 according to an embodiment of the present invention.

[0392] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.

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

[0394] like Fig.10 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.

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

[0396] like Fig.10 As shown, the application framework layer may include a drag framework. The drag framework may be connected to the application in the application layer to realize drag operation recognition, drag motion effect display, drag intent recognition, drag vibration display, etc.

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

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

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

[0400] 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 operation that after the drag start operation, the user long presses the first data and drags the first data so that the first data moves to the second application, and after the first data moves to the second application, the user stops long pressing the first data so that the second application receives the first data. Optionally, after the second application receives the first data, the second application can display the first data in the user interface of the second application.

[0401] 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 to the second application after the drag start operation.

[0402] 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, so as 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, so as to prompt the user that the application cannot receive the first data. Among them, 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.

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

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

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

[0406] The dragging animation display module includes but is not limited to a dragging start animation display module, a dragging end animation display module, a dragging cancel animation display module, and a cross-device dragging animation display module.

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

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

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

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

[0411] 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 all the same, and this application does not limit this. For example, the drag start animation and the drag end animation are different, which can mean that the animation display style of the drag start vibration is different from the animation display style of the drag end animation.

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

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

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

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

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

[0417] It should be noted that the vibration sense of drag start, the vibration sense of drag end, the vibration sense of drag cancel and the vibration sense of drag across devices may be partially the same, may be different, or may be all the same, and this application does not limit this. For example, the vibration sense of drag start and the vibration sense of drag end are different, which may mean that the frequency, intensity and duration of the vibration of drag start are partially or completely different from the frequency, intensity and duration of the vibration of drag end.

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

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

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

[0421] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.

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

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

[0424] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.

[0425] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.

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

[0427] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.

[0428] The system library may 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.

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

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

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

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

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

[0434] The various implementation modes of the present application can be combined arbitrarily to achieve different technical effects.

[0435] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part 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, the process or function described in the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can 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. The available medium can 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 disk (SSD)), etc.

[0436] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.

[0437] In short, the above description is only an embodiment of the technical solution of the present invention, and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made according to the disclosure of the present invention shall be included in the protection scope 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

Cited By

  • Drag data protection method, verification method and system based on quantum encryption

    CN121485916A

  • Data dragging method, and electronic device and storage medium

    EP4708012A1

  • Data dragging method, and electronic device and storage medium

    WO2025067441A1