Cross-device data sharing method and related equipment

By introducing a sharing module into electronic devices to generate file identification information between devices, local data sharing across devices and applications is realized, which solves the problems of data type restrictions and cloud sharing speed in the existing technology, and improves the efficiency and security of data sharing. .

CN114356870BActive Publication Date: 2024-10-29HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011092086.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-13
Publication Date
2024-10-29
Estimated Expiration
2040-10-13

AI Technical Summary

Technical Problem

The existing cross-device data sharing method has restrictions on data types and relies on cloud sharing, which affects file access speed.

Method used

By introducing a sharing module into electronic devices, file identification information between devices is generated, and cross-device data sharing is directly performed locally without limiting data types, realizing cross-device and cross-application data sharing.

Benefits of technology

It improves the scope and efficiency of data sharing, avoids the speed impact caused by cloud sharing, and enhances the security of file operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114356870B_ABST
    Figure CN114356870B_ABST
Patent Text Reader

Abstract

The present application provides a cross-device data sharing method, including: after receiving a data sharing request from a first application of a first electronic device to a second application of a second electronic device, the first application obtains relevant information of a file to be shared, and shares the file to be shared with a first sharing module of the first electronic device; the first sharing module generates inter-device file identification information of the file to be shared and sends it to a second application and a second sharing module of the second electronic device; if the file to be shared is an external file, the second application operates the file to be shared through the second sharing module; the first sharing module receives the file operation request returned by the second sharing module, searches for corresponding information according to the inter-device file identification information in the request, and if the operation authority check is passed, operates the file to be shared according to the request, and returns the operation result to the second application. The present application can improve the scope and efficiency of data sharing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to a cross-device data sharing method and related equipment. Background Art

[0002] With the widespread use of smart devices, users often need to share data between different devices. For example, playing videos on a mobile phone on a large screen, or editing files on a mobile phone on a tablet. Currently, the main ways to share data across devices are screen projection and cloud sharing. However, screen projection has restrictions on the type of data that can be shared, and can only share multimedia files, while cloud sharing uses the cloud, which will affect the access speed of files. Summary of the invention

[0003] The embodiments of the present application disclose a cross-device data sharing method and related devices, which do not require the use of the cloud to achieve data sharing and have no restrictions on the type of data shared.

[0004] In a first aspect, the present application discloses a cross-device data sharing method, which is applied to a first electronic device, wherein the first electronic device includes a first application and a first sharing module. The method includes:

[0005] After receiving a data sharing request from the first application to the second application of the second electronic device, the first application obtains the device file identification information, source device information, source application information, destination device information, destination application information and operation permission information of the file to be shared;

[0006] The first application shares the file to be shared with the first sharing module, and transmits the file identification information in the device, source device information, source application information, destination device information, destination application information and operation permission information to the first sharing module;

[0007] The first sharing module generates inter-device file identification information of the to-be-shared file according to the intra-device file identification information and the source device information, and stores the intra-device file identification information, inter-device file identification information and operation authority information;

[0008] The first sharing module launches the second application according to the destination device information and the destination application information, and sends the inter-device file identification information to the second application;

[0009] The first sharing module sends the inter-device file identification information and the destination application information to the second sharing module of the second electronic device according to the destination device information, so that the second sharing module identifies whether the file to be shared is an external file according to the inter-device file identification information, and returns the identification result of the file to be shared to the second application according to the destination application information, and if the file to be shared is an external file, the second application performs the first file operation on the file to be shared through the second sharing module;

[0010] The first sharing module receives a file operation request returned by the second sharing module, wherein the file operation request includes inter-device file identification information of the file to be shared, destination device information, destination application information, and operation information of the first file operation;

[0011] The first sharing module searches for the corresponding intra-device file identification information and operation authority information according to the inter-device file identification information in the file operation request;

[0012] The first sharing module performs an operation permission check based on the found operation permission information and the operation information. If the operation permission check passes, a second file operation is performed on the file to be shared based on the found file identification information in the device and the operation information. The operation result is returned to the second sharing module based on the destination device information in the file operation request, and the second sharing module returns the operation result to the second application.

