Content storage method and electronic equipment

By registering a sharing service on the receiving device, the shared content can be saved directly based on the storage address of the currently displayed application, solving the problem of cumbersome content saving operations in cross-device sharing, improving user experience, and expanding device compatibility.

CN121541824APending Publication Date: 2026-02-17HUAWEI TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510838072.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-19
Publication Date
2026-02-17

AI Technical Summary

Technical Problem

During cross-device content sharing, after the receiving device saves the content to the default storage address, the user needs to perform additional operations to move it to the target application, which is cumbersome. This is especially true when the receiving and sending devices are not on the same account, which limits the cross-device sharing scenario.

Method used

The first electronic device, through registration and sharing services, directly saves the shared content to the storage address corresponding to the currently displayed application, reducing the user's operation steps on the receiving end and supporting content sharing between different account devices.

Benefits of technology

It enables users to directly save shared content to the target application's storage address on the receiving device, simplifying user operations, improving the user experience of cross-device sharing, and expanding the application scenarios of cross-device sharing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121541824A_ABST
    Figure CN121541824A_ABST
Patent Text Reader

Abstract

The invention provides a content storage method and electronic equipment, and relates to the technical field of terminals. The first electronic equipment can flexibly store the shared content according to the storage address registered by the current display application, so that a user can conveniently use the shared content in the current application, the user operation is simplified, and the use experience of the user is improved. The method comprises the following steps: responding to a first operation of a user, and starting a first application by the first electronic equipment; and the first application registers with the sharing service. In the process of displaying the first application, the first electronic device detects that the second electronic device is close to the first electronic device. And the first electronic equipment receives the first content sent by the second electronic equipment. The first electronic equipment stores the first content to a first storage address corresponding to the first application; wherein the first storage address is obtained by registering the sharing service based on the first application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of terminal technology, and in particular to a content storage method and an electronic device. Background Technology

[0002] With the development of terminal technology, electronic devices support cross-device sharing. For example, a user can tap their phone against the NFC recognition area of ​​a computer to trigger the phone to send content to be shared to the computer, or vice versa, enabling collaborative work between the phone and the computer.

[0003] In cross-device sharing, the receiving device typically saves the shared content to a default storage address. However, if the user on the receiving device needs to access the shared content, they must instruct the receiving device to retrieve the desired content from the default storage address, a cumbersome process.

[0004] For example, after receiving an image from the sending device, the receiving device saves the image to the default storage address of the gallery application. If the user instructs the receiving device to add the image to the notes application, then the user also needs to instruct the notes application to copy the image from the default storage address of the gallery application, which is obviously a cumbersome process. Summary of the Invention

[0005] To address the aforementioned technical problems, this application provides a content storage method and an electronic device. The technical solution provided by this application allows the first electronic device to flexibly save shared content based on the storage address registered by the currently displayed application, thereby facilitating user access to the shared content within the current application, simplifying user operations, and enhancing the user experience.

[0006] To achieve the above-mentioned technical objectives, this application provides the following technical solution:

[0007] A first aspect provides a content saving method applied to a first electronic device, the method comprising: launching a first application in response to a first user operation; registering the first application with a sharing service; detecting a second electronic device approaching the first electronic device while displaying the first application; receiving first content sent by the second electronic device; and saving the first content to a first storage address corresponding to the first application; wherein the first storage address is obtained based on the registration of the first application with the sharing service.

[0008] In this way, by pre-registering the ability of the currently displayed application to receive shared content with the sharing service, the obtained shared content can be directly saved to the storage address corresponding to the application, instead of being saved to the default storage address. This reduces the need for users to retrieve shared content from the default storage address and add it to the application, thus improving the user experience.

[0009] Furthermore, compared to the content saving method of copying shared content to the clipboard and then pasting it into the current application, the content saving method provided in this application reduces the user's copy-paste operations by pre-registering the ability to receive shared content. Moreover, it does not limit the first and second electronic devices to devices with the same account, effectively expanding cross-device sharing scenarios.

[0010] According to the first aspect, saving the first content to the first storage address corresponding to the first application includes: obtaining the first storage address corresponding to the first interface currently displayed by the first application; and saving the first content to the first storage address.

[0011] For example, after the first electronic device detects the approach of the second electronic device, the sharing service in the first electronic device determines that the current interface displays a first application that has registered a first capability. Then, the sharing service can request the storage address corresponding to the first interface currently displayed by the first application. Correspondingly, the first application can provide the sharing service with the first storage address pre-configured for the first interface. In this way, the sharing service can save the shared content sent by the second electronic device to that first storage address.

[0012] Thus, by registering the first capability, the first electronic device can save the received shared content to the storage address corresponding to the currently displayed interface.

[0013] According to the first aspect, or any implementation of the first aspect above, the first application registers with the sharing service, including: registering with the sharing service the first storage address corresponding to the first interface currently displayed by the first application.

[0014] According to the first aspect, or any implementation of the first aspect above, the first application registers with the sharing service, including: registering a first capability of the first application with the sharing service, wherein the first capability indicates that the first application is capable of saving received content.

[0015] For example, the granularity of the first application's registration with the sharing service varies. For instance, the first application can register with coarse granularity, indicating that the first application has at least one storage address where it can save shared content. Alternatively, the first application can register with fine granularity, specifying the storage address of the currently displayed interface, indicating that the first application's currently displayed interface has a storage address where it can save shared content.

[0016] In this way, the first electronic device can flexibly register storage addresses to meet the need to save the received shared content to the registered storage address.

[0017] According to the first aspect, or any implementation of the first aspect above, saving the first content to the first storage address corresponding to the first application includes: the sharing service sending a first request to the first application based on the first capability registered by the first application, the first request being used to request the storage address for saving the first content. In response to the first request, the first application returns the first storage address corresponding to the currently displayed first interface to the sharing service. The sharing service then saves the first content to the first storage address.

[0018] According to the first aspect, or any implementation of the first aspect above, the method further includes: displaying a second interface of the first application in response to a second operation by the user; registering a second storage address corresponding to the second interface with the sharing service; receiving second content sent by the second electronic device in response to the second electronic device approaching the first electronic device; and saving the second content to the second storage address.

[0019] For example, the first electronic device can also register a storage address with the sharing service after switching the display interface of the first application, based on the new display interface. Then, when the first electronic device detects the approach of the second electronic device, the sharing service in the first electronic device determines that the currently displayed second interface has registered a storage address and can request the storage address registered by the second interface from the corresponding first application. Accordingly, the first application can provide the sharing service with the second storage address pre-configured for the second interface. In this way, the sharing service can save the shared content sent by the second electronic device to that second storage address.

[0020] In this way, the first electronic device can obtain the storage address corresponding to the current display interface based on the changes in the display interface, and can flexibly save the received shared content.

[0021] According to the first aspect, or any implementation of the first aspect above, the method further includes: during the display of the first interface of the first application, in response to a third operation by the user, displaying a third interface of the first application, or exiting the first application. The first application unregisters with the sharing service.

[0022] According to the first aspect, or any implementation of the first aspect above, the third interface is not configured with a corresponding storage address.

[0023] Thus, when the first electronic device ends the display of the first application or switches to an interface displaying an unconfigured storage address, it can unregister with the sharing service, thereby avoiding any impact on the subsequent sharing process.

[0024] According to the first aspect, or any implementation of the first aspect above, the method further includes: during the display of the first interface of the first application, in response to a fourth user operation, displaying a fourth interface of the first application, the fourth interface corresponding to a third storage address; receiving third content sent by the second electronic device as the second electronic device approaches the first electronic device; and saving the third content to a default storage address corresponding to the first format if the first format of the third content does not match the second format indicated by the third storage address.

[0025] In this way, when the first electronic device receives shared content that does not match the storage address format corresponding to the current display interface, it can still save the shared content through the default storage address, thus meeting the user's subsequent usage needs.

[0026] According to the first aspect, or any implementation of the first aspect above, the first electronic device displays a first window and a second window, the first window being the focus window, displaying a first interface of the first application, and the second window displaying a fifth interface of the second application; the method further includes: detecting that the second electronic device is close to a first display area of ​​the second window on the display screen of the first electronic device, the first display area not being covered by the first window; receiving fourth content sent by the second electronic device; and saving the fourth content to a fourth storage address corresponding to the fifth interface.

[0027] In this way, even when displaying multiple windows, the first electronic device can flexibly send or receive shared content based on user operations, thus providing users with more sharing scenarios.

[0028] According to the first aspect, or any implementation of the first aspect above, the method further includes: displaying the second window at the top level.

[0029] In this way, the first electronic device can set the window that needs to be shared as the focus window according to the user's sharing needs, thereby improving the user experience.

[0030] According to the first aspect, or any implementation of the first aspect above, after detecting that the second electronic device is close to the first display area of ​​the second window on the display screen of the first electronic device, the method further includes: displaying a selection animation of the second window.

[0031] In this way, dynamic effects can enrich the user's interactive experience.

[0032] According to the first aspect, or any implementation of the first aspect above, detecting that the second electronic device is close to the first electronic device includes: detecting that the second electronic device is close to a second display area in the first window on the display screen of the first electronic device.

[0033] In this way, the first electronic device can determine the application that needs to be interacted with based on the window corresponding to the proximity of the second electronic device.

[0034] According to the first aspect, or any implementation of the first aspect above, before saving the first content to the first storage address, the method further includes: displaying a first identifier corresponding to the first content and a second identifier corresponding to the first application. A fifth operation is detected where the user selects the second identifier.

[0035] In response to a user's sharing action, the first electronic device can save the shared content to the location the user intends to store, based on the current interface display and registration information, thereby meeting the user's needs and achieving a WYSIWYG user experience.

[0036] According to the first aspect, or any implementation of the first aspect above, detecting that the second electronic device is close to the first electronic device includes: determining that the second electronic device is close to the first electronic device based on first detection data from a sensor, wherein the sensor is an NFC sensor and / or an accelerometer. Alternatively, determining that the second electronic device is close to the first electronic device based on second detection data from the display screen of the first electronic device, wherein the second detection data includes capacitance data.

[0037] In this way, the first electronic device can determine the presence of a nearby second electronic device through various means, thereby establishing a communication connection with the second electronic device to facilitate the sending or receiving of subsequent shared content and improve the user's operating experience in the sharing scenario.

[0038] According to the first aspect, or any implementation thereof, the first application registers with the sharing service, including: the first application registers a first capability and / or a second capability corresponding to the first application with the sharing service, wherein the first capability indicates that the first application can save received content, and the second capability indicates that the first application has content to be shared. During the display of the first application, after detecting that a second electronic device is close to the first electronic device, the method further includes: based on the proximity of the second electronic device to the first electronic device, sending fifth content to be shared to the second electronic device, wherein the fifth content instructs the second electronic device to save the fifth content to a fifth storage address, the fifth storage address being the storage address corresponding to the currently displayed interface of the second electronic device.

[0039] In this way, when both electronic devices contain shared content, interaction between their respective shared content is possible. Furthermore, both electronic devices can flexibly save shared content based on their storage address registration, enhancing the user experience.

[0040] According to the first aspect, or any implementation of the first aspect above, the first electronic device displays a first window and a third window, the first window being the focus window, displaying a first interface of the first application, and the third window displaying a sixth interface of a third application, wherein the third application has registered its corresponding third capability with the sharing service; the method further includes: detecting that the second electronic device is close to a third display area in the third window on the display screen of the first electronic device, the third display area not being covered by the first window; sending sixth content displayed on the sixth interface to the second electronic device, the sixth content instructing the second electronic device to save the sixth content to a sixth storage address, the sixth storage address being the storage address corresponding to the currently displayed interface of the second electronic device.

[0041] In this way, even when displaying multiple windows, the first electronic device can flexibly send or receive shared content based on user operations, thus providing users with more sharing scenarios.

[0042] According to the first aspect, or any implementation of the first aspect above, receiving the first content sent by the second electronic device includes: receiving the first content sent by the second electronic device through a first connection; wherein, the first connection is a communication connection established after the first electronic device detects that the second electronic device is close to the first electronic device, or, the first connection is a communication connection that already exists between the first electronic device and the second electronic device.

[0043] Secondly, a first electronic device is provided. The first electronic device includes a processor, a memory, and a display screen. The memory and display screen are coupled to the processor. The memory stores computer program code, including computer instructions. When the processor reads the computer instructions from the memory, the first electronic device executes the following: responding to a first user operation, launching a first application; registering the first application with a sharing service; detecting a second electronic device approaching the first electronic device while displaying the first application; receiving first content sent by the second electronic device; and saving the first content to a first storage address corresponding to the first application; wherein the first storage address is obtained based on the first application's registration with the sharing service.

[0044] According to the second aspect, saving the first content to the first storage address corresponding to the first application includes: obtaining the first storage address corresponding to the first interface currently displayed by the first application; and saving the first content to the first storage address.

[0045] According to the second aspect, or any implementation of the second aspect above, the first application registers with the sharing service, including: registering with the sharing service the first storage address corresponding to the first interface currently displayed by the first application.

[0046] According to the second aspect, or any implementation of the second aspect above, the first application registers with the sharing service, including: registering a first capability of the first application with the sharing service, wherein the first capability indicates that the first application is able to save received content.

[0047] According to the second aspect, or any implementation thereof, saving the first content to the first storage address corresponding to the first application includes: the sharing service sending a first request to the first application based on the first capability registered by the first application, the first request being used to request the storage address for saving the first content. In response to the first request, the first application returns the first storage address corresponding to the currently displayed first interface to the sharing service. The sharing service then saves the first content to the first storage address.

[0048] According to the second aspect, or any implementation of the second aspect above, when the processor reads computer instructions from memory, it further causes the first electronic device to perform the following: In response to a second operation by the user, displaying a second interface of the first application; registering a second storage address corresponding to the second interface with the sharing service; during the display of the second interface, receiving second content sent by the second electronic device in response to the second electronic device approaching the first electronic device; and saving the second content to the second storage address.

[0049] According to the second aspect, or any implementation of the second aspect above, when the processor reads computer instructions from memory, it further causes the first electronic device to: during the display of the first interface of the first application, in response to a third operation by the user, display the third interface of the first application, or exit the first application. The first application unregisters with the sharing service.

[0050] According to the second aspect, or any implementation of the second aspect above, the third interface is not configured with a corresponding storage address.

[0051] According to the second aspect, or any implementation thereof, when the processor reads computer instructions from memory, it further causes the first electronic device to: during the display of a first interface of the first application, in response to a fourth user operation, display a fourth interface of the first application, the fourth interface corresponding to a third storage address. The second electronic device receives third content sent by the second electronic device when it approaches the first electronic device. If the first format of the third content does not match the second format indicated by the third storage address, the third content is saved to the default storage address corresponding to the first format.

[0052] According to the second aspect, or any implementation of the second aspect above, the first electronic device displays a first window and a second window, the first window being the focus window, displaying a first interface of the first application, and the second window displaying a fifth interface of the second application; when the processor reads computer instructions from memory, it further causes the first electronic device to execute: detecting that the second electronic device is close to a first display area in the second window on the display screen of the first electronic device, the first display area not being covered by the first window; receiving fourth content sent by the second electronic device; and saving the fourth content to a fourth storage address corresponding to the fifth interface.

[0053] According to the second aspect, or any implementation of the second aspect above, when the processor reads computer instructions from memory, it also causes the first electronic device to execute: display the second window at the top level.

