CN114356870B - Cross-device data sharing method and related device - Google Patents
Cross-device data sharing method and related device Download PDFInfo
- Publication number
- CN114356870B CN114356870B CN202011092086.7A CN202011092086A CN114356870B CN 114356870 B CN114356870 B CN 114356870B CN 202011092086 A CN202011092086 A CN 202011092086A CN 114356870 B CN114356870 B CN 114356870B
- Authority
- CN
- China
- Prior art keywords
- file
- information
- application
- sharing
- shared
- Prior art date
- Legal status (The legal status 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 status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 55
- 238000004590 computer program Methods 0.000 description 8
- 238000010586 diagram Methods 0.000 description 6
- 230000006870 function Effects 0.000 description 6
- 238000004891 communication Methods 0.000 description 5
- 239000011230 binding agent Substances 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000007246 mechanism Effects 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 230000006399 behavior Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/16—File or folder operations, e.g. details of user interfaces specifically adapted to file systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/17—Details of further file system functions
- G06F16/176—Support for shared access to files; File sharing support
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/62—Protecting access to data via a platform, e.g. using keys or access control rules
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)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Storage Device Security (AREA)
Abstract
The application provides a cross-device data sharing method, which comprises the following steps: after receiving a data sharing request from a first application of a first electronic device to a second application of a second electronic device, the first application acquires related information of a file to be shared, and shares the file to be shared to a first sharing module of the first electronic device; the first sharing module generates inter-device file identification information of the file to be shared and sends the inter-device file identification information to a second application and a second sharing module of the second electronic device; if the file to be shared is an external file, the second application operates the file to be shared through the second sharing module; the first sharing module receives a file operation request returned by the second sharing module, searches corresponding information according to the file identification information among the devices in the request, operates the file to be shared according to the request if the operation authority is checked, and returns an operation result to the second application. The application can improve the application range and the efficiency of data sharing.
Description
Technical Field
The application relates to the technical field of terminals, in particular to a cross-device data sharing method and related devices.
Background
With the widespread use of smart devices, users often need to share data between different devices. For example, video of a cell phone is played on a large screen, or a file of a cell phone is edited on a tablet. At present, the main mode of cross-device data sharing is screen projection and cloud sharing. However, the screen projection has limitation on the type of shared data, and only the multimedia files can be shared, while cloud sharing is realized by means of the cloud, so that the access speed of the files can be influenced.
Disclosure of Invention
The embodiment of the application discloses a cross-device data sharing method and related equipment, which do not need to realize data sharing by means of cloud and have no limitation on the type of shared data.
The first aspect of the application discloses a cross-device data sharing method, which is applied to first electronic equipment, wherein the first electronic equipment comprises a first application and a first sharing module, and the method comprises the following steps:
After receiving a data sharing request from the first application to a second application of second electronic equipment, the first application acquires in-equipment file identification information, source equipment information, source application information, destination equipment information, destination application information and operation authority information of a file to be shared;
The first application shares the file to be shared with the first sharing module, and transmits the file identification information, the source equipment information, the source application information, the destination equipment information, the destination application information and the operation authority information in the equipment to the first sharing module;
The first sharing module generates inter-device file identification information of the file to be shared according to the intra-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 first sharing module pulls up the second application according to the destination equipment information and the destination application information, and sends the file identification information between the equipment to the second application;
The first sharing module sends the inter-equipment file identification information and the destination application information to a second sharing module of the second electronic equipment according to the destination equipment information, so that the second sharing module identifies whether the file to be shared is an external file according to the inter-equipment file identification information, returns an identification result of the file to be shared to the second application according to the destination application information, and if the file to be shared is the external file, the second application performs a first file operation on the file to be shared through the second sharing module;
the first sharing module receives a file operation request returned by the second sharing module, wherein the file operation request comprises inter-device file identification information, destination device information, destination application information and operation information of the first file operation of the file to be shared;
the first sharing module searches corresponding in-device file identification information and operation authority information according to the inter-device file identification information in the file operation request;
And the first sharing module performs operation authority check according to the searched operation authority information and the operation information, if the operation authority check is passed, performs second file operation on the file to be shared according to the searched in-device file identification information and the operation information, returns an operation result to the second sharing module according to the destination device information in the file operation request, and returns the operation result to the second application.
The method and the device share the sharable file from the first application of the first electronic device to the second application of the second electronic device, so that cross-device and cross-application data sharing is realized. According to the method and the device, cloud is not needed when data sharing is carried out, the type of the shared data is not limited, and the application range and the efficiency of the data sharing are improved.
In some optional embodiments, when the first sharing module sends the inter-device file identification information and the destination application information to the second sharing module, the first sharing module further sends the operation permission information to the second sharing module, so that the second sharing module performs operation permission check on the first file operation according to the operation permission information.
The first sharing module of the first electronic device transmits the operation permission information to the second sharing module of the second electronic device, so that the second electronic device performs operation permission check on user operation according to the operation permission information, and the security of file operation can be improved.
In some alternative embodiments, the first application determines whether the data sharing request is received by:
if the fact 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 is detected, a first interface is displayed, and the first interface comprises a sharing menu;
If the sharing menu is detected to be selected on the first interface, displaying a sharing interface, wherein the sharing interface comprises the second electronic equipment;
If the second electronic equipment is detected to be selected on the sharing interface, an application selection interface is displayed, wherein the application selection interface comprises the second application;
and if the second application is detected to be selected in the application selection interface, receiving the data sharing request.
In some alternative embodiments, the intra-device file identification information and the inter-device file identification information include uniform resource identifiers.
In some optional embodiments, before the sending the inter-device file identification information and the destination application information to the second sharing module, the method further includes:
and the first sharing module encrypts the file identification information and the destination application information between the devices.
In some optional embodiments, the performing operation authority checking according to the searched operation authority information and the operation information includes:
Judging whether the operation type corresponding to the operation information is a designated operation type or not; and/or
And judging whether the operation time corresponding to the operation information is within the appointed operation effective period.
In some optional embodiments, before the obtaining the in-device file identification information, the source device information, the source application information, the destination device information, the destination application information, and the operation authority information of the file to be shared, the method further includes:
Searching the second electronic equipment;
and if the second electronic equipment is found, connecting the second electronic equipment.
A second aspect of the invention discloses a computer readable storage medium comprising computer instructions which, when run on an electronic device, cause the electronic device to perform the cross-device data sharing method of the first aspect.
The third aspect of the invention discloses an electronic device, which comprises a processor and a memory, wherein the memory is used for storing instructions, and the processor is used for calling 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 invention discloses a computer program product for causing a computer to perform the cross-device data sharing method as described in the first aspect when the computer program product is run on the computer.
A fifth aspect of the present invention discloses a chip system applied to an electronic device; the chip system comprises an interface circuit and a processor; the interface circuit and the processor are interconnected through a circuit; the interface circuit is used for receiving signals from the memory of the electronic device and sending signals to the processor, wherein the signals comprise computer instructions stored in the memory; when the processor executes the computer instructions, the system-on-chip performs the cross-device data sharing method as described in the first aspect.
In a sixth aspect, the present invention discloses an apparatus, which has a function of implementing the behavior of the electronic device in the method provided in the first aspect. The functions may be realized by hardware, or may be realized by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the functions described above.
It will be appreciated that the computer readable storage medium according to the second aspect, the electronic device according to the third aspect, the computer program product according to the fourth aspect, the chip system according to the fifth aspect and the apparatus according to the sixth aspect correspond to the methods according to the first aspect, and therefore, the advantages achieved by the method according to the second aspect may refer to the advantages provided in the corresponding methods, and are not repeated herein.
Drawings
Fig. 1 is an application scenario schematic diagram of a cross-device data sharing method disclosed in an embodiment of the present application.
Fig. 2 is a schematic diagram of a data sharing request sent through an application interface of a first application.
Fig. 3 is a flowchart of a cross-device data sharing method disclosed in an embodiment of the present application.
Fig. 4 is a schematic structural diagram of a first electronic device according to an embodiment of the present application.
Detailed Description
In order to better understand the cross-device data sharing method and the related devices disclosed by the embodiment of the application, an application scenario of the cross-device data sharing method is described below.
Fig. 1 is an application scenario schematic diagram of a cross-device data sharing method disclosed in an embodiment of the present application.
As shown in fig. 1, the cross-device data sharing method is applied to a first electronic device 10 and a second electronic device 11. The first electronic device 10 comprises a plurality of first applications 100, e.g. gallery, file manager. The second electronic device 11 comprises a plurality of second applications 110, such as a picture processor, a video player, a document editor. The user shares a file (e.g., a picture, video, or document) of the first electronic device 11 from the first application 100 to the second application 110, and manipulates (e.g., views or edits) 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, a 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 views the shared video on the video player of the second electronic device 11. For another example, the user selects a document from the file manager of the first electronic device 11, shares the document to 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. According to the data sharing method, cloud is not needed when data sharing is carried out, the type of the shared data is not limited, and the application range and efficiency of the data sharing are improved.
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 car-mounted computer, and the like, among others. The first electronic device 10 and the second electronic device 11 may be the same type of electronic device, e.g. both a mobile phone (e.g. a mobile phone shared from a mobile phone of a first user to a mobile phone of a 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.
The first electronic device 10 and the second electronic device 11 may be communicatively connected by infrared, bluetooth, wireless lan, or the like.
Fig. 2 is a flowchart of a cross-device data sharing method disclosed in an embodiment of the present application. The first electronic device comprises a first application and a first sharing module, and the second electronic device comprises a second application and a second sharing module. The data can be shared from the first application of the first electronic device to the second application of the second electronic device through the first sharing module of the first electronic device and the second sharing module of the second electronic device. It should be appreciated that the first electronic device may include a second sharing module, and the second electronic device may include a first sharing module, through which data may be shared from a second application of the second electronic device to a first application of the first electronic device.
Referring to fig. 2, the method for sharing data across devices includes:
201, if a data sharing request from a first application of a first electronic device to a second application of a second electronic device is received, the first application obtains in-device file identification information, source device information, source application information, destination device information, destination application information and operation authority information of a file to be shared.
In one embodiment, the first application determines whether a data sharing request is received according to the following manner:
Detecting whether a file to be shared is long pressed in a file list of a first application (such as a file manager) or a file to be shared is opened in the first application, if the file to be shared is long pressed in the file list of the first application or the file to be shared is opened in the first application, displaying a first interface, wherein the first interface comprises a sharing menu;
detecting whether a sharing menu is selected on the first interface, and if so, displaying a sharing interface, wherein the sharing interface comprises second electronic equipment;
Detecting whether a second electronic device is selected on the sharing interface, and if so, displaying an application selection interface, wherein the application selection interface comprises a second application;
And detecting whether the second application is selected on the application selection interface, and if the second application is selected on the application selection interface, receiving a data sharing request.
In an embodiment, a file interface of the file to be shared is displayed after the file to be shared is opened from the first application, and the file interface includes a sharing menu. After the sharing menu is selected (e.g., clicked), a sharing interface is displayed, where the sharing interface includes a sharable external device, such as a second electronic device. And displaying an application selection interface after selecting an external device (such as a second electronic device) in the sharing interface, wherein the application selection interface comprises an application which can share data with a first application in the external device, such as a second application. If an application (e.g., a second application) of the external device is selected at the application selection interface, a data sharing request is issued from the first application of the first electronic device to the application (e.g., the second application) of the external device (e.g., the second electronic device).
Fig. 3 is a schematic diagram of a data sharing request sent through an application interface of a first application. The file manager of device a displays a plurality of documents (including document 1, document 2, document 3, document 4). If the document 4 is pressed for a long time, a plurality of shortcut menus are displayed, wherein the shortcut menus comprise sharing menus. If the sharing menu is selected, displaying a sharing interface, wherein the sharing interface comprises two external devices, namely a device B and a device C. If the equipment B is selected, an application selection interface is displayed, wherein the application selection interface comprises Word and WPS. If the Word is selected, a data sharing request from the file manager of the device A to the Word of the device B is sent out, and the data sharing request indicates that the document to be shared is to be shared from the file manager of the device A to the Word of the device B.
It should be appreciated 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, etc. The first electronic device may share the sharable file to a local application to implement data sharing within the device.
In another embodiment, the file list is displayed after the first application (e.g. the file manager) is started, and if the picture to be shared in the long press file list is detected, the sharing menu is displayed.
In another embodiment, the sharing interface may directly display an application of the external device (e.g., a second application of the second electronic device). If the user selects an application of the external device (e.g., a second application of the second electronic device) from the sharing interface, a data sharing request is issued from the first application of the first electronic device to the application of the external device (e.g., the second application of the second electronic device).
The in-device file identification information is used for in-device file location and may uniquely identify a file on a device (e.g., a first electronic device). The in-device file identification information may be a file path or 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, and 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 designates the operation authority of the file to be shared and is used for checking the operation authority of the second application. The operation authority information set by the user may be received, or default operation authority information may be used.
The operation permission information may specify whether the second application has a read permission or a write permission for the file to be shared.
The operation permission information may further specify whether the second application has the sharing permission for the file to be shared. The sharing permission refers to whether the second application can share the file to be shared in the device, that is, share the file to other applications in the second electronic device. If the operation authority information designates sharing authority, the second application can share the file to be shared to other applications in the second electronic device. Otherwise, if the operation authority information designates no sharing authority, the second application cannot share the file to be shared to other applications in the second electronic device.
The operation authority information may also specify an operation validity period. And in the operation validity period, the second application can operate the file to be shared.
202, A first application shares a file to be shared to a first sharing module, and transmits file identification information in equipment, source equipment information, source application information, destination equipment information, destination application information and operation authority information to the first sharing module.
The first application can share the file to be shared to the first sharing module through a Binder mechanism. Binder is an inter-process communication mechanism, a first application corresponds to a process, and a first sharing module corresponds to a process. When the first application shares the file to be shared to the first sharing module system through the Binder mechanism, the operating system allocates a temporary area for the file to be shared, and the operation of the temporary area is reflected on the file to be shared.
And 203, the first sharing module generates inter-device file identification information of the file to be shared according to the intra-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. And the second electronic equipment can determine the position of the file to be shared according to the identification information between the devices of the file to be shared.
In one embodiment, the intra-device file identification information, the inter-device file identification information may be a uniform resource identifier.
The first sharing module may add the source device information to the file identification information in the device, and generate file identification information between the devices. For example, the in-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:// media/external/file/1.
And 204, the first sharing module pulls up the second application according to the destination equipment information and the destination application information, and sends the file identification information between the equipment to the second application.
It should be appreciated that, to improve the security of the 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.
And 205, the first sharing module sends the file identification information between the devices, the destination application information and the operation authority information to the second sharing module according to the destination device information.
In this embodiment, the first sharing module transmits the operation permission information to the second sharing module, so that the second sharing module performs the first operation permission check on the file operation of the file to be shared by the second application according to the operation permission information, thereby improving the operation security.
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 appreciated that, in order to improve the security of data transmission, the first sharing module may encrypt the inter-device file identification information, the destination application information, and the operation authority information before transmitting the inter-device file identification information, the destination application information, and the operation authority information to the second sharing module.
And 206, the second sharing module identifies whether the file to be shared is an external file according to the file identification information among the devices, 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 identifies whether the file to be shared is an external file according to the inter-device file identification information, and returns an identification result of the file to be shared to the second application according to the destination application information.
The second sharing module can analyze the source device information from the file identification information among the devices, and judge whether the file to be shared is an external file or not according to the analyzed source device information. For example, the second sharing module analyzes that the source device information is 123456 from the inter-device file identification information content of 123456:// media/external/file/1, and the 123456 represents the first electronic device instead of the device (i.e., the second electronic device), and determines that the file to be shared is an external file.
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 share the file may include reading the file, writing the file, sharing the file in the device, and so on.
208, The second sharing module performs a first operation authority check on the first file operation according to the operation authority information.
Performing a first operation authority check on the first file operation according to the operation authority information includes: if the first file operation is the operation in the authority specified by the operation authority information, allowing the first file operation; and if the first file operation is not the operation in the authority specified by the operation authority information, rejecting the first file operation. For example, the second application only has read rights and no write rights to the file to be shared, and if the first file is operated as a write operation, the write operation is denied.
The first operation authority check is carried out in the second electronic equipment, so that illegal operation can be intercepted in advance, the safety of file operation is improved, and the communication overhead between the first electronic equipment and the second electronic equipment during illegal operation can be reduced.
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, the destination application information, the destination device information, and the operation information of the first file operation of the file to be shared.
The operation information indicates a first file operation, such as a write operation, performed by the second application on the sharable file.
It should be appreciated that in order to increase the security of the data transfer, the second sharing module may encrypt the file operation request before sending the file operation request to the first sharing module.
210, The first sharing module searches corresponding file identification information and operation authority information in the device according to the file identification information between the devices in the file operation request.
And 211, the first sharing module performs second operation authority check according to the searched operation authority information and the operation information in the file operation request.
The performing of the second operation authority check according to the operation authority information and the operation information may include:
and judging whether the operation type corresponding to the operation information is the designated operation type.
For example, the file operation request indicates that writing operation is performed on the file to be shared, the first electronic device determines whether the second application has writing permission on the file to be shared according to the operation permission information, and if the second application has writing permission on the file to be shared, the second electronic device passes through the second operation permission check of the operation type.
The performing the second operation authority check on the operation information according to the operation authority information may further include:
and judging whether the operation time corresponding to the operation information is within the appointed operation effective period.
For example, the operation time designated by the operation permission information is 30 minutes after the second electronic device receives the external location information, the source device information, the source application information, the destination application information and the operation permission information, and if the second application operates the file to be shared in the time period content, the second operation permission of the operation time is checked.
212, If the second operation authority is checked, 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 searched file identification information in the device, operate the file to be shared according to the searched file descriptor and the operation information, and return the operation result to the second electronic device.
For example, the first sharing module performs writing operation on the file to be shared according to the searched file descriptor and the operation information.
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 appreciated that, 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, The second sharing module returns the operation result to the second application.
And 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.
According to the method and the device, the sharable file is shared from the first application of the first electronic device to the first application of the second electronic device, so that cross-device and cross-application data sharing is realized. According to the method and the device, cloud is not needed when data sharing is carried out, the type of the shared data is not limited, and the application range and the efficiency of the data sharing are improved.
In another embodiment, before the obtaining the in-device file identification information, the source device information, the source application information, the destination device information, the destination application information, and the operation authority information of the file to be shared, the method further includes:
Searching a second electronic device;
And if the second electronic equipment is found, connecting the second electronic equipment.
The first electronic device may 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.
While the application has been described with reference to specific embodiments, it will be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the spirit and scope of the application.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a first electronic device according to the present disclosure. 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 by one or more communication buses 403. The 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 perform the steps performed by the electronic device (e.g., a cell phone) in the above embodiments to implement a cross-device data sharing function in the electronic device.
The present embodiment also provides a computer storage medium, where computer instructions are stored, and when the computer instructions are executed on an electronic device, the electronic device is caused to execute the related method steps to implement the cross-device data sharing method in the foregoing embodiment.
The present embodiment also provides a computer program product, which when executed on an electronic device, causes the electronic device to perform the above-mentioned related steps, so as to implement the cross-device data sharing method in the above-mentioned embodiment.
In addition, embodiments of the present application also provide an apparatus, which may be embodied as a chip, component or module, which may include a processor and a memory coupled to each other; the memory is configured to store computer-executable instructions, and when the device is running, the processor may execute the computer-executable instructions stored in the memory, so that the chip executes the cross-device data sharing method in the above method embodiments.
The electronic device, the computer storage medium, the computer program product, or the chip provided in this embodiment are used to execute the corresponding methods provided above, so that the beneficial effects thereof can be referred to the beneficial effects in the corresponding methods provided above, and will not be described herein.
From the foregoing description of the embodiments, it will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of functional modules is illustrated, and in practical application, the above-described functional allocation may be implemented by different functional modules according to needs, i.e. the internal structure of the apparatus is divided into different functional modules to implement all or part of the functions described above.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another apparatus, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and the parts displayed as units may be one physical unit or a plurality of physical units, may be located in one place, or may be distributed in a plurality of different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated unit may be stored in a readable storage medium if implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solution of the embodiments of the present application may be essentially or a part contributing to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, including several instructions for causing a device (may be a single-chip microcomputer, a chip or the like) or a processor (processor) to perform all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely illustrative of specific embodiments of the present application, and the scope of the present application is not limited thereto, but any changes or substitutions within the technical scope of the present application should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims (10)
1. The method for sharing data across devices is applied to first electronic equipment, wherein the first electronic equipment comprises a first application and a first sharing module, and is characterized by comprising the following steps:
After receiving a data sharing request from the first application to a second application of second electronic equipment, the first application acquires in-equipment file identification information, source equipment information, source application information, destination equipment information, destination application information and operation authority information of a file to be shared;
The first application shares the file to be shared with the first sharing module, and transmits the file identification information, the source equipment information, the source application information, the destination equipment information, the destination application information and the operation authority information in the equipment to the first sharing module;
The first sharing module generates inter-device file identification information of the file to be shared according to the intra-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 first sharing module pulls up the second application according to the destination equipment information and the destination application information, and sends the file identification information between the equipment to the second application;
The first sharing module sends the inter-equipment file identification information and the destination application information to a second sharing module of the second electronic equipment according to the destination equipment information, so that the second sharing module identifies whether the file to be shared is an external file according to the inter-equipment file identification information, returns an identification result of the file to be shared to the second application according to the destination application information, and if the file to be shared is the external file, the second application performs a first file operation on the file to be shared through the second sharing module;
the first sharing module receives a file operation request returned by the second sharing module, wherein the file operation request comprises inter-device file identification information, destination device information, destination application information and operation information of the first file operation of the file to be shared;
the first sharing module searches corresponding in-device file identification information and operation authority information according to the inter-device file identification information in the file operation request;
And the first sharing module performs operation authority check according to the searched operation authority information and the operation information, if the operation authority check is passed, performs second file operation on the file to be shared according to the searched in-device file identification information and the operation information, returns an operation result to the second sharing module according to the destination device information in the file operation request, and returns the operation result to the second application.
2. The method for sharing data across devices according to claim 1, wherein when the first sharing module sends the inter-device file identification information and the destination application information to the second sharing module, the first sharing module further sends the operation permission information to the second sharing module, so that the second sharing module performs operation permission checking on the first file operation according to the operation permission information.
3. The method of cross-device data sharing according to claim 1, wherein the first application determines whether the data sharing request is received by:
if the fact 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 is detected, a first interface is displayed, and the first interface comprises a sharing menu;
If the sharing menu is detected to be selected on the first interface, displaying a sharing interface, wherein the sharing interface comprises the second electronic equipment;
If the second electronic equipment is detected to be selected on the sharing interface, an application selection interface is displayed, wherein the application selection interface comprises the second application;
and if the second application is detected to be selected in the application selection interface, receiving the data sharing request.
4. The cross-device data sharing method of claim 1, wherein the intra-device file identification information and the inter-device file identification information comprise uniform resource identifiers.
5. The method of cross-device data sharing according to claim 1, wherein before the inter-device file identification information and destination application information are sent to the second sharing module, the method further comprises:
and the first sharing module encrypts the file identification information and the destination application information between the devices.
6. The method for sharing data across devices according to claim 1, wherein the performing operation authority check according to the searched operation authority information and the operation information comprises:
Judging whether the operation type corresponding to the operation information is a designated operation type or not; and/or
And judging whether the operation time corresponding to the operation information is within the appointed operation effective period.
7. The method for sharing data across devices according to any one of claims 1 to 6, wherein before the obtaining the in-device file identification information, the source device information, the source application information, the destination device information, the destination application information, and the operation authority information of the file to be shared, the method further comprises:
Searching the second electronic equipment;
and if the second electronic equipment is found, connecting the second electronic equipment.
8. A computer readable storage medium comprising computer instructions which, when run on an electronic device, cause the electronic device to perform the cross-device data sharing method of any one of claims 1 to 7.
9. An electronic device comprising a processor and a memory for storing instructions, the processor for invoking the instructions in the memory to cause the electronic device to perform the cross-device data sharing method of any of claims 1-7.
10. A chip system, the chip system being applied to an electronic device; the chip system comprises an interface circuit and a processor; the interface circuit and the processor are interconnected through a circuit; the interface circuit is used for receiving signals from the memory of the electronic device and sending signals to the processor, wherein the signals comprise computer instructions stored in the memory; when the processor executes the computer instructions, the system-on-chip performs the cross-device data sharing method of any one of claims 1 to 7.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011092086.7A CN114356870B (en) | 2020-10-13 | 2020-10-13 | Cross-device data sharing method and related device |
PCT/CN2021/117209 WO2022078119A1 (en) | 2020-10-13 | 2021-09-08 | Cross-device data sharing method and related device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011092086.7A CN114356870B (en) | 2020-10-13 | 2020-10-13 | Cross-device data sharing method and related device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114356870A CN114356870A (en) | 2022-04-15 |
CN114356870B true CN114356870B (en) | 2024-10-29 |
Family
ID=81089784
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011092086.7A Active CN114356870B (en) | 2020-10-13 | 2020-10-13 | Cross-device data sharing method and related device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN114356870B (en) |
WO (1) | WO2022078119A1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117931463A (en) * | 2022-10-14 | 2024-04-26 | 华为终端有限公司 | Application control method, electronic equipment and system |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104618217A (en) * | 2014-03-24 | 2015-05-13 | 腾讯科技(北京)有限公司 | Method, terminal, server and system for sharing resource |
CN106294660A (en) * | 2016-08-04 | 2017-01-04 | 青岛海信电器股份有限公司 | Information interacting method and device |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2012057997A1 (en) * | 2010-10-29 | 2012-05-03 | Google Inc. | Incentives for media sharing |
KR20130027930A (en) * | 2011-09-08 | 2013-03-18 | 주식회사 팬택 | Nfc terminal and data synchronizing method between nfc terminals |
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 |
CN109857762B (en) * | 2019-01-29 | 2021-08-17 | 腾讯科技(深圳)有限公司 | User data processing method, sharing message processing method and computer equipment |
CN111479250A (en) * | 2020-03-31 | 2020-07-31 | 歌尔科技有限公司 | File sharing method, device and system and terminal equipment |
-
2020
- 2020-10-13 CN CN202011092086.7A patent/CN114356870B/en active Active
-
2021
- 2021-09-08 WO PCT/CN2021/117209 patent/WO2022078119A1/en active Application Filing
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104618217A (en) * | 2014-03-24 | 2015-05-13 | 腾讯科技(北京)有限公司 | Method, terminal, server and system for sharing resource |
CN106294660A (en) * | 2016-08-04 | 2017-01-04 | 青岛海信电器股份有限公司 | Information interacting method and device |
Also Published As
Publication number | Publication date |
---|---|
WO2022078119A1 (en) | 2022-04-21 |
CN114356870A (en) | 2022-04-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102938039B (en) | For the selectivity file access of application | |
US20190089810A1 (en) | Resource access method, apparatus, and system | |
CN111782416B (en) | Data reporting method, device, system, terminal and computer readable storage medium | |
EP4109861A1 (en) | Data processing method, apparatus, computer device, and storage medium | |
CN113032766B (en) | Application authority management method and device | |
US10528749B2 (en) | Methods and apparatus for containerized secure computing resources | |
US10282120B2 (en) | Method, apparatus and system for inserting disk | |
CN114281484B (en) | Data transmission method, device, equipment and storage medium | |
US20170052979A1 (en) | Input/Output (IO) Request Processing Method and File Server | |
CN112866348B (en) | Database access method and device, computer equipment and storage medium | |
CN113254969B (en) | Business data processing method and device, electronic equipment and storage medium | |
CN116599917B (en) | Network port determining method, device, equipment and storage medium | |
US20180212817A1 (en) | Enabling redirection policies to be applied based on the windows class of a usb device | |
CN114356870B (en) | Cross-device data sharing method and related device | |
US8006009B2 (en) | Methods and device for implementing multifunction peripheral devices with a single standard peripheral device driver | |
CN114912103A (en) | Access control method and related device | |
CN107038388B (en) | Multi-user operating system running method and device and computer equipment | |
CN112416875B (en) | Log management method, device, computer equipment and storage medium | |
CN116450372A (en) | Positioning method and positioning device for shared memory leakage | |
CN111639936A (en) | Transaction information acquisition method and device, electronic equipment and readable storage medium | |
CN116662623B (en) | Method, device, equipment and medium for accessing menu information | |
CN114722018A (en) | Log information processing method and device, electronic equipment and readable storage medium | |
CN115134348B (en) | Sharing method of cloud application instance, system, equipment and storage medium thereof | |
CN117707365B (en) | Text processing method and electronic equipment | |
CN118113354A (en) | Method, device, equipment and storage medium for indexing kernel object |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant |