WO2022078119A1 - Cross-device data sharing method and related device - Google Patents

Cross-device data sharing method and related device Download PDF

Info

Publication number
WO2022078119A1
WO2022078119A1 PCT/CN2021/117209 CN2021117209W WO2022078119A1 WO 2022078119 A1 WO2022078119 A1 WO 2022078119A1 CN 2021117209 W CN2021117209 W CN 2021117209W WO 2022078119 A1 WO2022078119 A1 WO 2022078119A1
Authority
WO
WIPO (PCT)
Prior art keywords
information
file
application
sharing
electronic device
Prior art date
Application number
PCT/CN2021/117209
Other languages
French (fr)
Chinese (zh)
Inventor
李浩然
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022078119A1 publication Critical patent/WO2022078119A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/176Support for shared access to files; File sharing support
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules

Definitions

  • the present application relates to the field of terminal technologies, and in particular, to a cross-device data sharing method and related devices.
  • the embodiments of the present application disclose a cross-device data sharing method and related devices, which do not need to rely on the cloud to realize data sharing, and have no restrictions on the type of data to be shared.
  • a first aspect of the present application discloses a cross-device data sharing method, which is applied to a first electronic device, where the first electronic device includes a first application and a first sharing module, and the method includes:
  • the first application After receiving the data sharing request from the first application to the second application of the second electronic device, the first application obtains the in-device file identification information, source device information, source application information, and destination device of the file to be shared information, purpose application information and operation authority information;
  • the first application shares the to-be-shared file to the first sharing module, and transmits the in-device file identification information, 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 ;
  • the first sharing module generates the inter-device file identification information of the to-be-shared file according to the in-device file identification information and the source device information, and stores the in-device file identification information, the inter-device file identification information and the 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 target application information to the second sharing module of the second electronic device according to the destination device information, so that the second sharing module
  • the file identification information identifies whether the to-be-shared file is an external file, and returns the identification result of the to-be-shared file to the second application according to the target application information. If the to-be-shared file is an external file, the second application The application performs the first file operation on the to-be-shared file through the second sharing module;
  • the first sharing module receives the file operation request returned by the second sharing module, and the file operation request includes the inter-device file identification information, destination device information, destination application information and the first file of the file to be shared. Operational information for the operation;
  • the first sharing module searches for corresponding in-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 authority check according to the found operation authority information and the operation information. If the operation authority check is passed, the to-be-shared file is checked according to the found file identification information in the device and the operation information. For the second file operation, the operation result is returned to the second sharing module according to the destination device information in the file operation request, and the second sharing module returns the operation result to the second application.
  • the present application shares the shareable file from the first application of the first electronic device to the second application of the second electronic device, so as to realize cross-device and cross-application data sharing.
  • the present application does not need to rely on the cloud for data sharing, and there is no restriction on the type of data to be shared, which improves the scope and efficiency of data sharing.
  • the first sharing module when the first sharing module sends the inter-device file identification information and target application information to the second sharing module, the first sharing module also sends the operation permission information to the second sharing module.
  • the second sharing module enables the second sharing module to check the operation authority of the first file operation according to the operation authority information.
  • 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 checks the user's operation authority according to the operation authority information, which can improve the security of file operations.
  • the first application determines whether to receive the data sharing request in the following manner:
  • a first interface is displayed, and the first interface includes a sharing menu
  • a sharing interface is displayed, and the sharing interface includes the second electronic device;
  • an application selection interface is displayed, and the application selection interface includes the second application
  • the data sharing request is received.
  • the intra-device file identification information and the inter-device file identification information include uniform resource identifiers.
  • the method before the 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 inter-device file identification information and target application information.
  • the performing operation authority check according to the found operation authority information and the operation information includes:
  • the method before acquiring the in-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 method further includes:
  • a second aspect of the present application discloses a computer-readable storage medium, comprising computer instructions, which, when the computer instructions are executed on an electronic device, cause the electronic device to execute the cross-device data sharing method described in the first aspect.
  • a third aspect of the present application discloses an electronic device, the electronic device includes a processor and a memory, 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 according to the first aspect.
  • a fourth aspect of the present application discloses a computer program product that, when the computer program product runs on a computer, enables the computer to execute the cross-device data sharing method described in the first aspect.
  • a fifth aspect of the present application 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 by lines; the interface circuit is used for receiving signals from a memory of the electronic device, A signal is sent to the processor, where the signal includes 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.
  • a sixth aspect of the present application discloses an apparatus, the apparatus having the function of implementing the behavior of the electronic device in the method provided in the above-mentioned first aspect.
  • the functions can be implemented by hardware, or by executing corresponding software by hardware.
  • the hardware or software includes one or more modules corresponding to the above functions.
  • FIG. 1 is a schematic diagram of an application scenario of the method for sharing data across devices disclosed in an embodiment of the present application.
  • FIG. 2 is a schematic diagram of sending a data sharing request through an application interface of a first application.
  • FIG. 3 is a flowchart of a method for sharing data across devices disclosed in an embodiment of the present application.
  • FIG. 4 is a schematic structural diagram of a first electronic device disclosed in an embodiment of the present application.
  • FIG. 1 is a schematic diagram of an application scenario of the method for sharing data across devices disclosed in an embodiment of the present application.
  • the cross-device data sharing method is applied to the first electronic device 10 and the 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, video or document) of the first electronic device 10 to 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 .
  • the user opens a picture from the gallery of the first electronic device 10 , shares the picture to the picture processor of the second electronic device 11 , and modifies the shared picture on the picture processor of the second electronic device 11 .
  • the user selects a video from the file manager of the first electronic device 10 , shares the video to the video player of the second electronic device 11 , and watches the shared video on the video player of the second electronic device 11 .
  • the user selects a document from the file manager of the first electronic device 10 , 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 need to rely on the cloud for data sharing, and there is no restriction on the type of data to be shared, which improves the scope and efficiency of data sharing.
  • the first electronic device 10 and the second electronic device 11 may include a smart phone, a tablet computer, a desktop computer, a laptop portable computer, a vehicle-mounted computer, and the like.
  • 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 (eg, 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 different types of electronic devices, for example, the first electronic device 10 is a mobile phone, and the second electronic device 11 is a tablet computer.
  • Communication connection between the first electronic device 10 and the second electronic device 11 may be performed by means of infrared rays, Bluetooth, wireless local area network, or the like.
  • FIG. 2 is a flowchart of a method for sharing data across devices disclosed in an embodiment of the present application.
  • the first electronic device includes a first application and a first sharing module
  • the second electronic device includes a second application and a second sharing module.
  • data can be shared from the first application of the first electronic device to the second application of the second electronic device.
  • the first electronic device may include a second sharing module
  • the second electronic device may include a first sharing module
  • data can be transferred from The second application of the second electronic device is shared with the first application of the first electronic device.
  • the cross-device data sharing method includes:
  • the first application if 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 the in-device file identification information, source device information, source application information, Destination device information, destination application information, and operation permission information.
  • the first application determines whether a data sharing request is received according to the following methods:
  • the file to be shared is opened in the first application, and a first interface is displayed, and the first interface includes a sharing menu;
  • the sharing interface is displayed, and the sharing interface includes the second electronic device;
  • an application selection interface is displayed, and the application selection interface includes the second application
  • a file interface of the file to be shared is displayed, and the file interface includes a sharing menu.
  • a sharing interface is displayed, and the sharing interface includes external devices that can be shared, such as a second electronic device.
  • 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 on the application selection interface, a data sharing request is sent from the first application of the first electronic device to the application (such as the second application) of the external device (such as the second electronic device) .
  • FIG. 3 is a schematic diagram of sending a data sharing request through an application interface of a first application.
  • the file manager of Device A displays multiple documents (including Document 1, Document 2, Document 3, Document 4). If the document 4 is long-pressed, multiple shortcut menus are displayed, and the shortcut menu includes a share menu. If the sharing menu is selected, a sharing interface is displayed, and the sharing interface includes two external devices, device B and device C. If device B is selected, an application selection interface is displayed, and the application selection interface includes Word and WPS. If Word is selected, a data sharing request is sent from the file manager of device A to Word of device B, indicating that the document to be shared is to be shared from the file manager of device A to Word of device B.
  • the sharing interface of the file to be shared may also include a local application of the first electronic device, such as a printer, email, WeChat, QQ, and so on.
  • the first electronic device can share the sharable file to the local application to realize in-device data sharing.
  • a file list is displayed after the first application (eg, a file manager) is opened, and a sharing menu is displayed if a long-press on an image to be shared in the file list is detected.
  • the first application eg, a file manager
  • the sharing interface may directly display the application of the external device (eg, the second application of the second electronic device). If the user selects the application of the external device (for example, the second application of the second electronic device) from the sharing interface, send a message from the first application of the first electronic device to the application of the external device (for example, the second application of the second electronic device) Data sharing request.
  • the application of the external device for example, the second application of the second electronic device
  • the in-device file identification information is used for file location in the device, and can uniquely identify the file on the device (eg, the first electronic device).
  • the file identification information in the device may be a file path, or may be a file identification in a database, such as a uniform resource identifier (Uniform Resource Identifier, URI).
  • URI Uniform Resource Identifier
  • 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.
  • the source application information is used to identify the first application.
  • the source application information may be an application identifier of the first application.
  • 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.
  • the destination application information is used to identify the second application.
  • the destination application information may be an application identifier of the second application.
  • the operation authority information specifies the operation authority of the file to be shared, and is used to check the operation authority of the second application. It can receive the operation authority information set by the user, or use the default operation authority information.
  • the operation permission information can specify whether the second application has read permission and write permission on the file to be shared.
  • the operation permission information can also specify whether the second application has sharing permission for the file to be shared.
  • the sharing permission refers to whether the second application can share the to-be-shared file within the device, that is, share to other applications in the second electronic device. If the operation permission information specifies 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 no sharing permission, the second application cannot share the file to be shared with other applications in the second electronic device.
  • the operation authority information can also specify the operation validity period. Within the validity period of the operation, the second application can operate the to-be-shared file.
  • the first application shares the file to be shared to the first sharing module, and transmits the in-device file identification information, source device information, source application information, destination device information, destination application information and operation permission information to the first sharing module.
  • the first application may share the to-be-shared file to 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.
  • the operating system allocates a temporary area for the to-be-shared file, and operations on the temporary area are reflected on the to-be-shared file.
  • the first sharing module generates the inter-device file identification information of the file to be shared according to the in-device file identification information and the source device information, and stores the intra-device file identification information, the inter-device file identification information and the operation authority information.
  • the inter-device file identification information is used for file location across devices. According to the inter-device identification information of the file to be shared, the second electronic device may determine the location of the file to be shared.
  • the intra-device file identification information and the inter-device file identification information may be uniform resource identifiers.
  • the first sharing module may add the source device information to the intra-device file identification information to generate inter-device file identification information.
  • the intra-device file identification information is content://media/external/file/1
  • the source device information is 123456
  • the inter-device identification information may be content:123456://media/external/file/1.
  • 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 may encrypt the inter-device file identification information before sending the inter-device file identification information to the second application.
  • the first sharing module sends the inter-device file identification information, the target application information and the operation authority information to the second sharing module according to the target device information.
  • the first sharing module transmits the operation authority information to the second sharing module, so that the second sharing module performs the first operation authority check on the file operation of the file to be shared by the second application according to the operation authority information, thereby improving the security of the operation. sex.
  • the first sharing module may not transmit the operation permission information to the second sharing module, and the second sharing module does not perform the first operation permission check on the file operation of the file to be shared by the second application.
  • the first sharing module sends the inter-device file identification information, the purpose application information and the operation authority information to the second sharing module, it can share the inter-device file identification information, purpose application information and operation authority information.
  • the operation authority information is encrypted.
  • the second sharing module identifies whether the file to be shared is an external file according to the identification information of the inter-device file, and returns the identification result of the file to be shared to the second application according to the target application information.
  • the second application after receiving the inter-device file identification information from the first sharing module, the second application sends a file identification request to the second sharing module, and after receiving the file identification request, the second sharing module according to the inter-device file
  • the identification information identifies whether the file to be shared is an external file, and the identification result of the file to be shared is returned to the second application according to the target application information.
  • the second sharing module can parse out the source device information from the inter-device file identification information, and judge whether the file to be shared is an external file according to the parsed source device information. For example, the second sharing module parses the source device information from the inter-device file identification information content:123456://media/external/file/1 as 123456, and 123456 represents the first electronic device rather than the device (ie, the second electronic device), Then it is determined that 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 file operation to be shared with the file may include reading a file, writing a file, sharing a file in a device, and the like.
  • the second sharing module performs a first operation authority check on the first file operation according to the operation authority information.
  • Performing the first operation authority check on the first file operation according to the operation authority information includes: if the first file operation is an operation within the authority specified by the operation authority information, allowing the first file operation; if the first file operation is not the operation authority information operation within the specified authority, the first file operation is rejected.
  • the second application only has read permission but no write permission to the shared file, and if the first file operation is a write operation, the write operation is rejected.
  • Performing the first operation authority check in the second electronic device can intercept illegal operations in advance, improve the security of file operations, and can reduce the communication overhead between the first electronic device and the second electronic device during illegal operations.
  • the second sharing module if the first operation authority 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, where the file operation request includes the inter-device file identification information of the file to be shared, the purpose Application information, destination device information, and operation information of the first file operation.
  • the operation information indicates a first file operation performed by the second application on the shareable file, such as a write operation.
  • the second sharing module may encrypt the file operation request before sending the file operation request to the first sharing module.
  • 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 a second operation authority check according to the found operation authority information and the operation information in the file operation request.
  • Performing the second operation authority check according to the operation authority information and the operation information may include:
  • the file operation request indicates that a write operation is to be performed on the file to be shared
  • the first electronic device determines whether the second application has the write permission to the shared file according to the operation permission information. If the second application has the write permission to the shared file, the operation type The second operation permission check.
  • the second operation authority check on the operation information according to the operation authority information may further include:
  • the operation time specified by the operation authority 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 authority information.
  • To operate the file to be shared pass the second operation permission check of the operation time.
  • 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.
  • the first sharing module can search 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.
  • the first sharing module performs a write operation on the to-be-shared file according to the found file descriptor and operation information.
  • the first sharing module returns the operation result to the second sharing module according to the destination device information in the file operation request.
  • the first sharing module may encrypt the operation result before returning the operation result to the second sharing module.
  • the second sharing module returns the operation result to the second application.
  • the second application displays the file to be shared according to the operation result.
  • the second application displays the written file to be shared according to the operation result of the writing operation.
  • a shareable file is shared from the first application of the first electronic device to the first application of the second electronic device, thereby realizing cross-device and cross-application data sharing.
  • the present application does not need to rely on the cloud for data sharing, and there is no restriction on the type of data to be shared, which improves the scope and efficiency of data sharing.
  • the method before acquiring the in-device file identification information, source device information, source application information, destination device information, destination application information and operation permission information information of the file to be shared, the method further includes:
  • the first electronic device can search for the second electronic device by means of infrared rays or the like, and if the second electronic device is found, the second electronic device is connected.
  • FIG. 4 is a schematic structural diagram of the first electronic device disclosed in the present application.
  • the first electronic device 40 includes one or more processors 401 and a memory 402 .
  • the processor 401 and the memory 402 are connected through one or more communication buses 403 .
  • Memory 402 is used to store one or more computer programs 404 .
  • One or more computer programs 404 are configured to be executed by the processor 401 .
  • the one or more computer programs 404 include instructions that can be used to execute various steps performed by an electronic device (eg, a mobile phone) in the above embodiments, so as to implement a cross-device data sharing function in the electronic device.
  • an electronic device eg, a mobile phone
  • This embodiment also provides a computer storage medium, where computer instructions are stored in the computer storage medium, and when the computer instructions are executed on the electronic device, the electronic device executes the above-mentioned relevant method steps to realize the cross-device data sharing in the above-mentioned embodiment. method.
  • This embodiment also provides a computer program product, which, when the computer program product runs on the electronic device, causes the electronic device to execute the above-mentioned relevant steps, so as to realize the cross-device data sharing method in the above-mentioned embodiment.
  • the embodiments of the present application also provide an apparatus, which may specifically be a chip, a component or a module, and the apparatus may include a connected processor and a memory; wherein, the memory is used for storing computer execution instructions, and when the apparatus is running, The processor can execute the computer-executed instructions stored in the memory, so that the chip executes the cross-device data sharing method in the foregoing method embodiments.
  • the electronic device, computer storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding method provided above. Therefore, for the beneficial effects that can be achieved, reference can be made to the corresponding provided above. The beneficial effects in the method will not be repeated here.
  • the disclosed apparatus and method may be implemented in other manners.
  • the device embodiments described above are only illustrative.
  • the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined. Or it may be integrated into another device, or some features may be omitted, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and components shown as units may be one physical unit or multiple physical units, that is, may be located in one place, or may be distributed to multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as an independent product, may be stored in a readable storage medium.
  • a readable storage medium including several instructions to make a device (may be a single chip microcomputer, a chip, etc.) or a processor (processor) to execute all or part of the steps of the methods described in the various embodiments 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), magnetic disk or optical disk and other media that can store program codes .

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Storage Device Security (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A cross-device data sharing method and a related device. Said method comprises: upon 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 acquiring related information of a file to be shared, and sharing said file with a first sharing module of the first electronic device; the first sharing module generating inter-device file identifier information of said file, and sending same to the second application and a second sharing module of the second electronic device; if said file is an external file, the second application performing, by means of the second sharing module, an operation on said file; and the first sharing module receiving a file operation request returned by the second sharing module, and searching for corresponding information according to the inter-device file identifier information in the request, and if an operation permission check has passed, performing, according to the request, an operation on said file, and returning an operation result to the second application. The method can improve the usage range and efficiency of data sharing.

Description

跨设备数据分享方法及相关设备Cross-device data sharing method and related devices
本申请要求于2020年10月13日提交中国专利局、申请号为202011092086.7、发明名称为“跨设备数据分享方法及相关设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202011092086.7 and the invention titled "Cross-device data sharing method and related equipment" filed with the China Patent Office on October 13, 2020, the entire contents of which are incorporated into this application by reference middle.
技术领域technical field
本申请涉及终端技术领域,尤其涉及一种跨设备数据分享方法及相关设备。The present application relates to the field of terminal technologies, and in particular, to a cross-device data sharing method and related devices.
背景技术Background technique
随着智能设备的广泛使用,用户经常需要在不同设备之间分享数据。例如,在大屏上播放手机的视频,或者在平板上编辑手机的文件。目前跨设备数据分享的主要方式是投屏和云共享。然而,投屏对分享的数据类型有限制,只能对多媒体文件进行分享,而云共享是借助了云,会影响文件的访问速度。With the widespread use of smart devices, users often need to share data between different devices. For example, play your phone's video on a big screen, or edit your phone's files on a tablet. Currently, the main methods of data sharing across devices are screen projection and cloud sharing. However, screen projection has restrictions on the type of data to be shared, and can only share multimedia files, while cloud sharing relies on the cloud, which will affect the speed of file access.
发明内容SUMMARY OF THE INVENTION
本申请实施例公开了一种跨设备数据分享方法及相关设备,不需要借助于云实现数据分享,并且对分享的数据类型没有限制。The embodiments of the present application disclose a cross-device data sharing method and related devices, which do not need to rely on the cloud to realize data sharing, and have no restrictions on the type of data to be shared.
本申请第一方面公开了一种跨设备数据分享方法,应用于第一电子设备,所述第一电子设备包括第一应用和第一分享模块,所述方法包括:A first aspect of the present application discloses a cross-device data sharing method, which is applied to a first electronic device, where the first electronic device includes a first application and a first sharing module, and the method includes:
在接收到从所述第一应用向第二电子设备的第二应用的数据分享请求后,所述第一应用获取待分享文件的设备内文件标识信息、源设备信息、源应用信息、目的设备信息、目的应用信息和操作权限信息;After receiving the data sharing request from the first application to the second application of the second electronic device, the first application obtains the in-device file identification information, source device information, source application information, and destination device of the file to be shared information, purpose application information and operation authority information;
所述第一应用将所述待分享文件分享给所述第一分享模块,将所述设备内文件标识信息、源设备信息、源应用信息、目的设备信息、目的应用信息和操作权限信息传送给所述第一分享模块;The first application shares the to-be-shared file to the first sharing module, and transmits the in-device file identification information, 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;
所述第一分享模块根据所述设备内文件标识信息和所述源设备信息生成所述待分享文件的设备间文件标识信息,存储所述设备内文件标识信息、设备间文件标识信息和操作权限信息;The first sharing module generates the inter-device file identification information of the to-be-shared file according to the in-device file identification information and the source device information, and stores the in-device file identification information, the inter-device file identification information and the 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 target application information to the second sharing module of the second electronic device according to the destination device information, so that the second sharing module The file identification information identifies whether the to-be-shared file is an external file, and returns the identification result of the to-be-shared file to the second application according to the target application information. If the to-be-shared file is an external file, the second application The application performs the first file operation on the to-be-shared file through the second sharing module;
所述第一分享模块接收所述第二分享模块返回的文件操作请求,所述文件操作请求包括所述待分享文件的设备间文件标识信息、目的设备信息、目的应用信息和所述第一文件操作的操作信息;The first sharing module receives the file operation request returned by the second sharing module, and the file operation request includes the inter-device file identification information, destination device information, destination application information and the first file of the file to be shared. Operational information for the operation;
所述第一分享模块根据所述文件操作请求中的设备间文件标识信息查找对应的设备内文件标识信息和操作权限信息;The first sharing module searches for corresponding in-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 authority check according to the found operation authority information and the operation information. If the operation authority check is passed, the to-be-shared file is checked according to the found file identification information in the device and the operation information. For the second file operation, the operation result is returned to the second sharing module according to the destination device information in the file operation request, and the second sharing module returns the operation result to the second application.
本申请将可分享文件从第一电子设备的第一应用分享给第二电子设备的第二应用,实现了跨设备跨应用数据分享。本申请在进行数据分享时不需要借助于云,并且对分享的数据类型没有限制,提高了数据分享的使用范围和效率。The present application shares the shareable file from the first application of the first electronic device to the second application of the second electronic device, so as to realize cross-device and cross-application data sharing. The present application does not need to rely on the cloud for data sharing, and there is no restriction on the type of data to be shared, which improves the scope and efficiency of data sharing.
在一些可选的实施方式中,所述第一分享模块在将所述设备间文件标识信息、目的应用信息发送给所述第二分享模块时,还将所述操作权限信息发送给所述第二分享模块,使所述第二分享模块根据所述操作权限信息对所述第一文件操作进行操作权限检查。In some optional implementation manners, when the first sharing module sends the inter-device file identification information and target application information to the second sharing module, the first sharing module also sends the operation permission information to the second sharing module. The second sharing module enables the second sharing module to check the operation authority of the first file operation according to the operation authority information.
第一电子设备的第一分享模块将操作权限信息传送给第二电子设备的第二分享模块,使得第二电子设备根据操作权限信息对用户操作进行操作权限检查,可以提高文件操作的安全性。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 checks the user's operation authority according to the operation authority information, which can improve the security of file operations.
在一些可选的实施方式中,所述第一应用通过以下方式判断是否接收到所述数据分享请求:In some optional implementation manners, the first application determines whether to receive the data sharing request in the following manner:
若检测到在所述第一应用的文件列表中长按所述待分享文件或者在所述第一应用中打开所述待分享文件,显示第一界面,所述第一界面包括分享菜单;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, and 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 on the application selection interface, the data sharing request is received.
在一些可选的实施方式中,所述设备内文件标识信息和所述设备间文件标识信息包括统一资源标识符。In some optional implementations, the intra-device file identification information and the inter-device file identification information include uniform resource identifiers.
在一些可选的实施方式中,所述将所述设备间文件标识信息、目的应用信息发送给所述第二分享模块之前,所述方法还包括:In some optional implementation manners, before the 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 inter-device file identification information and target application information.
在一些可选的实施方式中,所述根据查找到的操作权限信息和所述操作信息进行操作权限检查包括:In some optional implementation manners, the performing operation authority check according to the found operation authority information and the operation information includes:
判断所述操作信息对应的操作类型是否为指定的操作类型;和/或Determine whether the operation type corresponding to the operation information is the specified operation type; and/or
判断所述操作信息对应的操作时间是否在指定的操作有效期内。It is judged whether the operation time corresponding to the operation information is within the specified operation validity period.
在一些可选的实施方式中,所述获取待分享文件的设备内文件标识信息、源设备信息、源应用信息、目的设备信息、目的应用信息和操作权限信息之前,所述方法还包括:In some optional implementation manners, before acquiring the in-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 method further includes:
查找所述第二电子设备;find the second electronic device;
若查找到所述第二电子设备,连接所述第二电子设备。If the second electronic device is found, connect the second electronic device.
本申请第二方面公开了一种计算机可读存储介质,包括计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行如第一方面所述的跨设备数据分享方法。A second aspect of the present application discloses a computer-readable storage medium, comprising computer instructions, which, when the computer instructions are executed on an electronic device, cause the electronic device to execute the cross-device data sharing method described in the first aspect.
本申请第三方面公开了一种电子设备,所述电子设备包括处理器和存储器,所述存储器,用于存储指令,所述处理器用于调用所述存储器中的指令,使得所述电子设备执行如第一方面所述的跨设备数据分享方法。A third aspect of the present application discloses an electronic device, the electronic device includes a processor and a memory, 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 according to the first aspect.
本申请第四方面公开了一种计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行如第一方面所述的跨设备数据分享方法。A fourth aspect of the present application discloses a computer program product that, when the computer program product runs on a computer, enables the computer to execute the cross-device data sharing method described in the first aspect.
本申请第五方面公开了一种芯片系统,该芯片系统应用于电子设备;芯片系统包括接口电路和处理器;接口电路和处理器通过线路互联;接口电路用于从电子设备的存储器接收信号,并向处理器发送信号,信号包括存储器中存储的计算机指令;当处理器执行该计算机指令时,芯片系统执行如第一方面所述的跨设备数据分享方法。A fifth aspect of the present application 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 by lines; the interface circuit is used for receiving signals from a memory of the electronic device, A signal is sent to the processor, where the signal includes 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.
本申请第六方面公开了一种装置,该装置具有实现上述第一方面所提供的方法中电子设备行为的功能。功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的模块。A sixth aspect of the present application discloses an apparatus, the apparatus having the function of implementing the behavior of the electronic device in the method provided in the above-mentioned first aspect. The functions can be implemented by hardware, or by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above functions.
可以理解地,上述提供的第二方面所述的计算机可读存储介质,第三方面所述的电子设备,第四方面所述的计算机程序产品,第五方面所述的芯片系统及第六方面所述的装置均与上述第一方面的方法对应,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。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 sixth aspect The above-mentioned apparatuses all correspond to the method of the first aspect. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects of the corresponding methods provided above, which will not be repeated here.
附图说明Description of drawings
图1是本申请实施例公开的跨设备数据分享方法的应用场景示意图。FIG. 1 is a schematic diagram of an application scenario of the method for sharing data across devices disclosed in an embodiment of the present application.
图2是通过第一应用的应用界面发出数据分享请求的示意图。FIG. 2 is a schematic diagram of sending a data sharing request through an application interface of a first application.
图3是本申请实施例公开的跨设备数据分享方法的流程图。FIG. 3 is a flowchart of a method for sharing data across devices disclosed in an embodiment of the present application.
图4是本申请实施例公开的第一电子设备的结构示意图。FIG. 4 is a schematic structural diagram of a first electronic device disclosed in an embodiment of the present application.
具体实施方式Detailed ways
为了更好地理解本申请实施例公开的跨设备数据分享方法及相关设备,下面首先对本申请跨设备数据分享方法的应用场景进行描述。In order to better understand the cross-device data sharing method and related devices disclosed in the embodiments of the present application, the following first describes the application scenarios of the cross-device data sharing method of the present application.
图1是本申请实施例公开的跨设备数据分享方法的应用场景示意图。FIG. 1 is a schematic diagram of an application scenario of the method for sharing data across devices disclosed in an embodiment of the present application.
如图1所示,所述跨设备数据分享方法应用于第一电子设备10和第二电子设备11。第一电子设备10包括多个第一应用100,例如图库、文件管理器。第二电子设备11包括多个第二应用110,例如图片处理器、视频播放器、文档编辑器。用户从第一应用100将第一电子设备10的文件(例如图片、视频或文档)分享给第二应用110,从第二电子 设备11的第二应用110操作(例如查看或者编辑)分享的文件。例如,用户从第一电子设备10的图库打开图片,将图片分享给第二电子设备11的图片处理器,在第二电子设备11的图片处理器上修改该分享的图片。又如,用户从第一电子设备10的文件管理器选择视频,将视频分享给第二电子设备11的视频播放器,在第二电子设备11的视频播放器上观看该分享的视频。再如,用户从第一电子设备10的文件管理器选择文档,将文档分享给第二电子设备11的文档编辑器,在第二电子设备11的文档编辑器上查看并编辑该分享的文档。本申请数据分享方法在进行数据分享时不需要借助于云,并且对分享的数据类型没有限制,提高了数据分享的使用范围和效率。As shown in FIG. 1 , the cross-device data sharing method is applied to the first electronic device 10 and the 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, video or document) of the first electronic device 10 to 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 to 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 to 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 10 , 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 need to rely on the cloud for data sharing, and there is no restriction on the type of data to be shared, which improves the scope and efficiency of data sharing.
其中,第一电子设备10和第二电子设备11可以包括智能手机、平板电脑、台式计算机、膝上型便携计算机、车载电脑等。第一电子设备10和第二电子设备11可以是相同类型的电子设备,例如都是手机(例如从第一用户的手机分享给第二用户的手机)。第一电子设备10和第二电子设备11也可以是不同类型的电子设备,例如第一电子设备10是手机,第二电子设备11是平板电脑。Wherein, the first electronic device 10 and the second electronic device 11 may include a smart phone, a tablet computer, a desktop computer, a laptop portable computer, a vehicle-mounted computer, and the like. 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 (eg, 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 different types of electronic devices, for example, the first electronic device 10 is a mobile phone, and the second electronic device 11 is a tablet computer.
第一电子设备10和第二电子设备11之间可以通过红外线、蓝牙、无线局域网等方式进行通信连接。Communication connection between the first electronic device 10 and the second electronic device 11 may be performed by means of infrared rays, Bluetooth, wireless local area network, or the like.
图2是本申请实施例公开的跨设备数据分享方法的流程图。第一电子设备包括第一应用和第一分享模块,第二电子设备包括第二应用和第二分享模块。通过第一电子设备的第一分享模块和第二电子设备的第二分享模块,可以将数据从第一电子设备的第一应用分享给第二电子设备的第二应用。应当理解,第一电子设备可以包括第二分享模块,第二电子设备可以包括第一分享模块,通过第二电子设备的第一分享模块和第一电子设备的第二分享模块,可以将数据从第二电子设备的第二应用分享给第一电子设备的第一应用。FIG. 2 is a flowchart of a method for sharing data across devices 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 a second sharing module, the second electronic device may include a 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 transferred from The second application of the second electronic device is shared with the first application of the first electronic device.
参阅图2所示,所述跨设备数据分享方法包括:Referring to Figure 2, the cross-device data sharing method includes:
201,若接收到从第一电子设备的第一应用向第二电子设备的第二应用的数据分享请求,第一应用获取待分享文件的设备内文件标识信息、源设备信息、源应用信息、目的设备信息、目的应用信息和操作权限信息。201, if 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 the in-device file identification information, source device information, source application information, Destination device information, destination application information, and operation permission information.
在一实施例中,第一应用根据以下方式判断是否接收到数据分享请求:In one embodiment, the first application determines whether a data sharing request is received according to the following methods:
检测是否在第一应用(例如文件管理器)的文件列表中长按待分享文件或者在第一应用中打开待分享文件,若检测到在第一应用的文件列表中长按待分享文件或者在第一应用中打开待分享文件,显示第一界面,第一界面包括分享菜单;Detect whether you have long-pressed the file to be shared in the file list of the first application (such as a file manager) or opened the file to be shared in the first application. The file to be shared is opened in the first application, and a first interface is displayed, and the first interface includes a sharing menu;
检测是否在第一界面选择分享菜单,若检测到在第一界面选择分享菜单,显示分享界面,分享界面包括第二电子设备;Detecting whether the sharing menu is selected on the first interface, and if it is detected that the sharing menu is selected on the first interface, the sharing interface is displayed, and the sharing interface includes the second electronic device;
检测是否在分享界面选择第二电子设备,若检测到在分享界面选择第二电子设备,显示应用选择界面,应用选择界面包括第二应用;Detecting whether the 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, an application selection interface is displayed, and the application selection interface includes the second application;
检测是否在应用选择界面选择第二应用,若检测到在应用选择界面选择第二应用,接收到数据分享请求。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.
在一实施例中,从第一应用打开待分享文件后显示待分享文件的文件界面,文件界面包括分享菜单。选择(如点击)分享菜单后显示分享界面,分享界面包括可分享的外 部设备,例如第二电子设备。选择分享界面中的外部设备(例如第二电子设备)后显示应用选择界面,应用选择界面包括外部设备中可与第一应用进行数据分享的应用,例如第二应用。若在应用选择界面选择外部设备的应用(例如第二应用),则发出从第一电子设备的第一应用向外部设备(例如第二电子设备)的应用(例如第二应用)的数据分享请求。In one embodiment, after the file to be shared is opened from the first application, a file interface of the file to be shared is displayed, and the file interface includes a sharing menu. After selecting (eg clicking) the sharing menu, a sharing interface is displayed, and the sharing interface includes external devices that can be shared, such as a second electronic device. After selecting an external device (eg, 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 on the application selection interface, a data sharing request is sent from the first application of the first electronic device to the application (such as the second application) of the external device (such as the second electronic device) .
图3是通过第一应用的应用界面发出数据分享请求的示意图。设备A的文件管理器显示多个文档(包括文档1、文档2、文档3、文档4)。若长按文档4,则显示多个快捷菜单,快捷菜单包括分享菜单。若选择分享菜单,则显示分享界面,分享界面包括设备B、设备C两个外部设备。若选择设备B,则显示应用选择界面,应用选择界面包括Word、WPS。若选择Word,则发出从设备A的文件管理器向设备B的Word的数据分享请求,表明要将待分享文档从设备A的文件管理器分享给设备B的Word。FIG. 3 is a schematic diagram of sending a data sharing request through an application interface of a first application. The file manager of Device A displays multiple documents (including Document 1, Document 2, Document 3, Document 4). If the document 4 is long-pressed, multiple shortcut menus are displayed, and the shortcut menu includes a share menu. If the sharing menu is selected, a sharing interface is displayed, and the sharing interface includes two external devices, device B and device C. If device B is selected, an application selection interface is displayed, and the application selection interface includes Word and WPS. If Word is selected, a data sharing request is sent from the file manager of device A to Word of device B, indicating that the document to be shared is to be shared from the file manager of device A to Word of device B.
应当理解,除了可分享的外部设备,待分享文件的分享界面还可以包括第一电子设备的本地应用,例如打印机、电子邮件、微信、QQ等。第一电子设备可以将可分享文件分享给本地应用以实现设备内数据分享。It should be understood that, in addition to the shareable external device, the sharing interface of the file to be shared may also include a local application of the first electronic device, such as a printer, email, WeChat, QQ, and so on. The first electronic device can share the sharable file to the local application to realize in-device data sharing.
在另一实施例中,开启第一应用(例如文件管理器)后显示文件列表,若检测到长按文件列表中的待分享图片,则显示分享菜单。In another embodiment, a file list is displayed after the first application (eg, a file manager) is opened, and a sharing menu is displayed if a long-press on an image to be shared in the file list is detected.
在另一实施例中,分享界面可以直接显示外部设备的应用(例如第二电子设备的第二应用)。若用户从分享界面选择外部设备的应用(例如第二电子设备的第二应用),则发出从第一电子设备的第一应用向外部设备的应用(例如第二电子设备的第二应用)的数据分享请求。In another embodiment, the sharing interface may directly display the application of the external device (eg, the second application of the second electronic device). If the user selects the application of the external device (for example, the second application of the second electronic device) from the sharing interface, send a message from the first application of the first electronic device to the application of the external device (for example, the second application of the second electronic device) Data sharing request.
设备内文件标识信息用于设备内的文件定位,可以唯一标识设备(例如第一电子设备)上的文件。设备内文件标识信息可以是文件路径,也可以是数据库中的文件标识,例如统一资源标识符(Uniform Resource Identifier,URI)。第一电子设备可以根据设备内文件标识信息对待分享文件进行定位,而外部设备无法根据设备内文件标识信息对待分享文件进行定位。The in-device file identification information is used for file location in the device, and can uniquely identify the file on the device (eg, the first electronic device). The file identification information in the device may be a file path, or may be a file identification in a database, such as a uniform resource identifier (Uniform Resource Identifier, URI). The first electronic device can locate the file to be shared according to the file identification information in the device, but the external device cannot locate the file to be shared according to the file identification information in the device.
源设备信息用于标识第一电子设备。源设备信息可以是第一电子设备的设备标识符。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.
源应用信息用于标识第一应用。源应用信息可以是第一应用的应用标识符。The source application information is used to identify the first application. The source application information may be an application identifier of the first application.
目的设备信息用于标识第二电子设备。目的设备信息可以是第二电子设备的设备标识符。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.
目的应用信息用于标识第二应用。目的应用信息可以是第二应用的应用标识符。The destination application information is used to identify the second application. The destination application information may be an application identifier of the second application.
操作权限信息指定待分享文件的操作权限,用于对第二应用进行操作权限检查。可以接收用户设定的操作权限信息,也可以使用默认的操作权限信息。The operation authority information specifies the operation authority of the file to be shared, and is used to check the operation authority of the second application. It can receive the operation authority information set by the user, or use the default operation authority information.
操作权限信息可以指定第二应用对待分享文件是否有读取权限、写入权限。The operation permission information can specify whether the second application has read permission and write permission on the file to be shared.
操作权限信息还可以指定第二应用对待分享文件是否有分享权限。分享权限是指第二应用是否可以对待分享文件进行设备内分享,即分享给第二电子设备中的其他应用。若操作权限信息指定有分享权限,则第二应用可以将待分享文件分享给第二电子设备中的其他应用。否则,若操作权限信息指定无分享权限,则第二应用不能将待分享文件分享给第二电子设备中的其他应用。The operation permission information can also specify whether the second application has sharing permission for the file to be shared. The sharing permission refers to whether the second application can share the to-be-shared file within the device, that is, share to other applications in the second electronic device. If the operation permission information specifies 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 no sharing permission, the second application cannot share the file to be shared with other applications in the second electronic device.
操作权限信息还可以指定操作有效期。在操作有效期内,第二应用可以对待分享文件进 行操作。The operation authority information can also specify the operation validity period. Within the validity period of the operation, the second application can operate the to-be-shared file.
202,第一应用将待分享文件分享给第一分享模块,将设备内文件标识信息、源设备信息、源应用信息、目的设备信息、目的应用信息和操作权限信息传送给第一分享模块。202, the first application shares the file to be shared to the first sharing module, and transmits the in-device file identification information, source device information, source application information, destination device information, destination application information and operation permission information to the first sharing module.
第一应用可以通过Binder机制将待分享文件分享给第一分享模块。Binder是一种进程间通信机制,第一应用对应于一个进程,第一分享模块对应于一个进程。第一应用通过Binder机制将待分享文件分享给第一分享模块系统时,操作系统为待分享文件分配一块临时区域,对该临时区域的操作都会体现到待分享文件上。The first application may share the to-be-shared file to 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 to-be-shared file to the first sharing module system through the Binder mechanism, the operating system allocates a temporary area for the to-be-shared file, and operations on the temporary area are reflected on the to-be-shared file.
203,第一分享模块根据设备内文件标识信息和源设备信息生成待分享文件的设备间文件标识信息,存储设备内文件标识信息、设备间文件标识信息和操作权限信息。203. The first sharing module generates the inter-device file identification information of the file to be shared according to the in-device file identification information and the source device information, and stores the intra-device file identification information, the inter-device file identification information and the operation authority information.
设备间文件标识信息用于跨设备的文件定位。根据待分享文件的设备间标识信息,第二电子设备可以确定待分享文件的位置。The inter-device file identification information is used for file location across devices. According to the inter-device identification information of the file to be shared, the second electronic device may determine the location of the file to be shared.
在一实施例中,设备内文件标识信息、设备间文件标识信息可以是统一资源标识符。In one embodiment, the intra-device file identification information and the inter-device file identification information may be uniform resource identifiers.
第一分享模块可以将源设备信息加入到设备内文件标识信息中,生成设备间文件标识信息。例如,设备内文件标识信息是content://media/external/file/1,源设备信息为123456,设备间标识信息可以是content:123456://media/external/file/1。The first sharing module may add the source device information to the intra-device file identification information to generate inter-device file identification information. For example, the intra-device file identification information is content://media/external/file/1, the source device information is 123456, and the inter-device identification information may be content:123456://media/external/file/1.
204,第一分享模块根据目的设备信息和目的应用信息拉起第二应用,将设备间文件标识信息发送给第二应用。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.
应当理解,为了提高数据传输的安全性,第一分享模块在将设备间文件标识信息发送给第二应用之前,可以对设备间文件标识信息进行加密。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.
205,第一分享模块根据目的设备信息将设备间文件标识信息、目的应用信息和操作权限信息发送给第二分享模块。205. The first sharing module sends the inter-device file identification information, the target application information and the operation authority information to the second sharing module according to the target device information.
本实施例中,第一分享模块将操作权限信息传送给第二分享模块,使得第二分享模块根据操作权限信息对第二应用对待分享文件的文件操作进行第一操作权限检查,提高操作的安全性。In this embodiment, the first sharing module transmits the operation authority information to the second sharing module, so that the second sharing module performs the first operation authority check on the file operation of the file to be shared by the second application according to the operation authority information, thereby improving the security of the operation. sex.
在其他的实施例中,第一分享模块可以不将操作权限信息传送给第二分享模块,第二分享模块不对第二应用对待分享文件的文件操作进行第一操作权限检查。In other embodiments, the first sharing module may not transmit the operation permission information to the second sharing module, and the second sharing module does not perform the first operation permission check on the file operation of the file to be shared by the second application.
应当理解,为了提高数据传输的安全性,第一分享模块在将设备间文件标识信息、目的应用信息和操作权限信息发送给第二分享模块之前,可以对设备间文件标识信息、目的应用信息和操作权限信息进行加密。It should be understood that, in order to improve the security of data transmission, before the first sharing module sends the inter-device file identification information, the purpose application information and the operation authority information to the second sharing module, it can share the inter-device file identification information, purpose application information and operation authority information. The operation authority information is encrypted.
206,第二分享模块根据设备间文件标识信息识别待分享文件是否为外部文件,根据目的应用信息将待分享文件的识别结果返回第二应用。206. The second sharing module identifies whether the file to be shared is an external file according to the identification information of the inter-device file, and returns the identification result of the file to be shared to the second application according to the target application information.
在本实施例中,第二应用收到来自于第一分享模块的设备间文件标识信息后,向第二分享模块发送文件识别请求,收到文件识别请求后,第二分享模块根据设备间文件标识信息识别待分享文件是否为外部文件,根据目的应用信息将待分享文件的识别结果返回第二应用。In this embodiment, after receiving the inter-device file identification information from the first sharing module, the second application sends a file identification request to the second sharing module, and after receiving the file identification request, the second sharing module according to the inter-device file The identification information identifies whether the file to be shared is an external file, and the identification result of the file to be shared is returned to the second application according to the target application information.
第二分享模块可以从设备间文件标识信息解析出源设备信息,根据解析出来的源设备信息判断待分享文件是否为外部文件。例如,第二分享模块从设备间文件标识信息content:123456://media/external/file/1解析出源设备信息为123456,123456代表第一电子设备而非设备(即第二电子设备),则判断待分享文件是外部文件。The second sharing module can parse out the source device information from the inter-device file identification information, and judge whether the file to be shared is an external file according to the parsed source device information. For example, the second sharing module parses the source device information from the inter-device file identification information content:123456://media/external/file/1 as 123456, and 123456 represents the first electronic device rather than the device (ie, the second electronic device), Then it is determined that the file to be shared is an external file.
207,若待分享文件为外部文件,第二应用通过第二分享模块对待分享文件进行第一文件操作。207. 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 file operation to be shared with the file may include reading a file, writing a file, sharing a file in a device, and the like.
208,第二分享模块根据操作权限信息对第一文件操作进行第一操作权限检查。208. The second sharing module performs a first operation authority check on the first file operation according to the operation authority information.
根据操作权限信息对第一文件操作进行第一操作权限检查包括:若第一文件操作为操作权限信息指定的权限内的操作,则允许该第一文件操作;若第一文件操作非操作权限信息指定的权限内的操作,则拒绝该第一文件操作。例如,第二应用对待分享文件只有读取权限而无写入权限,若第一文件操作为写入操作,则拒绝该写入操作。Performing the first operation authority check on the first file operation according to the operation authority information includes: if the first file operation is an operation within the authority specified by the operation authority information, allowing the first file operation; if the first file operation is not the operation authority information operation within the specified authority, the first file operation is rejected. For example, the second application only has read permission but no write permission to the shared file, and if the first file operation is a write operation, the write operation is rejected.
在第二电子设备中进行第一操作权限检查可以提前拦截非法操作,提高文件操作的安全性,并且可以减少非法操作时第一电子设备和第二电子设备之间的通信开销。Performing the first operation authority check in the second electronic device can intercept illegal operations in advance, improve the security of file operations, and can reduce the communication overhead between the first electronic device and the second electronic device during illegal operations.
209,若通过第一操作权限检查,第二分享模块根据第一文件操作生成文件操作请求,将文件操作请求发送给第一分享模块,文件操作请求包括待分享文件的设备间文件标识信息、目的应用信息、目的设备信息和第一文件操作的操作信息。209, if the first operation authority 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, where the file operation request includes the inter-device file identification information of the file to be shared, the purpose Application information, destination device information, and operation information of the first file operation.
操作信息指明第二应用对可分享文件执行的第一文件操作,例如写入操作。The operation information indicates a first file operation performed by the second application on the shareable file, such as a write operation.
应当理解,为了提高数据传输的安全性,第二分享模块在将文件操作请求发送给第一分享模块之前,可以将文件操作请求进行加密。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.
210,第一分享模块根据文件操作请求中的设备间文件标识信息查找对应的设备内文件标识信息和操作权限信息。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.
211,第一分享模块根据查找到的操作权限信息和文件操作请求中的操作信息进行第二操作权限检查。211. The first sharing module performs a second operation authority check according to the found operation authority information and the operation information in the file operation request.
根据操作权限信息和操作信息进行第二操作权限检查可以包括:Performing the second operation authority check according to the operation authority information and the operation information may include:
判断操作信息对应的操作类型是否为指定的操作类型。Determine whether the operation type corresponding to the operation information is the specified operation type.
例如,文件操作请求指明对待分享文件进行写操作,第一电子设备根据操作权限信息判断第二应用是否对待分享文件有写入权限,若第二应用对待分享文件有写入权限,则通过操作类型的第二操作权限检查。For example, the file operation request indicates that a write operation is to be performed on the file to be shared, and the first electronic device determines whether the second application has the write permission to the shared file according to the operation permission information. If the second application has the write permission to the shared file, the operation type The second operation permission check.
根据操作权限信息对操作信息进行第二操作权限检查还可以包括:The second operation authority check on the operation information according to the operation authority information may further include:
判断操作信息对应的操作时间是否在指定的操作有效期内。Determine whether the operation time corresponding to the operation information is within the specified operation validity period.
例如,操作权限信息指定的操作时间为第二电子设备接收到外部位置信息、源设备信息、源应用信息、目的应用信息和操作权限信息之后的30分钟内,若第二应用在该时间期限内容对待分享文件进行操作,则通过操作时间的第二操作权限检查。For example, the operation time specified by the operation authority 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 authority information. To operate the file to be shared, pass the second operation permission check of the operation time.
212,若通过第二操作权限检查,第一分享模块根据查找到的设备内文件标识信息和操作信息对待分享文件进行第二文件操作。212. If the second operation authority 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.
第一分享模块可以根据查找到的设备内文件标识信息查找待分享文件的文件描述符,根据查找到的文件描述符和操作信息对待分享文件进行操作,将操作结果返回第二电子设备。The first sharing module can search 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.
例如,第一分享模块根据查找到的文件描述符和操作信息对待分享文件进行写入操作。For example, the first sharing module performs a write operation on the to-be-shared file according to the found file descriptor and operation information.
213,第一分享模块根据文件操作请求中的目的设备信息将操作结果返回第二分享模块。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.
应当理解,为了提高数据传输的安全性,第一分享模块在将操作结果返回第二分享模块之前,可以将操作结果进行加密。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.
214,第二分享模块将操作结果返回第二应用。214. The second sharing module returns the operation result to the second application.
第二应用根据操作结果显示待分享文件。例如,第二应用根据写入操作的操作结果显示写入后的待分享文件。The second application displays the file to be shared according to the operation result. For example, the second application displays the written file to be shared according to the operation result of the writing operation.
本申请将可分享文件从第一电子设备的第一应用分享给第二电子设备的第一应用,实现了跨设备跨应用数据分享。本申请在进行数据分享时不需要借助于云,并且对分享的数据类型没有限制,提高了数据分享的使用范围和效率。In the present application, a shareable file is shared from the first application of the first electronic device to the first application of the second electronic device, thereby realizing cross-device and cross-application data sharing. The present application does not need to rely on the cloud for data sharing, and there is no restriction on the type of data to be shared, which improves the scope and efficiency of data sharing.
在另一实施例中,所述获取待分享文件的设备内文件标识信息、源设备信息、源应用信息、目的设备信息、目的应用信息和操作权限信息息之前,所述方法还包括:In another embodiment, before acquiring the in-device file identification information, source device information, source application information, destination device information, destination application information and operation permission information information of the file to be shared, the method further includes:
查找第二电子设备;find the second electronic device;
若查找到第二电子设备,连接第二电子设备。If the second electronic device is found, connect the second electronic device.
第一电子设备可以通过红外线等方式搜索第二电子设备,若查找到第二电子设备,则连接第二电子设备。The first electronic device can search for the second electronic device by means of infrared rays or the like, and if the second electronic device is found, the second electronic device is connected.
以上所述,仅是本申请的具体实施方式,但本申请的保护范围并不局限于此,对于本领域的普通技术人员来说,在不脱离本申请创造构思的前提下,还可以做出改进,但这些均属于本申请的保护范围。The above are only specific implementations of the present application, but the protection scope of the present application is not limited to this. improvements, but these all belong to the protection scope of this application.
请参见图4,图4是本申请公开的第一电子设备的结构示意图。如图4所示,所述第一电子设备40包括一个或多个处理器401和存储器402。处理器401、存储器402通过一个或多个通信总线403连接。存储器402用于存储一个或多个计算机程序404。一个或多个计算机程序404被配置为被该处理器401执行。该一个或多个计算机程序404包括指令,上述指令可以用于执行上述实施例中电子设备(如手机)执行的各个步骤,以实现在电子设备中的跨设备数据分享功能。Please refer to FIG. 4 , which is a schematic structural diagram of the first electronic device disclosed in the present application. As shown in FIG. 4 , the first electronic device 40 includes one or more processors 401 and a memory 402 . The processor 401 and the memory 402 are connected through one or more communication buses 403 . Memory 402 is used to store one or more computer programs 404 . One or more computer programs 404 are configured to be executed by the processor 401 . The one or more computer programs 404 include instructions that can be used to execute various steps performed by an electronic device (eg, a mobile phone) in the above embodiments, so as to implement a cross-device data sharing function in the electronic device.
本实施例还提供一种计算机存储介质,该计算机存储介质中存储有计算机指令,当该计算机指令在电子设备上运行时,使得电子设备执行上述相关方法步骤实现上述实施例中的跨设备数据分享方法。This embodiment also provides a computer storage medium, where computer instructions are stored in the computer storage medium, and when the computer instructions are executed on the electronic device, the electronic device executes the above-mentioned relevant method steps to realize the cross-device data sharing in the above-mentioned embodiment. method.
本实施例还提供了一种计算机程序产品,当该计算机程序产品在电子设备上运行时,使得电子设备执行上述相关步骤,以实现上述实施例中的跨设备数据分享方法。This embodiment also provides a computer program product, which, when the computer program product runs on the electronic device, causes the electronic device to execute the above-mentioned relevant steps, so as to realize the cross-device data sharing method in the above-mentioned embodiment.
另外,本申请的实施例还提供一种装置,这个装置具体可以是芯片,组件或模块,该装置可包括相连的处理器和存储器;其中,存储器用于存储计算机执行指令,当装置运行时,处理器可执行存储器存储的计算机执行指令,以使芯片执行上述各方法实施例中的跨设备数据分享方法。In addition, the embodiments of the present application also provide an apparatus, which may specifically be a chip, a component or a module, and the apparatus may include a connected processor and a memory; wherein, the memory is used for storing computer execution instructions, and when the apparatus is running, The processor can execute the computer-executed instructions stored in the memory, so that the chip executes the cross-device data sharing method in the foregoing method embodiments.
其中,本实施例提供的电子设备、计算机存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。Wherein, the electronic device, computer storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding method provided above. Therefore, for the beneficial effects that can be achieved, reference can be made to the corresponding provided above. The beneficial effects in the method will not be repeated here.
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。From the description of the above embodiments, those skilled in the art can clearly understand that for the convenience and brevity of the description, only the division of the above functional modules is used as an example for illustration. In practical applications, the above functions can be allocated as required. It is completed by different functional modules, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,该模块或单元 的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the device embodiments described above are only illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined. Or it may be integrated into another device, or some features may be omitted, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
该作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components shown as units may be one physical unit or multiple physical units, that is, may be located in one place, or may be distributed to multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。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 alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
该集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as an independent product, may be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, which are stored in a storage medium , including several instructions to make a device (may be a single chip microcomputer, a chip, etc.) or a processor (processor) to execute all or part of the steps of the methods described in the various embodiments 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), magnetic disk or optical disk and other media that can store program codes .
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific embodiments of the present application, but the protection scope of the present application is not limited to this, and any changes or substitutions within the technical scope disclosed in the present application should be covered within the protection scope of the present application. . Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims (10)

  1. 一种跨设备数据分享方法,应用于第一电子设备,所述第一电子设备包括第一应用和第一分享模块,其特征在于,所述方法包括:A method for sharing data across devices, applied to a first electronic device, the first electronic device comprising a first application and a first sharing module, wherein the method comprises:
    在接收到从所述第一应用向第二电子设备的第二应用的数据分享请求后,所述第一应用获取待分享文件的设备内文件标识信息、源设备信息、源应用信息、目的设备信息、目的应用信息和操作权限信息;After receiving the data sharing request from the first application to the second application of the second electronic device, the first application obtains the in-device file identification information, source device information, source application information, and destination device of the file to be shared information, purpose application information and operation authority information;
    所述第一应用将所述待分享文件分享给所述第一分享模块,将所述设备内文件标识信息、源设备信息、源应用信息、目的设备信息、目的应用信息和操作权限信息传送给所述第一分享模块;The first application shares the to-be-shared file to the first sharing module, and transmits the in-device file identification information, 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;
    所述第一分享模块根据所述设备内文件标识信息和所述源设备信息生成所述待分享文件的设备间文件标识信息,存储所述设备内文件标识信息、设备间文件标识信息和操作权限信息;The first sharing module generates the inter-device file identification information of the to-be-shared file according to the in-device file identification information and the source device information, and stores the in-device file identification information, the inter-device file identification information and the 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 target application information to the second sharing module of the second electronic device according to the destination device information, so that the second sharing module The file identification information identifies whether the to-be-shared file is an external file, and returns the identification result of the to-be-shared file to the second application according to the target application information. If the to-be-shared file is an external file, the second application The application performs the first file operation on the to-be-shared file through the second sharing module;
    所述第一分享模块接收所述第二分享模块返回的文件操作请求,所述文件操作请求包括所述待分享文件的设备间文件标识信息、目的设备信息、目的应用信息和所述第一文件操作的操作信息;The first sharing module receives the file operation request returned by the second sharing module, and the file operation request includes the inter-device file identification information, destination device information, destination application information and the first file of the file to be shared. Operational information of the 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 authority check according to the found operation authority information and the operation information. If the operation authority check is passed, the to-be-shared file is checked according to the found file identification information in the device and the operation information. For the second file operation, the operation result is returned to the second sharing module according to the destination device information in the file operation request, and the second sharing module returns the operation result to the second application.
  2. 如权利要求1所述的跨设备数据分享方法,其特征在于,所述第一分享模块在将所述设备间文件标识信息、目的应用信息发送给所述第二分享模块时,还将所述操作权限信息发送给所述第二分享模块,使所述第二分享模块根据所述操作权限信息对所述第一文件操作进行操作权限检查。The cross-device data sharing method according to claim 1, wherein when the first sharing module sends the inter-device file identification information and target application information to the second sharing module, the first sharing module also sends the data to the second sharing module. The operation authority information is sent to the second sharing module, so that the second sharing module checks the operation authority of the first file operation according to the operation authority information.
  3. 如权利要求1所述的跨设备数据分享方法,其特征在于,所述第一应用通过以下方式判断是否接收到所述数据分享请求:The cross-device data sharing method according to claim 1, wherein the first application judges whether to receive the data sharing request in the following manner:
    若检测到在所述第一应用的文件列表中长按所述待分享文件或者在所述第一应用中打开所述待分享文件,显示第一界面,所述第一界面包括分享菜单;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, and 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 on the application selection interface, the data sharing request is received.
  4. 如权利要求1所述的跨设备数据分享方法,其特征在于,所述设备内文件标识信息和所述设备间文件标识信息包括统一资源标识符。The cross-device data sharing method according to claim 1, wherein the intra-device file identification information and the inter-device file identification information comprise uniform resource identifiers.
  5. 如权利要求1所述的跨设备数据分享方法,其特征在于,所述将所述设备间文件标识信息、目的应用信息发送给所述第二分享模块之前,所述方法还包括:The cross-device data sharing method according to claim 1, wherein, before sending the inter-device file identification information and destination application information to the second sharing module, the method further comprises:
    所述第一分享模块对所述设备间文件标识信息、目的应用信息进行加密。The first sharing module encrypts the inter-device file identification information and target application information.
  6. 如权利要求1所述的跨设备数据分享方法,其特征在于,所述根据查找到的操作权限信息和所述操作信息进行操作权限检查包括:The cross-device data sharing method according to claim 1, wherein the checking 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 the specified operation type; and/or
    判断所述操作信息对应的操作时间是否在指定的操作有效期内。Determine whether the operation time corresponding to the operation information is within the specified operation validity period.
  7. 如权利要求1至6中任一项所述的跨设备数据分享方法,其特征在于,所述获取待分享文件的设备内文件标识信息、源设备信息、源应用信息、目的设备信息、目的应用信息和操作权限信息之前,所述方法还包括:The cross-device data sharing method according to any one of claims 1 to 6, wherein the acquisition of in-device file identification information, source device information, source application information, destination device information, and destination application information of the file to be shared is performed. Before the information and operation authority information, the method further includes:
    查找所述第二电子设备;find the second electronic device;
    若查找到所述第二电子设备,连接所述第二电子设备。If the second electronic device is found, connect the second electronic device.
  8. 一种计算机可读存储介质,其特征在于,包括计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行如权利要求1至7中任一项所述的跨设备数据分享方法。A computer-readable storage medium, characterized by comprising computer instructions, which, when the computer instructions are executed on an electronic device, cause the electronic device to execute the cross-device data according to any one of claims 1 to 7 How to share.
  9. 一种电子设备,其特征在于,所述电子设备包括处理器和存储器,所述存储器,用于存储指令,所述处理器用于调用所述存储器中的指令,使得所述电子设备执行如权利要求1至7中任一项所述的跨设备数据分享方法。An electronic device, characterized in that the electronic device includes a processor and a memory, 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 method as claimed in the claims The cross-device data sharing method described in any one of 1 to 7.
  10. 一种芯片系统,该芯片系统应用于电子设备;芯片系统包括接口电路和处理器;接口电路和处理器通过线路互联;接口电路用于从电子设备的存储器接收信号,并向处理器发送信号,信号包括存储器中存储的计算机指令;当处理器执行该计算机指令时,芯片系统执行权利要求1至7中任一项所述的跨设备数据分享方法。A chip system, which is applied to electronic equipment; the chip system includes an interface circuit and a processor; the interface circuit and the processor are interconnected by lines; the interface circuit is used for receiving signals from a memory of the electronic equipment and sending signals to the processor, The signal includes 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 .
PCT/CN2021/117209 2020-10-13 2021-09-08 Cross-device data sharing method and related device WO2022078119A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011092086.7 2020-10-13
CN202011092086.7A CN114356870A (en) 2020-10-13 2020-10-13 Cross-device data sharing method and related devices

Publications (1)

Publication Number Publication Date
WO2022078119A1 true WO2022078119A1 (en) 2022-04-21

Family

ID=81089784

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/117209 WO2022078119A1 (en) 2020-10-13 2021-09-08 Cross-device data sharing method and related device

Country Status (2)

Country Link
CN (1) CN114356870A (en)
WO (1) WO2022078119A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117931463A (en) * 2022-10-14 2024-04-26 华为终端有限公司 Application control method, electronic equipment and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130065521A1 (en) * 2011-09-08 2013-03-14 Pantech Co., Ltd. Near field communication (nfc) terminal and method for data synchronization
CN105656991A (en) * 2015-12-21 2016-06-08 北京金山安全软件有限公司 File sharing method and device
CN109086365A (en) * 2018-07-20 2018-12-25 常州信息职业技术学院 local file sharing method, system, device, electronic equipment and storage medium
CN111479250A (en) * 2020-03-31 2020-07-31 歌尔科技有限公司 File sharing method, device and system and terminal equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130065521A1 (en) * 2011-09-08 2013-03-14 Pantech Co., Ltd. Near field communication (nfc) terminal and method for data synchronization
CN105656991A (en) * 2015-12-21 2016-06-08 北京金山安全软件有限公司 File sharing method and device
CN109086365A (en) * 2018-07-20 2018-12-25 常州信息职业技术学院 local file sharing method, system, device, electronic equipment and storage medium
CN111479250A (en) * 2020-03-31 2020-07-31 歌尔科技有限公司 File sharing method, device and system and terminal equipment

Also Published As

Publication number Publication date
CN114356870A (en) 2022-04-15

Similar Documents

Publication Publication Date Title
US10638261B2 (en) Sharing content with nearby devices
CN105610949B (en) Resource data use permission sharing method, device and system
CN102938039B (en) For the selectivity file access of application
US20190089810A1 (en) Resource access method, apparatus, and system
JP5611598B2 (en) Encryption key container on USB token
US20220214932A1 (en) Methods, devices and computer storage media for inter-mini program platform communication
WO2021036706A1 (en) Trusted application operation method and information processing and memory allocation method and apparatus
US8661502B2 (en) Determining a sensitivity label of document information in real time
US20110055848A1 (en) Launching an midp-based target application from a launcher application
EP4109861A1 (en) Data processing method, apparatus, computer device, and storage medium
US20200257576A1 (en) Verifying transfer of detected sensitive data
US11895105B2 (en) Authenticated interface element interactions
US10757182B2 (en) Contextually interacting with applications
US20220245005A1 (en) Methods, devices and computer storage media for inter-mini program platform discovery
CN114281484B (en) Data transmission method, device, equipment and storage medium
US20230259548A1 (en) Virtual file library
WO2022078119A1 (en) Cross-device data sharing method and related device
US20130297718A1 (en) Server device, client device, data sharing system and method for sharing data between client device and server device thereof
CN111459673A (en) Secure memory expansion and release method and device and electronic equipment
KR20150139546A (en) Removable storage device identity and configuration information
CN107038388B (en) Multi-user operating system running method and device and computer equipment
WO2023086149A1 (en) System and method of providing granular access control
US11336714B1 (en) Queue-based distributed timer
CN111159734A (en) Communication terminal and multi-application data inter-access processing method
KR101490688B1 (en) Apparatus for storing and processing contents and method of transmitting object meta information about contents using media transfer protocol from the apparatus

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21879165

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21879165

Country of ref document: EP

Kind code of ref document: A1