[0054] According to the second aspect, or any implementation of the second aspect above, when the processor reads computer instructions from memory, it also causes the first electronic device to execute: displaying the selection animation of the second window.

[0055] According to the second aspect, or any implementation of the second aspect above, detecting that the second electronic device is close to the first electronic device includes: detecting that the second electronic device is close to a second display area in the first window on the display screen of the first electronic device.

[0056] According to the second aspect, or any implementation of the second aspect above, when the processor reads computer instructions from memory, it further causes the first electronic device to execute: displaying a first identifier corresponding to the first content and a second identifier corresponding to the first application. A fifth operation is detected whereby the user selects the second identifier.

[0057] According to the second aspect, or any implementation of the second aspect above, detecting that the second electronic device is close to the first electronic device includes: determining that the second electronic device is close to the first electronic device based on first detection data from a sensor, wherein the sensor is an NFC sensor and / or an accelerometer. Alternatively, determining that the second electronic device is close to the first electronic device based on second detection data from the display screen of the first electronic device, wherein the second detection data includes capacitance data.

[0058] According to the second aspect, or any implementation thereof, the first application registers with the sharing service, including: the first application registers a first capability and / or a second capability corresponding to the first application with the sharing service, wherein the first capability indicates that the first application can save received content, and the second capability indicates that the first application has content to be shared. During the display of the first application, after detecting that a second electronic device is close to the first electronic device, the method further includes: based on the proximity of the second electronic device to the first electronic device, sending fifth content to be shared to the second electronic device, wherein the fifth content instructs the second electronic device to save the fifth content to a fifth storage address, the fifth storage address being the storage address corresponding to the current display interface of the second electronic device.

[0059] According to the second aspect, or any implementation of the second aspect above, the first electronic device displays a first window and a third window, the first window being the focus window, displaying a first interface of the first application, and the third window displaying a sixth interface of a third application, wherein the third application has registered its corresponding third capability with the sharing service. When the processor reads computer instructions from memory, it also causes the first electronic device to execute: detecting that the second electronic device is close to a third display area in the third window on the display screen of the first electronic device, the third display area not being covered by the first window; sending the sixth content displayed on the sixth interface to the second electronic device, the sixth content instructing the second electronic device to save the sixth content to a sixth storage address, the sixth storage address being the storage address corresponding to the currently displayed interface of the second electronic device.

[0060] According to the second aspect, or any implementation thereof, receiving the first content sent by the second electronic device includes: receiving the first content sent by the second electronic device through a first connection; wherein the first connection is a communication connection established after the first electronic device detects that the second electronic device is close to the first electronic device, or the first connection is a communication connection that already exists between the first electronic device and the second electronic device.

[0061] Thirdly, a content saving method is provided, comprising: a sharing service receiving a first registration request sent by a first application after its launch; the sharing service completing the registration of the first application according to the first registration request; during the display of the first application, the sharing service receiving first content; and in response to the received first content, the sharing service saving the first content to a first storage address corresponding to the first application, wherein the first storage address is obtained by the sharing service based on the registration of the first application with the sharing service.

[0062] According to the third aspect, the sharing service saves the first content to the first storage address corresponding to the first application, including: the sharing service obtaining the first storage address corresponding to the first interface currently displayed by the first application. The sharing service saves the first content to the first storage address.

[0063] According to the third aspect, or any implementation of the third aspect above, the first registration request is used to request the registration of the first storage address corresponding to the first interface currently displayed by the first application.

[0064] According to the third aspect, or any implementation of the third aspect above, the first registration request is used to request a first capability of the first application, the first capability indicating that the first application can save the received content.

[0065] According to the third aspect, or any implementation thereof, saving the first content to the first storage address corresponding to the first application includes: the sharing service sending a first request to the first application based on the first capability registered by the first application, the first request being used to request the storage address for saving the first content. In response to the first request, the first application returns the first storage address corresponding to the currently displayed first interface to the sharing service. The sharing service then saves the first content to the first storage address.

[0066] According to the third aspect, or any implementation of the third aspect above, the method further includes: the sharing service receiving a second registration request sent by the first application after displaying the second interface. Based on the second registration request, the sharing service completes registration of the second storage address corresponding to the second interface. During the process of the first application displaying the second interface, the sharing service receives second content. In response to the received second content, the sharing service saves the second content to the second storage address.

[0067] According to the third aspect, or any implementation of the third aspect above, the method further includes: the sharing service receiving a deregistration request sent by the first application, the deregistration request being sent by the first application after switching to displaying the third interface, or after the first application exits. The sharing service then completes the deregistration of the first application based on the deregistration request.

[0068] According to the third aspect, or any implementation of the third aspect above, the third interface is not configured with a corresponding storage address.

[0069] According to the third aspect, or any implementation of the third aspect above, the method further includes: during the process of the first application displaying the fourth interface, the sharing service receives third content. The sharing service obtains the third storage address corresponding to the fourth interface. If the first format of the third content does not match the second format indicated by the third storage address, the sharing service saves the third content to the default storage address corresponding to the first format.

[0070] According to the third aspect, or any implementation of the third aspect above, the first registration request is used to register the first capability and / or second capability corresponding to the first application with the sharing service. The first capability indicates that the first application can save the received content, and the second capability indicates that the first application has content to be shared.

[0071] Fourthly, a first electronic device is provided. The first electronic device includes a processor, a memory, and a display screen. The memory and the display screen are coupled to the processor. The memory stores computer program code, which includes computer instructions. When the processor reads the computer instructions from the memory, the first electronic device performs the method of the third aspect or any embodiment of the third aspect.

[0072] Fifthly, an electronic device is provided that has the function of implementing the method as described in the first aspect and any of its possible implementations; or, the electronic device has the function of implementing the method as described in the third aspect and any of its possible implementations. This function can be implemented in hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above-described function.

[0073] Sixthly, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program (also referred to as instructions or code) that, when executed by an electronic device, causes the electronic device to perform the method of the first aspect or any embodiment thereof; or causes the electronic device to perform the method of the third aspect or any embodiment thereof.

[0074] In a seventh aspect, a computer program product is provided that, when run on an electronic device, causes the electronic device to perform the method of the first aspect or any one of the embodiments of the first aspect; or causes the electronic device to perform the method of the third aspect or any one of the embodiments of the third aspect.

[0075] Eighthly, a circuit system is provided, the circuit system including a processing circuit configured to perform the method of the first aspect or any embodiment of the first aspect; or, the processing circuit is configured to perform the method of the third aspect or any embodiment of the third aspect.

[0076] A ninth aspect provides a chip system including at least one processor and at least one interface circuit, wherein the at least one interface circuit is configured to perform transceiver functions and send instructions to the at least one processor, wherein when the at least one processor executes instructions, the at least one processor performs the method of the first aspect or any embodiment thereof; or, the at least one processor performs the method of the third aspect or any embodiment thereof.

[0077] The technical effects of the aforementioned aspects can be referenced from each other, and will not be elaborated further here. Attached Figure Description

[0078] Figure 1 This application provides a schematic diagram of a sharing scenario. Figure 1 ;

[0079] Figure 2 This is a schematic diagram of the shared content format provided in the embodiments of this application;

[0080] Figure 3 This application provides a schematic diagram of a sharing scenario. Figure 2 ;

[0081] Figure 4 A schematic diagram of the architecture of a communication system for a content storage method provided in this application embodiment;

[0082] Figure 5A A schematic diagram of the hardware structure of the first electronic device provided in an embodiment of this application;

[0083] Figure 5B A schematic diagram of the software architecture of the first electronic device provided in an embodiment of this application;

[0084] Figure 6A This is a schematic diagram of the capacitor module arrangement scenario provided in the embodiments of this application;

[0085] Figure 6B A schematic diagram of the area on the display screen of the second electronic device near the first electronic device provided in an embodiment of this application;

[0086] Figure 6C This is a schematic diagram illustrating the determination of the type of conductor near the subject of this application.

[0087] Figure 7 A schematic diagram illustrating the process of registering the storage address as provided in this application embodiment;

[0088] Figure 8 A schematic diagram illustrating the process of deregistering the storage address provided in this application embodiment;

[0089] Figure 9 This is a schematic diagram illustrating a content storage scenario provided in an embodiment of this application.

[0090] Figure 10 This application provides a schematic diagram of a content storage scenario. Figure 1 ;

[0091] Figure 11 This application provides a schematic diagram of a content storage scenario. Figure 2 ;

[0092] Figure 12 This application provides a schematic diagram of a content storage scenario. Figure 3 ;

[0093] Figure 13 This application provides a schematic diagram of a content storage scenario. Figure 4 ;

[0094] Figure 14 Diagram 5 illustrates a content storage scenario provided in this application embodiment;

[0095] Figure 15 Sixth illustration of a content storage scenario provided for embodiments of this application;

[0096] Figure 16 This application provides a schematic diagram of a content storage scenario. Figure 7 ;

[0097] Figure 17 This application provides a schematic diagram of a content storage scenario. Figure 8 ;

[0098] Figure 18 This application provides a schematic diagram of a content storage scenario. Figure 9 ;

[0099] Figure 19 A flowchart illustrating a content saving method provided in an embodiment of this application;

[0100] Figure 20 A schematic diagram of the structure of the first electronic device provided in an embodiment of this application. Detailed Implementation

[0101] The technical solutions of the embodiments of this application are described below with reference to the accompanying drawings. In the description of the embodiments of this application, the terminology used in the following embodiments is for the purpose of describing specific embodiments only and is not intended to be a limitation of this application. As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to include expressions such as “one or more,” unless the context clearly indicates otherwise. It should also be understood that in the following embodiments of this application, “at least one” and “one or more” refer to one or more (including two).

[0102] References to "one embodiment" or "some embodiments" in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized. The term "connection" includes direct connections and indirect connections, unless otherwise stated. "First" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated.

[0103] In the embodiments of this application, the words "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of the words "exemplarily" or "for example" is intended to present the relevant concepts in a specific manner.

[0104] In some embodiments, electronic devices support sharing across devices. For example, such as... Figure 1 As shown, devices A and B detect a user's "tap-to-share" action, triggering content sharing. During content sharing, if device A and / or device B have content to be shared, they can send that content to the other device. For example, if device A has content to be shared, it can send it to device B. Or, if device B has content to be shared, it can send it to device A. Furthermore, if both device A and device B have content to be shared, device A can send the content to be shared to device B, and device B can send the content to be shared to device A, achieving two-way interaction for content sharing.

[0105] Optionally, such as Figure 2 As shown, the format of the content to be shared can be, for example, file, special format, media, or other formats. File formats include, for example, PPT and Zip; special formats include, for example, Vcard and LRF; and media formats include, for example, JPG and MP4. Different applications support different content formats. For example, file management applications can handle file-type content. Special format content requires processing by specific applications. Gallery applications, memo applications, and other applications can handle media-type content. Optionally, the receiving device typically sets default storage addresses for different content formats. After receiving content shared by the sending device, the receiving device can save the content to the corresponding default storage address based on its format.

[0106] For example, the Notes app supports processing hdoc format content. When the receiving device receives hdoc format content, it can save the content to the Notes app's storage address, and the Notes app will be launched by default to process the content.

[0107] For example, many applications, such as the Gallery app and the Notes app, support processing media formats like images. The Gallery app is generally the default application for processing media formats. Therefore, when the receiving device receives an image from the sending device while displaying the Notes app, it saves the image to the Gallery app's default storage location. If the user instructs the receiving device to add the image to the Notes app, the user would also need to instruct the Notes app to copy the image from the Gallery app's default storage location, which obviously requires additional steps and makes the whole process cumbersome.

[0108] In another cross-device sharing scenario, after the sending and receiving devices establish a communication connection, the user can perform a copy operation on the sending device and then a paste operation on the receiving device. In this way, the receiving device can directly save the content to the storage address of the application to be used, thereby reducing the number of steps required by the user.

[0109] For example, such as Figure 3 As shown, after the sending device 31 and the receiving device 32 establish a communication connection, the sending device 31 can copy various types of content, such as text, images, and videos, to the clipboard application according to user operations. Then, while displaying an application, the receiving device 32 can save the content from the clipboard application to the application's storage address by pasting it according to the user's paste operation in the application interface.

[0110] In the above scenario, although users can flexibly choose the storage location for the shared content on the receiving device, reducing some operations, the actual steps are still relatively numerous: the user needs to perform a copy operation on the sending device and then a paste operation on the receiving device. Furthermore, the current scenario requires the sending and receiving devices to be devices registered under the same account, thus limiting cross-device sharing.

[0111] Therefore, this application provides a content saving method, which enables the receiving device to flexibly save shared content according to the registered storage address of the current interface, thereby facilitating users to use the shared content on the current interface, simplifying user operations, and improving the user experience.

[0112] For example, Figure 4 This is a schematic diagram of the architecture of a communication system for a content storage method provided in an embodiment of this application. Figure 4 As shown, the communication system includes a first electronic device 100 and a second electronic device 200.

[0113] In some embodiments, the first electronic device 100 can obtain a proximity event of the second electronic device 200 through proximity detection and obtain the proximity position of the second electronic device 200. Alternatively, the second electronic device 200 can obtain a proximity event of the first electronic device 100 through proximity detection and obtain the proximity position of the first electronic device 100. Optionally, in response to a proximity event, the first electronic device 100 can establish a short-range communication connection with the second electronic device 200, and based on this short-range communication connection, content sharing can be realized.

[0114] In some embodiments, the second electronic device 200 can act as a content sender, sending content to the first electronic device 100. The first electronic device 100 can act as a content receiver, receiving content from the second electronic device 200. In other embodiments, the first electronic device 100 can act as a content sender, sending content to the second electronic device 200. The second electronic device 200 can act as a content receiver, receiving content from the first electronic device 100. That is, in the embodiments of this application, the first electronic device 100 or the second electronic device 200 can act as both a content sender and a content receiver. The technical solutions provided in the embodiments of this application can be applied to various content sharing scenarios. For example, the content may include, but is not limited to, one or more of files, services, application interfaces, etc.

[0115] For example, the first electronic device 100 or the second electronic device 200 may include, but is not limited to, mobile phones, laptops, tablets, desktop computers, handheld computers, ultra-mobile personal computers (UMPCs), netbooks, and various electronic devices equipped with displays, such as personal digital assistants (PDAs), augmented reality (AR) devices, virtual reality (VR) devices, artificial intelligence (AI) devices, wearable devices, in-vehicle devices, smart home devices, and / or smart city devices. Optionally, the first electronic device 100 and the second electronic device 200 may be fixed devices or portable devices. The first electronic device 100 and the second electronic device 200 may be the same type of electronic device or different types of electronic devices.

[0116] Optionally, the operating systems installed on the first electronic device 100 and the second electronic device 200 may include, but are not limited to, those for... Or other operating systems.

[0117] Optionally, the first electronic device 100 and the second electronic device 200 in the embodiments of this application can be implemented by different devices. Different devices can have the same, similar, or somewhat different hardware structures, for example... Figure 5A The hardware structure.

[0118] For example, the first electronic device 100 has such Figure 5A Taking the hardware structure as an example, for Figure 5A The hardware structure will be explained.

[0119] For example, Figure 5A A schematic diagram of the hardware structure of a first electronic device 100 provided in an embodiment of this application is shown. Figure 5AAs shown, the first electronic device 100 may include a processor 510, an external memory interface 520, an internal memory 521, a universal serial bus (USB) interface 530, a charging management module 540, a power management module 541, a battery 542, an antenna 1, an antenna 2, a mobile communication module 550, a wireless communication module 560, an audio module 570, a sensor module 580, a button 590, a motor 591, an indicator 592, a camera 593, a display screen 594, and a subscriber identification module (SIM) card interface 595, etc.