[0013] This application shares a shareable file from a first application of a first electronic device to a second application of a second electronic device, realizing cross-device and cross-application data sharing. This application does not require the use of the cloud when sharing data, and has no restrictions on the type of data shared, thereby improving the scope and efficiency of data sharing.

[0014] In some optional implementations, when the first sharing module sends the inter-device file identification information and destination application information to the second sharing module, it also sends the operation permission information to the second sharing module, so that the second sharing module performs an operation permission check on the first file operation according to the operation permission information.

[0015] The first sharing module of the first electronic device transmits the operation authority information to the second sharing module of the second electronic device, so that the second electronic device performs an operation authority check on the user operation according to the operation authority information, thereby improving the security of file operations.

[0016] In some optional implementations, the first application determines whether the data sharing request is received by:

[0017] If it is detected that the file to be shared is long pressed in the file list of the first application or the file to be shared is opened in the first application, a first interface is displayed, where the first interface includes a sharing menu;

[0018] If it is detected that the sharing menu is selected on the first interface, a sharing interface is displayed, and the sharing interface includes the second electronic device;

[0019] If it is detected that the second electronic device is selected in the sharing interface, an application selection interface is displayed, and the application selection interface includes the second application;

[0020] If it is detected that the second application is selected in the application selection interface, the data sharing request is received.

[0021] In some optional implementations, the intra-device file identification information and the inter-device file identification information include a uniform resource identifier.

[0022] In some optional implementations, before sending the inter-device file identification information and the destination application information to the second sharing module, the method further includes:

[0023] The first sharing module encrypts the file identification information and the destination application information between the devices.

[0024] In some optional implementations, the performing the operation authority check according to the found operation authority information and the operation information includes:

[0025] Determine whether the operation type corresponding to the operation information is a specified operation type; and / or

[0026] Determine whether the operation time corresponding to the operation information is within the specified operation validity period.

[0027] In some optional implementations, before obtaining the file identification information, source device information, source application information, destination device information, destination application information, and operation permission information of the file to be shared, the method further includes:

[0028] searching for the second electronic device;

[0029] If the second electronic device is found, the second electronic device is connected.

[0030] A second aspect of the present invention discloses a computer-readable storage medium, comprising computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the cross-device data sharing method as described in the first aspect.

[0031] The third aspect of the present invention discloses an electronic device, which includes a processor and a memory, wherein the memory is used to store instructions, and the processor is used to call the instructions in the memory so that the electronic device executes the cross-device data sharing method described in the first aspect.

[0032] A fourth aspect of the present invention discloses a computer program product. When the computer program product is run on a computer, the computer executes the cross-device data sharing method as described in the first aspect.

[0033] The fifth aspect of the present invention discloses a chip system, which is applied to an electronic device; the chip system includes an interface circuit and a processor; the interface circuit and the processor are interconnected through lines; the interface circuit is used to receive signals from the memory of the electronic device and send signals to the processor, the signals including computer instructions stored in the memory; when the processor executes the computer instructions, the chip system executes the cross-device data sharing method described in the first aspect.

[0034] The sixth aspect of the present invention discloses a device having the function of implementing the electronic device behavior in the method provided in the first aspect. The function can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.

[0035] It can be understood that the computer-readable storage medium described in the second aspect, the electronic device described in the third aspect, the computer program product described in the fourth aspect, the chip system described in the fifth aspect and the device described in the sixth aspect all correspond to the method of the first aspect above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 It is a schematic diagram of an application scenario of the cross-device data sharing method disclosed in an embodiment of the present application.

[0037] Figure 2 This is a schematic diagram of sending a data sharing request through the application interface of the first application.

[0038] Figure 3 It is a flow chart of the cross-device data sharing method disclosed in an embodiment of the present application.

[0039] Figure 4 It is a schematic diagram of the structure of the first electronic device disclosed in an embodiment of the present application. DETAILED DESCRIPTION

[0040] In order to better understand the cross-device data sharing method and related devices disclosed in the embodiments of the present application, the application scenario of the cross-device data sharing method of the present application is first described below.

[0041] Figure 1 It is a schematic diagram of an application scenario of the cross-device data sharing method disclosed in an embodiment of the present application.

[0042] like Figure 1 As shown, the cross-device data sharing method is applied to a first electronic device 10 and a second electronic device 11. The first electronic device 10 includes a plurality of first applications 100, such as a gallery and a file manager. The second electronic device 11 includes a plurality of second applications 110, such as a picture processor, a video player, and a document editor. The user shares a file (such as a picture, a video, or a document) of the first electronic device 11 with the second application 110 from the first application 100, and operates (such as viewing or editing) the shared file from the second application 110 of the second electronic device 11. For example, the user opens a picture from the gallery of the first electronic device 10, shares the picture with the picture processor of the second electronic device 11, and modifies the shared picture on the picture processor of the second electronic device 11. For another example, the user selects a video from the file manager of the first electronic device 10, shares the video with the video player of the second electronic device 11, and watches the shared video on the video player of the second electronic device 11. For another example, the user selects a document from the file manager of the first electronic device 11, shares the document with the document editor of the second electronic device 11, and views and edits the shared document on the document editor of the second electronic device 11. The data sharing method of the present application does not require the use of the cloud when sharing data, and has no restrictions on the type of data shared, thereby improving the scope and efficiency of data sharing.

[0043] The first electronic device 10 and the second electronic device 11 may include a smart phone, a tablet computer, a desktop computer, a laptop computer, a car computer, etc. The first electronic device 10 and the second electronic device 11 may be electronic devices of the same type, for example, both are mobile phones (for example, shared from the mobile phone of the first user to the mobile phone of the second user). The first electronic device 10 and the second electronic device 11 may also be electronic devices of different types, for example, the first electronic device 10 is a mobile phone, and the second electronic device 11 is a tablet computer.

[0044] The first electronic device 10 and the second electronic device 11 can be connected to each other by means of infrared, Bluetooth, wireless local area network, etc.

[0045] Figure 2It is a flow chart of the cross-device data sharing method disclosed in an embodiment of the present application. The first electronic device includes a first application and a first sharing module, and the second electronic device includes a second application and a second sharing module. Through the first sharing module of the first electronic device and the second sharing module of the second electronic device, data can be shared from the first application of the first electronic device to the second application of the second electronic device. It should be understood that the first electronic device may include the second sharing module, and the second electronic device may include the first sharing module, and through the first sharing module of the second electronic device and the second sharing module of the first electronic device, data can be shared from the second application of the second electronic device to the first application of the first electronic device.

[0046] See also Figure 2 As shown, the cross-device data sharing method includes:

[0047] 201. If a data sharing request is received from a first application of a first electronic device to a second application of a second electronic device, the first application obtains the device file identification information, source device information, source application information, destination device information, destination application information and operation permission information of the file to be shared.

[0048] In one embodiment, the first application determines whether a data sharing request is received according to the following method:

[0049] Detecting whether a file to be shared is long pressed in a file list of a first application (such as a file manager) or the file to be shared is opened in the first application, and if it is detected that the file to be shared is long pressed in the file list of the first application or the file to be shared is opened in the first application, displaying a first interface, the first interface including a sharing menu;

[0050] Detecting whether a sharing menu is selected on the first interface, and if it is detected that the sharing menu is selected on the first interface, displaying a sharing interface, where the sharing interface includes a second electronic device;

[0051] Detecting whether a second electronic device is selected in the sharing interface, and if it is detected that the second electronic device is selected in the sharing interface, displaying an application selection interface, where the application selection interface includes the second application;

[0052] It is detected whether the second application is selected in the application selection interface, and if it is detected that the second application is selected in the application selection interface, a data sharing request is received.

[0053] In one embodiment, after opening the file to be shared from the first application, the file interface of the file to be shared is displayed, and the file interface includes a sharing menu. After selecting (such as clicking) the sharing menu, the sharing interface is displayed, and the sharing interface includes a shareable external device, such as a second electronic device. After selecting an external device (such as a second electronic device) in the sharing interface, an application selection interface is displayed, and the application selection interface includes applications in the external device that can share data with the first application, such as a second application. If an application of an external device (such as a second application) is selected in the application selection interface, a data sharing request is issued from the first application of the first electronic device to an application (such as a second application) of an external device (such as a second electronic device).

