Data sharing method and device, and storage medium
By receiving the user's sharing operation on the first device and displaying the recommended device, allowing the user to select the target device and send the target content, the limitations of cross-device sharing in the prior art are solved, and fast and simple cross-device sharing is achieved.
Patent Information
- Application Number
- CN202411659508.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-03-07
AI Technical Summary
In the prior art, sharing of files and applications is mainly limited to different applications of the same device or between devices with the same account, and rapid sharing across devices cannot be achieved.
By receiving the user's sharing operation on the first device, displaying the sharing identification of the target content and the device identification of the recommended device, the user is allowed to select the target device and send the target content to the device, thereby realizing rapid sharing across devices.
It achieves rapid determination of target devices and cross-device sharing of target content, simplifying the sharing process of files and applications.
Smart Images

Figure CN119576183A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to data processing technology, and in particular to a data sharing method and device, and a storage medium. Background Art
[0002] As terminal devices become more and more popular in people's daily lives, the frequency of file and application sharing between devices is increasing. The selection of target devices is a key interactive step in the sharing operation.
[0003] In related technologies, sharing of files and applications is limited to different applications on the same device or between devices with the same account. Summary of the invention
[0004] The embodiments of the present application provide a data sharing method and device, and a storage medium, which can accurately extract the hierarchical relationship between elements of an architecture diagram.
[0005] The technical solution of the embodiment of the present application is implemented as follows:
[0006] The present application provides a data sharing method, which is applied to a first device. The method includes:
[0007] receiving a sharing operation of a user for a target content, wherein the sharing operation is used to instruct sharing of the target content;
[0008] Displaying a sharing identifier of the target content in a first area of the sharing interface, and displaying a device identifier of each of the one or more recommended devices in a second area of the sharing interface;
[0009] selecting a target device from among the one or more recommended devices;
[0010] The target content is sent to the target device.
[0011] This embodiment of the present application provides a first device, the first device comprising:
[0012] A receiving module, configured to receive a sharing operation of a user on a target content, wherein the sharing operation is used to instruct sharing of the target content;
[0013] A display module, configured to display a sharing identifier of the target content in a first area of the sharing interface, and to display a device identifier of each of the one or more recommended devices in a second area of the sharing interface;
[0014] A determination module configured to select a target device from the one or more recommended devices;
[0015] A transmission module configured to send the target content to the target device
[0016] An embodiment of the present application provides a first device, including a processor, wherein the processor is configured to:
[0017] receiving a sharing operation of a user for a target content, wherein the sharing operation is used to instruct sharing of the target content;
[0018] Displaying a sharing identifier of the target content in a first area of the sharing interface, and displaying a device identifier of each of the one or more recommended devices in a second area of the sharing interface;
[0019] selecting a target device from among the one or more recommended devices;
[0020] The target content is sent to the target device.
[0021] An embodiment of the present application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps in the above-mentioned data sharing method are implemented.
[0022] An embodiment of the present application provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned data sharing method is implemented.
[0023] The chip provided in the embodiment of the present application is used to implement the above-mentioned data sharing method. The chip includes: a processor, which is used to call and run a computer program from a memory, so that a device equipped with the chip executes the above-mentioned data sharing method.
[0024] The data sharing method, device, and storage medium provided in the embodiments of the present application receive a user's sharing operation for target content, wherein the sharing operation is used to indicate sharing of the target content; display a sharing identifier of the target content in a first area of a sharing interface, and display a device identifier of each of one or more recommended devices in a second area of the sharing interface; select a target device from the one or more recommended devices; and send the target content to the target device, thereby sharing the target content to the target device. In the embodiments of the present application, one or more recommended devices are displayed in a sharing interface, a target device is determined from one or more recommended devices, and the target content is shared to the target device, thereby realizing rapid determination of the target device and cross-device sharing of the target content. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 This is an optional flow chart of the data sharing method provided in the embodiment of the present application;
[0026] Figure 2is an optional schematic diagram of a sharing interface provided in an embodiment of the present application;
[0027] Figure 3 This is an optional flow chart of the data sharing method provided in the embodiment of the present application;
[0028] Figure 4 is an optional schematic diagram of a drag operation provided in an embodiment of the present application;
[0029] Figure 5 This is an optional flow chart of the data sharing method provided in the embodiment of the present application;
[0030] Figure 6 This is an optional flow chart of the data sharing method provided in the embodiment of the present application;
[0031] Figure 7 is an optional schematic diagram of a sharing interface provided in an embodiment of the present application;
[0032] Figure 8 is an optional schematic diagram of a sharing interface provided in an embodiment of the present application;
[0033] Fig. 9 is an optional schematic diagram of a sharing interface provided in an embodiment of the present application;
[0034] Fig.10 is an optional schematic diagram of a sharing interface provided in an embodiment of the present application;
[0035] Fig.11 This is an optional flow chart of the data sharing method provided in the embodiment of the present application;
[0036] Fig.12 is an optional schematic structural diagram of the first device provided in an embodiment of the present application;
[0037] Fig.13 is an optional schematic structural diagram of an electronic device provided in an embodiment of the present application;
[0038] Fig.14 is an optional schematic structural diagram of an electronic device provided in an embodiment of the present application;
[0039] Fig.15 It is an optional schematic structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0040] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.
[0041] The embodiments of the present application can provide a data sharing method, device and storage medium. In practical applications, the data sharing method can be implemented by electronic devices, and each functional entity in the electronic device can be collaboratively implemented by hardware resources of computer devices (such as terminal devices, network devices, etc.), such as computing resources such as processors, and communication resources (such as for supporting various communication methods such as optical cables and cellular).
[0042] Of course, the embodiments of the present application are not limited to being provided as methods and hardware, and there may be multiple implementation methods, such as being provided as a storage medium (storing instructions for executing the data sharing method provided by the embodiments of the present application).
[0043] Below, various embodiments of the data sharing method, device, and storage medium provided in the embodiments of the present application are described.
[0044] The data sharing method provided in the embodiment of the present application is applied to the first device, and can be as follows: Figure 1 As shown, including:
[0045] S101: Receive a sharing operation of a user on target content, where the sharing operation is used to instruct sharing of the target content.
[0046] The user can operate the content in the first device to determine the target content, and the content format of the target content can be: link, text, picture, audio, video, application, etc. In the embodiment of the present application, the content format of the target content is not limited.
[0047] After the target content is determined, the user can perform a sharing operation on the target content, and the first device receives the sharing operation for the target content. In the embodiment of the present application, the sharing operation may include set operations, such as: a long press operation, that is, the target content is selected for a duration greater than the first duration, a double-click operation, a sliding operation of a set trajectory, etc. The sharing operation may also include the selection of a sharing option, such as: a sharing option is provided in the content operation interface for the target content, and when the sharing option is selected by the user, it can be considered that the target content has received the sharing operation. In the embodiment of the present application, the sharing operation can also be implemented based on buttons, voice operations, etc. In the embodiment of the present application, the implementation method of the sharing operation is not limited.
[0048] S102: Displaying a sharing identifier of the target content in a first area of the sharing interface, and displaying a device identifier of each of the one or more recommended devices in a second area of the sharing interface.
[0049] When the first device receives a sharing operation for the target content, in response to the sharing operation for the target content, a sharing interface is displayed. The sharing interface may include a first area and a second area, the first area of the sharing interface is used to present the target content, and the second area of the sharing interface is used to present a list of recommended devices.
[0050] Here, the sharing interface may be a new interface displayed, or an interface in which a second area is added to the interface when the target receives the sharing operation. The first area and the second area may be two different areas in one page, or two different pages.
[0051] The first device displays a sharing mark of the target content in a first area of the display interface, wherein the sharing mark of the target content may include one or more of the following: the target content, description information of the target content, or an icon of the target content.
[0052] In one example, the content format of the target content is a link, and the identifier of the target content is the content of the link.
[0053] In one example, the content format of the target content is text, and the identifier of the target content is a section of text in the text.
[0054] In one example, the content format of the target content is a picture, and the identifier of the target content is a thumbnail of the picture.
[0055] In one example, the content format of the target content is video, and the identification of the target content includes an icon and description information of the video.
[0056] In one example, the content format of the target content is an application, and the identifier of the target content includes an icon and description information of the application.
[0057] The first device displays device identifications of one or more devices in a second area in the display interface, wherein the devices corresponding to the device identifications displayed in the second area can be understood as recommended devices, ie, recommended devices for receiving target content.
[0058] In the embodiment of the present application, one or more recommended devices may be devices near the first device, that is, devices scanned by the first device.
[0059] The device identification of the recommended device may include information that can intuitively identify the device, such as a device icon and a device name. The device icon may be related to the device type. The device type of the recommended device may include one of the following: mobile phone, notebook, tablet, television, monitor, etc.
[0060] In one example, the one or more recommended devices include: device A, device B, and device C, and the following contents are displayed in the second area: an icon of device A, an icon of device B, and an icon of device C.
[0061] In one example, the one or more recommended devices include: device A, device B, and device C, and the following contents are displayed in the second area: the device name of device A, the device name of device B, and the device name of device C.
[0062] In the embodiment of the present application, the device identification may also include an identification characterizing the relationship between the recommended device and the first device, wherein the identification is different based on the relationship between the recommended device and the first device. The relationship between the recommended device and the first device may include one of the following: a device with the same account, a friend device, and an unfamiliar device. Among them, the friend device may include: an online friend device and an offline friend device.
[0063] In one example, one or more recommended devices include: device A, device B and device C, and the following content is displayed in the second area: for device A, the device name of device A and the relationship identifier representing the device with the same account are displayed; for device B, the device name of device B and the relationship identifier representing the friend's device are displayed; for device C, the device name of device C and the relationship identifier representing the unfamiliar device are displayed.
[0064] In the embodiment of the present application, the second area can be displayed distinguishably based on suspension, lines, a color different from the color of the first area, etc.
[0065] In the embodiment of the present application, the position distribution of the first area and the second area in the sharing interface can be set based on demand.
[0066] In one example, the first area is located in a partial area of the sharing interface, and the second area is an area of the sharing interface excluding the first part.
[0067] In one example, the first area is located on a left portion of the sharing interface, and the second area is located on a right portion of the sharing interface.
[0068] In one example, if Figure 2 As shown, the target content is file 1, the first area 201 displays the icon and file name of file 1, and the recommended devices displayed in the second area 202 include: recommended device A, recommended device B, recommended device C and recommended device D, and for each recommended device, the second area displays the icon and device name of each recommended device.
[0069] In one possible implementation, when one or more recommended devices include multiple recommended devices, the multiple recommended devices are sorted, wherein the sorting may include file transfer attributes of each recommended device, and the file transfer attributes are used to characterize one or more of the following: a historical sharing record of data sharing from the first device to the second device, a relationship between the second device and the first device, and a degree of match between a device type of the second device and the target content.
[0070] S103: Select a target device from the one or more recommended devices.
[0071] When the second area of the sharing interface displays the device identifications of one or more recommended devices, the first device can select one or more recommended devices as a target device. The first device can select one or more target devices.
[0072] In one example, if Figure 2 As shown, the recommended devices displayed in the second area 202 include: recommended device A, recommended device B, recommended device C and recommended device D. When the recommended device A is selected by the user, the recommended device A is the target device.
[0073] In one example, if Figure 2 As shown, the recommended devices displayed in the second area 202 include: recommended device A, recommended device B, recommended device C and recommended device D. When the recommended device A and the recommended device B are selected by the user, the target device includes the recommended device A and the recommended device B.
[0074] The first device may select a target device from one or more recommended devices based on a user's selection operation, or may select a target device based on target content. The user's selection operation may include a click operation, a drag operation, etc. When the first device selects a target device based on target content, a recommended device that supports the target content may be determined as the target device.
[0075] S104: Send the target content to the target device.
[0076] When the target device is determined, the first device sends the target content to the target device. When there are multiple target devices, the first device sends the target content to each of the multiple target devices.
[0077] In an embodiment of the present application, the first device may send the target content to the target device based on the first connection. In one example, the first connection is a wifi direct connection (wifi P2P connection).
[0078] In an embodiment of the present application, when the target device receives the target content, it can determine the target application that loads or runs the target content, and start the target application in the target device to load or run the target content in the target application; it can also load the target content in the application running in the foreground of the target application.
[0079] In one example, the target content is a link. When the target device receives the link, it starts a browser, loads the received link in the browser, and accesses the link.
[0080] In one example, the target content is a picture. When the target device receives the picture, it starts a picture viewing application and loads the picture in the picture viewing application.
[0081] In one example, the target content is a picture. When the target device receives the picture and detects that a text editing application is running in the foreground, the picture is loaded into the current editing position of the text editing application.
[0082] The data sharing method provided in the embodiment of the present application receives a user's sharing operation for target content, wherein the sharing operation is used to indicate sharing of the target content; displays a sharing logo of the target content in a first area of the sharing interface, and displays a device logo of each of one or more recommended devices in a second area of the sharing interface; selects a target device from the one or more recommended devices; and sends the target content to the target device, thereby sharing the target content to the target device. In the embodiment of the present application, one or more recommended devices are displayed in the sharing interface, the target device is determined from the one or more recommended devices, and the target content is shared to the target device, thereby realizing rapid determination of the target device and cross-device sharing of the target content.
[0083] In some embodiments, the step S103 selects a target device from the one or more recommended devices, such as Figure 3 As shown, including:
[0084] S1031, receiving a drag operation on a sharing mark of the target content, wherein a position of the sharing mark of the target content changes as a position of the drag operation changes;
[0085] S1032: When the sharing identifier of the target content stays at a target location in the second area, determine that a recommended device corresponding to the device identifier of the target location is the target device.
[0086] In the embodiment of the present application, the first device may select a target device based on a drag operation on the target content.
[0087] Here, the first device receives a drag operation of the user on the sharing mark of the target device, and when the drag operation is not stopped, the position of the sharing mark of the target content changes with the change of the position of the drag operation.
[0088] In an embodiment of the present application, when a drag operation is received for a sharing icon of target content, while the sharing icon of the target content in the first area remains unchanged, a sharing icon can be copied for the target content, and the position of the copied sharing icon changes as the position of the drag operation in the display interface changes.
[0089] In an embodiment of the present application, the sharing mark of the target content that changes with the position of the drag operation can be set to be semi-transparent, thereby facilitating the user to identify the position of the drag operation without affecting the display of other content in the sharing interface.
[0090] When the dragging operation stops, the sharing mark of the target content changes with the position of the dragging operation and stays. If the staying position of the sharing mark of the target content is located in the second area, the staying position of the sharing mark of the target content is determined as the target position, and the device identifier of the target position is determined.
[0091] In a possible implementation, it can be determined whether the target location is located on the device identifier of the recommended device. If so, the device identifier is determined to be the device identifier of the target location. If not, it is determined that there is no device identifier at the target location.
[0092] In one possible implementation, in the second display area, there is an occupied area for the device identification of each recommended device, and the occupied areas of the device identifications of different recommended devices do not overlap. The first device can determine the occupied area to which the target position belongs, and determine the device identification corresponding to the occupied area to which the target position belongs as the device identification of the target position.
[0093] After the first device determines the device identifier of the target location, it determines the recommended device corresponding to the device identifier as the target device.
[0094] In one example, if Figure 4 As shown, the target content is file 1, the first area 201 displays the icon and file name of file 1, and the recommended devices displayed in the second area 202 include: recommended device A, recommended device B, recommended device C and recommended device D, and for each recommended device, the second area displays the icon and device name of each recommended device; when the user drags the icon and file name of file 1, and drags the icon and file name of file 1 to position 401 and stays there, the recommended device C to which the icon at position 401 belongs is the target device.
[0095] In an embodiment of the present application, the first device selects a target device based on a drag operation on the target content, so that the user can click and drag the file to the second area and select the target device in the second area, thereby achieving simpler and faster file sharing.
[0096] In some embodiments, a data sharing method applied to a first device, such as Figure 5 As shown, it also includes:
[0097] S501, receiving a first broadcast message sent by each second device among one or more second devices, where the first broadcast message includes device information of the corresponding second device;
[0098] S502: Determine the one or more recommended devices from the one or more second devices.
[0099] In the device discovery phase, the first device may receive a first broadcast message sent by one or more second devices, wherein the second broadcast message sent by the second device includes the device information of the second device, wherein the device information of the second device may include: device ID, i.e., device number, device Bluetooth address, device account information, etc. The reception of the second broadcast message indicates that the second device is located near the first device, and the received device information is used to establish a Bluetooth connection with the first device. After the first device establishes a Bluetooth connection with the second device, a small amount of information can be sent.
[0100] For the second device that receives the first broadcast message, the first device may establish a Bluetooth connection with some or all of the devices.
[0101] After receiving the first broadcast message from one or more second devices, the first device identifies the second devices based on the device information carried in the first broadcast message, and determines one or more recommended devices from the one or more second devices.
[0102] In the embodiment of the present application, the second device may be provided with a mutual transmission switch, and after the mutual transmission switch is turned on, the first broadcast message may be periodically sent. The second device may also periodically send the first broadcast message after changing from a screen-off state to a screen-on state.
[0103] In a possible implementation, the first device may send a broadcast message to perform device scanning. The broadcast message sent by the first device may carry device information of the first device, wherein the device information of the first device may include: device ID, i.e., device number, device Bluetooth address, device account information, etc. The sending of the first broadcast message is used to notify surrounding devices that the first device performs device scanning.
[0104] In an embodiment of the present application, the sender of the first broadcast message received by the first device is used as the second device, and the recommended device is determined from one or more second devices of the received second broadcast message, thereby ensuring that the recommended device is a device near the first device, and the recommended device does not need to be close to the first device.
[0105] In some embodiments, the one or more second devices include multiple second devices, and S502 determines the one or more recommended devices from the one or more second devices, including:
[0106] S5021. Determine a file transfer attribute of each second device among the plurality of second devices, where the file transfer attribute is used to represent one or more of the following: a historical sharing record of data sharing from the first device to the second device, a relationship between the second device and the first device, and a matching degree between a device type of the second device and the target content;
[0107] S5022: Sort the multiple second devices based on a file transfer attribute of each second device in the multiple second devices;
[0108] S5023: Based on the ranking results of the multiple second devices, select a first number of recommended devices from the multiple second devices.
[0109] In the case where a plurality of second devices are included, the first device may sort the plurality of second devices, and select some devices from the plurality of second devices as recommended devices according to the sorting result.
[0110] In a possible implementation, when the number of the plurality of second devices is greater than the first number, a first number of recommended devices is selected from the plurality of second devices, and when the number of the plurality of second devices does not reach the first number, the plurality of second devices are used as the plurality of recommended devices, wherein the first number is the number of identifications of the recommended devices that can be displayed in the first area,
[0111] When the first device selects a first number of recommended devices from multiple second devices, it determines a file transfer attribute of each second device, wherein the file transfer attribute includes one or more of the following information: first information representing the number of times the first device shares content with the second device, second information representing the time of the most recent device sharing with the second device by the first device, third information representing the closeness of the relationship between the first device and the second device, and fourth information representing the degree of matching between the device type of the second device and the target content.
[0112] In one example, the first information is the number of times the first device shares content with the second device, the second information is the ranking of the second device in the order of the most recent content sharing by the first device to each of the multiple second devices, the third information is a relationship index representing the relationship between the first device and the second device, and the fourth information is the degree of match between the device type of the second device and the target content.
[0113] In one example, the first information is the number of times the first device shares content with the second device, the second information is the time when the first device last shared content with the second device, the third information is a relationship index representing the relationship between the first device and the second device, and the fourth information is the degree of match between the device type of the second device and the target content.
[0114] In the embodiment of the present application, the second devices may be sorted based on one or more of the following principles:
[0115] Principle 1: Most frequently used principle: For devices that are frequently shared, place them at the front;
[0116] Principle 2: Most recently used: devices that have been shared recently are placed at the front.
[0117] Principle 3: Relationship distance principle: The order of display devices can be devices with the same account -> devices of friends -> devices of strangers;
[0118] Principle 4: Device capability principle: Recommend matching devices based on sharing method or file type. For example, if the sharing method is screen projection, put large-screen devices such as tablets, TVs, and PCs in the front row.
[0119] Among them, the first information represents the first principle, the second information represents the second principle, the third information represents the third principle, and the fourth information represents the fourth principle.
[0120] For the second device, the first device scores the second device based on one or more of the first to fourth information of the second device. After determining the score of each second device, the plurality of second devices are sorted based on the branches of each second device, and a first number of second devices with high scores are selected as the first number of recommended devices. In an embodiment of the present application, one or more of the first to fourth information can be calculated based on the device recommendation algorithm to obtain a score, so that the obtained score can reflect the user's sharing intention.
[0121] Here, when a plurality of recommended devices are displayed in the second area, the identifiers of the respective recommended devices may be displayed in order based on the scores of the plurality of recommended devices.
[0122] The method provided in the embodiment of the present application filters the multiple second devices to a certain extent when there are many second devices around, and displays the devices that the user is most likely to share, so that the user can quickly find the target device in the second area.
[0123] In some embodiments, S104 sends the target content to the target device, including:
[0124] S1041. Establish a first connection with the target device;
[0125] S1042: Send the target content to the target device based on the first connection.
[0126] In an embodiment of the present application, when the first device determines to share the target content with the target device, it establishes a first connection with the target device, thereby sending the target content based on the first connection, thereby achieving sharing of the target content with the target device.
[0127] In some embodiments, the data sharing method applied to the first device further includes:
[0128] Determine whether the target device and the first device are devices with the same account;
[0129] S1041 establishes a first connection with the target device, including:
[0130] In a case where the target device and the first device are devices with the same account, the first connection is established with the target device.
[0131] Here, before establishing the first connection with the target device, the first device determines whether the target device and the first device are devices with the same account, and directly establishes the first connection with the target device if the target device and the first device are devices with the same account.
[0132] The first device can determine whether the first device and the target device are devices with the same account based on its own account information and the account information carried in the first broadcast message of the target device. If the account information of the first device is the same as the account information of the target device, it is determined that the first device and the target device are devices with the same account; if the account information of the first device is different from the account information of the target device, it is determined that the first device and the target device are devices with different accounts, that is, devices with different accounts.
[0133] In an embodiment of the present application, when the first device and the target device are devices with the same account, the first device may assume that the target device accepts the sharing of the target content, may directly establish a first connection with the target device, and send the target content to the target device based on the established first connection, thereby improving the sharing efficiency of the target content.
[0134] In some embodiments, S1041 establishes a first connection with the target device, further comprising:
[0135] If the target device and the first device are not devices with the same account, sending a file sharing request to the target device;
[0136] receiving an acceptance message sent by the target device in response to the file sharing request;
[0137] In response to the acceptance message, the first connection with the target device is established.
[0138] In the case that the target device and the first device are not devices with the same account, the first device may request to share the target content with the target device by sending a file sharing request. The file sharing request may include the following information: message type (indicating a file request to share), the address of the sender's device for establishing the first connection, i.e., the device address of the first device, the address of the receiver's device for establishing the first connection, i.e., the device address of the target device, and file information, i.e., information about the target content, wherein the information about the target content may include file type, number of files, etc.
[0139] In the embodiment of the present application, the file sharing request may also be defined as a request to send message requesting to send the target content.
[0140] After receiving the file sharing request, the target device may display a target content prompt interface, in which an accept and send interface and a reject and send interface are displayed. The accept and send interface is used to receive the user's accept and send operation, and the reject and send interface is used to receive the user's reject and send operation. The target content prompt interface may also display one or more of the following information: information of the first device, file information, etc., so that the user can determine that the first device shares the target content.
[0141] When the target device receives the user's acceptance and sending operation based on the acceptance and sending interface, it generates an acceptance message and sends the acceptance message to the first device. The acceptance may include one or more of the following information: information type (accept), the address of the sender device for establishing the first connection, that is, the device address of the first device, and the address of the receiver device for establishing the first connection, that is, the device address of the target device.
[0142] When the first device receives the acceptance message, it determines that the target content can be sent to the target device, so it establishes a first connection with the target device, and sends the target content to the target device based on the established first connection.
[0143] When the target device receives a rejection operation from the user based on the rejection interface, it can ignore the received file sharing request or generate a rejection message and send the rejection message to the first device. When the first device does not receive a response from the target device or a rejection message within a set time period, it can stop sending the target content to the target device.
[0144] In an embodiment of the present application, when the first device and the target device are devices of different accounts, the first device may consult the target device to determine whether to share the target content with the target device. If the target device agrees to share the target content, a first connection is established with the target device, and the target content is sent to the target device based on the established first connection, thereby avoiding unnecessary content sharing and improving the user's sharing experience of the target content.
[0145] In some embodiments, the data sharing method applied to the first device further includes:
[0146] Detecting whether the first device and the target device have established a Bluetooth connection; wherein, if the first device and the target device have established a Bluetooth connection, determining whether the target device and the first device are devices with the same account;
[0147] The step of establishing a first connection with the target device at step S1041 further includes:
[0148] S1411. When the first device has not established a Bluetooth connection with the target device, establish the Bluetooth connection with the first device;
[0149] S1412: Establish the first connection with the target device based on the Bluetooth connection.
[0150] In an embodiment of the present application, after the first device determines the target device, the first device can detect whether a Bluetooth connection is established between the first device and the target device. In the case where a Bluetooth connection is established between the first device and the target device, it can be determined whether the target device is a device with the same account as the first device; in the case where it is determined that the target device and the first device are devices with the same account, a first connection is established; in the case where it is determined that the target device and the first device are devices with different accounts, a file sharing request is sent to the target device based on the Bluetooth connection, and a first connection is established when an acceptance message is sent by the target device. In the case where a Bluetooth connection is not established between the first device and the target device, a Bluetooth connection is first established between the first device and the target device.
[0151] The first device detects whether a heartbeat packet sent by the target device is received, and the heartbeat packet is used to detect whether a Bluetooth connection is established between the first device and the target device. The heartbeat packet sent by the target device may include one or more of the following information: the device number of the target device, the Bluetooth address of the target device, the account information of the target device, etc. If the first device does not receive the heartbeat packet sent by the target device within a period of time, it can be determined that the Bluetooth connection between the first device and the target device is disconnected, or the Bluetooth connection is not established.
[0152] In an embodiment of the present application, when the first device and the target device establish a Bluetooth connection, the two parties can periodically send each other heartbeat packets. If the receiving party fails to receive the heartbeat packet after a timeout, the connection with the sender is disconnected. The heartbeat packet sent by the first device includes one or more of the following information: the device number of the first device, the Bluetooth address of the first device, the account information of the first device, etc.
[0153] In some embodiments, S1411 establishes the Bluetooth connection with the first device, including:
[0154] Sending a second broadcast message, where the second broadcast message is used to instruct sending a file to the target device;
[0155] Upon receiving a third broadcast message from the target device in response to the second broadcast message, the third broadcast message carries Bluetooth information of the target device;
[0156] The Bluetooth connection is established based on the Bluetooth information of the target device.
[0157] When the first device needs to establish a Bluetooth connection with the target device, it broadcasts a second broadcast message, wherein the second broadcast message includes one or more of the following information: the device number of the first device, the Bluetooth address of the first device, the account information of the first device, the Bluetooth address of the target device, the device number of the target device, etc.
[0158] When the target device monitors the second broadcast message, it may broadcast a third broadcast message, wherein the third broadcast message may include one or more of the following information: the device number of the target device, the Bluetooth address of the target device, the account information of the target device, the service identifier, etc. The service identifier is used to indicate that the target device supports the reception of the target content.
[0159] When the first device receives the third broadcast message, it determines that the target device is near the first device and establishes a Bluetooth connection with the target device based on the Bluetooth address carried by the third broadcast device. After the first device establishes a Bluetooth connection with the target device, it establishes a first connection with the target device based on the Bluetooth connection.
[0160] In some embodiments, S1412 establishes the first connection with the target device based on the Bluetooth connection, including:
[0161] Based on the Bluetooth connection, sending a file sharing request to the target device;
[0162] Based on the Bluetooth connection, receiving an acceptance message sent by the target device in response to the file sharing request;
[0163] The first connection with the target device is established based on the information carried in the received message.
[0164] After the first device establishes a Bluetooth connection with the target device, it sends a file sharing request to the target device based on the Bluetooth connection, and receives an acceptance message in response to the file sharing request. The description of the file sharing request and the acceptance message is as described above, and will not be repeated here.
[0165] When the first device receives the acceptance message, the first device establishes the first connection with the target device based on the address of the target device for establishing the first connection carried in the acceptance message.
[0166] In an embodiment of the present application, when a Bluetooth connection is not established between the first device and the target device, a Bluetooth connection is first established with the target device, and based on the established Bluetooth connection, the address of the target device for establishing the first connection is obtained and the target device is inquired whether to receive the target content, thereby determining that the target device receives the target content, and then establishing the first connection based on the address returned by the target device, thereby completing the interaction of information for establishing the first connection based on the Bluetooth connection that supports transmission of small amounts of data.
[0167] In the embodiment of the present application, the Bluetooth connection is used to exchange some short message information of the signaling type. If a file with a large amount of data is to be transmitted, a first connection needs to be established. In one example, the first connection is a wifi P2P connection. In the data sharing method provided in the embodiment of the present application, the first device can execute the following steps: Figure 6 The processing shown:
[0168] S601, detecting whether a Bluetooth connection is established between the first device and the target device;
[0169] If the first device does not establish a Bluetooth connection with the target device, S602 is executed. If the first device establishes a Bluetooth connection with the target device, S604 is executed.
[0170] S602: Send a third broadcast message to a target device, and receive a fourth broadcast message.
[0171] S603: Establish a Bluetooth connection with the target device.
[0172] After the first device establishes a Bluetooth connection with the target device, S605 is executed.
[0173] S604: Determine whether the first device and the target device are devices with the same account.
[0174] If the first device and the target device are devices with different accounts, S605 is executed. If the first device and the target device are devices with the same account, S606 is executed.
[0175] S605: Send a file sharing request to the target device, and receive an acceptance message in response to the file sharing request.
[0176] After receiving the acceptance message, the first device executes S606.
[0177] S606: Establish a first connection with the target device.
[0178] S607: Send target content to the target device based on the first connection.
[0179] Next, the data sharing method provided in the embodiment of the present application is further described.
[0180] In the related art, file sharing includes the following scenarios: selecting a sharing device based on clicking. For example: file transfer on social applications, copy and paste between devices with the same account, different devices from the same manufacturer, one-touch transfer based on NFC, etc. However, these solutions either have complicated operation steps, or have devices from the same manufacturer or the same account, or have limitations on the effective distance of NFC.
[0181] In the data sharing method provided in the embodiment of the present application, the user clicks on the file and drags it to the sidebar, and selects the target device in the sidebar, thereby realizing simpler and faster file sharing; when the receiving end receives the file, it identifies the file type or parses the text content to recommend a suitable opening application. Drag-and-drop sharing can be used for file sharing, text sharing, and can even be expanded to applications such as screen projection and continuation.
[0182] In the scenario of transferring pictures to each other, the interface display of the data sharing method provided in the embodiment of the present application can be as follows: Figures 7 to 10 As shown, in Figure 7 In the case where the shared image of the sender is selected, the sender displays the sender interface, which includes the selected shared image and a sidebar, and the sidebar displays multiple recommended devices. Figure 8 In , if a shared image is dragged to the icon of one of the multiple recommended devices in the sidebar and released, the recommended device corresponding to the icon becomes the target device, and the shared image is sent to the target device. Fig. 9In the process, the receiving end pops up a prompt to ask whether to receive the message. The prompt includes options of rejecting and accepting. If the accepting option is selected by the user, the message is displayed. Fig.10 The interface shown. Fig.10 In the case where a shared image is received and the foreground application is detected as WPS, the shared image is inserted into the file position where the cursor of WPS is located. Fig. 9 and Fig.10 The receiving end of the interface shown is Figure 7 and Fig. 9 The sending end of the interface shown can be a device with the same account.
[0183] In an embodiment of the present application, the recommended devices displayed in the sidebar may include discovered surrounding devices, where the discovered surrounding devices may include the following three types: devices with the same account, friend devices (the device adding friend operation can be performed in advance), and unfamiliar devices.
[0184] In an embodiment of the present application, the sending device sends a broadcast message, which carries the following information: device number, device Bluetooth address, account information, and the information carried in the broadcast message is used to keep alive (heartbeat packet) and establish a connection.
[0185] In the embodiment of the present application, the method of discovering surrounding devices includes:
[0186] 1) Connected devices: This type of device can maintain connection through periodic heartbeats and other methods, thereby automatically realizing device discovery;
[0187] For connected devices, both devices will periodically send heartbeat packets to each other. The heartbeat packets contain information such as device number, device address, account information, etc. If the receiver fails to receive the heartbeat packet within the time limit, the connection with the sender will be disconnected.
[0188] 2) Devices with the mutual transmission switch turned on. When the surrounding devices have the mutual transmission switch turned on, they will periodically send mutual transmission broadcast packets, where the broadcast packet contains information such as the device number, device address, account information, etc. After the receiver receives the broadcast, an icon containing the device account will be displayed on the page. When the user clicks the icon, the file transfer can be initiated.
[0189] 3) Other devices with bright screen.
[0190] When the terminal device changes from the screen-off state to the screen-on state, it will also send Bluetooth broadcasts (which also include device number, device address, account information, etc.) at a certain period. After other devices scan the broadcasts, they can choose to establish a Bluetooth connection.
[0191] A configurable periodic broadcast strategy is required. Considering the power consumption overhead caused by broadcasting, a suitable broadcast strategy needs to be designed based on scenario awareness. For example, in sports scenarios, driving scenarios, subway scenarios, or sleeping scenarios, the probability of mutual sharing is low, so periodic broadcasting may not be performed or may be performed at a lower frequency.
[0192] Since the display space of the sidebar is limited, when there are many devices around, it is necessary to filter and sort the displayed devices. The device recommendation algorithm can be used to identify the user's intention and put the target devices that the user is most likely to share at the front. The device recommendation algorithm includes the following strategies:
[0193] 1) Most frequently used principle: For devices that are frequently shared, place them at the front;
[0194] 2) Most recently used principle: devices that have been shared recently are ranked at the front;
[0195] 3) Relationship principle: the order of display devices can be devices with the same account -> friends' devices -> unfamiliar devices;
[0196] 4) Device capability principle: Recommend matching devices based on sharing method or file type. For example, if the sharing method is screen projection, put large-screen devices such as tablets, TVs, and PCs in the front row.
[0197] In the embodiment of the present application, the interaction between the sending segment and the receiving end is as follows: Fig.11 As shown, including:
[0198] S1101, Device Discovery
[0199] The sender and receiver periodically send broadcast information.
[0200] S1102: The sender selects a file.
[0201] S1103: The sending end calls a recommendation algorithm to sort the surrounding devices and display them in a sidebar.
[0202] S1104: The selected file is dragged to the icon of the target device in the sidebar.
[0203] The target device here is the receiving end.
[0204] S1105: The sending end detects whether a Bluetooth connection is established with the target device.
[0205] If the Bluetooth connection has been established, execute S1106; if the Bluetooth connection has not been established, execute S1111.
[0206] S1106: Detect whether the sending end and the target device are devices with the same account.
[0207] If they are devices with the same account, execute S1107; if they are not devices with the same account, execute S1108.
[0208] S1107: The sending end and the receiving end establish a WifiP2P connection, and perform data transmission based on the established WifiP2P connection.
[0209] When the receiving end receives the data, it opens the recommended application list or uses the foreground application to open it.
[0210] S1108: The sending end sends a file sharing request to the receiving end.
[0211] S1109: The receiving end sends a file acceptance message to the sending end.
[0212] When the user accepts the file sending request, a file acceptance message is sent to the sending end.
[0213] S1110: The sending end and the receiving end establish a WifiP2P connection, and perform data transmission based on the established WifiP2P connection.
[0214] S1111. The sender sends a broadcast, where the broadcast is used to notify a target device to send a file.
[0215] S1112: When the receiving end receives the broadcast, it sends a broadcast that carries information such as device ID and service ID.
[0216] S1113. The sending end establishes a Bluetooth connection with the receiving end.
[0217] S1114: The sending end sends a file sharing request to the receiving end based on the established Bluetooth connection.
[0218] S1115. The receiving end sends a file acceptance message to the sending end.
[0219] When the user accepts the file sending request, a file acceptance message is sent to the sender.
[0220] S1116: The sending end and the receiving end establish a WifiP2P connection, and perform data transmission based on the established WifiP2P connection.
[0221] The data sharing method provided in the embodiment of the present application includes the following contents:
[0222] 1. Quickly and easily share files and texts by dragging them to devices around the sidebar;
[0223] 2. Identify user intent through device recommendation algorithms and rank the target devices that users are most likely to share at the top, allowing users to quickly find devices in the sidebar;
[0224] 3. On the receiving end, intelligently recommend applications to open based on file type or parsed text content.
[0225] The data sharing method provided in the embodiment of the present application includes the following technical effects:
[0226] Sharing is simpler. Compared with the mutual sharing method, the drag-and-drop sharing method can achieve sharing in just one step, which is simpler to operate and more in line with the user's intuitive and instinctive operation method;
[0227] More universal and applicable. Specifically:
[0228] Distance universality: Compared with the one-touch sharing method, this solution does not require the sharing device and the target device to be close to each other. Sharing can be achieved as long as the target device is nearby.
[0229] Content universality: supports a variety of sharing content, including not only pictures, videos, documents and other files, but also text, links, etc.
[0230] Universality of sharing objects: It is not limited to sharing between the same account, but can also be shared between friends' devices or even strangers.
[0231] Since the data sharing method provided in the embodiment of the present application is general and universal, it can be used as a unified entry point for sharing files.
[0232] A first device according to an embodiment of the present application, such as Fig.12 As shown, the first device 1200 includes:
[0233] The receiving module 1201 is configured to receive a sharing operation of a user on a target content, where the sharing operation is used to instruct sharing of the target content;
[0234] The display module 1202 is configured to display a sharing identifier of the target content in a first area of the sharing interface, and to display a device identifier of each of the one or more recommended devices in a second area of the sharing interface;
[0235] A determination module 1203, configured to select a target device from the one or more recommended devices;
[0236] The transmission module 1204 is configured to send the target content to the target device.
[0237] In some embodiments, the determination module 1203 is further configured to:
[0238] receiving a moving operation for a sharing mark of the target content, wherein a position of the sharing mark of the target content changes as a position of the moving operation changes;
[0239] When the sharing identifier of the target content stays at the target position in the second area, it is determined that the recommended device corresponding to the device identifier of the target position is the target device.
[0240] In some embodiments, the first device 1200 further includes:
[0241] a communication module, configured to receive a first broadcast message sent by each second device among one or more second devices, wherein the first broadcast message includes device information of the corresponding second device;
[0242] The selection module is configured to determine the one or more recommended devices from the one or more second devices.
[0243] In some embodiments, the selection module is further configured to:
[0244] Determining a file transfer attribute of each second device among a plurality of second devices included in the one or more second devices, the file transfer attribute being used to characterize one or more of the following: a historical sharing record of data sharing from the first device to the second device, a relationship between the second device and the first device, and a matching degree between a device type of the second device and the target content;
[0245] sorting the plurality of second devices based on a file transfer attribute of each second device among the plurality of second devices;
[0246] Based on the ranking results of the plurality of second devices, a first number of recommended devices are selected from the plurality of second devices.
[0247] In some embodiments, the transmission module 1204 is further configured to:
[0248] Establishing a first connection with the target device;
[0249] The target content is sent to the target device based on the first connection.
[0250] In some embodiments, the first device 1200 further includes:
[0251] A first determination module is configured to determine whether the target device and the first device are devices with the same account;
[0252] The transmission module 1204 is further configured to establish the first connection with the target device when the target device and the first device are devices with the same account.
[0253] In some embodiments, the transmission module 1204 is further configured to:
[0254] If the target device and the first device are not devices with the same account, sending a file sharing request to the target device;
[0255] receiving an acceptance message sent by the target device in response to the file sharing request;
[0256] In response to the acceptance message, the first connection with the target device is established.
[0257] In some embodiments, the first device 1200 further includes:
[0258] A second judgment module is configured to detect whether the first device and the target device have established a Bluetooth connection; wherein, when the first device and the target device have established a Bluetooth connection, it is determined whether the target device and the first device are devices with the same account;
[0259] The transmission module 1204 is further configured to:
[0260] When the first device has not established a Bluetooth connection with the target device, establishing the Bluetooth connection with the first device;
[0261] Based on the Bluetooth connection, the first connection is established with the target device.
[0262] In some embodiments, the transmission module 1204 is further configured to:
[0263] Sending a second broadcast message, where the second broadcast message is used to instruct sending a file to the target device;
[0264] Upon receiving a third broadcast message from the target device in response to the second broadcast message, the third broadcast message carries Bluetooth information of the target device;
[0265] The Bluetooth connection is established based on the Bluetooth information of the target device.
[0266] In some embodiments, the transmission module 1204 is further configured to:
[0267] Based on the Bluetooth connection, sending a file sharing request to the target device;
[0268] Based on the Bluetooth connection, receiving an acceptance message sent by the target device in response to the file sharing request;
[0269] The first connection with the target device is established based on the information carried in the received message.
[0270] In actual applications, the above-mentioned receiving module, display module, determination module, transmission module, communication module, selection module, first judgment module, second judgment training module and other modules can be implemented by a processor located on the electronic device, specifically a combination of one or more of a central processing unit (CPU), an image graphics processor (graphics processing unit, GPU), a microprocessor (MPU, Microprocessor Unit), an application processor (AP), a digital signal processor (DSP, Digital Signal Processing), and a field programmable gate array (FPGA, Field Programmable Gate Array).
[0271] Those skilled in the art should understand that the relevant description of the above-mentioned electronic device in the embodiment of the present application can be understood by referring to the relevant description of the data sharing method in the embodiment of the present application.
[0272] Fig.13 An optional implementation of the present application is provided as a schematic diagram of the structure of an electronic device, such as Fig.13 As shown, the embodiment of the present application provides an electronic device 1300, including an electronic chip 1301, which can be implemented as a data sharing method as described in one or more embodiments above. The electronic chip can be implemented as a processor of an electronic device or as a microprocessor of a fast charging module.
[0273] An embodiment of the present application provides an electronic device, Fig.14 Another optional implementation provided in the embodiment of the present application is a structural diagram of an electronic device, such as Fig.14 As shown, an embodiment of the present application provides an electronic device 1400, including:
[0274] A processor 1401 and a storage medium 1402 storing executable instructions of the processor 1401. The storage medium 1402 relies on the processor 1401 to perform operations through a communication bus 1403. When the instructions are executed by the processor 1401, the data sharing method performed in one or more of the above embodiments is executed.
[0275] It should be noted that in actual application, the various components in the terminal are coupled together through the communication bus 1403. It is understandable that the communication bus 1403 is used to realize the connection and communication between these components. In addition to the data bus, the communication bus 1403 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, Fig.14 Various buses are labeled as communication buses 1403.
[0276] An embodiment of the present application provides a computer storage medium, wherein the computer-readable storage medium is used to store a computer program, and the computer program enables a computer to execute the steps of the data sharing method described in one or more of the above embodiments.
[0277] An embodiment of the present application provides a schematic structural diagram of an electronic device 1500. The electronic device 1500 can be implemented as a first device. Fig.15 The electronic device 1500 shown includes a processor 1510. The processor 1510 is configured to:
[0278] receiving a sharing operation of a user for a target content, wherein the sharing operation is used to instruct sharing of the target content;
[0279] Displaying a sharing identifier of the target content in a first area of the sharing interface, and displaying a device identifier of each of the one or more recommended devices in a second area of the sharing interface;
[0280] selecting a target device from among the one or more recommended devices;
[0281] The target content is sent to the target device.
[0282] In the embodiment of the present application, the processor 1510 can call and run a computer program from the memory to implement the data sharing method in the embodiment of the present application.
[0283] Alternatively, if Fig.15 As shown, the electronic device 1500 may further include a memory 1520. The processor 1510 may call and run a computer program from the memory 1520 to implement the data sharing method in the embodiment of the present application.
[0284] The memory 1520 may be a separate device independent of the processor 1510 , or may be integrated into the processor 1510 .
[0285] Alternatively, if Fig.15 As shown, the electronic device 1500 may further include a transceiver 1530, and the processor 1510 may control the transceiver 1530 to communicate with other devices, specifically, to receive signals sent by other devices. Here, the transceiver may include at least two antennas.
[0286] It can be understood that the transceiver includes multiple physical paths for receiving signals or transmitting signals, and the physical elements on one or more physical paths for transmitting signals constitute a transmitter.
[0287] Optionally, the electronic device 1500 can implement the corresponding processes implemented by the electronic device in each method of the embodiment of the present application, and for the sake of brevity, it will not be repeated here. It should be understood that the processor of the embodiment of the present application may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method embodiment can be completed by the hardware integrated logic circuit or software instructions in the processor. The above processor can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Arra y, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software modules in the decoding processor are combined to execute. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0288] It can be understood that the memory in the embodiments of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus random access memory (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0289] It should be understood that the above-mentioned memory is exemplary but not restrictive. For example, the memory in the embodiments of the present application may also be static random access memory (static RAM, SRAM), dynamic random access memory (dynamic RAM, DRAM), synchronous dynamic random access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (synch link DRAM, SLDRAM) and direct RAM bus random access memory (Direct RAM, DR RAM), etc. That is to say, the memory in the embodiments of the present application is intended to include but not limited to these and any other suitable types of memory.
[0290] An embodiment of the present application also provides a computer-readable storage medium for storing a computer program.
[0291] Optionally, the computer-readable storage medium can be applied to the electronic device in the embodiments of the present application, and the computer program enables the computer to execute the corresponding processes implemented by the electronic device in the various methods of the embodiments of the present application. For the sake of brevity, they are not repeated here.
[0292] An embodiment of the present application also provides a computer program product, including computer program instructions.
[0293] Optionally, the computer program can be applied to the electronic device in the embodiments of the present application. When the computer program runs on a computer, the computer executes the corresponding processes implemented by the electronic device in the various methods of the embodiments of the present application. For the sake of brevity, they are not described here.
[0294] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0295] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0296] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0297] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0298] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0299] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0300] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A data sharing method, characterized in that: Applied to a first device, the method includes: receiving a sharing operation of a user for a target content, wherein the sharing operation is used to instruct sharing of the target content; Displaying a sharing identifier of the target content in a first area of the sharing interface, and displaying a device identifier of each of the one or more recommended devices in a second area of the sharing interface; selecting a target device from among the one or more recommended devices; The target content is sent to the target device.
2. The method according to claim 1, characterized in that The selecting a target device from the one or more recommended devices comprises: receiving a moving operation for a sharing mark of the target content, wherein a position of the sharing mark of the target content changes as a position of the moving operation changes; When the sharing identifier of the target content stays at the target position in the second area, it is determined that the recommended device corresponding to the device identifier of the target position is the target device.
3. The method according to claim 1, characterized in that The method further comprises: Receiving a first broadcast message sent by each second device among one or more second devices, where the first broadcast message includes device information of the corresponding second device; The one or more recommended devices are determined from the one or more second devices.
4. The method according to claim 3, characterized in that The one or more second devices include a plurality of second devices, and determining the one or more recommended devices from the one or more second devices includes: Determine a file transfer attribute of each second device among the plurality of second devices, the file transfer attribute being used to characterize one or more of the following: a historical sharing record of data sharing from the first device to the second device, a relationship between the second device and the first device, and a matching degree between a device type of the second device and the target content; sorting the plurality of second devices based on a file transfer attribute of each second device among the plurality of second devices; Based on the ranking results of the plurality of second devices, a first number of recommended devices are selected from the plurality of second devices.
5. The method according to any one of claims 1 to 4, characterized in that: The sending the target content to the target device includes: Establishing a first connection with the target device; The target content is sent to the target device based on the first connection.
6. The method according to claim 5, characterized in that The method further comprises: Determine whether the target device and the first device are devices with the same account; Establishing a first connection with the target device includes: In a case where the target device and the first device are devices with the same account, the first connection is established with the target device.
7. The method according to claim 6, characterized in that Establishing a first connection with the target device further includes: If the target device and the first device are not devices with the same account, sending a file sharing request to the target device; receiving an acceptance message sent by the target device in response to the file sharing request; In response to the acceptance message, the first connection with the target device is established.
8. The method according to claim 6, characterized in that The method further comprises: Detecting whether the first device and the target device have established a Bluetooth connection; wherein, if the first device and the target device have established a Bluetooth connection, determining whether the target device and the first device are devices with the same account; The establishing a first connection with the target device further includes: When the first device has not established a Bluetooth connection with the target device, establishing the Bluetooth connection with the first device; Based on the Bluetooth connection, the first connection is established with the target device.
9. The method according to claim 8, characterized in that The establishing the Bluetooth connection with the first device includes: Sending a second broadcast message, where the second broadcast message is used to instruct sending a file to the target device; Upon receiving a third broadcast message from the target device in response to the second broadcast message, the third broadcast message carries Bluetooth information of the target device; The Bluetooth connection is established based on the Bluetooth information of the target device.
10. The method according to claim 8, characterized in that The establishing the first connection with the target device based on the Bluetooth connection includes: Based on the Bluetooth connection, sending a file sharing request to the target device; Based on the Bluetooth connection, receiving an acceptance message sent by the target device in response to the file sharing request; The first connection with the target device is established based on the information carried in the received message.
11. A first device, characterized in that: The first device comprises: A receiving module, configured to receive a sharing operation of a user on a target content, wherein the sharing operation is used to instruct sharing of the target content; A display module, configured to display a sharing identifier of the target content in a first area of the sharing interface, and to display a device identifier of each of the one or more recommended devices in a second area of the sharing interface; A determination module configured to select a target device from the one or more recommended devices; A transmission module is configured to send the target content to the target device.
12. A first device, comprising a processor, characterized in that: The processor is configured to: receiving a sharing operation of a user for a target content, wherein the sharing operation is used to instruct sharing of the target content; Displaying a sharing mark of the target content in a first area of the sharing interface, and displaying an icon of each of the one or more recommended devices in a second area of the sharing interface; selecting a device identification of a target device from among the one or more recommended devices; The target content is sent to the target device.
13. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps in the data sharing method according to any one of claims 1 to 10 are implemented.
14. A storage medium storing an executable program, characterized in that: When the executable program is executed by a processor, the data sharing method according to any one of claims 1 to 10 is implemented.
15. A chip, comprising a processor, characterized in that: The processor is configured to execute the data sharing method according to any one of claims 1 to 10.