[0120] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the first electronic device 100. In other embodiments of this application, the first electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0121] Processor 510 may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). These different processing units may be independent devices or integrated into one or more processors.

[0122] The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.

[0123] The processor 510 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 510 is a cache memory. This memory can store instructions or data that the processor 510 has just used or that are used repeatedly. If the processor 510 needs to use the instruction or data again, it can directly retrieve it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 510, and thus improves the efficiency of the system.

[0124] The MIPI interface can be used to connect the processor 510 to peripheral devices such as the display screen 594 and the camera 593. The MIPI interface includes a camera serial interface (CSI) and a display serial interface (DSI). In some embodiments, the processor 510 and the camera 593 communicate via the CSI interface to realize the shooting function of the first electronic device 100. The processor 510 and the display screen 594 communicate via the DSI interface to realize the display function of the first electronic device 100.

[0125] The wireless communication function of the first electronic device 100 can be implemented through antenna 1, antenna 2, mobile communication module 550, wireless communication module 560, modem processor, and baseband processor.

[0126] The wireless communication module 560 can provide solutions for wireless communication applications on the first electronic device 100, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 560 can be one or more devices integrating at least one communication processing module. The wireless communication module 560 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 510. The wireless communication module 560 can also receive signals to be transmitted from processor 510, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.

[0127] In some embodiments, antenna 1 of the first electronic device 100 is coupled to mobile communication module 550, and antenna 2 is coupled to wireless communication module 560, enabling the first electronic device 100 to communicate with networks and other devices via 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 technologies, etc. The GNSS may include the Global Positioning System (GPS), the Global Navigation Satellite System (GLONASS), the BeiDou Navigation Satellite System (BDS), the Quasi-Zenith Satellite System (QZSS), and / or satellite-based augmentation systems (SBAS).

[0128] In some embodiments, when the first electronic device 100 is a content sender, the wireless communication module 560 can be used to send content from the first electronic device 100 to the second electronic device 200. When the first electronic device 100 is a content receiver, the wireless communication module 560 can be used to receive content shared by the second electronic device 200.

[0129] The first electronic device 100 implements display functions through a GPU, a display screen 594, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 594 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. The processor 510 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0130] Display screen 594 is used to display images, videos, etc. Display screen 594 includes a display panel. The display panel can be manufactured using a liquid crystal display (LCD), such as an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a mini-LED, a micro-LED, a micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the first electronic device 100 may include one or N displays 594, where N is a positive integer greater than 1.

[0131] Internal memory 521 can be used to store computer executable program code, which includes instructions. Internal memory 521 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of the first electronic device 100 (such as audio data, phonebook, etc.). Furthermore, internal memory 521 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc. Processor 510 executes various functional applications and data processing of the first electronic device 100 by running instructions stored in internal memory 521 and / or instructions stored in memory disposed in the processor.

[0132] In some embodiments, the internal memory 521 may also be used to store a preset model that can be used to determine whether an object near the display screen of the first electronic device 100 is an electronic device.

[0133] The electronic devices (such as the first electronic device 100 or the second electronic device 200) provided in this application embodiment can run an operating system (OS). This operating system can be various operating systems used in industry, such as operating systems developed based on OpenHarmony, like HarmonyOS; or other operating systems such as Android™, iOS mobile operating systems; it can also be various open-source operating systems or their derivatives, such as Linux OS, and other embedded operating systems; or it can be a future new operating system, such as an AI operating system based on artificial intelligence. An operating system is a set of interconnected system software programs that manage and control the operation of electronic devices, utilize and run hardware and software resources, and provide public services to organize user interaction. In electronic devices, the operating system connects downwards to the physical devices at the hardware layer and provides a runtime environment for application software upwards.

[0134] An operating system typically includes a kernel layer, a middleware layer, and an application layer. The application layer includes applications, which can include system applications and third-party applications. The middleware layer includes a suite of software providing various services to application developers, or frameworks providing services such as databases, multimedia, and graphics, or capabilities such as distributed scheduling and system scaling. For example, the middleware layer may include a framework layer and / or a system service layer. The framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer. The system service layer includes the system's core capabilities, providing services to applications through the framework layer. The kernel layer is the layer between hardware and software. The kernel layer may include hardware drivers and the operating system kernel. In addition to providing hardware drivers, the kernel layer also supports functions such as memory management and system process management.

[0135] The electronic devices we use in our daily lives come in various types and forms, and are applied in a wide range of scenarios. Therefore, based on the different forms and functions of electronic devices, different application scenarios, and different user needs, the operating systems used in these devices may also differ. The basic functions implemented by the electronic device provided in this application can be implemented using a general-purpose operating system or a dedicated operating system. To more clearly illustrate the implementation of the embodiments of this application under a specific operating system, the architecture of HarmonyOS is shown below. Those skilled in the art can deduce the implementation of the embodiments of this application under other specific operating systems, such as Android™.

[0136] For example, such as Figure 5BAs shown, the software architecture of an electronic device can be divided into several layers. In some embodiments, from bottom to top, these layers are: kernel layer, system service layer, framework layer, and application layer. Layers communicate with each other through software interfaces. System functions can be tailored, added, or combined at the subsystem granularity in different device deployment scenarios, and each subsystem can also be tailored, added, or combined at the functional granularity.

[0137] The kernel layer includes the kernel abstract layer (KAL), kernel subsystems, driver subsystems, etc.

[0138] KAL provides basic kernel capabilities to the upper layers by shielding the differences between multiple kernels, including but not limited to process / thread management, memory management, file system, network management, and peripheral device management.

[0139] The kernel subsystem supports selecting a suitable OS kernel for different resource-constrained devices, including but not limited to Linux kernel, HarmonyOS kernel, LiteOS (Lite Operating System), etc.

[0140] The driver subsystem includes the driver framework, which forms the foundation for the system's open hardware ecosystem, providing unified peripheral access capabilities and a framework for driver development and management. The driver framework includes: display drivers, camera drivers, audio drivers, Bluetooth drivers, sensor drivers, etc.

[0141] The system service layer comprises the core capabilities of the system, providing services to applications through the framework layer. This layer includes, but is not limited to, the following subsystems:

[0142] The system's basic capability subsystem set provides fundamental capabilities for the operation, scheduling, and migration of distributed applications across multiple devices. This set may include distributed soft bus, distributed data management, distributed task scheduling, and Ark multi-language runtime; it may also include multi-modal input subsystem, graphics subsystem, security subsystem, AI business subsystem, and sharing services.

[0143] Basic software service subsystem set: provides public and general software services; the basic software service subsystem set may include event notification subsystem, telephone service subsystem, multimedia subsystem, etc.

[0144] Enhanced software service subsystem suite: Provides differentiated enhanced software services for different devices; the enhanced software service subsystem suite may include smart screen proprietary business subsystem, wearable proprietary business subsystem, IoT proprietary business subsystem, etc.

[0145] Hardware service subsystem set: Provides hardware services; the hardware service subsystem set may include location service subsystem, user IAM (Identity and Access Management) subsystem, wearable proprietary hardware service subsystem, biometric identification, IoT proprietary hardware service subsystem, etc.

[0146] Distributed task scheduling enables distributed service management (discovery, synchronization, registration, and invocation), supporting remote startup, remote invocation, remote connection, and migration of applications across devices.

[0147] Distributed data management enables data synchronization, data storage, data sharing, and data access across all scenarios and devices.

[0148] The distributed soft bus provides communication-related capabilities for seamless interconnection between multiple devices, including WLAN service capabilities, Bluetooth service capabilities, soft bus, and StarFlash communication capabilities.

[0149] Ark Multilingual Runtime is a unified compilation runtime platform designed to support the joint compilation and execution of multiple programming languages ​​and multiple chip platforms.

[0150] The framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer. The framework layer includes: the ArkUI framework (which provides a complete infrastructure for UI development of system applications, including UI functions such as components, layouts, animations, and interactive events, as well as a real-time interface preview tool), the user application framework, and the Ability framework (an Ability is a lightweight application; the Ability framework schedules and manages the operation and lifecycle of Abilities). Different devices may have different operating systems, and the APIs they support may also differ.

[0151] The HarmonyOS API is a series of open capabilities provided to support HarmonyOS application development. The HarmonyOS API can be set at the framework layer or independently of the framework layer. The HarmonyOS API includes the Audio API (audio service), Push API (push service), and Account API (account service), among others.

[0152] The application layer includes multiple applications. These applications can include system applications and extended / third-party applications. System applications can include the desktop, control bar, settings, contacts, phone, camera, etc., while extended / third-party applications can include social applications, travel applications, etc.

[0153] based on Figure 5A The hardware structure shown and Figure 5B The software structure shown below illustrates the content saving method provided in the embodiments of this application.

[0154] In some embodiments, a user can trigger the content sharing process between different electronic devices in various ways. For example, a user can bring a sending device close to a receiving device to trigger the sending device to share content with the receiving device. It should be understood that after an electronic device detects that another electronic device is nearby, the device containing the content to be shared can be the sending device. For example, if a first electronic device is close to a second electronic device, both the first and / or the second electronic device may be the sending device.

[0155] Optionally, "the sending device is close to the receiving device" includes situations where the distance between the sending and receiving devices is less than or equal to a preset threshold. In some scenarios, this proximity includes proximity before contact, as well as proximity when the devices actually touch. For example, the sending device touches the receiving device, or the receiving device touches the sending device. For instance, the sending device touches the NFC detection area of ​​the receiving device. Another example is the sending device touching the display screen of the receiving device. Yet another example is the sending device being close to the display screen of the receiving device, but not yet touching it.

[0156] The following section provides examples of several implementation methods for proximity detection of electronic devices.

[0157] In some examples, electronic devices use NFC detection, accelerometer (ACC) collision detection, or other methods to determine if they have detected a user's "tap-to-pay" action and can identify the other electronic device. This allows them to share content with the other electronic device or share content from the other electronic device to their own. For example, ... Figure 1 As shown, device A detects device B through the NFC detection function and can determine to send shared content to device B.

[0158] In other examples, the first electronic device can be placed close to the display screen of the second electronic device to share content from the first electronic device to the second electronic device, or vice versa. In this embodiment, the second electronic device can be any electronic device equipped with a display screen. In still other embodiments, the second electronic device can be placed close to the display screen of the first electronic device to share content from the first electronic device to the second electronic device, or vice versa. In this embodiment, the first electronic device can be any electronic device equipped with a display screen. The following description uses the example of the first electronic device being close to the display screen of the second electronic device; similar implementations can be referenced for the implementation of the second electronic device being close to the display screen of the first electronic device.

[0159] It is understood that, in this embodiment of the application, "the first electronic device is close to the display screen of the second electronic device" can mean that the distance between the display screens of the first electronic device and the second electronic device meets a preset distance range. For example, the preset distance range can be less than or equal to a preset distance threshold, etc.

[0160] In some embodiments, when a first electronic device approaches the display screen of a second electronic device, the detection data corresponding to the display screen of the second electronic device changes, thereby allowing the second electronic device to determine that an electronic device (such as the first electronic device) is currently approaching its display screen. In this embodiment, as a specific implementation, taking a capacitive touchscreen as the display screen of the second electronic device and capacitance as the corresponding detection data, the process by which the second electronic device determines the presence of an electronic device approaching its display screen will be described.

[0161] A capacitive touchscreen may include one or more capacitor modules. When a charged conductor, such as a first electronic device, approaches the display screen of a second electronic device, the capacitance value of these capacitor modules changes (e.g., increases or decreases). This allows the second electronic device to determine that the first electronic device is currently near its display screen. In some embodiments, these capacitor modules may be distributed across different areas of the capacitive touchscreen. When a charged conductor, such as a first electronic device, approaches a certain area of ​​the display screen of the second electronic device, the capacitance value of the capacitor module located in the corresponding area changes. This allows the second electronic device to determine which area of ​​its display screen the first electronic device is near. In other words, in this embodiment, the second electronic device can not only determine whether the first electronic device is near its display screen, but also which area of ​​its display screen the first electronic device is near.

[0162] Optionally, the one or more capacitor modules described above can be composed of horizontally arranged electrode arrays and vertically arranged electrode arrays. In some implementations, such asFigure 6A As shown, two sets of electrodes (such as horizontal electrode 61 and vertical electrode 62) form a capacitor 63 at their intersection. That is, a horizontally arranged electrode and the vertically arranged electrode that intersects it each form the two poles of a capacitor, thus constituting a capacitor module. When the first electronic device approaches the display screen of the second electronic device, it affects the coupling between the two electrodes near the proximity point, thereby changing the capacitance between these two electrodes and causing a change in the capacitance value. This results in a change in the capacitance value of the capacitor module near the proximity point. When detecting the capacitance value, the horizontally arranged electrodes can sequentially emit excitation signals, and all the vertically arranged electrodes simultaneously receive the signals. This allows the capacitance values ​​of all intersection points (such as capacitor 63) on the display screen to be obtained, thus obtaining the capacitance value of each capacitor module.

[0163] Of course, in other implementations, horizontally arranged electrodes and vertically arranged electrodes can also form a capacitor with ground, that is, form a capacitor module. Alternatively, the capacitance value of all the capacitors to ground on the display screen can be obtained by detecting the capacitance between the electrodes and ground, that is, the capacitance value of each capacitor module can be obtained.

[0164] Optionally, the aforementioned horizontally arranged electrode array and vertically arranged electrode array can be achieved by etching different ITO conductive circuit modules on two different nano-indium tin oxide (ITO) conductive glass coatings, with the etched patterns on the two modules being perpendicular to each other.

[0165] In other embodiments, the above-mentioned one or more capacitor modules may also be configured in other ways or have other arrangements, and this application embodiment does not impose specific limitations on this.

[0166] In some embodiments, since the change in capacitance of the display screen of the second electronic device caused by the first electronic device approaching the display screen of the second electronic device is relatively slight, in order to improve the accuracy of the second electronic device in determining that the first electronic device is approaching its display screen and reduce the judgment error, the second electronic device can use time-domain aggregation to determine whether the capacitance of the display screen has changed. The time-domain aggregation method refers to the second electronic device detecting the capacitance value of the display screen within a preset time period. When it is determined that the capacitance value of the display screen meets a preset condition within the preset time period, it is determined that the capacitance of the display screen has changed, and thus it can be determined that the first electronic device is approaching the display screen of the second electronic device. For example, in this embodiment, the preset condition may include a capacitance value change greater than or equal to a preset change threshold. Optionally, the change may include, for example, the difference between the average capacitance value detected over a period of time and a preset capacitance value. Optionally, the change may also include, for example, the difference between the average capacitance value of a certain area of ​​the display screen of the second electronic device detected over a period of time and the preset capacitance value. The preset capacitance value is, for example, a pre-configured reference capacitance value. The reference capacitance value may be the average value measured when no other conductor has historically approached the capacitive touchscreen of the second electronic device.