[0054] Figure 3 It is a schematic diagram of issuing a data sharing request through the application interface of the first application. The file manager of device A displays multiple documents (including document 1, document 2, document 3, document 4). If you long press document 4, multiple shortcut menus are displayed, and the shortcut menus include a sharing menu. If you select the sharing menu, the sharing interface is displayed, and the sharing interface includes two external devices, device B and device C. If device B is selected, the application selection interface is displayed, and the application selection interface includes Word and WPS. If Word is selected, a data sharing request is issued from the file manager of device A to the Word of device B, indicating that the document to be shared is to be shared from the file manager of device A to the Word of device B.

[0055] It should be understood that, in addition to the shareable external device, the sharing interface of the file to be shared may also include local applications of the first electronic device, such as printer, email, WeChat, QQ, etc. The first electronic device may share the shareable file with the local application to realize data sharing within the device.

[0056] In another embodiment, after opening the first application (eg, a file manager), a file list is displayed, and if a long press of a picture to be shared in the file list is detected, a sharing menu is displayed.

[0057] In another embodiment, the sharing interface can directly display the application of the external device (e.g., the second application of the second electronic device). If the user selects the application of the external device (e.g., the second application of the second electronic device) from the sharing interface, a data sharing request is issued from the first application of the first electronic device to the application of the external device (e.g., the second application of the second electronic device).

[0058] The file identification information in the device is used to locate the file in the device and can uniquely identify the file on the device (e.g., the first electronic device). The file identification information in the device can be a file path or a file identifier in a database, such as a Uniform Resource Identifier (URI). The first electronic device can locate the file to be shared based on the file identification information in the device, while the external device cannot locate the file to be shared based on the file identification information in the device.

[0059] The source device information is used to identify the first electronic device. The source device information may be a device identifier of the first electronic device.

[0060] The source application information is used to identify the first application. The source application information may be an application identifier of the first application.

[0061] The destination device information is used to identify the second electronic device. The destination device information may be a device identifier of the second electronic device.

[0062] The target application information is used to identify the second application. The target application information may be an application identifier of the second application.

[0063] The operation permission information specifies the operation permission of the file to be shared, and is used to check the operation permission of the second application. The operation permission information set by the user can be received, or the default operation permission information can be used.

[0064] The operation permission information may specify whether the second application has read permission or write permission for the shared file.

[0065] The operation permission information can also specify whether the second application has sharing permission for the file to be shared. Sharing permission refers to whether the second application can share the file to be shared within the device, that is, share it with other applications in the second electronic device. If the operation permission information specifies that there is sharing permission, the second application can share the file to be shared with other applications in the second electronic device. Otherwise, if the operation permission information specifies that there is no sharing permission, the second application cannot share the file to be shared with other applications in the second electronic device.

[0066] The operation permission information may also specify an operation validity period. During the operation validity period, the second application may operate the file to be shared.

[0067] 202 , the first application shares the file to be shared with the first sharing module, and transmits the file identification information in the device, the source device information, the source application information, the destination device information, the destination application information and the operation permission information to the first sharing module.

[0068] The first application can share the file to be shared with the first sharing module through the Binder mechanism. Binder is an inter-process communication mechanism. The first application corresponds to a process and the first sharing module corresponds to a process. When the first application shares the file to be shared with the first sharing module system through the Binder mechanism, the operating system allocates a temporary area for the file to be shared, and all operations on the temporary area will be reflected on the file to be shared.

[0069] 203 , the first sharing module generates inter-device file identification information of the file to be shared according to the file identification information in the device and the source device information, and stores the file identification information in the device, the inter-device file identification information and the operation authority information.

[0070] The inter-device file identification information is used for locating files across devices. According to the inter-device identification information of the file to be shared, the second electronic device can determine the location of the file to be shared.

