Data sharing method and electronic equipment
By displaying a sharing interface on electronic devices and establishing physical links with multiple target devices, and dynamically adjusting status and priority scheduling, the problem of poor user experience caused by users sharing data one by one is solved, and efficient data transmission for simultaneous sharing across multiple devices is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-13
- Publication Date
- 2026-03-13
AI Technical Summary
In existing technologies, when users share data with multiple devices, they need to share it one by one, resulting in a poor user experience. Furthermore, sharing with multiple devices simultaneously may affect the performance of the terminal devices.
Electronic devices respond to user operations, display a sharing interface, establish physical links with multiple target devices, dynamically adjust device status, prioritize link resources, support multi-channel data transmission, and display processing status on the interface. They also enhance robustness through Wi-Fi and Bluetooth connections.
It improves the user experience, allows data to be shared with multiple devices simultaneously, reduces waiting time, and optimizes the performance and resource allocation of terminal devices.
Smart Images

Figure CN121665374A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and more particularly to a data sharing method and an electronic device. Background Technology
[0002] Currently, smartphones, tablets, and other devices allow users to wirelessly share images, documents, and other data with other devices. For example, users can share images and files from their smartphones or other devices with other devices via Wi-Fi connections.
[0003] When users want to share to multiple devices, current sharing strategies are mostly one-to-one. A user's device must first share with one device before it can share with a second. This sharing strategy is rather crude and results in a poor user experience. Summary of the Invention
[0004] In view of this, this application provides a data sharing method and an electronic device for improving the user experience when sharing data with multiple devices.
[0005] To achieve the above objectives, in a first aspect, embodiments of this application provide a data sharing method applied to an electronic device, comprising:
[0006] In response to the first operation, a sharing interface is displayed, showing multiple devices. The first operation includes turning on the sharing switch.
[0007] In response to the second operation, M physical links are established with M target devices respectively. In the sharing interface, the M target devices are marked as the first state. The second operation means selecting M target devices from multiple devices, where M is greater than or equal to 2. The first state is used to indicate that the electronic device is establishing a connection with the corresponding target device.
[0008] After successfully establishing a physical link with the first target device among M target devices, a sharing request is sent to the first target device;
[0009] Receive a message from the first target device agreeing to share, and transmit the shared data to the first target device.
[0010] The data sharing method provided in this application embodiment allows an electronic device to establish M physical links with each of the M target devices in response to a user's selection of M target devices from a sharing interface. This allows the user to simultaneously select multiple devices for data sharing. Simultaneously, the electronic device marks all devices selected by the user in the sharing interface as being in the first state of establishing a connection. Therefore, when the user selects a large number of devices, for example, exceeding the maximum number N physical links that the electronic device can establish simultaneously, the electronic device can still show the user that the requests of all selected devices are being processed (e.g., displaying both queued and establishing connection devices as being in the establishing connection state on the interface, or displaying different states for queued and establishing connection devices, with the former in the connection establishment queue state and the latter in the connection establishment state). This allows the electronic device to support the simultaneous establishment of more physical links, improving the user experience.
[0011] In one possible implementation of the first aspect, after successfully establishing a physical link with the first target device among the M target devices, the method further includes:
[0012] The first target device is authenticated through the physical link established with it.
[0013] Send a sharing request to the first target device, including:
[0014] After successfully authenticating the first target device, a sharing request is sent to the first target device.
[0015] In one possible implementation of the first aspect, after successfully establishing a physical link with the first target device among the M target devices, the method further includes:
[0016] In the sharing interface, the first target device is marked as the second state. The second state is used to indicate whether the first target device is in the authentication state or the data transmission preparation state.
[0017] Through the above implementation method, the status of each device selected by the user to share data can be dynamically adjusted in the sharing interface to reflect the differences in the interaction process between the electronic device and each device selected by the user, making multi-channel interaction more realistic.
[0018] In one possible implementation of the first aspect, the method further includes: after receiving a message of consent to share returned by the first target device, marking the status of the first target device as a third state in the sharing interface, the third state being used to indicate the data transmission status.
[0019] Through the above implementation, when the electronic device receives a sharing agreement message from any device, it displays the corresponding transmission status on the sharing interface, making the user feel that the electronic device has begun transmitting sharing data to that device. This creates the effect of the electronic device transmitting multiple data simultaneously (in reality, the electronic device can only transmit data to a maximum of N devices simultaneously; the remaining devices that need to transmit sharing data...).
[0020] In one possible implementation of the first aspect, the third state also displays the progress of data transmission to the first target device, or a progress bar for the corresponding data transmission is surrounded by an icon of the first target device.
[0021] In one possible implementation of the first aspect, the sharing interface includes a first area for indicating a user device, a second area for indicating a contact device, and a third area for indicating other devices.
[0022] Through the above implementation method, the devices discovered by the electronic device can be displayed in categories on the sharing interface, so that users can select the device they want to share.
[0023] In one possible implementation of the first aspect, the second area includes the name and icon of the successfully authenticated contact device, and the third area includes at least one of the following:
[0024] The name and icon of the non-contact device, the name and icon of the contact device to be authenticated, and the name and icon of the contact device whose authentication failed.
[0025] In one possible implementation of the first aspect, the icons in the second area are the contact icons corresponding to each contact device, and the icons in the third area are device icons.
[0026] In one possible implementation of the first aspect, M physical links are established with M target devices respectively, including:
[0027] If M is less than or equal to N, then M physical links are directly established with the M target devices, where N is the number of physical links that the electronic device is allowed to establish simultaneously.
[0028] If M is greater than N, then according to the preset physical link scheduling rules, M physical links are established with M target devices respectively. The physical link scheduling rules indicate the priority and link preemption rules of multiple devices when establishing physical links.
[0029] Through the above implementation method, when an electronic device establishes physical links with multiple devices at the same time, it can establish physical links with devices with higher priority first, thereby enabling a more reasonable allocation of physical link resources of the electronic device.
[0030] In one possible implementation of the first aspect, the physical link scheduling rules include:
[0031] The priority of establishing a physical link among devices waiting to send a sharing request, devices waiting to transmit shared data, and devices waiting to authenticate the contact device decreases in that order.
[0032] The above implementation method enables the device selected by the user to receive the sharing request as quickly as possible, further improving the user experience.
[0033] In one possible implementation of the first aspect, the method further includes:
[0034] After sending a sharing request to the first target device, if no message agreeing to share is received within the first time period and the physical link established by the electronic device is equal to N, according to the physical link scheduling rules, other target devices with higher priority will preempt the physical link currently established by the first target device, and the physical link currently established by the first target device will be disconnected.
[0035] Through the above implementation method, after an electronic device sends a sharing request to any target device, it will not disconnect the physical link with the target device for a period of time. If a message of consent to share is received from the target device during this period, the electronic device can continue to use the physical link to transmit shared data to the target device, thereby reducing the number of times the physical link is established and improving overall performance. If a message of consent to share is not received from the target device during this period, the physical link can be disconnected to release the physical link resources so that other tasks can use the physical link resources in the future.
[0036] In one possible implementation of the first aspect, after receiving the consent-to-share message returned by the first target device, the method further includes:
[0037] According to the physical link scheduling rules, a new physical link is established with the first target device, and shared data is transmitted to the first target device based on the newly established physical link.
[0038] In one possible implementation of the first aspect, the physical link includes a Wi-Fi connection, and the method further includes:
[0039] If a Wi-Fi connection to the primary target device fails, a Bluetooth connection will be established. Using Bluetooth as an escape link enhances the robustness of data sharing capabilities of electronic devices.
[0040] Secondly, embodiments of this application provide a data sharing device applied to an electronic device, including a display module, a receiving module, and a sending module.
[0041] The display module is used to: in response to a first operation, display a sharing interface, in which multiple devices are displayed, the first operation including turning on the sharing switch;
[0042] The sending module is used to: in response to the second operation, establish M physical links with M target devices respectively. The display module is also used to mark the M target devices as first state in the sharing interface. The second operation means selecting M target devices from multiple devices, where M is greater than or equal to 2. The first state is used to indicate that the electronic device is establishing a connection with the corresponding target device.
[0043] The sending module is also used to: after successfully establishing a physical link with the first target device among the M target devices, send a sharing request to the first target device;
[0044] The receiving module is used to receive a message of consent to share returned by the first target device, and the sending module is also used to transmit shared data to the first target device.
[0045] In one possible implementation of the second aspect, after successfully establishing a physical link with the first target device among the M target devices, the sending module is further configured to:
[0046] The first target device is authenticated through the physical link established with it.
[0047] After successfully authenticating the first target device, a sharing request is sent to the first target device.
[0048] In one possible implementation of the second aspect, after the sending module successfully establishes a physical link with the first target device among the M target devices, the display module is further configured to:
[0049] In the sharing interface, the first target device is marked as the second state. The second state is used to indicate whether the first target device is in the authentication state or the data transmission preparation state.
[0050] In one possible implementation of the second aspect, the display module is further configured to: after the receiving module receives a message of consent to share returned by the first target device, mark the status of the first target device as a third status in the sharing interface, the third status being used to indicate the data transmission status.
[0051] In one possible implementation of the second aspect, the third state also displays the progress of data transmission to the first target device, or a progress bar for the corresponding data transmission is surrounded by an icon of the first target device.
[0052] In one possible implementation of the second aspect, the sharing interface includes a first area for indicating a user device, a second area for indicating a contact device, and a third area for indicating other devices.
[0053] In one possible implementation of the second aspect, the second area includes the name and icon of the successfully authenticated contact device, and the third area includes at least one of the following:
[0054] The name and icon of the non-contact device, the name and icon of the contact device to be authenticated, and the name and icon of the contact device whose authentication failed.
[0055] In one possible implementation of the second aspect, the icons in the second area are the contact icons corresponding to each contact device, and the icons in the third area are device icons.
[0056] In one possible implementation of the second aspect, the sending module is further specifically used for:
[0057] If M is less than or equal to N, then M physical links are directly established with the M target devices, where N is the number of physical links that the electronic device is allowed to establish simultaneously.
[0058] If M is greater than N, then according to the preset physical link scheduling rules, M physical links are established with M target devices respectively. The physical link scheduling rules indicate the priority and link preemption rules of multiple devices when establishing physical links.
[0059] In one possible implementation of the second aspect, the physical link scheduling rules include:
[0060] The priority of establishing a physical link among devices waiting to send a sharing request, devices waiting to transmit shared data, and devices waiting to authenticate the contact device decreases in that order.
[0061] In one possible implementation of the second aspect, the sending module is further configured to:
[0062] After sending a sharing request to the first target device, if no message agreeing to share is received within the first time period and the physical link established by the electronic device is equal to N, according to the physical link scheduling rules, other target devices with higher priority will preempt the physical link currently established by the first target device, and the physical link currently established by the first target device will be disconnected.
[0063] In one possible implementation of the second aspect, the sending module is further configured to:
[0064] According to the physical link scheduling rules, a new physical link is established with the first target device, and shared data is transmitted to the first target device based on the newly established physical link.
[0065] In one possible implementation of the second aspect, the physical link includes a Wi-Fi connection, and the transmitting module is further configured to:
[0066] If a Wi-Fi connection with the first target device fails, a Bluetooth connection will be established with the first target device.
[0067] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor, wherein the memory is used to store a computer program; and the processor is used to execute the method described in the first aspect or any embodiment of the first aspect when the computer program is invoked.
[0068] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect or any embodiment of the first aspect.
[0069] Fifthly, embodiments of this application provide a computer program product that, when run on an electronic device, causes the electronic device to perform the method described in the first aspect or any embodiment of the first aspect.
[0070] Sixthly, embodiments of this application provide a chip system including a processor coupled to a memory. The processor executes a computer program stored in the memory to implement the method described in the first aspect or any embodiment thereof. The chip system may be a single chip or a chip module composed of multiple chips.
[0071] It is understood that the beneficial effects of the second to sixth aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here. Attached Figure Description
[0072] Figure 1 A flowchart illustrating a data sharing method provided in an embodiment of this application;
[0073] Figures 2 to 10 A schematic diagram of the sharing interface provided in an embodiment of this application;
[0074] Figure 11 This is a schematic diagram of the structure of the data sharing device provided in the embodiments of this application;
[0075] Figure 12 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0076] The embodiments of this application are described below with reference to the accompanying drawings. The terminology used in the implementation section of this application is only for explaining specific embodiments and is not intended to limit the application. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0077] Currently, smartphones, tablets, and other terminal devices allow users to wirelessly share data such as pictures and documents with other devices. For example, users can share pictures, files, and other data from their smartphones or other terminals with other devices via Wi-Fi connections.
[0078] When users need to share to multiple devices, one method is one-to-one sharing. This means the user's device shares with one device first, then with the second, and so on. This method is extremely inefficient, especially when the user wants to share with many devices; the waiting time becomes lengthy, resulting in a poor user experience.
[0079] Another approach is one-to-many simultaneous sharing. This means the user's device simultaneously shares with all the devices that need to share. While this method can improve sharing efficiency, it can negatively impact the performance of the user's device (the sharing device) when there are many devices sharing simultaneously or when the files to be shared are large. This can slow down the file transfer speed or even cause transfer failures, resulting in a poor user experience.
[0080] Therefore, this application provides a data sharing method that, in response to a user's selection of M target devices from multiple devices on a sharing interface, establishes M physical links with each of the M target devices. This allows the user to simultaneously select multiple devices for data sharing. Simultaneously, the electronic device marks all devices selected by the user on the sharing interface as being in the first state of establishing a connection. Thus, when the user selects a large number of devices, for example, exceeding the maximum number N physical links that the electronic device can establish simultaneously, the electronic device can still show the user that the requests of all the user-selected devices are being processed (e.g., displaying both queued and establishing devices as being in the establishing connection state on the interface, or displaying different states for queued and establishing devices, with the former in the connection establishment queue state and the latter in the connection establishment state). This allows the electronic device to support the simultaneous establishment of more physical links, improving the user experience.
[0081] Wherein, N is an integer greater than 1. N can be a fixed value, such as 6, 8, 10, etc., and N can also be adjusted according to the performance of the electronic device. This application does not specifically limit this.
[0082] Electronic devices can establish physical links with target devices through Wi-Fi connections, Bluetooth connections, or other means. In this application, the following embodiments will use the establishment of a physical link between an electronic device and a target device via Wi-Fi connections as an example for illustrative purposes.
[0083] When sharing data, electronic devices can establish Wi-Fi connections with other devices by using a station (STA) to connect to a wireless access point (AP), a peer-to-peer (P2P) interface to connect to other P2P devices, or a high-definition multimedia link (HML) interface to connect to other HML devices.
[0084] For each of the above Wi-Fi connection methods, the maximum number of Wi-Fi connections that an electronic device can simultaneously establish through that Wi-Fi connection method can be a set value. The set value for each Wi-Fi connection method can be a fixed value, or it can be adjusted according to the performance of the electronic device, the supported Wi-Fi connection methods, etc. This application embodiment does not specifically limit this. N can be less than or equal to the sum of the set values for each Wi-Fi connection method.
[0085] For example, if the maximum number of Wi-Fi connections an electronic device can establish simultaneously is 2 when connected to an AP via a STA; 3 when connected to other P2P devices via a P2P interface; and 3 when connected to other HML devices via an HML interface, then N can be 8. In this embodiment, we will use a setting of 2 for the STA-AP connection method, 3 for the P2P interface connection method, 3 for the HML interface connection method, and N = 8 as an example for illustrative purposes.
[0086] When an electronic device needs to establish a Wi-Fi connection with other devices, it can first determine the number of Wi-Fi connections currently established. If the number of established Wi-Fi connections is less than N, the electronic device can further determine the number of Wi-Fi connections established by each Wi-Fi connection method. If the number of Wi-Fi connections established by a certain Wi-Fi connection method is less than its set value, the electronic device can establish a Wi-Fi connection with other devices through that Wi-Fi connection method. If multiple connection methods have a number of Wi-Fi connections established that is less than their set value, the electronic device can randomly select a connection method (that has a number of Wi-Fi connections established that is less than its set value) to establish a Wi-Fi connection with other devices.
[0087] For example, if an electronic device establishes 3 Wi-Fi connections, of which 1 is established by connecting a STA to an AP, 0 is established by connecting to other P2P devices via a P2P interface, and 2 is established by connecting to other HML devices via an HML interface, then the electronic device can use any of these methods to establish Wi-Fi connections with other devices.
[0088] In some embodiments, if the number of Wi-Fi connections established by multiple connection methods is less than a set value, the electronic device may also prioritize establishing Wi-Fi connections with other devices by connecting to other HML devices via the HML interface. If the number of Wi-Fi connections established by connecting to other HML devices via the HML interface is equal to the set value, the electronic device may choose to establish Wi-Fi connections with other devices by connecting to other P2P devices via the P2P interface.
[0089] For example, if an electronic device establishes 3 Wi-Fi connections, of which 1 is established by connecting the STA to the AP, 0 are established by connecting to other P2P devices via the P2P interface, and 2 are established by connecting to other HML devices via the HML interface, then the electronic device can prioritize establishing Wi-Fi connections with other devices via the HML interface. Conversely, if the electronic device establishes 3 Wi-Fi connections, of which 0 are established by connecting the STA to the AP, 0 are established by connecting to other P2P devices via the P2P interface, and 3 are established via the HML interface, then the electronic device can establish Wi-Fi connections with other devices via the P2P interface.
[0090] In some embodiments, if an electronic device fails to establish a Wi-Fi connection with any other device using any Wi-Fi connection method, and if the number of Wi-Fi connections established by other Wi-Fi connection methods is less than a preset value, the electronic device can establish a Wi-Fi connection with the device using other Wi-Fi connection methods. If the number of Wi-Fi connections established by all other Wi-Fi connection methods is equal to the preset value, the electronic device can wait for the Wi-Fi connections established by other Wi-Fi connection methods to be released before establishing a Wi-Fi connection with the device using other Wi-Fi connection methods.
[0091] In some embodiments, if an electronic device cannot establish a Wi-Fi connection with any other device through any Wi-Fi connection method (i.e., the Wi-Fi connection fails to be established), the electronic device can also establish a Bluetooth connection with the device, such as a Bluetooth Low Energy (BLE) connection, to improve the robustness of the electronic device's data sharing function.
[0092] When an electronic device establishes a Bluetooth connection with another device, it can first determine the number of Bluetooth connections currently established by the electronic device. If the number of Bluetooth connections is less than M, the electronic device can directly establish a Bluetooth connection with another device; if the number of Bluetooth connections is equal to M, the electronic device can wait to establish a Bluetooth connection until a Bluetooth connection is released. M is an integer greater than 1. M can be a fixed value, such as 3, 4, 5, etc., and M can also be adjusted according to the performance of the electronic device. This application does not specifically limit this.
[0093] The data sharing method provided in this application can be applied to electronic devices, including but not limited to personal computers (PCs), smartphones, netbooks, tablets, PDAs, smart screens, etc. For ease of explanation, this application will use a mobile phone as an example for illustrative purposes in the following embodiments.
[0094] Figure 1 This is a flowchart illustrating a data sharing method provided in an embodiment of this application, as shown below. Figure 1 As shown, the data sharing method provided in this application embodiment may include the following steps:
[0095] S1001, The electronic device responds to the first operation and displays the sharing interface.
[0096] The first operation can be a user-triggered sharing operation (such as Huawei Share). Users can trigger sharing through touch (such as clicking, long pressing, etc.), or through voice input, gestures, or remote control, etc. This application embodiment does not specifically limit this.
[0097] In some embodiments, the first operation may also be the user turning on the share switch. The user can turn on the share switch by touch (such as clicking, long pressing, etc.), or by voice input, gestures, or remote control. This application embodiment does not specifically limit this.
[0098] The naming conventions for user operations in this application are merely examples and should not be construed as limiting the scope of this application. In some embodiments, the same operations may use other names. Similarly, the naming conventions for various functions, interfaces, and interface elements in this application are also merely examples and are not intended to limit this application. In other embodiments, other names may also be used.
[0099] Electronic devices can respond to the first operation by performing the device discovery operation.
[0100] When a device is discovered, the electronic device can obtain information about other devices belonging to the same user under the same account (such as device name, device type, etc.), or it can discover the device by receiving information broadcast by other devices. The information broadcast by each other device can include the device's identifier (such as device serial number, hash identifier, etc.).
[0101] The electronic devices can then perform an initial screening of the discovered devices.
[0102] Specifically, electronic devices will initially filter other devices under the same account as themselves as user devices. For each device sending a broadcast, the electronic device can use its device identifier to match the device identifiers of each contact in the address book. If a match is found, the device can be initially filtered as a contact device; if no match is found, the device can be initially filtered as a non-contact device (that is, it is initially filtered as neither a user device nor a contact device).
[0103] The electronic device can then display information about each device after initial filtering on the sharing interface.
[0104] For example, such as Figure 2 As shown, the sharing interface can include a first area (i.e., the "My Devices" area), a second area (i.e., the "Contact Devices" area), and a third area (i.e., the "Other Devices" area). The first, second, and third areas can specifically include information such as the device names and icons of the devices after initial screening. Specifically, the first area can be used to indicate user devices after initial screening, such as device 1 and device 2. The second area can be used to indicate contact devices after initial screening, such as device 3, device 4, device 5, and device 6. The third area can be used to indicate non-contact devices after initial screening, such as device 7, device 8, device 9, and device 10.
[0105] The sharing interface shown in this embodiment is merely an example and is not intended to limit this application. In some embodiments, the sharing interface displayed by the electronic device may include more or fewer interface elements than shown in the figure to achieve more or fewer functions; the position of each interface element may be adjusted as needed; each function may also be implemented using other interface elements, or may also be implemented in other user interfaces, and this embodiment does not particularly limit these aspects.
[0106] In some embodiments, after initial screening, the electronic device may further perform device authentication on the initially screened contact devices to determine whether the initially screened contact devices are genuine contact devices.
[0107] Specifically, for each initially screened contact device, the electronic device can first establish a Wi-Fi connection with the contact device and send a request to obtain the device identifier. After receiving the device identifier returned by the contact device, the electronic device can use the received device identifier to match the device identifiers corresponding to each contact in the address book. If a match is found, the initially screened contact device is successfully authenticated; if no match is found, the initially screened contact device is not authenticated.
[0108] When an electronic device establishes a Wi-Fi connection with a pre-selected contact device for authentication, it can first determine the number of established Wi-Fi connections. If the number of established Wi-Fi connections is less than N, the electronic device can directly establish a Wi-Fi connection with the pre-selected contact device (i.e., the contact device to be authenticated) for authentication. If the number of established Wi-Fi connections is equal to N, the electronic device can wait for authentication. During the waiting process, if a Wi-Fi connection is released and there are no higher-priority tasks waiting to establish a Wi-Fi connection (such as waiting to establish a Wi-Fi connection to send a sharing request, waiting to establish a Wi-Fi connection to transmit shared data, etc.), the electronic device can establish a Wi-Fi connection with the contact device to be authenticated for authentication. If there are higher-priority tasks waiting to establish Wi-Fi connections, the electronic device can continue to wait.
[0109] For successfully authenticated devices, the electronic device can change the device icon in the contact device area to the corresponding contact icon, which can be retrieved from the electronic device's address book. For example, such as... Figure 3 As shown in (a) and (b), after successful authentication, the device icon displayed in the contact device area of device 3 changes to the corresponding contact icon.
[0110] For devices that fail authentication, the electronic device can remove the device information displayed in the contact device area and display it in another device area. For example, such as... Figure 4 As shown in (a) and (b), after device 4 fails to authenticate, the device name and device icon displayed in the Contact Devices area of device 4 are changed to be displayed in the Other Devices area.
[0111] In some embodiments, if device authentication fails, it indicates that there may be a case of a fake contact device. In this case, the electronic device can prompt the user that the device authentication has failed, allowing the user to decide whether to share data with the device.
[0112] In some embodiments, the contact device area may display only the device information of successfully authenticated devices. Conversely, other device areas may display device information for non-contact devices, contact devices awaiting authentication, and contact devices that failed authentication.
[0113] For example, such as Figure 5 As shown in (a) and (b), when device authentication fails, the contact device area does not display device information, while the device information of the initially selected contact devices and the initially selected non-contact devices are displayed in the other devices area. After device 3 is successfully authenticated, the device information displayed in the other devices area is changed to be displayed in the contact device area, and the device icon of device 3 changes to the corresponding contact icon.
[0114] S1002, In response to the second operation, the electronic device establishes M Wi-Fi connections with M target devices respectively.
[0115] The second operation can be the user selecting M target devices from multiple devices on the sharing interface for data sharing. For example, the user can click on the target device's device icon, contact icon, or device name on the sharing interface. M is greater than or equal to 2.
[0116] In some embodiments, the electronic device may, in response to the second operation, directly establish M Wi-Fi connections with M target devices respectively.
[0117] Since the simultaneous establishment of numerous Wi-Fi connections by an electronic device can significantly impact its performance, in some embodiments, the electronic device may, in response to a second operation, first compare M with N (i.e., the maximum number of Wi-Fi connections the electronic device is allowed to establish simultaneously). If M is less than or equal to N, the electronic device can directly establish M Wi-Fi connections with each of the M target devices. If M is greater than N, the electronic device can first select N target devices from the M target devices, and then establish N Wi-Fi connections with each of the N target devices. The remaining M and N target devices will then need to queue for available Wi-Fi connection resources.
[0118] The electronic device can randomly select N target devices from M target devices, or it can select the N target devices that the user selected first, based on the order in which the user selects them on the sharing interface.
[0119] In some embodiments, the electronic device can also establish Wi-Fi connections with each target device according to physical link scheduling rules (used to indicate the priority and link preemption rules when the electronic device establishes physical links with multiple devices). This allows the electronic device to establish Wi-Fi connections with higher-priority devices first, thereby enabling a more rational allocation of Wi-Fi connection resources for the electronic device.
[0120] The priorities of multiple devices when establishing a physical link can include: the priority of devices waiting to send a sharing request > the priority of devices waiting to transmit shared data > the priority of devices waiting to perform contact device authentication.
[0121] For example, an electronic device is waiting to send a sharing request to device A and to transfer shared data to device B. If Wi-Fi connection resources become available, the electronic device will prioritize using those resources to establish a Wi-Fi connection with device A in order to send the sharing request to device A.
[0122] For example, an electronic device is waiting to transfer shared data to device B and is waiting to authenticate the contact device C. If Wi-Fi connection resources become available, the electronic device will prioritize using those resources to establish a Wi-Fi connection with device B in order to transfer the shared data to device B.
[0123] Link preemption rules when multiple devices establish physical links can include: physical links after a sharing request is sent to any device can be preempted by other higher-priority devices (such as those waiting to send a sharing request, waiting to transmit shared data, etc.); physical link resources occupied by other lower-priority services (such as P2P connections established by the database when the connection module records the front-end and back-end business of the application) can be preempted by other higher-priority devices (such as those waiting to send a sharing request, waiting to transmit shared data, waiting to perform contact device authentication, etc.).
[0124] S1003. In response to the second operation, the electronic device marks M target devices as first state in the sharing interface.
[0125] The first state can be used to indicate that the electronic device is establishing a connection with the corresponding target device. This way, when the user selects many devices—for example, more than the maximum number N of Wi-Fi connections the electronic device can establish simultaneously—the electronic device can still show the user that the requests of all the user-selected devices are being processed (e.g., displaying both queued and establishing devices as establishing connections on the interface, or displaying different states for queued and establishing devices respectively, with the former in the connection establishment queue state and the latter in the connection establishment state). This creates the effect that the electronic device can support establishing more Wi-Fi connections simultaneously, improving the user experience.
[0126] In some embodiments, an electronic device can mark itself as in a first state by displaying phrases such as "Establishing connection" or "Connecting" below its name. For example, such as... Figure 6 As shown in (a) and (b), when a user selects device 3, device 4 and device 5 for data sharing in the sharing interface, "Connecting" is displayed below device 3, device 4 and device 5.
[0127] In some embodiments, an electronic device can mark itself as in a first state by displaying a refresh icon below its device name. For example, as shown... Figure 7 As shown in (a) and (b), when a user selects device 3, device 4, device 5 and device 6 for data sharing in the sharing interface, a refresh icon will be displayed below device 3, device 4, device 5 and device 6.
[0128] S1004. After successfully establishing a first Wi-Fi connection with the first target device among the M target devices, the electronic device sends a sharing request to the first target device.
[0129] Electronic devices can establish a first Wi-Fi connection with the first target device through methods such as connecting to the AP via STA, connecting to other P2P devices via P2P interface, and connecting to other HML devices via HML interface.
[0130] If the above methods fail to establish a first Wi-Fi connection with the first target device, the electronic device can also establish a Bluetooth connection with the first target device and send a sharing request to the first target device through the Bluetooth connection.
[0131] In some embodiments, if the first target device is a contact device that has been preliminarily screened and has not yet been authenticated, the electronic device can still authenticate the first target device after establishing a connection with it.
[0132] In some embodiments, after successfully establishing a Wi-Fi connection with the first target device, the electronic device can also mark the first target device as a second state in the sharing interface. The second state may include an authentication state or a data transmission preparation state, etc.
[0133] Electronic devices can mark themselves as being in a second state by displaying messages such as "Authentication in progress," "Sharing request being sent," or "Data transfer preparing" below their device names. For example, after successfully establishing a Wi-Fi connection with device 4, if device 4 is among the initially selected contact devices and has not yet undergone device authentication, the electronic device will first authenticate device 4, and then... Figure 8 As shown in (a), the words "Authentication in progress" are displayed below the name of device 4. After successful authentication, a sharing request can be sent to device 4, and at the same time... Figure 8 As shown in (b), the icon of device 4 is replaced with the corresponding contact icon, and the words "Share request is being sent" are displayed below the name of device 4.
[0134] By marking M target devices as either a first state or a second state, the state of each device selected by the user for data sharing can be dynamically adjusted. This reflects the differences in the interaction process between the electronic devices and the user-selected devices, making multi-channel interactions more realistic. For example, if a user selects devices 1 through 10 for data sharing, the electronic devices simultaneously establish Wi-Fi connections with devices 1 through 8, while devices 9 and 10 queue to establish Wi-Fi connections. The sharing interface can then be as follows: Figure 9 As shown, devices 1 through 8 display the first state, with devices 1 through 4, as well as devices 7 and 8, displaying "sharing request in progress," and devices 5 and 6 displaying "authentication in progress." Devices 9 and 10 display the second state, i.e., "connecting."
[0135] In some embodiments, after sending a sharing request to the first target device, if no consent to share is received from the first target device within a first time period (e.g., 3 seconds, 5 seconds, etc.), the electronic device can disconnect the first Wi-Fi connection with the first target device. If a consent to share is received from the target device within the first time period, the electronic device can continue to use the Wi-Fi connection to transmit shared data to the first target device, thereby reducing the number of Wi-Fi connection establishments and improving overall performance. If no consent to share is received from the first target device within the first time period, the Wi-Fi connection can be disconnected, releasing Wi-Fi connection resources for subsequent tasks to use.
[0136] In some embodiments, after sending a sharing request to the first target device, if the electronic device receives a message from the first target device rejecting the sharing request, the electronic device may disconnect the first Wi-Fi connection with the first target device.
[0137] In some embodiments, after an electronic device sends a sharing request to a first target device, but before the first target device returns a message agreeing to share, if the electronic device has N established Wi-Fi connections and there are devices waiting to establish Wi-Fi connections, the electronic device can disconnect its Wi-Fi connection with the first target device. This allows devices waiting to establish Wi-Fi connections to use the Wi-Fi connection resources between the electronic device and the first target device, enabling a more efficient allocation of the electronic device's Wi-Fi connection resources.
[0138] In some embodiments, the electronic device may also release Wi-Fi connection resources occupied by other lower priority services (such as P2P connections established by the database when the connection module records the foreground and background services of the application), and preempt the released Wi-Fi connection resources to establish a first Wi-Fi connection with the first target device and send a sharing request to the first target device.
[0139] S1005. The first target device receives the sharing request and displays the sharing request.
[0140] The sharing request displayed by the first target device may include the name of the electronic device, the name and type of the data that the electronic device wants to share with the first target device, as well as accept and reject buttons.
[0141] S1006. In response to the consent sharing operation, the first target device sends a consent sharing message to the electronic device.
[0142] The action of agreeing to share can be such as the user clicking the accept button.
[0143] S1007. The electronic device receives a message from the first target device agreeing to share, and displays the progress of data transmission to the first target device in the sharing interface.
[0144] After receiving a sharing agreement message from any other device, the electronic device can mark that device's status as "third state" in the sharing interface. The third state can be used to indicate the data transmission progress when the electronic device is transmitting shared data to that device. The third state can include states such as waiting to transmit or transmitting in progress.
[0145] In some embodiments, the electronic device can also display the corresponding transmission progress on the sharing interface, making the user feel that the electronic device has started to transmit and share data to the device, thereby creating the effect that the electronic device can transmit multiple data at the same time (in reality, the electronic device can only transmit data to a maximum of N devices at the same time, and the other devices that need to transmit and share data need to queue up and wait).
[0146] For example, for devices waiting to transmit data, the electronic device can display its corresponding data transmission progress as 0 in the sharing interface; for devices that are currently transmitting and sharing data, the electronic device can display its actual data transmission progress in the sharing interface.
[0147] The transfer progress can be displayed as a percentage or as a progress bar. The progress bar can be located below or above the icon of the first target device (which could be a device icon or a contact icon), or... Figure 10 As shown, it surrounds the icon of the first target device.
[0148] In some embodiments, for devices that are queuing to transmit shared data, the electronic device may also display a low transmission progress, such as 3%, 5%, etc., in the sharing interface.
[0149] S1008. The electronic device determines whether the first Wi-Fi connection with the first target device is disconnected. If it is not disconnected, proceed to step S1009; otherwise, proceed to step S1010.
[0150] S1009. The electronic device transmits shared data to the first target device via a first Wi-Fi connection.
[0151] During the process of electronic devices transmitting shared data to the first target device, the sharing interface can display the real progress of the data transmission to the first target device.
[0152] S1010: The electronic device compares the number of established Wi-Fi connections with N. If the number of Wi-Fi connections is less than N, proceed to step S1011. If the number of Wi-Fi connections is equal to N, proceed to step S1012.
[0153] S1011. The electronic device establishes a second Wi-Fi connection with the first target device and transmits shared data to the first target device.
[0154] Electronic devices can establish a second Wi-Fi connection with the first target device through methods such as connecting to the AP via STA, connecting to other P2P devices via P2P interface, and connecting to other HML devices via HML interface.
[0155] If the above methods fail to establish a second Wi-Fi connection with the first target device, the electronic device can also establish a Bluetooth connection with the first target device and transmit shared data to the first target device through the Bluetooth connection.
[0156] S1012. The electronic device waits to transmit shared data. During the waiting process, if a Wi-Fi connection is released, it is determined whether there is a request waiting to send a share. If not, step S1013 is executed; otherwise, the device continues to wait.
[0157] S1013. The electronic device seizes the released Wi-Fi connection resources, establishes a second Wi-Fi connection with the first target device, and transmits shared data to the first target device.
[0158] If a Wi-Fi connection is released while waiting to transmit shared data, and there are currently no requests waiting to send sharing requests, the electronic device will seize the released Wi-Fi connection resources, establish a second Wi-Fi connection with the first target device, and transmit shared data to the first target device.
[0159] In some embodiments, while waiting to transmit shared data, the electronic device may also release some Wi-Fi connection resources occupied by other lower priority services, and preempt the released Wi-Fi connection resources to establish a second Wi-Fi connection with the first target device and transmit shared data to the first target device.
[0160] S1014. The first target device receives shared data sent by the electronic device.
[0161] The data sharing method provided in this application embodiment allows an electronic device to establish M physical links with each of the M target devices in response to a user's selection of M target devices from a sharing interface. This allows the user to simultaneously select multiple devices for data sharing. Simultaneously, the electronic device marks all devices selected by the user in the sharing interface as being in the first state of establishing a connection. Therefore, when the user selects a large number of devices, for example, exceeding the maximum number N physical links that the electronic device can establish simultaneously, the electronic device can still show the user that the requests of all selected devices are being processed (e.g., displaying both queued and establishing connection devices as being in the establishing connection state on the interface, or displaying different states for queued and establishing connection devices, with the former in the connection establishment queue state and the latter in the connection establishment state). This allows the electronic device to support the simultaneous establishment of more physical links, improving the user experience.
[0162] Those skilled in the art will understand that the above embodiments are exemplary and not intended to limit this application. Where possible, one or more of the above steps can be selectively combined to obtain one or more other embodiments. For example, in some embodiments, only steps S1001 to S1006, S1013, and S1014 may be performed; in some embodiments, steps S1007 and S1008 may be omitted. In some embodiments, some steps S1007 to S1013 may be performed. Those skilled in the art can arbitrarily select and combine the above steps as needed, and all combinations that do not depart from the essence of the present application fall within the protection scope of this application.
[0163] Based on the same concept, as an implementation of the above method, this application provides a data sharing device. This device embodiment corresponds to the aforementioned method embodiment. For ease of reading, this device embodiment will not repeat the details of the aforementioned method embodiment one by one, but it should be clear that the device in this embodiment can implement all the contents of the aforementioned method embodiment.
[0164] Figure 11 This is a schematic diagram of the structure of the data sharing device provided in the embodiments of this application, such as... Figure 11 As shown, the data sharing device provided in this embodiment may include a display module 210, a receiving module 220, and a sending module 230.
[0165] The display module 210 is configured to: in response to a first operation, display a sharing interface, wherein the sharing interface displays multiple devices, and the first operation includes turning on the sharing switch;
[0166] The sending module 230 is used to: in response to the second operation, establish M physical links with M target devices respectively. The display module 210 is also used to mark the M target devices as a first state in the sharing interface, wherein the second operation indicates that M target devices are selected from multiple devices, M is greater than or equal to 2, and the first state indicates that the electronic device is establishing a connection with the corresponding target device.
[0167] The sending module 230 is also used to: after successfully establishing a physical link with the first target device among the M target devices, send a sharing request to the first target device;
[0168] The receiving module 220 is used to receive a message of consent to share returned by the first target device, and the sending module is also used to transmit shared data to the first target device.
[0169] As an optional implementation, after successfully establishing a physical link with the first target device among the M target devices, the sending module 230 is further configured to:
[0170] The first target device is authenticated through the physical link established with it.
[0171] After successfully authenticating the first target device, a sharing request is sent to the first target device.
[0172] As an optional implementation, after the sending module 230 successfully establishes a physical link with the first target device among the M target devices, the display module 210 is further configured to:
[0173] In the sharing interface, the first target device is marked as the second state. The second state is used to indicate whether the first target device is in the authentication state or the data transmission preparation state.
[0174] As an optional implementation, the display module 210 is further configured to: after the sending module 230 receives the message of consent to share returned by the first target device, mark the status of the first target device as a third status in the sharing interface, the third status being used to indicate the data transmission status.
[0175] As an optional implementation, the third state also displays the progress of data transmission to the first target device, or a progress bar for the corresponding data transmission is displayed around the icon of the first target device.
[0176] As an alternative implementation, the sharing interface includes a first area for indicating a user device, a second area for indicating a contact device, and a third area for indicating other devices.
[0177] As an optional implementation, the second area includes the name and icon of the successfully authenticated contact device, and the third area includes at least one of the following:
[0178] The name and icon of the non-contact device, the name and icon of the contact device to be authenticated, and the name and icon of the contact device whose authentication failed.
[0179] As an optional implementation, the icons in the second area are the contact icons corresponding to each contact's device, and the icons in the third area are the device icons.
[0180] As an optional implementation, the sending module 230 is also specifically used for:
[0181] If M is less than or equal to N, then M physical links are directly established with the M target devices, where N is the number of physical links that the electronic device is allowed to establish simultaneously.
[0182] If M is greater than N, then according to the preset physical link scheduling rules, M physical links are established with M target devices respectively. The physical link scheduling rules indicate the priority and link preemption rules of multiple devices when establishing physical links.
[0183] As an optional implementation, the physical link scheduling rules include:
[0184] The priority of establishing a physical link among devices waiting to send a sharing request, devices waiting to transmit shared data, and devices waiting to authenticate the contact device decreases in that order.
[0185] As an optional implementation, the sending module 230 is also used for:
[0186] After sending a sharing request to the first target device, if no message agreeing to share is received within the first time period and the physical link established by the electronic device is equal to N, according to the physical link scheduling rules, other target devices with higher priority will preempt the physical link currently established by the first target device, and the physical link currently established by the first target device will be disconnected.
[0187] As an optional implementation, the sending module 230 is also used for:
[0188] According to the physical link scheduling rules, a new physical link is established with the first target device, and shared data is transmitted to the first target device based on the newly established physical link.
[0189] As an optional implementation, the physical link includes a Wi-Fi connection, and the transmitting module 230 is further used for:
[0190] If a Wi-Fi connection with the first target device fails, a Bluetooth connection will be established with the first target device.
[0191] The data sharing device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, so it will not be described again here.
[0192] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments 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. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0193] Based on the same concept, this application also provides an electronic device, please refer to... Figure 12 , Figure 12 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 12 As shown, the electronic device provided in this application embodiment may include: a memory 310 and a processor 320. The memory 310 is used to store computer programs; the processor 320 is used to implement the method described in the above method embodiment when the computer program is invoked.
[0194] The electronic device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, so they will not be described again here.
[0195] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the methods described in the above-described method embodiments.
[0196] This application also provides a computer program product that, when run on an electronic device, causes the electronic device to implement the method described in the above-described method embodiments.
[0197] This application also provides a chip system including a processor coupled to a memory. The processor executes a computer program stored in the memory to implement the method described in the above-described method embodiments. The chip system may be a single chip or a chip module composed of multiple chips.
[0198] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, or magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).
[0199] Those skilled in the art will understand that implementing all or part of the processes in the above embodiments can be accomplished by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium can include various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.
[0200] The naming or numbering of steps in this application does not mean that the steps in the method flow must be executed in the time / logical order indicated by the naming or numbering. The execution order of the named or numbered process steps can be changed according to the technical purpose to be achieved, as long as the same or similar technical effect can be achieved.
[0201] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0202] In the embodiments provided in this application, it should be understood that the disclosed apparatus / devices and methods can be implemented in other ways. For example, the apparatus / device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0203] It should be understood that in the description of this application and the appended claims, the terms "comprising," "including," "having," and any variations thereof are intended to cover non-exclusive inclusion and mean "including but not limited to," unless otherwise specifically emphasized. For example, a process, method, system, product, or apparatus that includes a series of steps or modules is not necessarily limited to those steps or modules that are explicitly listed, but may include other steps or modules that are not explicitly listed or that are inherent to such process, method, product, or apparatus.
[0204] Furthermore, in the description of this application, unless otherwise stated, "multiple" means two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0205] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."
[0206] Furthermore, in the description of this application and the appended claims, the terms "first," "second," etc., are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence, nor should they be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein; features defined as "first" or "second" may explicitly or implicitly include at least one of those features.
[0207] In the embodiments described in this application specification, the words "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design that is described as "exemplarily" or "for example" in the embodiments of this application specification should not be construed as being more preferred or advantageous than other embodiments or design options. Specifically, the use of the words "exemplarily" or "for example" is intended to present the relevant concepts in a specific manner.
[0208] References to "one embodiment" or "some embodiments" in this specification mean that one or more embodiments of this specification include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in still other embodiments" 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.
[0209] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A data sharing method applied to electronic devices, characterized in that, include: In response to a first operation, a sharing interface is displayed, which displays multiple devices, the first operation including turning on the sharing switch; In response to the second operation, M physical links are established with M target devices respectively. In the sharing interface, the M target devices are marked as a first state. The second operation represents selecting the M target devices from the plurality of devices, where M is greater than or equal to 2. The first state is used to indicate that the electronic device is establishing a connection with the corresponding target device. After successfully establishing a physical link with the first target device among the M target devices, a sharing request is sent to the first target device; Receive the consent message returned by the first target device and transmit the shared data to the first target device.
2. The method according to claim 1, characterized in that, After successfully establishing a physical link with the first target device among the M target devices, the method further includes: The first target device is authenticated through the physical link established with it. Sending a sharing request to the first target device includes: After successfully authenticating the first target device, a sharing request is sent to the first target device.
3. The method according to claim 1 or 2, characterized in that, After successfully establishing a physical link with the first target device among the M target devices, the method further includes: In the sharing interface, the first target device is marked as a second state, which indicates that the first target device is in an authentication state or a data transmission preparation state.
4. The method according to any one of claims 1-3, characterized in that, The method further includes: after receiving a message of consent to share returned by the first target device, marking the status of the first target device as a third status in the sharing interface, wherein the third status is used to indicate the data transmission status.
5. The method according to claim 4, characterized in that, The third state also displays the progress of data transmission to the first target device, or a progress bar for data transmission is displayed around the icon of the first target device.
6. The method according to any one of claims 2-5, characterized in that, The sharing interface includes a first area for indicating the user's device, a second area for indicating the contact's device, and a third area for indicating other devices.
7. The method according to claim 6, characterized in that, The second area includes the name and icon of the successfully authenticated contact device, and the third area includes at least one of the following: The name and icon of the non-contact device, the name and icon of the contact device to be authenticated, and the name and icon of the contact device whose authentication failed.
8. The method according to claim 6 or 7, characterized in that, The icons in the second area are the contact icons corresponding to each contact's device, and the icons in the third area are device icons.
9. The method according to any one of claims 1-8, characterized in that, The establishment of M physical links with M target devices respectively includes: If M is less than or equal to N, then M physical links are directly established with the M target devices, where N is the number of physical links that the electronic device is allowed to establish simultaneously. If M is greater than N, then according to the preset physical link scheduling rules, M physical links are established with the M target devices respectively. The physical link scheduling rules indicate the priority and link preemption rules of the multiple devices when establishing physical links.
10. The method according to claim 9, characterized in that, The physical link scheduling rules include: The priority of establishing a physical link among devices waiting to send a sharing request, devices waiting to transmit shared data, and devices waiting to authenticate the contact device decreases in that order.
11. The method according to claim 9 or 10, characterized in that, The method further includes: After sending the sharing request to the first target device, if no message agreeing to share is received within a first time period and the physical link established by the electronic device is equal to N, according to the physical link scheduling rules, other target devices with higher priority will preempt the physical link currently established by the first target device, and the physical link currently established by the first target device will be disconnected.
12. The method according to claim 11, characterized in that, After receiving the consent to share message returned by the first target device, the method further includes: According to the physical link scheduling rules, a new physical link is established with the first target device, and shared data is transmitted to the first target device based on the newly established physical link.
13. The method according to any one of claims 1-12, characterized in that, The physical link includes a Wi-Fi connection, and the method further includes: If a Wi-Fi connection with the first target device fails to be established, a Bluetooth connection is established with the first target device.
14. An electronic device, characterized in that, include: A memory and a processor, the memory being used to store a computer program; the processor being used to execute the method as described in any one of claims 1-13 when the computer program is invoked.
15. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-13.
16. A computer program product, characterized in that, When the computer program product is run on an electronic device, it causes the electronic device to perform the method as described in any one of claims 1-13.
17. A chip system, characterized in that, The chip system includes a processor coupled to a memory, the processor executing a computer program stored in the memory to implement the method as described in any one of claims 1-13.