[0167] Similarly, to improve the accuracy of the second electronic device in determining which area of ​​its own display screen the first electronic device has approached and to reduce judgment errors, the second electronic device can use a combination of spatial and temporal aggregation to determine whether the capacitance of the display screen has changed. This combination of spatial and temporal aggregation means that the second electronic device detects the capacitance value of a certain area on the display screen. This area can be the area the first electronic device has approached, i.e., the area where the capacitance value has changed slightly. When the capacitance value of this area meets a preset condition within a preset time period, it is determined that the capacitance of the display screen has changed, and thus it can be determined which area of ​​its own display screen the first electronic device has approached. Figure 6B As shown, when the first electronic device approaches region 1 on the display screen of the second electronic device, the second electronic device detects a slight change in the capacitance value in region 1. Optionally, region 1 may include one or more capacitor modules as described above. The capacitance value of region 1 can be determined based on the capacitance value of each of these capacitor modules, such as the mean, median, or other numerical values ​​of these capacitor modules. Furthermore, it is detected whether the capacitance value of region 1 meets a preset condition within a preset time period. If the preset condition is met, the second electronic device can determine that the first electronic device is approaching region 1 on the display screen of the second electronic device.

[0168] In the above embodiment, the display screen of the second electronic device is a capacitive screen, and the detection data is capacitance. In other embodiments, the detection data can also be parameters converted from capacitance, such as current and voltage.

[0169] Similarly, when the display screen of the second electronic device is implemented as other types of screens, such as infrared touch screens or acoustic touch screens, it is also possible to determine whether the first electronic device is close to the display screen of the second electronic device by detecting whether the detection data corresponding to the display screen changes.

[0170] It is understood that in this embodiment, the first electronic device has a characteristic that can cause the detection data corresponding to the display screen to change, such as conductivity. That is, only when an object with this characteristic approaches the display screen of the second electronic device can the detection data corresponding to the display screen change; conversely, when an object without this characteristic approaches the second electronic device, the detection data corresponding to the display screen will not change.

[0171] In some embodiments, objects other than electronic devices may also possess characteristics that cause changes in the detection data corresponding to the display screen. For example, if the detection data is capacitance, when a human body part such as a finger approaches the display screen of the second electronic device, the capacitance value of the display screen may change. Therefore, to facilitate the second electronic device's identification of whether the object approaching its display screen is an electronic device or a finger, in some embodiments, the second electronic device can input the detected capacitance value of the display screen into a preset model, and output the identification result through this preset model.

[0172] Optionally, in this embodiment of the application, the preset model can be various deep learning models or machine learning models. For example, such as... Figure 6C As shown, the capacitance value of the display screen can be represented by the capacitance value distribution diagram 601 on the entire display screen. Each capacitance value included in the capacitance value distribution diagram 601 corresponds to the capacitance value of each capacitor module included in the display screen. It can be understood that the capacitance value distribution diagram 601 uses patterns to represent the capacitance value; different patterns represent different capacitance values, such as the patterns "×", " / ", "\", and "√". It can also be understood that when the second electronic device uses methods such as time-domain aggregation and spatial-domain aggregation as described above, each capacitance value included in the capacitance value distribution diagram 601 can be obtained by summing the capacitance values ​​of the same capacitor module detected by the second electronic device within a preset time period.

[0173] The capacitance value distribution map 601 can be input into a preset model 602, and the preset model 602 will output a recognition result 603. The recognition result 603 can be something like an electronic device approaching a display screen, or a finger approaching a display screen. Of course, in other examples, the capacitance value of the aforementioned display screen can also be a capacitance value distribution map corresponding to the approach area on the display screen, etc.

[0174] In the above embodiments, the determination of whether a first electronic device is near the display screen of the second electronic device is based on the detection data corresponding to the display screen of the second electronic device. In other embodiments, the second electronic device may also determine whether the first electronic device is near the second electronic device in other ways, such as detecting ultrasonic signals, near-field communication signals, or other types of wireless signals emitted by the other end, and thus determining whether the first electronic device is near the second electronic device.

[0175] In some examples, the display screen of the second electronic device is equipped with a touch sensor. When the first electronic device touches the display screen of the second electronic device, the second electronic device can determine the touch operation and the touch location based on the detection data from the touch sensor. Optionally, the display screen of the second electronic device is also equipped with a pressure sensor. Then, the second electronic device can determine the touch and the touch location of the first electronic device by combining the detection data from the pressure sensor.

[0176] The following section describes the content saving method provided in this application embodiment using the capacitance data of an electronic device's display screen to determine the proximity of other electronic devices to the display screen and to determine the location of the proximity. Other methods of determining the proximity of other electronic devices, such as those using pressure sensor detection data, are also implemented in the content saving method and will not be exemplified here.

[0177] In some embodiments, after detecting the proximity of the first electronic device through the various methods described in the examples above, the second electronic device can initiate a network connection with the first electronic device. In some embodiments, the first and second electronic devices can establish a short-range communication connection through near-field communication (NFC) technology. For example, this NFC technology may include, but is not limited to, Bluetooth, and satellite communication. As one possible implementation, the second electronic device can periodically send broadcast messages to the outside world. These broadcast messages may carry information identifying the second electronic device, such as its name, identifier, and address. Correspondingly, the first electronic device can receive the broadcast messages from the outside world, and upon receiving a broadcast message from the second electronic device, it can establish a communication connection with the second electronic device.

[0178] For example, after the second electronic device detects the approach of the first electronic device, it sends an instruction message to the first electronic device to trigger the establishment of a short-range communication connection with the first electronic device.

[0179] In some embodiments, since other electronic devices may be simultaneously broadcasting messages around the second electronic device, and these broadcast messages may have different purposes—for example, the first electronic device's broadcast message might be for content sharing, while the other electronic devices' broadcast messages might be for audio connection or other purposes—the second electronic device can identify which broadcast messages are for content sharing. Therefore, to facilitate the second electronic device's identification of which broadcast messages are for content sharing, the broadcast messages sent by the first electronic device can carry a specific identifier, which can be used to characterize that the broadcast message is for content sharing.

[0180] In some embodiments, the first electronic device and the second electronic device may have already established a communication connection before detecting each other's proximity. Therefore, after detecting each other's proximity, the first electronic device and the second electronic device do not need to re-establish a communication connection; instead, they can transmit the shared content based on the existing communication connection.

[0181] In some embodiments, after content sharing is completed, the first electronic device and the second electronic device can disconnect the short-range communication connection used to transmit the shared content. Optionally, after the short-range communication connection is disconnected, the second electronic device can again determine that the first electronic device is close by means of display capacitance value, NFC detection, etc., and trigger the re-establishment of a short-range communication connection with the first electronic device to share other content.

[0182] For example, after the second electronic device sends shared content to the first electronic device via a short-range communication connection, it can send an indication message to the first electronic device. This indication message can be sent separately or along with the last sent shared content. Based on this indication message, the first electronic device can determine that the current content sharing is complete and can disconnect the short-range communication connection with the second electronic device.

[0183] In some embodiments, after establishing a short-range communication connection, the second electronic device and the first electronic device can share content based on the short-range communication connection. Optionally, this content sharing may include, for example, the sharing of application interfaces, files, services, etc.

[0184] Optionally, as described above, the first or second electronic device can be either a transmitting device or a receiving device. Therefore, for the sake of simplicity, the following section uses the interaction process between the transmitting and receiving devices as an example to introduce various implementation scenarios of the content saving method provided in this application's embodiments.

[0185] In some embodiments, the receiving device needs to save the shared content after receiving it. In some examples, the shared content can be saved to a default storage address. In other examples, the shared content can be saved to a registered storage address. Optionally, before sharing content, the receiving device can register a storage address with the sharing service, thereby enabling the received shared content to be saved to the registered storage address during the sharing process. This is obviously more user-friendly than saving the shared content to a default storage address. It should be understood that the aforementioned "storage address" refers to the storage directory, storage location, etc., where the shared content is saved.

[0186] The following section will first introduce the registration process for storage addresses.

[0187] Figure 7 This is a schematic diagram illustrating the registration storage address provided in an embodiment of this application. It should be noted that this method does not rely on... Figure 7 The specific order described below is a limitation. It should be understood that in other embodiments, the order of some steps in the method can be interchanged according to actual needs, or some steps can be omitted or deleted. The method includes the following steps:

[0188] S701a, The application display interface of the sending device shows the content that can be sent and shared.

[0189] S702a, The application of the sending device sends a registration request to the sharing service of the sending device.

[0190] S701b, the application display interface of the receiving device shows the content that can be received and shared.

[0191] S702b: The application of the receiving device sends a registration request to the sharing service of the receiving device.

[0192] In some embodiments, while displaying an application interface, an electronic device may detect a user's sharing action, such as a "tap" action or a proximity to the display screen of another electronic device. In response to this sharing action, the electronic device can determine whether it needs to share its content to another electronic device or receive shared content from another electronic device. Before detecting this sharing action, the sharing service needs to obtain the registration information of the current application to determine whether the application supports sending and / or receiving shared content.

[0193] In some examples, after the application starts, it has the ability to send shareable content and can send a registration request to the sharing service to register this ability. Subsequently, the sharing service can request shareable content from the application based on its shared content sending capability. Optionally, the application includes multiple interfaces, some of which may support sending shareable content (e.g., interfaces that allow sending shareable content) or not (e.g., interfaces that do not allow sending shareable content). In this case, the application can register its shared content sending capability directly with the sharing service after startup, or it can register it after displaying an interface that allows sending shareable content. Optionally, the application may also choose not to register its shared content sending capability, but instead register it when displaying an interface that allows sending shareable content, and not register it when displaying an interface that does not allow sending shareable content. That is, the application can register its shared content sending capability with the sharing service to achieve unified registration for at least one interface within the application. Alternatively, the application can register each interface separately with the sharing service.

[0194] In other examples, after the application starts, it has the ability to receive shared content and can send a registration request to the sharing service to register its ability to receive shared content. Subsequently, the sharing service can send shared content to the application based on its content receiving capability. Upon receiving the shared content, the application can then save it to the storage address corresponding to the currently displayed application interface; this storage address can be understood as the registered storage address. Optionally, the application may include multiple interfaces, some of which may support receiving shared content (e.g., interfaces that can receive shared content) or not (e.g., interfaces that cannot receive shared content). In this case, the application can register its content receiving capability directly with the sharing service after startup, or it can register its content sending capability after displaying an interface that can send shared content. Optionally, the application may also choose not to register its content sending capability, but instead register the corresponding storage address with the sharing service when displaying an interface that can receive shared content, and not register when displaying an interface that cannot receive shared content. In other words, an application can register its ability to receive shared content with the sharing service, achieving unified registration for at least one interface within the application. Alternatively, an application can register the storage addresses for each interface separately with the sharing service.

[0195] Optionally, the registration request sent by the application to the sharing service carries registration information, which may include, for example, an application identifier, an application interface identifier, and a sharing content identifier. Optionally, the application interface identifier may be, for example, the main interface identifier of the application, or it may be directly the identifier of a sub-interface corresponding to the current application interface. That is, one or more interfaces among the multiple interfaces included in the application can support sending and / or receiving sharing content. Optionally, the sharing content identifier indicates that sharing content exists within the application or a specific interface within the application.

[0196] For example, the sending device launches an application based on user input and determines that shareable content exists within the application. Then, the sending device can trigger the application to send a registration request to the sharing service. This registration request is used to register the ability to send shareable content. Optionally, the registration request carries an application identifier, a shareable content identifier, etc.

[0197] For example, if the application corresponding to the currently displayed interface of the sending device determines that there is shareable content on the currently displayed interface, it can send a registration request to the sharing service to indicate to the sharing service that the application has shareable content, so that the sharing service can subsequently share the shareable content. Optionally, the registration request sent by the sending device may include, for example, an application interface identifier and a shareable content identifier. The shareable content identifier indicates the existence of content to be shared.

[0198] For example, the receiving device launches an application based on user input and determines that the application can receive shared content, such as by obtaining the storage address corresponding to at least one interface within the application. Then, the receiving device can trigger the application to send a registration request to the sharing service. This registration request is used to register the ability to receive shared content. Optionally, the registration request carries an application identifier, etc.

[0199] For another example, if the application corresponding to the currently displayed interface of the receiving device determines that the currently displayed interface can receive shared content, it can send a registration request to the sharing service to register the storage address corresponding to the currently displayed interface, i.e., register the storage address. Subsequently, after receiving shared content, the sharing service of the receiving device can save the shared content according to the registered storage address. Optionally, the registration request sent by the receiving device may include, for example, an application interface identifier, which indicates, for example, that the application interface corresponding to the application interface identifier can be used to receive shared content.

[0200] It should be understood that the embodiments of this application do not limit the execution order between steps S701a-S702a and steps S701b-S702b. For example, the receiving device and the sending device may register with the sharing service automatically according to the information displayed by the application.

[0201] S703, the transmitting and receiving devices establish a communication connection based on proximity sensing and through a sharing service.

[0202] In some embodiments, the sending and receiving devices can determine the proximity of other electronic devices and identify content sharing intentions through various methods such as NFC detection, ACC detection, and display capacitance data detection. In response to the proximity of other devices, the sending and receiving devices can establish a communication connection through their respective sharing services to facilitate subsequent content sharing based on that connection.

[0203] S704a. The sharing service in the sending device sends a request to the application in the sending device to share content.

[0204] S705a: An application in the sending device sends shared content to the sharing service in the sending device.

[0205] The application receiving the content sharing request is the application corresponding to the currently displayed interface of the sending device, and this application has registered to share content. For example, if the receiving device displays an application that has registered to send content, then the sharing service can request content to share from that application.

[0206] In some examples, the sending device may display multiple applications, and the application receiving the content sharing request is the one selected by the receiving device. For instance, if the receiving device is close to the sending device's display screen, the sending device can determine the application corresponding to that display area based on the area on the screen where the receiving device is close. For example, the display area corresponding to the application's window might include the display area where the receiving device is close. If this application has registered its content sharing capability, then the sharing service can request content to share from that application.

[0207] In some embodiments, after establishing a communication connection, the sharing service can interact with the corresponding application based on the registration status. For example, the sharing service in the sending device determines, based on a previously received registration request, that the application corresponding to the currently displayed interface has registered and has content to be shared. Then, the sharing service in the sending device can send a request to share the content to that application. Correspondingly, after receiving the request from the sharing service, the application can send the shared content to the sharing service.

[0208] S704b: The sharing service in the receiving device sends a storage address request to the application in the receiving device.

[0209] S705b: The application in the receiving device sends the storage address to the sharing service in the receiving device.

[0210] Specifically, the application receiving the storage address request is the application corresponding to the currently displayed interface of the receiving device, and this application has registered the corresponding storage address. For example, if the receiving device displays an application that has registered the ability to receive shared content or a storage address, then the sharing service can request a storage address from this application.

[0211] In some examples, the receiving device may display multiple applications, and the application receiving the storage address request is the one selected by the sending device. For instance, if the sending device is close to the receiving device's display screen, the receiving device can determine the application corresponding to that display area based on the display area on the screen where the sending device is close. For example, the display area corresponding to the application's display window may include the display area where the sending device is close. Where this application has registered for content sharing and receiving capabilities or storage addresses, the sharing service can request a storage address from this application.

[0212] S706. The sharing service in the sending device sends the sharing content to the sharing service in the receiving device.

[0213] Correspondingly, the sharing service in the receiving device receives the shared content from the sharing service in the sending device.

[0214] In some embodiments, after sensing the proximity of the sending device, the receiving device can determine that content sharing is necessary. Then, the sharing service in the receiving device can obtain the storage address registered by the application to facilitate subsequent storage of the received shared content. For example, after executing steps S704b and S705b, the receiving device executes step S706.