[0071] In one embodiment, the intra-device file identification information and the inter-device file identification information may be a uniform resource identifier.

[0072] The first sharing module can add the source device information to the file identification information in the device to generate the inter-device file identification information. For example, if the file identification information in the device is content: / / media / external / file / 1 and the source device information is 123456, the inter-device identification information can be content:123456: / / media / external / file / 1.

[0073] 204 , the first sharing module launches the second application according to the destination device information and the destination application information, and sends the inter-device file identification information to the second application.

[0074] It should be understood that in order to improve the security of data transmission, the first sharing module may encrypt the inter-device file identification information before sending the inter-device file identification information to the second application.

[0075] 205 , the first sharing module sends the inter-device file identification information, the destination application information and the operation authority information to the second sharing module according to the destination device information.

[0076] In this embodiment, the first sharing module transmits the operation permission information to the second sharing module, so that the second sharing module performs the first operation permission check on the file operation of the second application on the shared file according to the operation permission information, thereby improving the security of the operation.

[0077] In other embodiments, the first sharing module may not transmit the operation permission information to the second sharing module, and the second sharing module may not perform the first operation permission check on the file operation of the second application to be shared.

[0078] It should be understood that in order to improve the security of data transmission, the first sharing module can encrypt the inter-device file identification information, target application information and operation permission information before sending them to the second sharing module.

[0079] 206 , the second sharing module identifies whether the file to be shared is an external file according to the file identification information between devices, and returns the identification result of the file to be shared to the second application according to the target application information.

[0080] In this embodiment, after the second application receives the inter-device file identification information from the first sharing module, it sends a file identification request to the second sharing module. After receiving the file identification request, the second sharing module identifies whether the file to be shared is an external file based on the inter-device file identification information, and returns the identification result of the file to be shared to the second application based on the destination application information.

[0081] The second sharing module can parse the source device information from the file identification information between devices, and determine whether the file to be shared is an external file based on the parsed source device information. For example, the second sharing module parses the source device information 123456 from the file identification information between devices content:123456: / / media / external / file / 1, and 123456 represents the first electronic device rather than the device (i.e., the second electronic device), and then determines that the file to be shared is an external file.

[0082] 207 , if the file to be shared is an external file, the second application performs a first file operation on the file to be shared through a second sharing module.

[0083] The first file operation on the shared file may include reading a file, writing a file, sharing a file within a device, and the like.

[0084] 208. The second sharing module performs a first operation permission check on the first file operation according to the operation permission information.

[0085] Performing a first operation permission check on the first file operation according to the operation permission information includes: if the first file operation is an operation within the permission specified by the operation permission information, allowing the first file operation; if the first file operation is not an operation within the permission specified by the operation permission information, rejecting the first file operation. For example, if the second application has only read permission but no write permission for the shared file, if the first file operation is a write operation, rejecting the write operation.

[0086] Performing the first operation permission check in the second electronic device can intercept illegal operations in advance, improve the security of file operations, and reduce the communication overhead between the first electronic device and the second electronic device when illegal operations occur.

[0087] 209. If the first operation permission check is passed, the second sharing module generates a file operation request according to the first file operation, and sends the file operation request to the first sharing module. The file operation request includes the inter-device file identification information of the file to be shared, the destination application information, the destination device information and the operation information of the first file operation.

[0088] The operation information indicates a first file operation, such as a write operation, performed by the second application on the sharable file.

[0089] It should be understood that in order to improve the security of data transmission, the second sharing module may encrypt the file operation request before sending the file operation request to the first sharing module.

[0090] 210. The first sharing module searches for the corresponding intra-device file identification information and operation authority information according to the inter-device file identification information in the file operation request.

[0091] 211 , the first sharing module performs a second operation permission check according to the found operation permission information and the operation information in the file operation request.

[0092] Performing a second operation authority check according to the operation authority information and the operation information may include:

[0093] Determine whether the operation type corresponding to the operation information is the specified operation type.

[0094] For example, the file operation request indicates a write operation on the shared file. The first electronic device determines whether the second application has write permission to the shared file based on the operation permission information. If the second application has write permission to the shared file, the second operation permission check of the operation type is passed.