[0215] In other embodiments, the sharing service in the receiving device may also obtain the application's registered storage address after receiving the sharing content sent by the sending device, so as to store the obtained sharing content. Optionally, after obtaining the sharing content returned by the application, the sharing service in the sending device can send the sharing content to the receiving device through a communication connection with the receiving device. Accordingly, the receiving device receives the sharing content sent by the sending device through the sharing service. For example, after executing step S706, the receiving device executes steps S704b and S705b.

[0216] For example, if the sharing service determines that the application has registered to receive shared content, the sharing service can request a storage address from the application. Correspondingly, upon receiving the request, the application can obtain the storage address corresponding to the currently displayed interface and return that storage address to the sharing service.

[0217] For example, if the sharing service determines that the application has registered to receive shared content, then the sharing service can request a storage address from the application. Correspondingly, upon receiving the request, the application determines that the current application interface does not have the corresponding storage address configured. Therefore, the application can report to the sharing service that it cannot receive shared content. The sharing service can then obtain a default storage address based on the application's feedback. Specifically, the sharing service can determine the default storage address corresponding to the received shared content. For example, the default storage address for an image might be the same as the storage address for the gallery application.

[0218] For example, if the sharing service determines that the application has registered to receive shared content, then the sharing service can request a storage address from the application. Optionally, after receiving the request, the application determines that the format of the storage address indicated on the current application's display interface does not match the format of the shared content. For example, the storage address indicates an image format, meaning that the storage address supports storing image content, but the received shared content is in document format; obviously, the two do not match. Therefore, the application can report to the sharing service that it cannot receive the shared content. The sharing service can obtain a default storage address based on the application's feedback. Specifically, the sharing service can determine the default storage address corresponding to the received shared content.

[0219] For example, if the sharing service determines that the application has registered to receive shared content, then the sharing service can request a storage address from the application. Optionally, after receiving the request, the application determines whether the format indicated by the storage address on the current application's display interface matches the format of the shared content. For example, if the storage address indicates an image format, meaning that the storage address supports storing image content, and the received shared content is in image format, then the two obviously match. The application can then send the storage address back to the sharing service. The sharing service can then save the shared content to that storage address.

[0220] For example, if the sharing service determines that the application has registered the storage address corresponding to the currently displayed interface, the sharing service can request the storage address from the application. Optionally, after receiving the request, the application can obtain the storage address corresponding to the currently displayed interface and return the storage address to the sharing service.

[0221] For example, if the sharing service determines that the application has registered the storage address corresponding to the currently displayed interface, then the sharing service can request the storage address from the application. Optionally, after receiving the request, if the application determines that the format of the storage address indicated by the current application's displayed interface does not match the format of the shared content, then the application can report to the sharing service that it cannot receive the shared content. The sharing service can obtain the default storage address based on the application's feedback. Specifically, the sharing service can determine the default storage address corresponding to the shared content based on the received shared content.

[0222] For another example, if the sharing service determines that the application has registered the storage address corresponding to the currently displayed interface, then the sharing service can request the storage address from the application. Optionally, after receiving the request, the application determines that the format indicated by the storage address corresponding to the current application's displayed interface matches the format of the shared content. Then, the application can send the storage address back to the sharing service. Accordingly, the sharing service can save the shared content to that storage address.

[0223] In the example scenario above, when the application registers a storage address with the sharing service, it informs the service that a storage address exists on the application's current display screen to save the shared content, thus avoiding the need to send the storage address directly to the sharing service. Therefore, upon receiving the shared content, the sharing service needs to request the storage address from the application to save the received content. In other example scenarios, during the storage address registration process, the application can directly send the storage address to the sharing service. In this case, upon receiving the shared content, the sharing service can directly obtain the registered storage address and save the shared content without needing to request the storage address from the application again.

[0224] It should be understood that the embodiments of this application do not limit the execution order between steps S704a-S705a and steps S704b-S705b. For example, the receiving device and the sending device can independently obtain the shared content or storage address based on the proximity detection.

[0225] S707: The sharing service in the receiving device stores the shared content in the storage address.

[0226] In some embodiments, the sharing service in the receiving device can save the shared content received from the sending device to the storage address after receiving the storage address.

[0227] For example, such as Figure 2 In the scenario described, for example, if the shared content is in a media format, such as an image, applications that support opening the image include the Gallery app and the Notes app. The default storage address for the image is the Gallery app's storage address. In an example scenario, after the receiving device launches the Notes app based on user input, the Notes app can register its storage address with the sharing service. Then, while the receiving device is displaying the Notes app, it detects the user's sharing action, and the sharing service can receive the image sent by the sending device. Subsequently, the sharing service on the receiving device can obtain the storage address registered by the Notes app and save the received image to that storage address. Specifically, the receiving device detects the user's sharing action while displaying the Notes app, and the user... Figure 1 This is typically used to add shared content to the currently displayed notes application.

[0228] In this way, by pre-registering the storage address corresponding to the current display interface, the shared content can be directly saved to the registered storage address instead of the default storage address. This reduces the need for users to retrieve the shared content from the default storage address and add it to the current display interface, thus improving the user experience.

[0229] Furthermore, compared to the content saving method of copying shared content to the clipboard and then pasting it into the current interface, the content saving method provided in this application reduces the number of copy-paste operations by pre-registering storage addresses. Moreover, it does not restrict the sending and receiving devices to be devices with the same account, effectively expanding cross-device sharing scenarios.

[0230] In some embodiments, the electronic device may exit the application or switch to another display interface instead of displaying the current one, based on user actions. In this case, the application can unregister from the sharing service, thereby preventing anomalies during the subsequent sharing process between the sending and receiving devices.

[0231] Optionally, such as Figure 8 As shown, the following steps may be included after step S707.

[0232] S801a, The application in the sending device stops displaying the interface for sending and sharing content.

[0233] S802a, The application in the sending device sends a deregistration request to the sharing service in the sending device.

[0234] The unregistration request is used to request the unregistration of the currently displayed interface; or, to unregister the application's ability to send shared content.

[0235] In some embodiments, the sending device exits the application corresponding to the currently displayed interface based on user operation. Then, the application can send an unregistration request to the sharing service, indicating that the application no longer needs to share content.

[0236] In other embodiments, the sending device switches to display another interface of the application corresponding to the currently displayed interface based on user operation. Then, the application can send an unregistration request to the sharing service, indicating that the original display interface of the application no longer needs content sharing. Optionally, if the newly displayed interface of the application contains content to be shared, steps S701a-S702a can be repeated to register the other interface. Optionally, if the newly displayed interface of the application can receive shared content, steps S701b-S702b can be repeated to register the corresponding storage address for the other interface. After registering on the new interface, the electronic device will switch to become a receiving device.

[0237] S801 b. The application in the receiving device stops displaying the interface for receiving and sharing content.

[0238] S802b: The application in the receiving device sends a deregistration request to the sharing service in the receiving device.

[0239] The unregistration request is used to request the unregistration of the currently displayed interface, thereby preventing the shared content from being stored in the storage address corresponding to the displayed interface; or, to unregister the application's ability to receive shared content.

[0240] It should be understood that different interfaces of the same application can correspond to the same storage address. In this case, the application will only send an unregistration request to the sharing service after exiting the display. Switching to display different interfaces will not send an unregistration request to the sharing service. Alternatively, different interfaces of the same application can correspond to different storage addresses, or some interfaces may correspond to the same storage address. In this case, the application will only send an unregistration request to the sharing service after switching to displaying the interface corresponding to a different storage address.

[0241] In some embodiments, the receiving device exits the application corresponding to the currently displayed interface based on user operation. Then, the application can send an unregistration request to the sharing service, indicating to the sharing service that the application no longer needs to receive shared content.

[0242] In other embodiments, the receiving device switches to displaying another interface of the application corresponding to the currently displayed interface based on user operation. Then, the application can send an unregistration request to the sharing service, indicating that the original display interface of the application no longer needs to receive shared content. Optionally, if the newly displayed interface of the application can receive shared content, steps S701b-S702b above can be repeated to register the corresponding storage address for that other interface. Optionally, if the newly displayed interface of the application contains content to be shared, steps S701a-S702a above can be repeated to register that other interface. After registering on the new interface, the electronic device will switch to becoming the sending device.

[0243] It should be understood that the embodiments of this application do not limit the execution order between steps S801a-S802a and steps S801b-S802b. For example, the receiving device and the sending device can automatically register and deregister with the sharing service based on the current display interface.

[0244] Thus, after the interface ends, the electronic device can determine that the user no longer needs to share content from that interface. The sharing service on the electronic device can then unregister the interface, thereby avoiding any impact on subsequent sharing processes.

[0245] Optionally, after unregistering, the sending and receiving devices can disconnect from each other, ending the sharing process.

[0246] The registration and deregistration processes have been described above. The following section describes the application scenarios of the content sharing method provided in this application embodiment, in conjunction with specific sharing scenarios.

[0247] In some embodiments, the sending device may send the content to be shared to the receiving device in response to a proximity sharing operation. Accordingly, the receiving device may determine whether to receive the shared content and save the shared content to the appropriate storage address based on the user's operation.

[0248] For example, such as Figure 9 As shown in (a), the sending device displays a gallery application, and the gallery application's current display interface contains shareable content, such as photos. The gallery application can then register with the sharing service on the sending device, indicating the existence of shareable content. The receiving device displays a memo application, and the memo application's current display interface can receive shareable content. The memo application can then register its storage address with the sharing service on the receiving device. Subsequently, while displaying photos through the gallery application, the sending device detects the user's "tap-to-share" action, confirming the user's instruction to share. The sending device also detects the user's swipe-up action in the direction indicated by arrow 91, confirming the user's instruction to share the photo affected by the swipe-up action to the receiving device. Therefore, as shown... Figure 9 As shown in (b), the sending device can generate a card 92 corresponding to the photo, allowing the user to confirm whether to send the corresponding photo to the receiving device based on the card content. If the sending device continues to detect the swipe-up operation, it can send the photo to the receiving device. Correspondingly, as... Figure 9 As shown in (c), after receiving a photo sent by the sending device, the receiving device can also display card 92. The display style of card 92 on both the sending and receiving devices can be adaptively adjusted according to device requirements. The animation of card 92 flying from the sending device into the receiving device can also enhance the fun of user-shared content.

[0249] Optionally, after receiving the shared content, the receiving device can display the application identifier corresponding to the registered storage address, thereby helping the user confirm whether they need to save the received shared content to that registered storage address. This makes the storage address for saving shared content more aligned with the user's needs.

[0250] For example, such as Figure 9As shown in (c), during the display of the Notes application, the receiving device receives a photo shared by the sending device and can display the card 92 corresponding to the photo and the Notes application identifier 93. Then, based on the user's swipe down from the card 92 location to the Notes application identifier 93 in the direction indicated by arrow 94, the receiving device can determine that the user has instructed to save the acquired photo to the storage address corresponding to the Notes application. For example, as... Figure 9 As shown in (d), the receiving device can directly insert the received photo into the memo application for display.

[0251] Optionally, the receiving device may not need to display the Notes app icon 93. Instead, it can directly save the shared content to the Notes app's corresponding storage address in response to the user's swipe down. For example, if the sending and receiving devices are devices with the same account, the security of the sharing can be guaranteed. Therefore, the shared content can be saved directly in response to the user's swipe down.

[0252] Optionally, if the receiving device displays the Memo app identifier 93, and if it detects that the user has swiped down to an area other than the Memo app identifier 93, it is determined that the user has instructed to save the shared content to another storage address, such as the default storage address.

[0253] It should be understood that the aforementioned swipe-up and swipe-down operations are merely for the user's understanding of the directionality of sending shared content to the other device, and this directionality aligns with user perception. However, users can also trigger the sending of shared content in other ways, and this application embodiment does not impose any restrictions on this.

[0254] In response to a user's sharing action, the receiving device can save the shared content to the location the user intends to store, based on the current interface display and registration information, thereby meeting the user's needs and achieving a WYSIWYG user experience.

[0255] In the following example scenarios, the registration process for storage addresses will not be described in detail. After the electronic device displays the application, the application can register the storage address with the sharing service.

[0256] In some embodiments, as described above, the electronic device can determine the presence of other electronic devices and a content sharing need by observing changes in capacitance data on the display screen. Furthermore, by observing the area of ​​capacitance data change, the electronic device can determine the area where other electronic devices are near. Combining this with the current interface display, the electronic device can identify the application window of the other electronic device that is near, thereby determining the user's intention to share content with the application corresponding to that window. In some examples, the application corresponding to this window can receive shared content sent by other electronic devices. In other examples, the application corresponding to this window can send shared content to other electronic devices.

[0257] The following section will first introduce the scenario where the application corresponding to this window can receive shared content sent by other electronic devices.

[0258] In some examples, the application corresponding to the window has registered a storage address. Therefore, it's possible to directly save shared content to the storage address of the application corresponding to the window, and to display the shared content within that window.

[0259] For example, such as Figure 10 As shown in (a), during the display of the memo application window on the receiving device, the device detects an operation by the sending device approaching the display area corresponding to the memo application window based on changes in the capacitance data of the receiving device's screen. This indicates that the user has instructed the receiving device to share content with the memo application window. Optionally, the receiving device can display animations to prompt the user to confirm whether to share content with the memo application window. These animations may include, for example, window zooming in / out animations, special icon animations, etc. Figure 10 As shown in (b), the receiving device displays identifier 101 on the memo application window to prompt the user that a sharing operation has been detected and to confirm whether content sharing to the memo application window is necessary. In response to the aforementioned proximity operation, the sending device and the receiving device establish a communication connection. The sending device detects the user's swipe-up operation in the direction indicated by arrow 102, and can determine that the user intends to share the currently displayed photo to the receiving device. Optionally, the sending device can display the card corresponding to the photo, and detect the user's swipe-up operation on the card, and can determine that the user intends to share the photo corresponding to the card to the receiving device. Then, in response to this swipe-up operation, the sending device can send the photo to the receiving device. Accordingly, after receiving the photo, the receiving device, as follows... Figure 10 As shown in (c), the receiving device can display the photo fly-in animation 103 and save the photo to the storage address of the memo application corresponding to the memo application window. Then, as... Figure 10 As shown in (d), the receiving device can directly insert the received photo at the corresponding position (such as the cursor display position) in the memo application window.

[0260] In this way, the receiving device saves the shared content to the registered storage address corresponding to the current interactive window, fulfilling the user's intention to add the shared content to the interactive window, simplifying user operations, and improving the user experience.

[0261] For example, such as Figure 11As shown in (a), during the display of the file management application window on the receiving device, changes in the capacitance data of the receiving device's screen indicate that the sending device has moved close to the display area corresponding to the file management application window, thus confirming that the user has instructed the user to share content with the file management application window. Optionally, the receiving device may display animations to prompt the user to confirm whether to share content with the file management application window. For example, as shown in (a). Figure 11 As shown in (b), the receiving device displays identifier 111 on the file management application window to prompt the user that a sharing operation has been detected and to confirm whether content sharing to the file management application window is necessary. In response to the aforementioned proximity operation, the sending device and the receiving device establish a communication connection. The sending device detects the user's swipe-up operation in the direction indicated by arrow 112 and determines that the user intends to share the currently displayed photo to the receiving device. Therefore, in response to this swipe-up operation, the sending device can send the photo to the receiving device. Accordingly, after receiving the photo, the receiving device, as follows... Figure 11 As shown in (c), the receiving device can display the photo flying-in animation 113 and save the photo to the storage address of the file management application corresponding to the file management application window. Then, as... Figure 11 As shown in (d), the receiving device can display the identifier 114 corresponding to the added photo file in the file management application window.

[0262] In this way, the receiving device can flexibly store shared content according to the storage address registered in the current display window, meeting the user's personalized usage needs.

[0263] For example, such as Figure 12 As shown in (a), during the process of displaying the desktop, the receiving device determines that it has detected the proximity of the sending device based on the change in the capacitance data of its screen, thus confirming that the sending device has a sharing need. Figure 12 As shown in (b), the sending device detects the user's swipe-up action as indicated by arrow 121 and determines that the user intends to share the currently displayed photo with the receiving device. In response to this swipe-up action, the sending device can send the photo to the receiving device. Correspondingly, the receiving device can receive the photo. Since the receiving device receives the photo while displaying the desktop, it can save the photo to the default storage address.

[0264] Optionally, if the receiving device receives a sharing operation while displaying its desktop, it can display the received shared content through a default application. Optionally, the receiving device determines the default application based on the format of the shared content.

[0265] For example, such as Figure 12As shown by reference numeral 122 in Figure (c), the shared content is a photo, and the receiving device displays the received photo through the gallery application. The gallery application window is positioned close to the screen on the sending device for easier user interaction.

[0266] For example, the sending device might share an application or service with the receiving device. Upon receiving the shared content, the receiving device can launch the corresponding application or service. Furthermore, the shared content may include the application's or service's status. Thus, after receiving the shared content, the receiving device can launch the corresponding application or service and display the same interface as the sending device. For instance, if the sending device detects a user's sharing action while displaying product details on a shopping app, it can send shared content including the shopping app's status to the receiving device. Upon receiving this shared content, the receiving device can launch the shopping app and display the same product details interface.

[0267] In this way, the receiving end can receive shared content while displaying the desktop, and can display the shared content through the application corresponding to the shared content, thereby simplifying user operation and improving user experience.

[0268] In some embodiments, if the receiving device detects that the sending device has performed a sharing operation to an application window that has not registered a storage address, it may store the received shared content in a default storage address. Optionally, this default storage address may refer to the various implementations in the example scenario of a desktop application receiving shared content described above. Alternatively, the receiving device may also save the shared content to the storage address corresponding to the sharing application.

[0269] For example, such as Figure 13 As shown in (a), the receiving device displays a calculator application window. This calculator application window does not contain any content to be shared, nor can it receive shared content, and therefore does not need to register with the sharing service. A window that is not registered with the sharing service can be described as an incompatible window, while a window that is registered with the sharing service can be described as an compatible window. Figure 13 As shown in (b), the sending device detects a user's swipe-up operation as indicated by arrow 131 and determines that the user intends to share the currently displayed photo to the receiving device. In response to this swipe-up operation, the sending device can send the photo to the receiving device. Correspondingly, the receiving device can receive the photo. The sending device determines, based on changes in the capacitance data of the receiving device's display, that the window closest to the sending device is a calculator application window, which is an unadapted window; therefore, the receiving device can save the photo to the default storage address. For example, as... Figure 13As shown by reference numeral 132 in Figure (c), the receiving device saves the photo to the storage address corresponding to the sharing application, launches the sharing application folder, and prompts the user that the photo has been successfully shared.

[0270] In this way, even when the sending device is close to the unfitted window of the receiving device, the receiving device can still receive and save the shared content.

[0271] The following describes an application that allows an electronic device to determine the window corresponding to another electronic device and send shared content to that other electronic device.

[0272] In some examples, an electronic device determines that the application corresponding to the window of another nearby electronic device has registered to share content. This allows the shared content to be sent to the other electronic device. Correspondingly, the other electronic device can save the received shared content based on the registration information at the storage address.

[0273] For example, such as Figure 14 As shown in (a), during the display of the gallery application window on the sending device, based on changes in the capacitance data of the sending device's display screen, it is determined that the receiving device has moved close to the display area corresponding to the gallery application window, thus confirming that the user has instructed to share the content in the gallery application window. Subsequently, the sending device can send the photos displayed in the gallery application window to the receiving device. Correspondingly, the receiving device can receive the photos sent by the sending device. Then, as... Figure 14 As shown in (b), the receiving device can display card 141 corresponding to the received photo. Then, based on the user's swipe-down operation as shown by arrow 142, the receiving device can determine that the user intends to save the photo corresponding to card 141. Since the receiving device detects the sharing operation during the desktop display process, it can save the photo to the corresponding default storage address, such as the storage address of the gallery application. Optionally, the receiving device can also display the shared content through the application corresponding to this default storage address, thereby facilitating subsequent user operations. For example, as... Figure 14 As shown in (c), the receiving device can display the received photo through a gallery application.

[0274] For example, such as Figure 15 As shown in (a), during the display of the gallery application window on the sending device, based on changes in the capacitance data of the sending device's display screen, it is determined that the receiving device has moved close to the display area corresponding to the gallery application window, thus confirming that the user has instructed to share the content in the gallery application window. Subsequently, the sending device can send the photos displayed in the gallery application window to the receiving device. Correspondingly, the receiving device can receive the photos sent by the sending device. Then, as... Figure 15As shown in (b), the receiving device can display the card 151 corresponding to the received photo, and the memo application identifier 152 corresponding to the memo application interface displayed when the photo is received. Then, based on the user's downward dragging action (as shown by arrow 153) of the card 151 towards the memo application identifier 152, the receiving device can determine that the user has instructed to add the photo corresponding to card 151 to the memo application. Therefore, as... Figure 15 As shown in (c), the receiving device can save the photo to the storage address corresponding to the memo application and add the photo to the memo application to display the photo on the current display screen.

[0275] Thus, in response to other electronic devices approaching the display screen, if the electronic device already contains shared content, it can trigger the sending of shared content to those other electronic devices. Furthermore, other electronic devices can flexibly store shared content based on the registration status of their storage addresses.

[0276] In some embodiments, when an electronic device displays multiple windows, it can determine that the position of other electronic devices near the display screen corresponds to a specific window among the multiple windows, and thus determine that the user has indicated an interaction with that window, such as a window displaying content to be shared. Optionally, the window displaying the content to be shared can be a focused window or a non-focused window. Optionally, if the window displaying the content to be shared is a non-focused window, the electronic device can trigger the window displaying the content to be shared to become the focused window, facilitating subsequent user operations.

[0277] Optionally, the electronic device displays multiple windows, including adapted windows and / or unadapted windows. The interactive implementation of shared content between adapted and unadapted windows can refer to the interactive implementation of shared content in a single window as described in the above embodiments.

[0278] For example, such as Figure 16 As shown in (a), during the display of the Memo application window 161 and the file management application window 162, the receiving device determines that it has detected an operation where the sending device is approaching based on changes in the capacitance data of its display screen, and can determine that the window approached by the sending device is the Memo application window 161. Therefore, the receiving device can determine that the user has indicated interaction with the Memo application window 161. Similarly, during the display of the gallery application, if the sending device detects a user's swipe-up operation, the user can share the currently displayed photo in the gallery application to the receiving device. Correspondingly, as... Figure 16 As shown by reference numeral 163 in Figure (b), after receiving the photo, the receiving device can save the photo to the storage address corresponding to the memo application window 161 and display the photo in the memo application window 161.

[0279] For example, such as Figure 16 As shown in (c), during the display of the memo application window 161 and the file management application window 162, the receiving device determines that it has detected the sending device approaching based on changes in the capacitance data of its display screen, and can determine that the window approaching by the sending device is the file management application window 162. Therefore, the receiving device can determine that the user has indicated interaction with the file management application window 162. Since the file management application window 162 is a non-focus window, in response to the approach of the sending device, the receiving device can set the file management application window 162 as the focus window. For example, as... Figure 16 As shown in (d), the receiving device can place the file management application window 162 on top of the display.

[0280] Among them, such as Figure 16 As shown in (c), when the sending device detects a user's swipe-up gesture while displaying the gallery application, it can share the photos currently displayed in the gallery application to the receiving device. Correspondingly, as... Figure 16 As shown in (d), after receiving the photo, the receiving device can save the photo to the storage address corresponding to the file management application window 162 and display the corresponding identifier 164 in the file management application window 162.

[0281] For example, such as Figure 17 As shown in (a), during the display of the gallery application window 171 and the file management application window 172, the sending device determines that it has detected the receiving device approaching based on changes in the capacitance data of its display screen, and identifies the window approaching by the receiving device as the gallery application window 171. Therefore, the sending device can determine that the user has indicated interaction with the gallery application window 171. The sending device can then send the shared content (such as photos) currently present in the gallery application window 171 to the receiving device. Correspondingly, as... Figure 17 As shown in (b), after receiving the photo, the receiving device can display the card 173 corresponding to the photo. In some examples, the receiving device can determine whether the user has instructed to save the photo corresponding to card 173 based on the user's swipe-down operation. In other examples, as indicated by reference numeral 174, the receiving device can display a receive control and a reject control, and determine whether the user has instructed to save the photo corresponding to card 173 based on the user's operation of the receive control. For example, if the receiving device determines that the user has instructed to save the photo based on the user's operation of the receive control, then the receiving device can save the photo to the storage address corresponding to the currently displayed desktop.

[0282] For example, such as Figure 17As shown in (c), during the display of the gallery application window 171 and the file management application window 172, the transmitting device determines that it has detected the receiving device approaching based on changes in the capacitance data of its display screen, and identifies the window approaching by the receiving device as the file management application window 172. Therefore, the transmitting device can determine that the user has indicated interaction with the file management application window 172. Since the file management application window 172 is a non-focus window, in response to the approach of the receiving device, the transmitting device can set the file management application window 172 as the focus window. For example, as... Figure 17 As shown in (d), the sending device can place the file management application window 172 on top of the display.

[0283] Among them, such as Figure 17 As shown in (d), after receiving a shared file, the receiving device can display the card 175 corresponding to that file. Then, the receiving device can save the photo to the storage address corresponding to the currently displayed desktop, according to the user's instructions.

[0284] Optionally, the file management application window 172 of the sending device displays an icon of a single file, meaning the file management application only manages that one file. In response to the receiving device approaching the file management application window 172, the sending device can send the file to the receiving device.

[0285] Optionally, the file management application window 172 of the sending device displays icons for multiple files, meaning the file management application manages these multiple files. In response to the receiving device approaching the file management application window 172, the sending device can send all of these files to the receiving device. Alternatively, the sending device can determine, based on changes in capacitance data, that the display area the receiving device is approaching is a specific display area within the file management application window 172, and can identify the icon of a specific file displayed in that area. Then, the sending device can send the file corresponding to that icon to the receiving device. For example, the granularity at which the electronic device determines the proximity based on the display's capacitance data can be at the window level or the pixel level, etc.

[0286] In this way, even when displaying multiple windows, electronic devices can flexibly send or receive shared content based on user actions, thus providing users with more sharing scenarios.

[0287] The preceding text describes the content storage provided in this application's embodiments using examples where the electronic device can only send or receive shared content. In other embodiments, the electronic device can both send and receive shared content. For example, when both electronic devices have shared content, they can interact with each other's shared content.

[0288] For example, such as Figure 18 As shown in (a), during the display of windows A, B, and C, the first electronic device 100 determines, based on changes in the capacitance data of its display screen, that it has detected the second electronic device 200 approaching window B, and thus determines that the user has instructed the application corresponding to window B to interact. In some examples, the display interface in window B has registered shared content B and a storage address. Therefore, as... Figure 18 As shown in (b), in response to the proximity operation, the first electronic device 100 can send shared content B to the second electronic device 200. Accordingly, upon receiving the shared content B, the second electronic device 200 can display card 181. Subsequently, based on the user's operation of receiving shared content on card 181, the second electronic device 200 can save the shared content B corresponding to card 181 to a registered storage address. For example, if the second electronic device 200 detects the proximity operation while displaying a gallery application, it can save the shared content B to the storage address corresponding to the gallery application.

[0289] Furthermore, during the process of the first electronic device 100 sending shared content B to the second electronic device 200, the second electronic device 200 can also send shared content back to the first electronic device 100. For example, such as Figure 18 As shown in (a), during the display of a gallery application, the second electronic device 200 detects a user's proximity to window B displayed by the first electronic device 100. In response to this proximity operation (or in response to a user's swipe-up operation), the second electronic device 200 can send the photo currently displayed in the gallery application to the first electronic device 100. Accordingly, after receiving the photo, the first electronic device 100 can display the corresponding card 182 in window B. Subsequently, based on the user's operation of receiving and sharing content on card 182, the first electronic device 100 can save the photo corresponding to card 182 to a registered storage address, such as the storage address of the application corresponding to window B.

[0290] In this way, when both electronic devices contain shared content, interaction between their respective shared content is possible. Furthermore, both electronic devices can flexibly save shared content based on their storage address registration, enhancing the user experience.

[0291] In some embodiments, neither of the two end electronic devices may have any content to share. In this case, at least one of the end electronic devices may display a prompt message to the user indicating that there is currently no content to share, so that the user can confirm whether they need to share again.

[0292] Figure 19This is a flowchart illustrating a content saving method provided in an embodiment of this application. It should be noted that this method does not rely on... Figure 20 The specific order described below is a limitation. It should be understood that in other embodiments, the order of some steps in the method can be interchanged according to actual needs, or some steps can be omitted or deleted. The method includes the following steps:

[0293] S1901, In response to the user's first operation, the first electronic device starts the first application.

[0294] The first application can be any application within the first electronic device. Optionally, the first application can be a system application or a third-party application.

[0295] Optionally, launching the first application may include opening the first application or switching the first application from running in the background to running in the foreground.

[0296] Optionally, the first operation may be, for example, an operation on the icon of the first application, a voice operation, or other gesture operations.

[0297] S1902, The first application in the first electronic device registers with the sharing service.

[0298] The process involves a first application in the first electronic device registering with a sharing service, including: the first application registering a first capability with the sharing service. This first capability may be, for example, the ability to receive shared content. For instance, the sharing service receives a first registration request sent by the first application after it is launched. Based on the first registration request, the sharing service completes the registration of the first application.

[0299] For example, after the application is launched, the first application has the ability to receive shared content and can send a registration request to the sharing service to register its ability to receive shared content. Subsequently, the sharing service can send shared content received from other electronic devices to the first application based on the application's ability to receive shared content.

[0300] Optionally, the first application registering its first capability with the sharing service includes: registering the first application's ability to receive shared content with the sharing service, or registering the storage address corresponding to the current display interface of the first application with the sharing service.

[0301] For example, registering a first application with a sharing service includes registering with the sharing service the first storage address corresponding to the first interface currently displayed by the first application. For instance, the aforementioned first registration request is used to request the registration of the first storage address corresponding to the first interface currently displayed by the first application.

[0302] For example, when a first application registers with a sharing service, it includes registering a first capability of the first application with the sharing service. This first capability indicates that the first application is able to save received content. For instance, the aforementioned first registration request is used to request the first application's first capability.

[0303] For example, the granularity of the first application's registration with the sharing service varies. For instance, the first application can register with coarse granularity, indicating that the first application has at least one storage address where it can save shared content. Alternatively, the first application can register with fine granularity, specifying the storage address of the currently displayed interface, indicating that the first application's currently displayed interface has a storage address where it can save shared content.

[0304] In this way, the first electronic device can flexibly register storage addresses to meet the need to save the received shared content to the registered storage address.

[0305] S1903. During the display of the first application, a second electronic device is detected to be near the first electronic device.