[0095] Performing a second operation authority check on the operation information according to the operation authority information may also include:

[0096] Determine whether the operation time corresponding to the operation information is within the specified operation validity period.

[0097] For example, the operation time specified by the operation permission information is within 30 minutes after the second electronic device receives the external location information, source device information, source application information, destination application information and operation permission information. If the second application operates the shared file within the time limit, the second operation permission check of the operation time passes.

[0098] 212. If the second operation permission check is passed, the first sharing module performs a second file operation on the file to be shared according to the found file identification information and operation information in the device.

[0099] The first sharing module can search for the file descriptor of the file to be shared according to the found file identification information in the device, operate the file to be shared according to the found file descriptor and operation information, and return the operation result to the second electronic device.

[0100] For example, the first sharing module performs a write operation on the file to be shared according to the found file descriptor and operation information.

[0101] 213. The first sharing module returns the operation result to the second sharing module according to the destination device information in the file operation request.

[0102] It should be understood that in order to improve the security of data transmission, the first sharing module may encrypt the operation result before returning the operation result to the second sharing module.

[0103] 214. The second sharing module returns the operation result to the second application.

[0104] The second application displays the file to be shared according to the operation result. For example, the second application displays the file to be shared after being written according to the operation result of the write operation.

[0105] This application shares a shareable file from a first application of a first electronic device to a first application of a second electronic device, thus realizing cross-device and cross-application data sharing. This application does not require the use of the cloud when sharing data, and has no restrictions on the type of data shared, thus improving the scope and efficiency of data sharing.

[0106] In another embodiment, before obtaining the file identification information, source device information, source application information, destination device information, destination application information and operation permission information of the file to be shared, the method further includes:

[0107] Finding a second electronic device;

[0108] If the second electronic device is found, the second electronic device is connected.

[0109] The first electronic device may search for the second electronic device by infrared rays or other methods, and if the second electronic device is found, the first electronic device is connected to the second electronic device.

[0110] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. For ordinary technicians in this field, improvements can be made without departing from the creative concept of the present application, but these all fall within the protection scope of the present application.

[0111] See also Figure 4 , Figure 4 is a schematic diagram of the structure of the first electronic device disclosed in this application. Figure 4 As shown, the first electronic device 40 includes one or more processors 401 and a memory 402. The processor 401 and the memory 402 are connected via one or more communication buses 403. The memory 402 is used to store one or more computer programs 404. The one or more computer programs 404 are configured to be executed by the processor 401. The one or more computer programs 404 include instructions, which can be used to execute the various steps performed by the electronic device (such as a mobile phone) in the above embodiment to realize the cross-device data sharing function in the electronic device.

[0112] This embodiment also provides a computer storage medium, in which computer instructions are stored. When the computer instructions are executed on an electronic device, the electronic device executes the above-mentioned related method steps to implement the cross-device data sharing method in the above-mentioned embodiment.

[0113] This embodiment also provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes the above-mentioned related steps to implement the cross-device data sharing method in the above-mentioned embodiment.

[0114] In addition, an embodiment of the present application also provides a device, which can specifically be a chip, component or module, and the device may include a connected processor and memory; wherein the memory is used to store computer execution instructions, and when the device is running, the processor can execute the computer execution instructions stored in the memory so that the chip executes the cross-device data sharing method in the above-mentioned method embodiments.

[0115] Among them, the electronic device, computer storage medium, computer program product or chip provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above and will not be repeated here.

[0116] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0117] In the several embodiments provided in the present application, it should be understood that the disclosed 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 modules or 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 device, 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.

[0118] The unit described as a separate component may or may not be physically separated, and the component shown as a unit may be one physical unit or multiple physical units, that is, it may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiment.

[0119] 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. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0120] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program code.