[0306] In some embodiments, the first electronic device detects that the second electronic device is near the first electronic device, including: the first electronic device determining that the second electronic device is near the first electronic device based on first detection data from a sensor, wherein the sensor is an NFC sensor and / or an accelerometer. Alternatively, the first electronic device determines that the second electronic device is near the first electronic device based on second detection data from the display screen of the first electronic device, wherein the second detection data includes capacitance data.

[0307] For example, the first electronic device can determine that it has detected the user's "tap-to-click" operation by means of NFC detection, ACC collision detection, etc., and can also determine that the second electronic device is nearby.

[0308] For example, the first electronic device is equipped with a display screen, such as a capacitive touchscreen. When another electronic device is near the display screen, the first electronic device can determine the proximity of the other electronic device based on changes in the display screen's detection data, for example, determining the presence of a second electronic device. Optionally, the first electronic device can determine the proximity position of the second electronic device on the display screen of the first electronic device based on changes in the detection data, and subsequently determine the window where the user intends to send or receive shared content based on that proximity position. The proximity position is located within that window.

[0309] In this way, the first electronic device can determine the presence of a nearby second electronic device through various means, thereby establishing a communication connection with the second electronic device to facilitate the sending or receiving of subsequent shared content and improve the user's operating experience in the sharing scenario.

[0310] S1904, The first electronic device receives the first content sent by the second electronic device.

[0311] The first content may be, for example, the sharing content currently displayed on the interface of the second electronic device, or the sharing content selected by the user of the second electronic device.

[0312] In some embodiments, the first electronic device receiving first content sent by the second electronic device includes: the first electronic device receiving the first content sent by the second electronic device through a first connection.

[0313] Optionally, the first connection is a communication connection established after the first electronic device detects that the second electronic device is close to the first electronic device, or the first connection is a communication connection that already exists between the first electronic device and the second electronic device.

[0314] For example, the first electronic device determines the presence of a second electronic device based on the capacitance data of its display screen. Then, the first electronic device can establish a first connection with the second electronic device to facilitate subsequent content transmission.

[0315] For example, a first connection has already been established between the first electronic device and the second electronic device. Then, the first electronic device can reuse this first connection to receive the first content sent by the second electronic device.

[0316] S1905, the first electronic device saves the first content to the first storage address corresponding to the first application; wherein, the first storage address is obtained based on the first application registering with the sharing service.

[0317] In some embodiments, the first electronic device saves the first content to a first storage address corresponding to the first application, including: the first electronic device obtaining the first storage address corresponding to the first interface currently displayed by the first application; and the first electronic device saving the first content to the first storage address.

[0318] In some examples, the first content is saved to the first storage address corresponding to the first application, including: the sharing service sends a first request to the first application based on the first capability registered by the first application. The first request is used to request the storage address where the first content is saved. In response to the first request, the first application returns the first storage address corresponding to the currently displayed first interface to the sharing service. The sharing service then saves the first content to the first storage address.

[0319] For example, after the first electronic device detects the approach of the second electronic device, the sharing service in the first electronic device determines that the current interface displays a first application that has registered a first capability. Then, the sharing service can request the storage address corresponding to the first interface currently displayed by the first application. Correspondingly, the first application can provide the sharing service with the first storage address pre-configured for the first interface. In this way, the sharing service can save the shared content sent by the second electronic device to that first storage address.

[0320] Thus, by registering the first capability, the first electronic device can save the received shared content to the storage address corresponding to the currently displayed interface.

[0321] In some examples, in response to a second user action, the first electronic device displays a second interface of the first application. The first electronic device registers a second storage address corresponding to the second interface with a sharing service. During the display of the second interface, in response to the second electronic device approaching the first electronic device, the first electronic device receives second content sent by the second electronic device. The first electronic device saves the second content to the second storage address.

[0322] For example, the sharing service receives a second registration request sent by the first application after displaying the second interface. Based on the second registration request, the sharing service completes the registration of the second storage address corresponding to the second interface. During the process of the first application displaying the second interface, the sharing service receives the second content. In response to the received second content, the sharing service saves the second content to the second storage address.

[0323] For example, as described above regarding registration granularity, the first electronic device can also register a storage address with the sharing service after switching the display interface of the first application. Then, when the first electronic device detects the approach of the second electronic device, the sharing service in the first electronic device determines that the currently displayed second interface has registered a storage address and can request the storage address registered by the second interface from the corresponding first application. Accordingly, the first application can provide the sharing service with the second storage address pre-configured for the second interface. In this way, the sharing service can save the shared content sent by the second electronic device to that second storage address.

[0324] In this way, the first electronic device can obtain the storage address corresponding to the current display interface based on the changes in the display interface, and can flexibly save the received shared content.

[0325] For example, such as Figure 10As shown in (a), during the display of the memo application window by the receiving device (such as the first electronic device), an operation by the sending device (such as the second electronic device) approaching the display area corresponding to the memo application window is detected, and it can be determined that the user has instructed to share content to the memo application window. Optionally, the proximity position of the sending device on the display screen of the receiving device is wholly or partially located within the memo application window. Afterwards, the sending device and the receiving device establish a communication connection. The sending device detects an upward swipe operation by the user in the direction indicated by arrow 102, and it can be determined that the user has instructed to share the currently displayed photo (such as the first content) to the receiving device. Optionally, the sending device can display the card corresponding to the photo, and detecting an upward swipe operation by the user on the card, it can be determined that the user has instructed to share the photo corresponding to the card to the receiving device. Then, in response to the upward swipe operation, the sending device can send the photo to the receiving device. Accordingly, after receiving the photo, the receiving device, as follows... Figure 10 As shown in (c), the receiving device can display the photo fly-in animation 103 and save the photo to the storage address of the memo application corresponding to the memo application window. Then, as... Figure 10 As shown in (d), the receiving device can directly insert the received photo at the corresponding position (such as the cursor display position) in the memo application window.

[0326] In this way, by pre-registering the ability of the currently displayed application to receive shared content with the sharing service, the obtained shared content can be directly saved to the storage address corresponding to the application, instead of being saved to the default storage address. This reduces the need for users to retrieve shared content from the default storage address and add it to the application, thus improving the user experience.

[0327] Furthermore, compared to the content saving method of copying shared content to the clipboard and then pasting it into the current application, the content saving method provided in this application reduces the user's copy-paste operations by pre-registering the ability to receive shared content. Moreover, it does not limit the first and second electronic devices to devices with the same account, effectively expanding cross-device sharing scenarios.

[0328] In some embodiments, before saving the first content to the first storage address, the first electronic device displays a first identifier corresponding to the first content and a second identifier corresponding to the first application. The first electronic device detects a fifth operation where the user selects the second identifier.

[0329] Optionally, after the communication connection is established, the second electronic device first sends information indicating the first content to the first electronic device. Optionally, the information indicating the first content may be, for example, a preview image of the first content. In this way, the first electronic device can display a corresponding first identifier based on the information indicating the first content, thereby facilitating the user to confirm whether they need to receive the first content.

[0330] Optionally, the first electronic device displays a second identifier corresponding to the first application, so that the user can confirm whether the received first content needs to be saved to the storage address corresponding to the first application.

[0331] For example, such as Figure 9 As shown in (c), when the receiving device (such as the first electronic device) receives a photo shared by the sending device (such as the second electronic device) while displaying the memo application, it can display the card 92 corresponding to the photo and the memo application identifier 93. Then, based on the user's swipe down from the card 92 location to the memo application identifier 93 in the direction indicated by arrow 94, the receiving device can determine that the user has instructed to save the acquired photo to the storage address corresponding to the memo application. For example, as... Figure 9 As shown in (d), the receiving device can directly insert the received photo into the memo application for display.

[0332] In response to a user's sharing action, the first electronic device can save the shared content to the location the user intends to store, based on the current interface display and registration information, thereby meeting the user's needs and achieving a WYSIWYG user experience.

[0333] In some embodiments, during the display of the first interface of the first application (e.g., the interface displayed after the first application starts is the first interface), in response to a third user operation, the first electronic device displays the third interface of the first application or exits the first application. The first application unregisters with the sharing service.

[0334] Optionally, the third interface is not configured with a corresponding storage address.

[0335] For example, the sharing service receives a deregistration request from the first application. This deregistration request is sent by the first application after switching to the third-party interface or after exiting the application. Based on the deregistration request, the sharing service completes the deregistration of the first application.

[0336] For example, if a first electronic device detects a user's instruction to exit a first application, the first application may unregister its first capability with the sharing service. Optionally, exiting the first application may include, for example, closing the first application or switching the first application running in the foreground to running in the background.

[0337] For example, if the first electronic device detects a user instruction to switch to a third interface while displaying the first interface of a first application, it can determine that the third interface is not configured with a corresponding storage address. Then, the first application can send a deregistration request to the sharing service to cancel the registration of the first capability. For example, it can cancel the registration of the first storage address of the first interface.

[0338] As another example, if the first electronic device detects a user instruction to switch to a new interface while displaying the first interface of the first application, it can determine that the new interface has already been pre-configured with a storage address. Therefore, the first application does not need to unregister with the sharing service. Alternatively, the first application can unregister the first interface with the sharing service and register the storage address of the new interface.

[0339] Thus, when the first electronic device ends the display of the first application or switches to an interface displaying an unconfigured storage address, it can unregister with the sharing service, thereby avoiding any impact on the subsequent sharing process.

[0340] In some embodiments, the interface displayed after the first application is launched is the first interface. While the first electronic device displays the first interface, in response to a fourth user operation, the first electronic device displays a fourth interface of the first application, which corresponds to a third storage address. The first electronic device receives third content sent by the second electronic device when the second electronic device approaches it. If the first format of the third content does not match the second format indicated by the third storage address, the first electronic device saves the third content to the default storage address corresponding to the first format.

[0341] For example, while the first application is displaying the fourth interface, the sharing service receives the third content. The sharing service obtains the third storage address corresponding to the fourth interface. If the first format of the third content does not match the second format indicated by the third storage address, the sharing service saves the third content to the default storage address corresponding to the first format.

[0342] For example, the format indicated by the third storage address is image-based, meaning that the third storage address supports storing image content. However, the third content received by the first electronic device is in document format, which is clearly a mismatch. Therefore, the first electronic device can report to the sharing service that it cannot receive the third content. The sharing service can then obtain a default storage address based on this feedback. Specifically, the sharing service can determine the default storage address corresponding to the received third content, for example, the default storage address might be the storage address corresponding to a file management application.

[0343] Optionally, the first electronic device may also display a prompt message to inform the user that the third content has been saved to the default storage address.

[0344] In this way, when the first electronic device receives shared content that does not match the storage address format corresponding to the current display interface, it can still save the shared content through the default storage address, thus meeting the user's subsequent usage needs.

[0345] In some embodiments, the first electronic device displays a first window and a second window. The first window is the focus window, displaying a first interface of a first application, and the second window displays a fifth interface of a second application. The first electronic device detects that the second electronic device is near a first display area in the second window on its display screen, and this first display area is not covered by the first window. The first electronic device receives fourth content sent by the second electronic device. The first electronic device saves the fourth content to a fourth storage address corresponding to the fifth interface.

[0346] Optionally, after the first electronic device detects that the second electronic device is close to the first display area of ​​the second window on the display screen of the first electronic device, the first electronic device displays the second window on the top layer.

[0347] Optionally, the first electronic device detecting the approach of the second electronic device includes: the first electronic device detecting the approach of the second electronic device to a second display area within a first window on its display screen. In this way, the first electronic device can determine the application requiring interaction based on the window corresponding to the proximity of the second electronic device.

[0348] For example, such as Figure 16 As shown in (c), the receiving device (such as a first electronic device) displays a memo application window 161 (such as a first window) and a file management application window 162 (such as a second window). The display area of ​​the memo application window 161 covers a portion of the display area of ​​the file management application window 162; for example, the top-level displayed memo application window 161 is the focus window. Optionally, during the display of the memo application window 161 and the file management application window 162, the receiving device detects an approach operation from the sending device (such as a second electronic device). Based on changes in capacitance data on the display screen, it determines that the approach position of the sending device corresponds to the file management application window 162; for example, the approach position is located within the area of ​​the file management application window 162 not covered by the memo application window 161. Then, the receiving device can determine that the user has indicated interaction with the file management application window 162. If the file management application window 162 is a non-focus window, then in response to the approach of the sending device, the receiving device can set the file management application window 162 as the focus window. For example, as shown in (c). Figure 16 As shown in (d), the receiving device can place the file management application window 162 on top of the display.

[0349] In this way, even when displaying multiple windows, the first electronic device can flexibly send or receive shared content based on user operations, thus providing users with more sharing scenarios.

[0350] Furthermore, the first electronic device can set the window that needs to be shared as the focus window based on the user's sharing needs, thereby improving the user experience.

[0351] In some embodiments, after detecting that the second electronic device is near the first display area of ​​the second window on the display of the first electronic device, the first electronic device displays a selection animation of the second window.

[0352] Optionally, in Figure 10 In the scenario shown, the receiving device (such as the first electronic device) can display animations to prompt the user to confirm whether to share content from the memo application window. These animations could include, for example, window zooming in, zooming out, or special icon animations. Figure 10 As shown in (b), the receiving device displays identifier 101 on the memo application window to prompt the user that a sharing operation has been detected and to confirm whether content sharing to the memo application window is required. Optionally, in a multi-window sharing scenario, the window that the sending device (such as a second electronic device) is near can also display a selection animation to help the user confirm the window currently being interacted with.

[0353] Optionally, if the first electronic device determines that the window near the second electronic device does not have a corresponding storage address or the format of the storage address does not match the shared content, it will not display any animation effects, thereby helping the user understand that the currently shared content has not been saved to the storage address corresponding to the application displayed in the window.

[0354] In this way, dynamic effects can enrich the user's interactive experience.

[0355] In some embodiments, after launching a first application in response to a user's first operation, the first application registers with a sharing service, including: the first application registering a first capability and / or a second capability corresponding to the first application with the sharing service, wherein the second capability indicates that the first application has content to be shared. Optionally, the first electronic device sends fifth content to be shared to the second electronic device as the second electronic device approaches the first electronic device, wherein the fifth content instructs the second electronic device to save the fifth content to a fifth storage address, the fifth storage address being the storage address corresponding to the currently displayed interface of the second electronic device.

[0356] For example, the aforementioned first registration request is used to register the first capability and / or second capability corresponding to the first application with the sharing service.

[0357] Optionally, the second capability may be, for example, the ability to send and share content. For instance, after the application starts, if it has the capability to send and share content, it can send a registration request to the sharing service to register this capability. Subsequently, the sharing service can request content from the application based on its ability to send and share content.

[0358] In this way, when both electronic devices contain shared content, interaction between their respective shared content is possible. Furthermore, both electronic devices can flexibly save shared content based on their storage address registration, enhancing the user experience.

[0359] In some embodiments, the first electronic device displays a first window and a third window. The first window is the focus window and displays a first interface of a first application. The third window displays a sixth interface of a third application, and the third application has registered its corresponding third capabilities with the sharing service. The first electronic device detects that the second electronic device is near the third display area in the third window on its screen, and this third display area is not covered by the first window. The first electronic device sends the sixth content displayed on the sixth interface to the second electronic device. The sixth content instructs the second electronic device to save the sixth content to a sixth storage address, which is the storage address corresponding to the currently displayed interface of the second electronic device.

[0360] Optionally, the third capability could be, for example, the ability to send shared content.

[0361] For example, such as Figure 17 As shown in (c), the transmitting device (such as a first electronic device) displays a gallery application window 171 (such as a first window) and a file management application window 172 (such as a third window). The display area of ​​the gallery application window 171 covers a portion of the display area of ​​the file management application window 172; for example, the top-level display of the memo gallery application window 171 is the focus window. Optionally, during the display of the gallery application window 171 and the file management application window 172, if the transmitting device detects the approach of the receiving device, it determines, based on changes in capacitance data on the display screen, that the window the receiving device is approaching is the file management application window 172, and can determine that the user has indicated interaction with the file management application window 172. If the file management application window 172 is a non-focus window, then in response to the approach of the receiving device, the transmitting device can set the file management application window 172 as the focus window. For example, as shown in (c). Figure 17 As shown in (d), the sending device can place the file management application window 172 on top of the display.

[0362] In this way, even when displaying multiple windows, the first electronic device can flexibly send or receive shared content based on user operations, thus providing users with more sharing scenarios.

[0363] In some solutions, multiple embodiments of this application can be combined, and the combined solution can be implemented. Optionally, some operations in the processes of each method embodiment may be combined, and / or the order of some operations may be changed. Furthermore, the execution order between the steps of each process is merely exemplary and does not constitute a limitation on the execution order between steps; other execution orders are also possible. It is not intended to indicate that the execution order is the only possible order in which these operations can be performed. Those skilled in the art will conceive of various ways to reorder the operations described herein. In addition, it should be noted that the process details involved in one embodiment of this document are similarly applicable to other embodiments, or different embodiments may be combined.

[0364] Furthermore, some steps in the method embodiments can be equivalently replaced with other possible steps. Alternatively, some steps in the method embodiments may be optional and can be deleted in certain use cases. Or, other possible steps may be added to the method embodiments.

[0365] Furthermore, the various method embodiments can be implemented individually or in combination.

[0366] The above combination Figure 6A- Figure 19 The content saving method provided in the embodiments of this application is described in detail below. Figure 20 The first electronic device provided in the embodiments of this application is described in detail.

[0367] In one possible design, Figure 20 This is a schematic diagram of the structure of a first electronic device provided in an embodiment of this application. Figure 20 As shown, the first electronic device 2000 may include a processing unit 2001, a transceiver unit 2002, and a display unit 2003. The first electronic device 2000 can be used to implement the functions of the first electronic device involved in the above method embodiments.

[0368] Optionally, the processing unit 2001 is used to support the first electronic device 2000 in performing [operations]. Figure 19 S1901, S1902, S1903, and S1905.

[0369] Optionally, the transceiver unit 2002 is used to support the first electronic device 2000 in performing... Figure 19 S1904 in the middle.

[0370] Optionally, the display unit 2003 is used to support the first electronic device 2000 in performing operations.Figure 19 S1903 in the middle.

[0371] The transceiver unit may include a receiving unit and a transmitting unit, and may be implemented by a transceiver or transceiver-related circuit components, and may be a transceiver or transceiver module. The operation and / or function of each unit in the first electronic device 2000 are respectively to implement the corresponding process of the content saving method described in the above method embodiments. All relevant content of each step involved in the above method embodiments can be referred to the functional description of the corresponding functional unit, and will not be repeated here for the sake of brevity.

[0372] Optionally, Figure 20 The first electronic device 2000 shown may also include a storage unit ( Figure 20 (not shown in the image), this storage unit stores a program or instruction. When the processing unit 2001, transceiver unit 2002, and display unit 2003 execute the program or instruction, it causes... Figure 20 The first electronic device 2000 shown can execute the content saving method described in the above method embodiments.

[0373] Figure 20 The technical effects of the first electronic device 2000 shown can be referred to the technical effects of the content saving method described in the above method embodiments, and will not be repeated here.

[0374] In addition to being in the form of a first electronic device 2000, the technical solutions provided in this application may also be functional units or chips in the first electronic device, or devices used in conjunction with the first electronic device.

[0375] This application also provides a chip system, including: a processor coupled to a memory, the memory being used to store programs or instructions, wherein when the program or instructions are executed by the processor, the chip system implements the methods in any of the above method embodiments.

[0376] Optionally, the chip system may contain one or more processors. These processors can be implemented in hardware or software. When implemented in hardware, the processor can be a logic circuit, an integrated circuit, etc. When implemented in software, the processor can be a general-purpose processor, implemented by reading software code stored in memory.

[0377] Optionally, the chip system may contain one or more memories. The memory may be integrated with the processor or disposed separately from it; this application embodiment does not limit this. For example, the memory may be a non-transient processor, such as a read-only memory (ROM), which may be integrated with the processor on the same chip or disposed separately on different chips. This application embodiment does not specifically limit the type of memory or the arrangement of the memory and processor.

[0378] For example, the chip system may be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a micro controller unit (MCU), a programmable logic device (PLD), or other integrated chips.

[0379] It should be understood that each step in the above method embodiments can be completed by integrated logic circuits in the processor hardware or by instructions in software form. The method steps disclosed in the embodiments of this application can be directly manifested as being executed by a hardware processor, or being executed by a combination of hardware and software modules in the processor.

[0380] This application also provides a computer-readable storage medium storing a computer program. When the computer program is run on a computer, it causes the computer to perform the aforementioned steps to implement the content saving method described in the above embodiments.

[0381] This application also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned steps to implement the content saving method described in the above embodiments.

[0382] In addition, this application also provides an apparatus. Specifically, the apparatus may be a component or module, and may include one or more processors and a memory connected together. The memory is used to store a computer program. When the computer program is executed by one or more processors, the apparatus performs the content saving methods described in the above method embodiments.

[0383] The apparatus, computer-readable storage medium, computer program product, or chip provided in the embodiments of this application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects of the corresponding methods provided above, and will not be repeated here.

[0384] The steps of the methods or algorithms described in conjunction with the embodiments of this application can be implemented in hardware or by a processor executing software instructions. The software instructions can consist of corresponding software modules, which can be stored in random access memory (RAM), flash memory, read-only memory (ROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, portable hard disks, CD-ROMs, or any other form of storage medium well known in the art. An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can reside in an application-specific integrated circuit (ASIC).

[0385] Through the above description of the embodiments, those skilled in the art will clearly understand that, for the sake of convenience and brevity, the division of the above functional modules is only used as an example. In practical applications, the above functions can be assigned to different functional modules as needed; that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device, and unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0386] In the several embodiments provided in this application, it should be understood that the disclosed methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of modules or units is only a logical functional division, and there may be other division methods in actual implementation; for example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of modules or units may be electrical, mechanical or other forms.

[0387] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0388] Computer-readable storage media include, but are not limited to, any of the following: USB flash drive, portable hard drive, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, and other media capable of storing program code.

[0389] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A content storage method, characterized in that, The method is applied to a first electronic device, and the method includes: Launch the first application in response to the user's first action; The first application registers with the sharing service; During the display of the first application, a second electronic device was detected approaching the first electronic device; Receive the first content sent by the second electronic device; The first content is saved to the first storage address corresponding to the first application; wherein the first storage address is obtained based on the first application registering with the sharing service.

2. The method according to claim 1, characterized in that, Saving the first content to the first storage address corresponding to the first application includes: Obtain the first storage address corresponding to the first interface currently displayed by the first application; Save the first content to the first storage address.

3. The method according to claim 2, characterized in that, The first application registers with the sharing service, including: Register the first storage address corresponding to the first interface currently displayed by the first application with the sharing service.

4. The method according to any one of claims 1-3, characterized in that, The first application registers with the sharing service, including: Register a first capability of the first application with the sharing service, wherein the first capability indicates that the first application is able to save the received content.

5. The method according to claim 4, characterized in that, Saving the first content to the first storage address corresponding to the first application includes: The sharing service sends a first request to the first application based on the first capability registered by the first application. The first request is used to request the storage address where the first content is stored. In response to the first request, the first application sends the first storage address corresponding to the currently displayed first interface to the sharing service; The sharing service saves the first content to the first storage address.

6. The method according to any one of claims 1-5, characterized in that, The method further includes: In response to the user's second action, a second interface of the first application is displayed; Register the second storage address corresponding to the second interface with the sharing service; During the display of the second interface, in response to the second electronic device approaching the first electronic device, the second content sent by the second electronic device is received; Save the second content to the second storage address.

7. The method according to any one of claims 1-6, characterized in that, The method further includes: During the process of displaying the first interface of the first application, in response to the user's third operation, the third interface of the first application is displayed, or the first application is exited; The first application unregisters with the sharing service.

8. The method according to claim 7, characterized in that, The third interface is not configured with a corresponding storage address.

9. The method according to any one of claims 1-8, characterized in that, The method further includes: During the display of the first interface of the first application, in response to the user's fourth operation, the fourth interface of the first application is displayed, the fourth interface corresponding to the third storage address; The third content sent by the second electronic device is received when the second electronic device approaches the first electronic device; If the first format of the third content does not match the second format indicated by the third storage address, the third content will be saved to the default storage address corresponding to the first format.

10. The method according to any one of claims 1-9, characterized in that, The first electronic device displays a first window and a second window. The first window is the focus window and displays a first interface of the first application. The second window displays a fifth interface of the second application. The method further includes: The system detects that the second electronic device is close to the first display area in the second window on the display screen of the first electronic device, and the first display area is not covered by the first window; Receive the fourth content sent by the second electronic device; The fourth content is saved to the fourth storage address corresponding to the fifth interface.

11. The method according to claim 10, characterized in that, The method further includes: The second window is displayed at the top level.

12. The method according to claim 10 or 11, characterized in that, After detecting that the second electronic device is near the first display area in the second window of the display screen of the first electronic device, the method further includes: Display the selection animation in the second window.

13. The method according to any one of claims 10-12, characterized in that, The detection of the second electronic device approaching the first electronic device includes: The second electronic device is detected to be near the second display area in the first window on the display screen of the first electronic device.

14. The method according to any one of claims 1-13, characterized in that, Before saving the first content to the first storage address, the method further includes: Display the first identifier corresponding to the first content and the second identifier corresponding to the first application; The fifth operation, in which the user selects the second identifier, has been detected.

15. The method according to any one of claims 1-14, characterized in that, The detection of the second electronic device approaching the first electronic device includes: Based on the first detection data from the sensor, it is determined that the second electronic device is close to the first electronic device, wherein the sensor is an NFC sensor and / or an accelerometer. or, Based on second detection data from the display screen of the first electronic device, it is determined that the second electronic device is close to the first electronic device, and the second detection data includes capacitance data.

16. The method according to any one of claims 1-15, characterized in that, The first application registers with the sharing service, including: The first application registers a first capability and / or a second capability corresponding to the first application with the sharing service. The first capability indicates that the first application can save the received content, and the second capability indicates that the first application has content to be shared. After detecting that a second electronic device is near the first electronic device during the display of the first application, the method further includes: As the second electronic device approaches the first electronic device, it sends a fifth piece of content to be shared to the second electronic device. The fifth piece of content instructs the second electronic device to save the fifth piece of content to a fifth storage address, which is the storage address corresponding to the current display interface of the second electronic device.

17. The method according to any one of claims 1-16, characterized in that, The first electronic device displays a first window and a third window. The first window is the focused window and displays a first interface of the first application. The third window displays a sixth interface of the third application. The third application has registered its corresponding third capability with the sharing service. The method further includes: The second electronic device is detected to be near the third display area in the third window on the display screen of the first electronic device, and the third display area is not covered by the first window; The sixth content displayed on the sixth interface is sent to the second electronic device. The sixth content instructs the second electronic device to save the sixth content to a sixth storage address, which is the storage address corresponding to the current display interface of the second electronic device.

18. The method according to any one of claims 1-17, characterized in that, The receipt of the first content sent by the second electronic device includes: The first content sent by the second electronic device is received through the first connection; wherein the first connection is a communication connection established after the first electronic device detects that the second electronic device is close to the first electronic device, or the first connection is a communication connection that already exists between the first electronic device and the second electronic device.

19. A content storage method, characterized in that, The method includes: The sharing service receives the first registration request sent by the first application after it is launched; The sharing service completes the registration of the first application based on the first registration request; During the display of the first application, the sharing service receives the first content; In response to the received first content, the sharing service saves the first content to a first storage address corresponding to the first application; wherein the first storage address is obtained by the sharing service based on the registration of the first application with the sharing service.

20. The method according to claim 19, characterized in that, The sharing service saves the first content to the first storage address corresponding to the first application, including: The sharing service obtains the first storage address corresponding to the first interface currently displayed by the first application; The sharing service saves the first content to the first storage address.

21. The method according to claim 20, characterized in that, The first registration request is used to request the registration of the first storage address corresponding to the first interface currently displayed by the first application.

22. The method according to any one of claims 19-21, characterized in that, The first registration request is used to request a first capability of the first application, the first capability indicating that the first application can save the received content.

23. The method according to claim 22, characterized in that, Saving the first content to the first storage address corresponding to the first application includes: The sharing service sends a first request to the first application based on the first capability registered by the first application. The first request is used to request the storage address where the first content is stored. In response to the first request, the first application sends the first storage address corresponding to the currently displayed first interface to the sharing service; The sharing service saves the first content to the first storage address.

24. The method according to any one of claims 19-23, characterized in that, The method further includes: The sharing service receives a second registration request sent by the first application after displaying the second interface; Based on the second registration request, the sharing service completes the registration of the second storage address corresponding to the second interface; During the process of the first application displaying the second interface, the sharing service receives the second content; In response to the received second content, the sharing service saves the second content to the second storage address.

25. The method according to any one of claims 19-24, characterized in that, The method further includes: The sharing service receives a cancellation request sent by the first application. The cancellation request is sent by the first application after switching to displaying the third interface or after the first application exits. The sharing service completes the deregistration of the first application based on the deregistration request.

26. The method according to claim 25, characterized in that, The third interface is not configured with a corresponding storage address.

27. The method according to any one of claims 19-26, characterized in that, The method further includes: During the process of the first application displaying the fourth interface, the sharing service receives the third content; The sharing service obtains the third storage address corresponding to the fourth interface; If the first format of the third content does not match the second format indicated by the third storage address, the sharing service will save the third content to the default storage address corresponding to the first format.

28. The method according to any one of claims 19-27, characterized in that, The first registration request is used to register the first capability and / or the second capability corresponding to the first application with the sharing service. The first capability indicates that the first application can save the received content, and the second capability indicates that the first application has content to be shared.

29. An electronic device, characterized in that, include: The electronic device includes a processor, a memory, and a display screen, the memory and the display screen being coupled to the processor. The memory is used to store computer program code, the computer program code including computer instructions, which, when the processor reads the computer instructions from the memory, cause the electronic device to perform the method as described in any one of claims 1-18; or cause the electronic device to perform the method as described in any one of claims 19-28.

30. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a computer program that, when executed on an electronic device, causes the electronic device to perform the method as described in any one of claims 1-18; or causes the electronic device to perform the method as described in any one of claims 19-28.

31. A computer program product, characterized in that, When the computer program product is run on a computer, it causes the computer to perform the method as described in any one of claims 1-18; or, causes the computer to perform the method as described in any one of claims 19-28.

Citation Information

Patent Citations

  • Cloud-based data sharing

    CN105745636A

  • Sharing method and electronic equipment

    CN110995816A

  • Permission sharing method and electronic equipment

    CN120050127A

  • Control method for providing storage space of application and terminal and server therefor

    US20120271951A1

  • Permission sharing method and electronic device

    WO2025112740A1