[0121] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application 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 cross-device data sharing method, applied to a first electronic device, wherein the first electronic device includes a first application and a first sharing module, characterized in that: The method comprises: After receiving a data sharing request from the first application to the second application of the second electronic device, the first application obtains the device file identification information, source device information, source application information, destination device information, destination application information and operation permission information of the file to be shared; The first application shares the file to be shared with the first sharing module, and transmits the file identification information in the device, source device information, source application information, destination device information, destination application information and operation permission information to the first sharing module; The first sharing module generates inter-device file identification information of the to-be-shared file according to the intra-device file identification information and the source device information, and stores the intra-device file identification information, inter-device file identification information and operation authority information; The first sharing module launches the second application according to the destination device information and the destination application information, and sends the inter-device file identification information to the second application; The first sharing module sends the inter-device file identification information and the destination application information to the second sharing module of the second electronic device according to the destination device information, so that the second sharing module identifies whether the file to be shared is an external file according to the inter-device file identification information, and returns the identification result of the file to be shared to the second application according to the destination application information, and if the file to be shared is an external file, the second application performs the first file operation on the file to be shared through the second sharing module; The first sharing module receives a file operation request returned by the second sharing module, wherein the file operation request includes inter-device file identification information of the file to be shared, destination device information, destination application information, and operation information of the first file operation; The first sharing module searches for the corresponding intra-device file identification information and operation authority information according to the inter-device file identification information in the file operation request; The first sharing module performs an operation permission check based on the found operation permission information and the operation information. If the operation permission check passes, a second file operation is performed on the file to be shared based on the found file identification information in the device and the operation information. The operation result is returned to the second sharing module based on the destination device information in the file operation request, and the second sharing module returns the operation result to the second application.

2. The cross-device data sharing method according to claim 1, characterized in that: When sending the inter-device file identification information and the destination application information to the second sharing module, the first sharing module also sends the operation permission information to the second sharing module, so that the second sharing module performs an operation permission check on the first file operation according to the operation permission information.

3. The cross-device data sharing method according to claim 1, characterized in that: The first application determines whether the data sharing request is received by: If it is detected that the file to be shared is long pressed in the file list of the first application or the file to be shared is opened in the first application, a first interface is displayed, where the first interface includes a sharing menu; If it is detected that the sharing menu is selected on the first interface, a sharing interface is displayed, and the sharing interface includes the second electronic device; If it is detected that the second electronic device is selected in the sharing interface, an application selection interface is displayed, and the application selection interface includes the second application; If it is detected that the second application is selected in the application selection interface, the data sharing request is received.

4. The cross-device data sharing method according to claim 1, characterized in that: The intra-device file identification information and the inter-device file identification information include a uniform resource identifier.

5. The cross-device data sharing method according to claim 1, characterized in that: Before sending the inter-device file identification information and the destination application information to the second sharing module, the method further includes: The first sharing module encrypts the file identification information and the destination application information between the devices.

6. The cross-device data sharing method according to claim 1, characterized in that: The checking of the operation authority according to the found operation authority information and the operation information comprises: Determine whether the operation type corresponding to the operation information is a specified operation type; and / or Determine whether the operation time corresponding to the operation information is within the specified operation validity period.

7. The cross-device data sharing method according to any one of claims 1 to 6, characterized in that: Before obtaining the file identification information, source device information, source application information, destination device information, destination application information and operation permission information of the file to be shared, the method further includes: searching for the second electronic device; If the second electronic device is found, the second electronic device is connected.

8. A computer-readable storage medium, characterized in that: It comprises computer instructions, and when the computer instructions are executed on an electronic device, the electronic device executes the cross-device data sharing method as claimed in any one of claims 1 to 7.

9. An electronic device, characterized in that: The electronic device includes a processor and a memory, wherein the memory is used to store instructions, and the processor is used to call the instructions in the memory, so that the electronic device executes the cross-device data sharing method as described in any one of claims 1 to 7.

10. A chip system, which is applied to an electronic device; the chip system includes an interface circuit and a processor; the interface circuit and the processor are interconnected through lines; the interface circuit is used to receive signals from a memory of the electronic device and send signals to the processor, and the signals include computer instructions stored in the memory; when the processor executes the computer instructions, the chip system executes the cross-device data sharing method described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method, terminal, server and system for sharing resource

    CN104618217A

  • Information interaction method and device

    CN106294660A