WO2021190352A1 - 一种数据共享的方法、电子设备和系统 - Google Patents

一种数据共享的方法、电子设备和系统 Download PDF

Info

Publication number
WO2021190352A1
WO2021190352A1 PCT/CN2021/081024 CN2021081024W WO2021190352A1 WO 2021190352 A1 WO2021190352 A1 WO 2021190352A1 CN 2021081024 W CN2021081024 W CN 2021081024W WO 2021190352 A1 WO2021190352 A1 WO 2021190352A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
file
metadata
user
thumbnail
Prior art date
Application number
PCT/CN2021/081024
Other languages
English (en)
French (fr)
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 华为技术有限公司
Priority to EP21776765.6A priority Critical patent/EP4102379A4/en
Priority to JP2022551363A priority patent/JP2023518163A/ja
Priority to US17/914,227 priority patent/US20230122838A1/en
Publication of WO2021190352A1 publication Critical patent/WO2021190352A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/54Browsing; Visualisation therefor
    • 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/14Details of searching files based on file metadata
    • G06F16/148File search processing
    • 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
    • G06F16/168Details of user interfaces specifically adapted to file systems, e.g. browsing and visualisation, 2d or 3d GUIs
    • 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
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/5866Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using information manually generated, e.g. tags, keywords, comments, manually generated location and time information

Definitions

  • This application relates to the field of terminals, and more specifically, to a method, electronic device, and system for data sharing.
  • This application provides a data sharing method, electronic device, and system, which help to quickly view digital assets distributed on various devices, thereby improving user experience.
  • a system in a first aspect, includes a first electronic device and a second electronic device.
  • the first electronic device stores a shared file of a first application program.
  • the second electronic device is used to determine the schedule. Assuming that the first electronic device is within a distance, the account logged in on the first electronic device is associated with the account logged in on the second electronic device; the second electronic device is also used for detecting that the user opens the first application During the operation of the program, request the first electronic device for the metadata corresponding to each file in the shared file; the first electronic device is also used for the metadata of each file sent to the second electronic device; The second electronic device is also used to determine the number of files in the shared file according to the number of received metadata; the second electronic device is also used to display a first interface, the first interface includes the corresponding shared file , The device name of the second electronic device, and the number of files.
  • the second electronic device may determine the first electronic device associated with the account logged in on the second electronic device within a preset distance, and the second electronic device may request the first electronic device for the metadata of the file under this application.
  • the data facilitates the user to quickly view the digital assets stored on the first electronic device through the second electronic device, which satisfies the user's request for unified management of the digital assets scattered on each device, thereby helping to improve the user experience.
  • the metadata of each file includes information such as the file name, file size, and creation time of each file.
  • the first application is an album application
  • the second electronic device is also used to request the first electronic device for a photo saved by the first electronic device Or thumbnails of multiple pictures; the second electronic device is also used to display at least part of the thumbnails of the one or more pictures after detecting that the user clicks on the folder on the first interface.
  • the second electronic device may also request the first electronic device for thumbnails of one or more pictures in the photo album application in the first electronic device, so that it is convenient for the user to click on the folder, The second electronic device displays at least part of the thumbnails of one or more pictures to the user in time.
  • the second electronic device may also request the first electronic device for thumbnails of one or more pictures after detecting that the user clicks on the folder.
  • the second electronic device may also display multiple subfolders under the folder, and each of the multiple subfolders displays a subfolder. Thumbnails, or, on the cover of each sub-folder, a thumbnail in that sub-folder is displayed.
  • the second electronic device is further configured to request the first thumbnail from the first electronic device when detecting that the user clicks on the first thumbnail
  • the thumbnail of the one or more pictures includes the first thumbnail
  • the first picture is a picture with a preset screen resolution
  • the first electronic device is also used to report to the second electronic device The device sends the first picture
  • the second electronic device is also used to display a second interface, and the second interface includes the first picture.
  • the second electronic device may request the first electronic device for a picture with a preset screen resolution. Instead of the original data of the picture corresponding to the thumbnail, it can ensure that the second electronic device quickly displays the picture to the user, thereby helping to improve the browsing speed of the user and saving the storage space of the electronic device.
  • the second interface further includes a first control for saving locally, and the second electronic device is also used for detecting that the user clicks on the first control During the operation, request a second picture corresponding to the first thumbnail from the first electronic device, and the second picture is the original data of the picture corresponding to the thumbnail; the first electronic device is also used to send the second picture to the second The electronic device sends the second picture; the second electronic device is also used to save the second picture in the second electronic device.
  • the second electronic device when the user wants to save a photo on the first electronic device locally in the second electronic device, the second electronic device will request the first electronic device for the original data of the picture. In this way, the second electronic device does not need the second electronic device to store the original data of each photo saved on the first electronic device in the process of displaying the picture of the first electronic device to the user, allowing the user to quickly browse the digital assets on other devices. , It also saves more storage space for electronic devices.
  • the second electronic device is further configured to, after receiving the metadata of each file sent by the first electronic device, perform according to the metadata of each file Metadata, to establish an index of the metadata of each file; the second electronic device is also used to, after detecting the keyword entered by the user in the search box of the first application, according to the keyword and the metadata Data index, display search results.
  • the second electronic device after the second electronic device obtains the metadata of each file saved by the first electronic device, it can establish an index of each file according to the metadata, which is convenient for the user to search for the file that he wants to view later. Quickly find the file you want to view.
  • each file under the first application is also stored on the second electronic device (for example, the photo album application of the second electronic device also contains one or more pictures), then the second electronic device can Each file generates metadata corresponding to each file, and establishes an index for the metadata of each file.
  • the second electronic device detects that the user searches for a file, it can display the search based on the keyword, the metadata index of each file stored on the second electronic device and the metadata index of each file sent by the first electronic device result.
  • the first electronic device is further configured to send each of the updated shared files to the second electronic device when it is detected that the shared file is updated.
  • the metadata of the file; the second electronic device is used to receive and update the metadata of the shared file.
  • the first electronic device when the metadata in the shared file saved by the first electronic device changes, for example, the first electronic device detects that the user has added some files or reduced some files in the shared file, then the first electronic device The updated metadata can be sent to the second electronic device, so that the second electronic device can update the metadata of the shared file in the first electronic device in time, and show the user the change of the file saved on the first electronic device.
  • the first electronic device when the first electronic device determines that the number of files in the shared file has increased, it may send the metadata of the added file to the second electronic device, or may send each of the shared files to the second electronic device.
  • the metadata of the file when the first electronic device determines that the number of files in the shared file has increased, it may send the metadata of the added file to the second electronic device, or may send each of the shared files to the second electronic device. The metadata of the file.
  • the association of the account logged in on the first electronic device with the account logged in on the second electronic device includes: the account logged in on the first electronic device and the The account logged in on the second electronic device is the same; or, the account logged in on the first electronic device and the account logged in on the second electronic device are in the same family group; or, the account logged in on the first electronic device is An account authorized by the account logged in on the second electronic device.
  • the first electronic device when data is shared between the first electronic device and the second electronic device, it can be based on the same account, or it can be based on different accounts, so that the electronic devices that can be viewed by the second electronic device can be expanded It is convenient for users to uniformly manage the digital assets of more electronic devices.
  • a data sharing method is provided.
  • the method is applied to an electronic device with a display screen.
  • the method includes: the electronic device determines another electronic device within a preset distance, The account is associated with the account logged in on the electronic device; when the electronic device detects the user's operation to open the first application, it sends request information to the other electronic device, and the request information is used to request the other electronic device
  • the metadata corresponding to each file in the shared file of the first application stored in the first application; the electronic device receives the metadata corresponding to each file in the shared file sent by the other electronic device; the electronic device uses the display screen
  • a first interface is displayed, and the first interface includes the folder corresponding to the shared file, the device name of the other electronic device, and the number of the files, and the number of the files is determined by the electronic device according to the number of received metadata.
  • the first application is an album application
  • the method further includes: before the electronic device displays the first interface, requesting the other electronic device for the another A thumbnail of one or more pictures saved by an electronic device; after the electronic device detects that the user clicks on the folder on the first interface, it displays at least part of the thumbnails of the one or more pictures .
  • the method further includes: when the electronic device detects that the user clicks on the first thumbnail, requesting the other electronic device to correspond to the first thumbnail
  • the first picture of the one or more pictures includes the first thumbnail, and the first picture has a picture with a preset screen resolution; the child device receives the first picture sent by the other electronic device; the The electronic device displays a second interface through the display screen, and the second interface includes the first picture.
  • the second interface further includes a first control for saving locally, and the method further includes: the electronic device detects that the user clicks on the first control During operation, request a second picture corresponding to the first thumbnail from the other electronic device, where the second picture is the original data of the picture corresponding to the thumbnail; the electronic device receives and saves the second picture sent by the other electronic device Two pictures.
  • the method further includes: after the electronic device receives the metadata of each file sent by the other electronic device, according to the metadata of each file Data, the metadata index of each file is established; the electronic device, after detecting the keyword entered by the user in the search box of the first application, displays the search result according to the keyword and the metadata index.
  • the method further includes: the electronic device receives and saves metadata of each file in the shared file updated by the other electronic device.
  • the association between the account logged in on the other electronic device and the account logged in on the electronic device includes: the account logged in on the electronic device and the other electronic device The account logged in on the electronic device is the same; or, the account logged in on the electronic device and the account logged in on the other electronic device are in the same family group; or, the account logged in on the electronic device is the one logged in on the other electronic device The account authorized by the account.
  • a system in a third aspect, includes a first electronic device and a second electronic device.
  • the first electronic device is used to establish a network connection with the second electronic device, and the network connection is used to transmit data.
  • the first electronic device is also used to request a shared file associated with the target file from the second electronic device when the user's operation to find the target file is detected; the second electronic device is also used to send An electronic device sends the shared file; the first electronic device is also used to display a first interface, and the first interface includes the identification of the shared file of the first electronic device and the identification of the shared file of the second electronic device.
  • the first electronic device after the first electronic device and the second electronic device establish a network connection, when the user wants to view the files scattered on the second electronic device through the first electronic device, the first electronic device can send the message to the second electronic device The file sharing is requested, so that the first electronic device displays the identification of the shared file to the user. In this way, it is actually convenient for users to view the information of digital assets distributed on other devices on one device, which satisfies the user's unified management of the information of digital assets scattered on each device.
  • the identifier of the shared file of the first electronic device may be a folder or a thumbnail; the identifier of the shared file of the second electronic device may also be a folder or a thumbnail.
  • the shared file includes original data or metadata
  • the metadata is attribute description information of each file in the shared file.
  • the second electronic device can send the metadata information of the shared file to the first electronic device.
  • the user can quickly browse the digital asset status on other devices, which saves more money on the electronic device. storage.
  • the first interface further includes the device name of the second electronic device.
  • establishing a network connection between the first electronic device and the second electronic device includes the first electronic device communicating with the second electronic device through a short-range wireless connection, or , The first electronic device communicates with the second electronic device through a long-distance wireless connection.
  • the first electronic device and the second electronic device can establish a connection through short-range wireless communication technology, and can also establish a connection through long-range wireless communication technology, so that the user can quickly view the near field through the first electronic device. Or the situation of the digital assets on the equipment in the far field, which is convenient for users to manage the digital assets scattered on the equipment in the near field or the far field.
  • the shared file is a multimedia file
  • the first electronic device is also used to request the second electronic device for one or more files saved by the second electronic device. Thumbnails of multimedia files.
  • the first electronic device is further configured to request the first thumbnail from the second electronic device when the user's click on the first thumbnail is detected
  • the thumbnail of the one or more multimedia files includes the first thumbnail
  • the first multimedia file is a multimedia file with a preset screen resolution
  • the second electronic device also It is used to send the first multimedia file to the first electronic device
  • the first electronic device is also used to display a second interface, and the second interface includes the first multimedia file.
  • the second interface further includes a first control for saving locally, and the first electronic device is also used for detecting that the user clicks on the first control During the operation, request a second multimedia file corresponding to the first thumbnail from the second electronic device, where the second multimedia file is the original data of the multimedia file corresponding to the thumbnail; the second electronic device, It is also used to send the second multimedia file to the first electronic device; the first electronic device is also used to save the second multimedia file in the second electronic device.
  • the shared file includes metadata
  • the first electronic device is further configured to receive the metadata of each file sent by the second electronic device. Establishing an index of the metadata of each file according to the metadata of each file; the first electronic device is also used to display search results according to the keyword input by the user and the metadata index.
  • the second electronic device is further configured to send the updated shared file to the first electronic device when it is detected that the shared file is updated; An electronic device for receiving the updated shared file sent by the second electronic device.
  • the first electronic device is further configured to determine the account logged in on the first electronic device and the second electronic device before establishing a network connection with the second electronic device. 2.
  • the account number logged in on the electronic device is associated.
  • a data sharing method is provided.
  • the method is applied to an electronic device.
  • the method includes: establishing a network connection between the electronic device and another electronic device, and the network connection is used to transmit data;
  • the user searches for the target file, he requests the other electronic device for the shared file associated with the target file;
  • the electronic device receives the shared file sent by the other electronic device;
  • the electronic device displays the first interface, the first The interface includes the identification of the shared file of the electronic device and the identification of the shared file of the other electronic device.
  • the shared file includes original data or metadata
  • the metadata is attribute description information of each file in the shared file.
  • the first interface further includes the device name of the other electronic device.
  • the electronic device establishing a network connection with the other electronic device includes the electronic device communicating with the other electronic device through a short-range wireless connection, or the electronic device Communicate with the other electronic device through a long-distance wireless connection.
  • the shared file is a multimedia file
  • the method further includes: the electronic device requests the other electronic device for one or more multimedia files saved by the other electronic device The thumbnail of the file.
  • the method further includes: when the electronic device detects that the user clicks on the first thumbnail, requesting the other electronic device to correspond to the first thumbnail
  • the first multimedia file of the one or more multimedia files includes the first thumbnail, and the first multimedia file is a multimedia file with a preset screen resolution; the electronic device receives the other electronic The first multimedia file sent by the device; the electronic device displays a second interface, and the first multimedia file is included on the second interface.
  • the second interface further includes a first control for saving locally, and the method further includes: when the electronic device detects that the user clicks on the first control, During operation, a second multimedia file corresponding to the first thumbnail is requested from the other electronic device, where the second multimedia file is the original data of the multimedia file corresponding to the thumbnail; the electronic device receives the other The second multimedia file sent by the electronic device; the electronic device saves the second multimedia file in the electronic device.
  • the shared file includes metadata
  • the method further includes: after the electronic device receives the metadata of each file sent by the other electronic device, According to the metadata of each file, an index of the metadata of each file is established; the electronic device displays the search result according to the keyword input by the user and the metadata index.
  • the method further includes: the electronic device receiving the updated shared file sent by the other electronic device.
  • the method further includes: before establishing a network connection with the other electronic device, determining the account logged in on the electronic device and the account logged in on the other electronic device. Account linking.
  • a device in a fifth aspect, is provided, the device is included in an electronic device, and the device has the function of realizing the behavior of the electronic device in the foregoing second aspect and the foregoing second and fourth aspects in possible implementation manners.
  • the function can be realized by hardware, or the corresponding software can be executed by hardware.
  • the hardware or software includes one or more modules or units corresponding to the above-mentioned functions.
  • an electronic device including: one or more processors; a memory; and one or more computer programs.
  • one or more computer programs are stored in the memory, and the one or more computer programs include instructions.
  • the electronic device is caused to execute the data sharing method in any one of the foregoing second aspect and the fourth aspect.
  • the technical solution provides an electronic device including one or more processors and one or more memories.
  • the one or more memories are coupled with one or more processors, and the one or more memories are used to store computer program codes.
  • the computer program codes include computer instructions.
  • the electronic device executes A method for data sharing in any one of the foregoing second aspect and fourth aspect may be realized.
  • the present technical solution provides a computer storage medium, including computer instructions, which when the computer instructions run on an electronic device, cause the electronic device to execute the data in any one of the foregoing second and fourth aspects.
  • the present technical solution provides a computer program product, which when the computer program product runs on an electronic device, causes the electronic device to execute the data sharing method in any one of the above-mentioned second and fourth aspects. .
  • Fig. 1 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • Fig. 2 is a software structure block diagram of an electronic device provided by an embodiment of the present application.
  • Figure 3 is a set of GUIs provided by an embodiment of the present application.
  • Figure 4 is another set of GUIs provided by an embodiment of the present application.
  • Figure 5 is another set of GUIs provided by an embodiment of the present application.
  • Fig. 6 is another set of GUIs provided by an embodiment of the present application.
  • Fig. 7 is another software architecture diagram of an electronic device provided by an embodiment of the present application.
  • FIG. 8 is a process of data sharing between device A and device B provided in the implementation of this application.
  • Fig. 9 is a schematic diagram of distributed browsing, searching, and management of pictures and videos provided by an embodiment of the present application.
  • Fig. 10 is another set of GUI provided by an embodiment of the present application.
  • FIG. 11 is a schematic flowchart of a data sharing method provided by an embodiment of the present application.
  • the electronic device may be a portable electronic device that also contains other functions such as a personal digital assistant and/or a music player function, such as a mobile phone, a tablet computer, and a wearable electronic device with wireless communication function (such as a smart watch) Wait.
  • portable electronic devices include, but are not limited to, carrying Or portable electronic devices with other operating systems.
  • the aforementioned portable electronic device may also be other portable electronic devices, such as a laptop computer (Laptop) and the like. It should also be understood that, in some other embodiments, the above-mentioned electronic device may not be a portable electronic device, but a desktop computer.
  • FIG. 1 shows a schematic structural diagram of an electronic device 100.
  • the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, and an antenna 2.
  • Mobile communication module 150 wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone interface 170D, sensor module 180, compass 190, motor 191, indicator 192, camera 193, display screen 194, and user
  • An identification module subscriber identification module, SIM
  • the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100.
  • the electronic device 100 may include more or fewer components than those shown in the figure, or combine certain components, or split certain components, or arrange different components.
  • the illustrated components can be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units.
  • the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU), etc.
  • different processing units may be independent components, or may be integrated in one or more processors.
  • the electronic device 100 may also include one or more processors 110.
  • the controller can generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching instructions and executing instructions.
  • a memory may be provided in the processor 110 to store instructions and data.
  • the memory in the processor 110 may be a cache memory.
  • the memory can store instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. In this way, repeated accesses are avoided, the waiting time of the processor 110 is reduced, and the efficiency of the electronic device 100 in processing data or executing instructions is improved.
  • the processor 110 may include one or more interfaces.
  • the interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, and a universal asynchronous transceiver (universal asynchronous transceiver) interface.
  • asynchronous receiver/transmitter, UART) interface mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, SIM card interface and/or USB interface, etc.
  • the USB interface 130 is an interface that complies with the USB standard specification, and specifically may be a Mini USB interface, a Micro USB interface, a USB Type C interface, and so on.
  • the USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and peripheral devices.
  • the USB interface 130 can also be used to connect earphones and play audio through the earphones.
  • the interface connection relationship between the modules illustrated in the embodiment of the present application is merely a schematic description, and does not constitute a structural limitation of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection modes in the foregoing embodiments, or a combination of multiple interface connection modes.
  • the charging management module 140 is used to receive charging input from the charger.
  • the charging management module 140 may receive the charging input of the wired charger through the USB interface 130.
  • the charging management module 140 may receive the wireless charging input through the wireless charging coil of the electronic device 100.
  • the charging management module 140 charges the battery 142, it can also supply power to the electronic device through the power management module 141.
  • the power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110.
  • the wireless communication function of the electronic device 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor.
  • the wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), and global navigation satellites.
  • WLAN wireless local area networks
  • BT wireless fidelity
  • BT wireless fidelity
  • GNSS global navigation satellite system
  • FM frequency modulation
  • NFC near field communication technology
  • IR infrared technology
  • the display screen 194 is used to display images, videos, and the like.
  • the display screen 194 includes a display panel.
  • the display panel can adopt liquid crystal display (LCD), organic light-emitting diode (OLED), active-matrix organic light-emitting diode, or active-matrix organic light-emitting diode (active-matrix organic light-emitting diode).
  • LCD liquid crystal display
  • OLED organic light-emitting diode
  • active-matrix organic light-emitting diode active-matrix organic light-emitting diode
  • AMOLED flexible light-emitting diode
  • FLED flexible light-emitting diode
  • mini light-emitting diode miniled
  • MicroLed Micro-oLed
  • quantum dot light emitting diode QLED
  • the electronic device 100 may include one or more display screens 194.
  • the display screen 194 in FIG. 1 may be bent.
  • the above-mentioned display screen 194 can be bent means that the display screen can be bent to any angle in at least a part of the area, and can be maintained at this angle.
  • the display screen 194 can be folded in half from the middle. You can also fold up and down from the middle.
  • the ISP is used to process the data fed back from the camera 193. For example, when taking a picture, the shutter is opened, the light is transmitted to the photosensitive element of the camera through the lens, the light signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing and is converted into an image visible to the naked eye.
  • the camera 193 is used to capture still images or videos.
  • the external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example, save music, video and other files in an external memory card.
  • the internal memory 121 may be used to store one or more computer programs, and the one or more computer programs include instructions.
  • the processor 110 can run the above-mentioned instructions stored in the internal memory 121 to enable the electronic device 100 to execute the data sharing methods provided in some embodiments of the present application, as well as various applications and data processing.
  • the electronic device 100 may implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. For example, music playback, recording, etc.
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and an ambient light sensor 180L, bone conduction sensor 180M, etc.
  • the gyro sensor 180B may be used to determine the movement posture of the electronic device 100.
  • the angular velocity of the electronic device 100 around three axes ie, X, Y, and Z axes
  • the acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of electronic devices, and apply to applications such as horizontal and vertical screen switching, pedometers, and so on.
  • the magnetic sensor 180D includes a Hall sensor.
  • the electronic device 100 may use the magnetic sensor 180D to detect the opening and closing of the flip holster.
  • the acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of electronic devices, and apply to applications such as horizontal and vertical screen switching, pedometers, and so on.
  • Distance sensor 180F used to measure distance.
  • the proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector such as a photodiode.
  • the light emitting diode may be an infrared light emitting diode.
  • the ambient light sensor 180L is used to sense the brightness of the ambient light.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photographs, fingerprint answering calls, and so on.
  • the fingerprint sensor may include an under-screen fingerprint sensor located under the side screen.
  • the under-screen fingerprint sensor may be located in a certain area of the side screen. When the user unlocks through the side screen, it can be in this area. Press or touch; or, when the user is unlocking the fingerprint, he can press or touch any area on the side screen, so that the fingerprint sensor under the screen can detect the user's fingerprint information and perform the fingerprint information. check.
  • the temperature sensor 180J is used to detect temperature.
  • Touch sensor 180K also called “touch panel”.
  • the touch sensor 180K may be disposed on the display screen 194, and the touch screen is composed of the touch sensor 180K and the display screen 194, which is also called a “touch screen”.
  • the touch sensor 180K is used to detect touch operations acting on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • the visual output related to the touch operation can be provided through the display screen 194.
  • the touch sensor 180K may also be disposed on the surface of the electronic device 100, which is different from the position of the display screen 194.
  • FIG. 2 is a block diagram of the software structure of the electronic device 100 according to an embodiment of the present application.
  • the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Communication between layers through software interface.
  • the software architectures of device A, device B, and device C are divided into four layers, where device A, device B, and device C all include a distributed application layer and a service layer.
  • Device A also includes the core layer of the Harmony operating system and the Linux kernel layer;
  • Device B also includes the Windows core layer and the Windows kernel layer;
  • Device C also includes the Android core layer and the Linux kernel layer.
  • the application layer can include distributed applications such as camera, gallery, file management, music, video, and contacts.
  • the service layer in the embodiment of the present application may include a device knowledge base, a device authentication management, and a device data storage area.
  • the device knowledge base can store the device name, device type, device status information, capability information, and address information of the device and other devices.
  • the device status information is used to indicate that the device is online or offline; the device capability information is used to indicate whether the device supports data sharing.
  • the other devices stored in the device knowledge base may be devices associated with the account of the current device; or, they may also be devices not associated with the account of the current device.
  • the current device and other devices may be located at Devices in the same social software group (for example, other devices can be the devices of the user’s friends in the address book, or other devices can be devices in the same WeChat group as the current device); or, other devices can also be Log in to any account's device.
  • Device authentication management can be used in the authentication process of this device to other devices.
  • the device can determine whether the device and the other device belong to the device under the same account according to the device name of the other device.
  • user account A includes device A, device B, and device C. Then device A can determine that device B is a device under the same account according to the device names of multiple devices under account A saved by device A after receiving the device name information of device B sent by device B.
  • the device can determine whether the device and other devices belong to the same family group according to the device names of other devices.
  • the same family group includes account A and account B
  • account A includes device A, device B, and device C
  • account B includes device D, device E, and device F.
  • device A can determine that device B is a device in the same family group according to the device names of multiple devices under account B saved on device A.
  • the device can also authenticate some devices without unregistered accounts.
  • device A can call the lightweight computing platform interface to generate a QR code.
  • Device G (device without an account) can scan the QR code on device A to obtain the media access control (MAC) address, internet protocol (IP) address, and public address of device A. Key information, challenge value, etc.
  • Device G can use the public key information of device A to encrypt the public key of device G and send it to device A.
  • Device A can use the public key of device A to decrypt the encrypted public key of device G to obtain the public key of device G.
  • the device A may store the device name, device type, device status information, capability information, and address information of the device G in the device knowledge base after passing the authentication of the device G.
  • devices under the same account or devices under the same family group can be directly trusted through a trust ring.
  • the device data storage area can be used for this device to store other device data (for example, picture information, video information, document information, audio information, etc.).
  • the SDK interface of the distributed application layer can call the data in the device data storage area through the user The interface displays data on other devices to the user.
  • FIG. 3 shows a set of graphical user interfaces (GUI) of the mobile phone.
  • GUI graphical user interfaces
  • the GUI is the desktop 301 of the mobile phone.
  • the mobile phone detects that the user has clicked the icon 302 of the photo album application (application, APP) on the desktop 301, it can start the photo album application and display the GUI as shown in (b) in FIG. 3.
  • the photo album application application, APP
  • the GUI is the display interface of the photo album application.
  • the display interface can display 4278 photos and 134 videos currently stored in the mobile phone. Among them, there are 3177 photos obtained through the camera, 12 photos obtained through screenshot recording, 25 photos in the collection, and 3 photos in the shared album.
  • the mobile phone detects the user's operation to open the photo album application, it will also automatically find the surrounding devices under the same account. For example, the user A's account is currently logged in on the mobile phone. User A’s account may have other devices (for example, other mobile phones, large-screen devices, Pads, smart watches, etc.). At this time, the mobile phone will search for other surrounding devices through user A’s account.
  • multiple devices under the same account can be directly authorized through the trust ring.
  • the mobile phone detects the user's operation to open the photo album application, the mobile phone can determine which devices under user A's account are within a preset distance from the mobile phone. For other devices within a preset distance under the account of user A, the mobile phone can initiate a service request to these devices, and the service request can be used to request digital assets (for example, photos, videos, files, etc.) saved by these devices. So as to display the digital assets of these devices on the mobile phone.
  • digital assets for example, photos, videos, files, etc.
  • the mobile phone before the mobile phone detects that the user clicks on the icon 302, the mobile phone can search for devices in the near field or in the far field. When the mobile phone detects the user's operation of clicking the icon 302, the mobile phone can directly display other devices found.
  • the GUI is another display interface of the photo album application.
  • the mobile phone finds other devices under User A's account within a preset distance, it can automatically display the subtitle "Other Devices". Users can select "local” and “other devices” to browse.
  • the mobile phone detects that the user has clicked on the "other devices” control, it can display the GUI as shown in (d) in Figure 3.
  • the mobile phone may periodically send a broadcast to surrounding devices before detecting that the user opens the photo album application, and the broadcast message is used to find other electronic devices within a preset distance under the account that is to be associated with the account logged in on the mobile phone.
  • the mobile phone detects that the user opens the photo album application, it can directly display "local” and “other devices", where “other devices” are electronic devices found by the mobile phone that meet the conditions.
  • the GUI is another display interface of the photo album application.
  • the display interface can display the information of other devices under the account of user A within the preset distance obtained by the mobile phone, including Huawei M7, Honor Smart Screen, and Huawei P30.
  • the mobile phone can obtain the quantity information of the digital assets (for example, photos) of other devices.
  • the number of photos saved in Huawei M7 is 80; the number of photos saved in the Honor Smart Screen is 120; the number of photos saved in Huawei P30 is 120.
  • the mobile phone detects that the user clicks to view the photo album folder of the Huawei M7, the mobile phone can display the GUI as shown in (e) in Figure 3.
  • (d) in Figure 3 can display the folders, device names, and file numbers of other devices; it can also display only part of the information; or, it can also display only the folder information, or other identifiers. information. After the user clicks on the identification information of other devices, information such as the device name and the number of files can be displayed.
  • the GUI is the display interface of other device photo albums.
  • the mobile phone can display information of folders saved on other devices (Huawei M7).
  • the Huawei M7 album includes folder 305, folder 306, folder 307, folder 308, folder 309, and folder 310.
  • the photos in folder 305 are obtained through the Huawei M7 camera, the number of photos in folder 305 is 3177; the photos in folder 306 are obtained through screenshot recording, the number of photos in folder 306 is 25 ;
  • the photos in the folder 307 are obtained through data sharing (Huawei Share), the number of photos in the folder 307 is 9; the photos in the folder 308 are obtained through social applications (for example, QQ), in the folder 308
  • the number of photos is 12;
  • the photos in folder 309 are obtained through social applications (for example, Weibo), the number of photos in folder 309 is 12;
  • the photos in folder 310 are obtained through social applications (for example, WeChat) Obtained, the number of photos in the folder 310 is 6 photos.
  • the mobile phone detects that the user clicks on the folder 305, it can display the GUI as shown in (f) in FIG. 3.
  • the GUI is the display interface of the folder 305.
  • the user can view the photos and videos saved in the folder 305 by swiping the screen upward.
  • the mobile phone detects the user's operation of clicking the thumbnail 311, the GUI as shown in (g) in FIG. 3 can be displayed.
  • the mobile phone when the mobile phone detects that the user clicks to view the photo album of the Huawei M7, the mobile phone can directly display the GUI as shown in (f) in FIG. 3.
  • the GUI is a preview interface of the large image corresponding to the thumbnail 311.
  • the detailed information of the photo can also be displayed on the preview interface of the big picture.
  • the photo was taken at 10:00 am on February 14, 2019, the electronic device that took the photo was a Huawei M7, and the location of the photo was Yuhuatai District, Nanjing.
  • the big picture preview interface can also display function controls, such as sharing function, device function, screen projection function, printing function and save to local function.
  • the mobile phone When the mobile phone detects the user's operation of clicking the thumbnail 311, the mobile phone can request the picture information of the preset screen resolution from the Huawei M7.
  • the picture displayed on the interface may not be the original picture data, but a picture with a preset screen resolution (for example, a picture with a pixel value of 1080 ⁇ 1920).
  • the user can share the photo 311 with his friends through the sharing function; the user can also set the photo 311 as a desktop wallpaper or contact avatar, etc. through the device as a function; the user can also cast the photo 311 through the screen-casting function Browse from the screen to a large-screen device; the user can also print the photo 311 through the print function; the user can also save the photo 311 to the mobile phone through the save to local function.
  • the mobile phone when the mobile phone detects that the user clicks to share, set as, cast screen, print, or save to local function, the mobile phone can prompt the user to save the original data or save the picture with the preset screen resolution by raising the photo frame. For example, when the mobile phone detects that the user clicks to save the original data, the mobile phone can request the data of the original picture from the Huawei M7. For another example, when the mobile phone detects that the user clicks to save the picture with the preset screen resolution, the mobile phone can directly save the picture with the preset screen resolution locally.
  • the user can view the digital assets on other electronic devices under the account through an electronic device under the account, which satisfies the user’s understanding of the digital assets scattered on each device (for example, pictures, videos, audios, and documents). )
  • the demand for unified management reduces redundant operations when users view digital assets on various devices, and helps improve user experience.
  • FIG. 3 describes the process of a user viewing photos on other devices through a mobile phone.
  • Fig. 4 shows another set of GUIs provided by an embodiment of the present application, and describes the process of a user viewing videos on other devices through a mobile phone.
  • the GUI is the display interface of the folder 305.
  • the user can view the photos and videos saved in the folder 305 by swiping the screen upward.
  • the mobile phone detects that the user clicks on the video 401, it can display the GUI as shown in (b) in FIG. 4.
  • the GUI is a preview interface of the large image of the video 401.
  • the detailed information of the video 401 can also be displayed on the preview interface of the big picture.
  • the video 401 was shot at 11:30 am on March 20, 2019, the electronic device used to shoot the video 401 was a Huawei M7, and the video 401 was shot at Yuhuatai District, Nanjing.
  • the big picture preview interface can also display function controls, such as sharing function, screen projection function and save to local function.
  • the user can share the video 401 with his friends through the sharing function; the user can also project the video 401 to a large-screen device for viewing through the screen projection function; the user can also save the video 401 to the mobile phone through the save to local function .
  • Figure 5 shows another set of GUIs provided by an embodiment of the present application.
  • the GUI is the display interface of the photo album application.
  • the GUI as shown in (b) of FIG. 5 can be displayed.
  • the GUI is the search interface of the photo album application.
  • the mobile phone can automatically show the user the classification information of the photo. For example, a mobile phone can categorize photos of this machine and other devices according to time, portrait, location, and tags. Users do not need to enter search keywords to see these classification information.
  • the GUI is another search interface of the photo album application.
  • the mobile phone detects that the user has entered the keyword "flower” in the search box, the mobile phone can categorize the photos related to "flower” in this device and other devices.
  • the mobile phone has searched a total of 1385 photos of "flowers" in this machine and other devices.
  • the mobile phone can search for 8 photos taken in the Huadu District of Nanjing City on this phone and other devices; 8 photos taken in Yuhuatai District, Nanjing City; photos of the contact person Xiaohua on this phone and other devices include 8 photos; there are 8 photos of Huahua contacts in this machine and other devices, etc.
  • the GUI is another search interface of the photo album application.
  • the mobile phone detects that the user has entered the keyword "flowers" in the search box, the mobile phone can search for photos related to "flowers" in this device and other devices. Among them, the mobile phone searched a total of 890 photos about "flowers” on this phone and other devices. The phone searched for 755 photos of “flowers” in this device; the phone searched 105 photos of “flowers” on Huawei M7 in other devices, and 130 photos about “flowers” were searched on the Honor smart screen of other devices. Photos of "flowers”.
  • Figure 6 shows another set of GUIs provided by an embodiment of the present application.
  • the GUI is another display interface of the photo album application.
  • the phone finds other devices under the same account and different accounts within a preset distance, it can automatically display the subtitle “Other Devices”. Users can select "local” and “other devices” to browse.
  • the mobile phone detects that the user has clicked on the “other devices” control, it can display the GUI shown in Figure 6 (b).
  • the GUI is another display interface of the photo album application.
  • the display interface can display the information of other devices under the same account (“My Device” shown in Figure 6(b)) within the preset distance obtained by the mobile phone, including Huawei M7, Honor Smart Screen, and Huawei P30; At the same time, it can also display the information of other devices under other accounts in the same family group as the login account of this machine (“other people’s devices” shown in Figure 6 (b)), including Mi 9, notebooks Computers (Macbook) and tablet computers (MatePad Pro).
  • the mobile phone can obtain the quantity information of the digital assets (for example, photos) of other devices.
  • the device can also share data with devices that have not logged in to an account.
  • the mobile phone can automatically generate a QR code after opening an album. If the user wants to see the data on the device without a logged-in account on this machine, the user can open the QR code and scan it with the device without a logged-in account. After the local device and the device without a logged-in account are authenticated, the local device and the device without a logged-in account can share data.
  • Fig. 7 shows another software architecture diagram of an electronic device provided by an embodiment of the present application. The following describes the authentication process, service request process, service data synchronization process, and device detection process between the local machine and other devices in the embodiment of the present application in conjunction with FIG. 7.
  • the electronic device When the electronic device detects that the user clicks on a certain distributed application, such as an application such as an album, a music player, file management, or contacts, the electronic device can automatically trigger an authentication process for surrounding devices.
  • a certain distributed application such as an application such as an album, a music player, file management, or contacts
  • the electronic device opens the application and displays the interface of the application.
  • the electronic device detects that the user clicks on the icon of an application (for example, photo album, music player, file management, or contacts) on the desktop of the electronic device
  • the application is a distributed application
  • the distributed application layer The application will send the label corresponding to the application (for example, the process identifier (PID)) and the process name corresponding to the application to the device monitor of the service layer.
  • the device monitor can determine whether it is based on the label and the process name. Which App has started.
  • the electronic device determines that the photo album application is started by determining the process identification number and process name of the photo album.
  • the device monitor can generate Bluetooth low energy (BLE) broadcast data packets through the local online broadcast module, which can carry the device name and address of the device (for example, MAC address, IP address, etc.) .
  • the device monitor can broadcast the BLE broadcast data packet through the Bluetooth broadcast/scan module of the communication protocol layer.
  • the electronic device can also receive the BLE broadcast response sent by other surrounding devices in real time through the Bluetooth broadcast/scan module, and the BLE broadcast response can carry the device name information of other devices.
  • BLE Bluetooth low energy
  • the device monitor can use the name information of other devices to determine whether it is a device under the same account, or whether it is a device under another account in the same family group. If it is another device under the same account, the machine can directly pass the authentication with other devices; or if it is another device under another account in the family group, the machine can also pass the authentication directly with other devices.
  • Distributed applications can monitor the device knowledge base. When the distributed application discovers that information about other devices has been added to the device knowledge base, the corresponding information can be displayed on the display interface.
  • the device monitor can also save the device name, device type, device status information, capability information, and address information of other devices in the device knowledge base.
  • the device monitor determines that the device name carried in the broadcast response is not another device under the same account, or is not a device under another account in the same family group, then the device monitor can also report to the application layer
  • the distributed response sends the information of the device name, and the distributed application prompts the user that the device is not another device under the same account, or is not a device under another account in the same family group.
  • the distributed application can prompt the user to authenticate the device by scanning the QR code.
  • the user can also send a screenshot of the QR code to a device in the far field, and the device in the far field can establish a network connection with the current device by scanning the QR code, so that the device in the far field can synchronize the information of the digital asset to the current device. equipment.
  • the electronic device may also discover other devices through far-field communication technology.
  • the electronic device can establish a network connection with the far-field device through a far-field communication technology such as a server and a cellular network.
  • the distributed application can call the distributed service request of the application layer to generate the corresponding service request.
  • the photo album application may call the distributed service to request the generation of a thumbnail request.
  • the distributed service request may send the thumbnail request to the service process engine (SPE) of the service layer.
  • SPE service process engine
  • the SPE is a logical processing unit, which can be used to perform service proxy functions, analyze and process service requests, and select appropriate equipment/hardware/services for the application. After receiving the corresponding service request, the SPE may select the appropriate device for the service request through the device knowledge base. Exemplarily, the information of the device A, the device B, and the device C is stored in the device knowledge base. The SPE can first obtain the status information of device A, device B, and device C. If the SPE finds that device A is offline, but device B and device C are online, then SPE can determine that device B and device C are suitable devices.
  • the SPE can forward the service request and the address information of other devices (device B and device C) to the data bus (DataBus). And sent to the communication layer downstream module of the communication protocol layer by the data bus.
  • the communication layer downlink module can forward the service request to other devices according to the address information of other devices.
  • the SPE of other devices acts as a local service agent, and returns the service response and corresponding data to the electronic device. So as to complete the service request process.
  • the electronic device After the electronic device obtains the response and data sent by other devices, it can save the data in the data storage area of the service layer. At the same time, it can also send corresponding data to the distributed application of the application layer, so that the user can see other data through the display interface. Data on the device.
  • the electronic device Before the electronic device and other devices share data with each other, the electronic device needs to first establish a data transmission channel (DataBus PIPE) with other devices. After receiving the service request sent by the electronic device, other devices can call the DataBus PIPE to establish an interface according to the service request, thereby establishing a data transmission channel. After the data transmission channel is established, other devices can share their saved data with electronic devices.
  • DataBus PIPE data transmission channel
  • the data synchronization process between the first electronic device and the second electronic device may include first synchronization and incremental synchronization.
  • the first synchronization refers to the first establishment of data transmission between the first electronic device and the second electronic device.
  • the synchronization is triggered when the first electronic device synchronizes its data to the second electronic device, or the second electronic device synchronizes its own data to the first electronic device; incremental synchronization refers to when the first electronic device and Synchronization triggered when the data on the second electronic device changes. For example, when the data on the first electronic device changes (for example, some photos or videos are added to the first electronic device), the first electronic device can synchronize its own data to the second electronic device.
  • the data transmission channel between the first electronic device and the second electronic device may always exist.
  • the data can be synchronized directly through the data transmission channel.
  • the electronic device needs to scan the information sent by other surrounding devices to determine the appropriate surrounding devices.
  • some devices may go offline after a period of time, so this requires electronic devices to detect other devices.
  • the electronic device may periodically send a BLE broadcast data packet, and if the electronic device receives a broadcast response from another device within a preset time period after sending the BLE broadcast data packet, it may be determined that the other device is online; On the contrary, if the electronic device does not receive the broadcast response within the preset time period, it can be determined that other devices are offline.
  • the electronic device did not find device B during the initial scan (device B and the electronic device are devices under the same account), and subsequently discovered device B during the scanning process. Then the electronic device can save the information of device B in the device knowledge base. At the same time, the device monitor can also send the updated information of the device to the distributed application, thereby displaying the information of the device B through the display interface of the electronic device.
  • Distributed applications can monitor the information of the device knowledge base. When the device information in the device knowledge base changes, the distributed application will update the device information in real time through the display interface. At the same time, when SPE sends a service request to DataBus, it can also send the updated device address to DataBus according to the updated device information.
  • the following describes the process of data sharing between device A and device B provided in the implementation of this application in conjunction with FIG. 8.
  • the process includes:
  • the distributed application When the electronic device detects a user's operation on the display interface of the distributed application, the distributed application initiates a service request by invoking a software development kit (SDK) of the distributed service of the business.
  • SDK software development kit
  • the SDK will send a service request to the SPE of the service layer.
  • the content of the specific service request can be determined according to the user's operation.
  • the SDK when the electronic device detects that the user clicks on the "other device” operation, the SDK will send the image metadata and the service request of the thumbnail to the SPE.
  • the mobile phone when the mobile phone detects the user's upward sliding operation on the display screen, the mobile phone can display more photo thumbnails downwards.
  • the phone requested image metadata and thumbnails from Huawei M7 before, it might have only requested 200 thumbnails of photos.
  • the SDK In the process of scrolling down the photo thumbnails on the phone, when the phone determines that it is about to scroll to the 200th photo thumbnail, the SDK can automatically initiate another service request for the photo thumbnail to the Huawei M7. This can ensure the continuity when the user views the photo thumbnails.
  • the mobile phone when the mobile phone detects the user's operation of clicking the photo 311 on the display, the mobile phone can request the Huawei M7 for the preset screen resolution (for example, a picture with a pixel value of 1080 ⁇ 1920) The data of the photo 311.
  • the Huawei M7 for the preset screen resolution (for example, a picture with a pixel value of 1080 ⁇ 1920) The data of the photo 311.
  • the mobile phone when the mobile phone detects that the user clicks the save to local operation, the mobile phone can request the original data of the photo 311 from the Huawei M7.
  • the SPE forwards the service request and the address of device B to the communication protocol layer through the data bus.
  • the communication protocol layer sends a service request to device B according to the address of device B.
  • the service request After receiving the service request under the communication protocol layer of the device B, the service request is forwarded to the SPE of the device B.
  • the SPE of device B continues to forward the service request to the retrieval service.
  • the retrieval service After the retrieval service obtains the service request, it can parse the service request, and then search for the corresponding data index from the data index storage area of the device B.
  • the retrieval service of device B can search the data index storage area for the corresponding index of the photo saved in device B.
  • the photo index here may be an index created by device B after classifying the photos stored in device B.
  • the device B may classify the photos saved in the device B according to information such as time, task, location, and label.
  • the index of the photos saved in the device B can also refer to the classification information of each photo.
  • the retrieval service searches for data in the data storage area of device B according to the service request.
  • the retrieval service of device B can search the data storage area for the image metadata and thumbnail information stored in device B.
  • the data storage area of device B may include local data and data of remote device A.
  • Device B can search for local data when searching to obtain corresponding data.
  • Table 1 shows a kind of picture metadata.
  • the picture metadata may be obtained from the original data of the picture stored in the memory of the electronic device.
  • the internal memory is not the same as the data storage area in Figure 8.
  • the internal memory stores the original data of the picture, and the amount of original data is very large; while the picture metadata and thumbnails stored in the data storage area pass through the picture.
  • the original data is obtained, and the amount of metadata and thumbnail data is very small.
  • the SDK will send image metadata and thumbnails to the SPE during the service request process.
  • the data that Huawei M7 synchronizes to the mobile phone is actually the image metadata and thumbnails.
  • the current device when the current device is performing digital asset access and management of other devices, it does not directly copy the original data of other devices to the current device, which helps to improve the user’s browsing speed and saves the use of electronic devices. storage.
  • the retrieval service of the device B forwards the response to the service request and the found data to the communication protocol layer of the device B.
  • the communication protocol layer of device B sends the response and data to the communication protocol layer of device A.
  • the device B may send the picture metadata and the thumbnail image saved by the device B to the device A. For example, if 1000 pictures are saved in device B, then device B can send metadata information of these 1000 pictures and thumbnail information of 200 pictures to device A.
  • the communication protocol layer of device A sends the received response and data to the retrieval service of device A.
  • the retrieval service of device A stores the received data in the data storage area of device A.
  • the data storage area of device A includes the local data of device A and the data of remote device B. After device A receives the data sent by device B, it can store it in remote device B data.
  • device A after device A receives the metadata sent by device B, it can index the data according to the information in the metadata, and save the index of device B metadata in the data index storage area of device A.
  • device B saves 1000 pictures, then device B can send metadata of these 1000 pictures to device A.
  • the metadata includes the time when the picture was created, the place where it was created, and the picture.
  • the metadata structure can be as shown in Table 2.
  • device B After device B receives the above 1000 metadata, it can create an index of these 1000 metadata based on the content of the above 1000 metadata, and save the established index in the remote device B in the data index storage of device A. .
  • device A may create an index table of these 1000 pictures in the remote device B data index storage area in the device A data index storage area, as shown in Table 3.
  • the classification manners shown in the foregoing Table 2 and Table 3 are only illustrative, and the received metadata may be indexed according to other classification manners in the embodiment of the present application.
  • the classification of locations can also include category 3, which can include the regional information of each city.
  • Nanjing can be further divided into Nanjing Huadu District, Nanjing Yuhuatai District, etc.
  • Xi’an can further It is divided into Beilin District of Xi'an City and Yanta District of Xi'an City.
  • the current device can receive metadata sent by other devices, and build a corresponding index based on the information in these metadata, so that it is convenient for the user to search for data saved locally on the current device and saved on another device. To quickly display search results to users.
  • the mobile phone when the user enters the keyword "flower” in the search box, the mobile phone can display the classification result obtained according to the keyword "flower".
  • the search results for "flowers” include “Huadu District” and “Yuhuatai District” classified by location, and "Sister Xiaohua” and “Huahua” classified by the name of the person who was photographed.
  • the mobile phone when the user enters the keyword "flower” in the search box, the mobile phone can display the classification result obtained according to the keyword "flower”. Among them, the mobile phone can display 8 photos of "flowers” taken in 2018 (it can also display photos of "flowers” taken in 2019 and 2020, not shown in the figure), and it can also display the photos found by this machine The number of photos about "flowers” and the number of photos about “flowers” found on other devices.
  • the retrieval service of device A sends data to the SDK of the application layer. And presented to the user by the user interface of device A.
  • the retrieval service may send information about the quantity of pictures in Huawei M7, Honor Smart Screen, and Huawei P30 to the SDK.
  • the mobile phone can also display the number of pictures in each device through the display interface.
  • the current device can store metadata information sent by other devices in the data storage area.
  • Huawei M7 can send 80 metadata information corresponding to the 80 pictures saved by Huawei M7 to the mobile phone, and the retrieval service can check the received The number of metadata is counted, and the result of the number of metadata statistics is the number of pictures saved on the Huawei M7.
  • the retrieval service can send the information of the thumbnails in the folder 305 in the Huawei M7 to the SDK, and the display screen The GUI shown in (f) in Fig. 3 is displayed.
  • the application of the device B will call the SDK to indicate to the retrieval service that the shared data has changed.
  • the SDK can be triggered to indicate to the retrieval service that the data of the photos in the photo album application has changed.
  • the retrieval service establishes a new shared data index in the data index storage area of the device B.
  • the device B updates the index information stored in the data index storage area of the device B according to the tag information of the newly added photo.
  • device B adds its corresponding metadata and thumbnail information to the data storage area of device B according to the newly added photos.
  • device B can send the updated data information to the communication protocol layer of device A through the communication protocol layer.
  • the remote device B data in the data storage area of the device A is updated by the retrieval service of the device A.
  • the retrieval service can also indicate its updated data to the SDK of the application layer, and the user interface of device A presents the updated data in device B to the user.
  • Fig. 9 shows a schematic diagram of distributed browsing, searching, and management of pictures and videos provided by an embodiment of the present application.
  • the internal memory of device A, device B, and device C store their respective original data of pictures and videos.
  • Device A, Device B, and Device C can respectively determine the metadata, data index, and thumbnail information in the service layer data storage area according to the original data stored in the internal memory.
  • the mobile phone can save the original data of the photo in the internal storage area.
  • the phone can also record the device name of the device that took the photo (for example, Huawei M7), the file name (for example, the suffix of the picture. JPG), and the absolute path of the file (for example, the physical Path), file size (for example, the size of the photo is 8Mb), the time when the file was added to the device (for example, at 10:00 am on February 14, 2019), file width (for example, 500 pixels), file height ( For example, 500 pixels) and file type (for example, picture) are saved in the data storage area.
  • the device name of the device that took the photo for example, Huawei M7
  • the file name for example, the suffix of the picture. JPG
  • the absolute path of the file for example, the physical Path
  • file size for example, the size of the photo is 8Mb
  • the time when the file was added to the device for example, at 10:00 am on February 14, 2019
  • file width for example, 500 pixels
  • file height For example, 500 pixels
  • the mobile phone can store the index of the photo in the data index storage area. For example, the mobile phone can automatically recognize the information on the photo, and classify the photo according to the information on the photo (or tag the photo accordingly).
  • the current device can construct an index (for example, using lucence) for various types of data (for example, time, location, and tag information) in the picture according to the index, so as to facilitate subsequent searches.
  • the mobile phone can store the thumbnail corresponding to the photo in the thumbnail database.
  • the data storage area and the thumbnail database in FIG. 9 may be located in the data storage area shown in FIG. 8; the data index storage area in FIG. 9 is the data index storage area in FIG. 9.
  • the data storage area, data index storage area, and thumbnail database shown in FIG. 9 can also be isolated according to the two dimensions ⁇ Group ID, App ID ⁇ , and the mobile phone can control corresponding access permissions.
  • Table 4 shows a data storage structure.
  • the music metadata may include the file name and size of the music; other business classifications and searches are used, such as the author, the album name, and the style of the music.
  • Figure 10 shows another set of GUIs of the mobile phone.
  • the GUI is the desktop 1001 of the mobile phone.
  • the mobile phone detects that the user has clicked the icon 1002 of the photo album application App on the desktop 1001, the photo album application can be started, and the GUI shown in (b) of FIG. 10 is displayed.
  • the GUI is the display interface of the photo album application.
  • the display interface can display 4278 photos and 134 videos currently stored in the mobile phone. Among them, there are 3177 photos obtained through the camera, 12 photos obtained through screenshot recording, 25 photos in the collection, and 3 photos in the shared album.
  • the mobile phone detects the user's operation of opening the photo album application, it will also automatically search for devices under the same account or other accounts associated with the account.
  • the GUI is another display interface of the photo album application.
  • the subtitles "Other Devices” and “Add Device” can be automatically displayed. Users can select “local” and “other devices” to browse.
  • the mobile phone detects that the user clicks on “other devices"
  • the mobile phone can display the device information of other devices under the user A's account and the information of other devices under the account associated with the user A's account.
  • the mobile phone detects that the user has clicked the "add device” control 1003
  • it can display the GUI as shown in (d) in FIG. 10.
  • the account associated with the user A account may be an account in the same family group as the user A account, or an account authorized by the user A account.
  • the GUI is a display interface for adding a data synchronization device.
  • the mobile phone detects that the user clicks "Add Device”
  • the mobile phone can pop up a reminder box 1004 on the screen, where the reminder box 1004 includes a text prompt "Please use the device to scan the QR code for data synchronization".
  • the user can scan the QR code with a device that has not logged in to the account (or log in to a device that is not related to user A's account) to complete the data synchronization between the mobile phone and the device that has not logged in to the account.
  • the display interface of the data synchronization device may also display some group information about social software, such as WeChat groups or address books. Users can also select the corresponding social software group to determine the device they want to add.
  • other devices and added devices may be devices that are very close to the current device, or devices that communicate over a long distance. For example, the user can send a screenshot of the QR code information to other devices far away from him. After receiving the screenshot of the picture, the other device can establish a network connection with the current device by scanning the QR code to share their data to On the current device.
  • the mobile phone after the mobile phone detects the operation of scanning the QR code of a device without an account (for example, Huawei Mate30), the mobile phone can display a total of 100 Huawei Mate30 in the "Add Device" picture.
  • the current device detects that another electronic device (for example, Huawei Mate 30) scans the QR code, so that the process of data synchronization between the current device and the other electronic device can be referred to the above description. For brevity, the details are not repeated here.
  • another electronic device for example, Huawei Mate 30
  • FIG. 11 shows a schematic flowchart of a data sharing method 1100 provided in an embodiment of the present application. As shown in FIG. 11, the method is executed by the first electronic device and the second electronic device, and the method includes:
  • the first electronic device stores one or more files.
  • the first application is an album application
  • the first file is a video or a picture.
  • the first electronic device may save the video or picture locally.
  • the first electronic device may store videos or pictures in an external memory card of the first electronic device.
  • the first file may be music.
  • the electronic device can obtain the piece of music from the server and save it locally.
  • the first electronic device may store music in the external memory card of the first electronic device.
  • the first electronic device generates metadata for each of the one or more files.
  • the first electronic device may generate 80 metadata for these 80 pictures, and each metadata may include the picture name, picture size, and picture size of the picture. Create events, create locations, and more.
  • the first electronic device may generate metadata corresponding to these 10 pieces of music, and each metadata may include the music name, music size, and author of the music. , Belonging to the album, etc. information.
  • the first electronic device may also establish an index of each file according to the generated metadata information.
  • the process of establishing the index of each picture can refer to the processes in Table 2 to Table 3 above. For the sake of brevity, details are not repeated here.
  • the first electronic device may also generate a thumbnail according to each picture in the next picture or pictures in the photo album application.
  • the metadata generated by the first electronic device may be stored in a storage area where the metadata is stored (in the local data of the data storage area of the device B in FIG. 8).
  • the data index established for the metadata can be stored in the data index storage area (in the local data index of the data index storage area of the device B in FIG. 8).
  • the second electronic device sends a broadcast message, where the broadcast message is used to search for electronic devices within a preset distance, and the broadcast message may include the device name and address information of the second electronic device.
  • the broadcast message is a Bluetooth low energy BLE broadcast message.
  • the second electronic device may periodically send a broadcast message, may also send a broadcast message when the second electronic device is idle, or may also send a broadcast message when it is detected that the user starts an application.
  • S1104 The first electronic device sends a response message to the second electronic device according to the address information, where the response message includes the device name of the first electronic device.
  • the second electronic device determines that the first electronic device is an electronic device within a preset distance, and the account logged in on the first electronic device is associated with the account logged in on the second electronic device.
  • the second electronic device may determine whether the distance between the first electronic device and the second electronic device is within a preset distance according to the signal strength or signal quality of the response message sent by the first electronic device.
  • the signal strength and signal quality involved in the embodiments of the present application may include one or more of the following parameters:
  • RSRP Reference signal receiving power
  • the second electronic device determines the distance between the second electronic device and the first electronic device according to the signal strength or signal quality, and it can also be determined in other ways. Not limited.
  • associating the account logged in on the first electronic device with the account logged in on the second electronic device includes: the account logged in on the first electronic device is the same as the account logged in on the second electronic device; or, the first electronic device The account logged in on the above and the account logged in on the second electronic device are in the same family group; or, the account logged in on the first electronic device is an account authorized by the account logged in on the second electronic device.
  • the second electronic device may save the device name information of other electronic devices under the account logged in on the second electronic device, then the second electronic device may determine whether the first electronic device is the first electronic device according to the device name in the response message Devices under the same account.
  • the second electronic device may also store the device names of devices under other accounts in the same family group as the account logged in on the second electronic device, and then the second electronic device may follow the device name in the response message The name determines whether the first electronic device is a device under the same account or a device under another account in the family group.
  • the first electronic device and the second electronic device are devices under the same account, or are devices under different accounts in the family group, then the first electronic device and the second electronic device can pass through the trust ring Trust each other directly.
  • S1106 The second electronic device sends a request message to the first electronic device, where the request message is used to request metadata of one or more files next to the first application.
  • the second electronic device may send a request message to the first electronic device after determining that it is within a preset distance of the first electronic device and is associated with its logged-in account and the second electronic device's logged-in account.
  • the second electronic device may also send a request message to the first electronic device when detecting that the user opens the first application.
  • the second electronic device may also send multiple request messages to the second electronic device, and each request message is used to request metadata under different applications.
  • the first electronic device sends the metadata of one or more files next to the first application to the second electronic device.
  • the second electronic device may store the metadata of one or more files sent by the first electronic device in the data storage area of the second electronic device (such as the local data in the data storage area of device A in FIG. 8 ).
  • the second electronic device may determine the first electronic device associated with the account logged in on the second electronic device within a preset distance, and the second electronic device may request the first electronic device for the metadata of the file under this application.
  • the data facilitates the user to quickly view the digital assets stored on the first electronic device through the second electronic device, which satisfies the user's request for unified management of the digital assets scattered on each device, thereby helping to improve the user experience.
  • the second electronic device may generate a corresponding metadata index based on the received metadata of one or more files sent by the first electronic device and save it in the data index storage area of the second electronic device (as shown in Fig. In the data index of remote device B in the data index storage area of device A in 8).
  • the second electronic device may establish an index of each file according to the metadata; and the second electronic device may also establish each file stored locally. Index of metadata for each file. This is convenient for the user to quickly find the file he wants to view when searching for the file he wants to view later, thereby helping to improve the user experience.
  • the first electronic device in addition to sending the metadata of the one or more pictures to the second electronic device, the first electronic device may also send one or more pictures to the second electronic device. Thumbnails of at least some of the pictures. For example, if 1000 pictures are saved in the first electronic device, then the first electronic device may also carry the thumbnails of 200 of the pictures in the response message.
  • the second electronic device may also request the first electronic device for thumbnails of one or more pictures in the photo album application in the first electronic device, so that it is convenient for the user to click on the folder, The second electronic device displays at least part of the thumbnails of one or more pictures to the user in time.
  • the mobile phone when the mobile phone detects the user's upward sliding operation, it can scroll and display thumbnails.
  • the mobile phone When the user is about to view the 200th thumbnail (for example, the 150th thumbnail is viewed), the mobile phone can be triggered to request more thumbnails from the Huawei M7 again, so as to ensure that the user will not view the thumbnails. There is a phenomenon of lag.
  • S1108 The second electronic device displays the folder, the device name of the second electronic device, and the number of files on the display screen.
  • the mobile phone may display a folder 304 on the interface, the device name is "Huawei M7" and the number of files is "80".
  • the mobile phone can receive 80 metadata from the Huawei M7 in the S1107, and the display of "80" on the interface of the mobile phone means that the mobile phone determines that there are 80 pictures stored on the Huawei M7.
  • the mobile phone can display (e) in FIG. 3 or display (f) in FIG. 3. If you directly display (f) in Figure 3, the phone can display multiple thumbnails on the interface. Since Huawei M7 in S1107 can also send multiple thumbnails to the phone, the interface of the phone can actually be directly viewed from Figure 3. If (d) jumps to (f) in Figure 3, the user will not get stuck.
  • the second electronic device may request the first electronic device for a picture with a preset screen resolution.
  • the mobile phone when the mobile phone detects that the user clicks on the thumbnail 311, the mobile phone can display the picture shown in (g) in Figure 3, which is actually not the original picture. Compared with the original picture, the picture with the preset screen resolution occupies a smaller storage space, which can make the browsing speed of the user faster.
  • the GUI shown in (g) in FIG. 3 may also include information such as the shooting time and location of the picture, so that it is convenient for the user to further understand the details of the picture.
  • the space occupied by the thumbnail is about 20KB
  • the space occupied by the picture with the preset screen resolution is about 200KB
  • the space occupied by the original image data is about 5MB-20MB.
  • the mobile phone when the mobile phone detects that the user clicks the save to local operation, the mobile phone can request the original data of the picture from the Huawei M7, and save the original data sent by the Huawei M7 locally.
  • the second electronic device when the user wants to save a photo on the first electronic device locally in the second electronic device, the second electronic device will request the first electronic device for the original data of the picture. In this way, the second electronic device does not need the second electronic device to store the original data of each photo saved on the first electronic device in the process of displaying the picture of the first electronic device to the user, allowing the user to quickly browse the digital assets on other devices. , It also saves more storage space for electronic devices.
  • metadata refers to file information including the file name and file size of the file; thumbnail refers to a picture that is reduced by a certain ratio, and the storage space occupied by the thumbnail is very small .
  • the pictures with the preset screen resolution and the original data of the pictures are all pictures, the storage space occupied by them is also different. The space occupied by the picture with the preset screen resolution is also smaller than the space occupied by the original data of the picture.
  • the second electronic device may use the keyword, the index of the local metadata, and the metadata received from the first electronic device.
  • the index of the data showing the search results.
  • the mobile phone when the mobile phone detects that the user enters the keyword "flower” in the search box, the mobile phone can use the index of the metadata stored locally and the index of the metadata sent by other devices.
  • the search results for the keyword "flower” are displayed.
  • the search results include pictures with shooting locations in “Huadu District” and “Yuhuatai District”, and pictures with user names “Sister Xiaohua” and "Huahua”.
  • the mobile phone when the mobile phone detects that the user enters the keyword "flower” in the search box, the mobile phone can use the index of the metadata stored locally and the index of the metadata sent by other devices. Display the search results for the keyword "flowers", where the search results include pictures about “flowers” taken in 2018, and the number of pictures about “flowers” on local and other devices.
  • S1109 The first electronic device detects that the file under the first application has changed.
  • S1110 The first electronic device sends the updated metadata of one or more files to the second electronic device.
  • the Huawei M7 can send updated metadata to the current mobile phone.
  • the Huawei M7 can send the metadata of the two newly added pictures to the current mobile phone, or it can also send the metadata of the two newly added pictures and the corresponding thumbnails.
  • the first electronic device can send the reduced metadata of all files to the second electronic device, and instruct the second electronic device to use the newly sent data from the first electronic device to overwrite the previous The data.
  • the first electronic device may also indicate which files are reduced, so that the second electronic device deletes the metadata of the corresponding file.
  • the first electronic device when the metadata in the shared file saved by the first electronic device changes, for example, the first electronic device detects that the user has added some files or reduced some files in the shared file, then the first electronic device The updated metadata can be sent to the second electronic device, so that the second electronic device can update the metadata of the shared file in the first electronic device in time, and show the user the change of the file saved on the first electronic device.
  • the disclosed system, device, and method can be implemented in other ways.
  • the device embodiments described above are merely illustrative, for example, the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined or It can be integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, 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 the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the technical solution of the present application essentially or the part that contributes to the existing technology or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage media include: 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 code .

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Library & Information Science (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

一种数据共享的方法、电子设备和系统,该方法包括:电子设备和另一电子设备建立网络连接,网络连接用于传输数据;电子设备在检测到用户查找目标文件的操作时,向另一电子设备请求与目标文件相关联的共享文件;电子设备接收另一电子设备发送的所述共享文件;电子设备显示第一界面,第一界面包括电子设备的共享文件的标识和另一电子设备的共享文件的标识。有助于用快速查看分布在各个设备上的数字资产,从而提升用户的体验。

Description

一种数据共享的方法、电子设备和系统
本申请要求于2020年3月26日提交中国专利局、申请号为202010225513.8、申请名称为“一种数据共享的方法、电子设备和系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及终端领域,并且更具体地,涉及一种数据共享的方法、电子设备和系统。
背景技术
用户拥有的智能设备越来越多,随之用户的数字资产(图片、视频、音频、文档等)也散落于这些分散的设备上,包含手机、平板、个人电脑(personal computer,PC)、智能电视、车机等。用户如果想要把这些设备上的数字资产进行统一的管理,目前缺少便捷且有效的手段。
目前用户在设备之间传输或共享图片、音视频、文档等文件时,可以将手机、Pad等设备上的图片、视频备份至PC,PC可以作为最终存储介质。但是这样需要用户定期进行操作,导致用户体验不好。
发明内容
本申请提供一种数据共享的方法、电子设备和系统,有助于用快速查看分布在各个设备上的数字资产,从而提升用户的体验。
第一方面,提供了一种系统,该系统包括第一电子设备和第二电子设备,该第一电子设备保存有第一应用程序的共享文件,其中,该第二电子设备,用于确定预设距离内的该第一电子设备,该第一电子设备上登录的账号和该第二电子设备上登录的账号相关联;该第二电子设备,还用于在检测到用户打开该第一应用程序的操作时,向该第一电子设备请求该共享文件中每个文件对应的元数据;该第一电子设备,还用于向该第二电子设备发送的该每一个文件的元数据;该第二电子设备,还用于根据接收到的元数据的个数确定该共享文件中的文件数量;该第二电子设备,还用于显示第一界面,该第一界面上包括该共享文件对应的文件夹、该第二电子设备的设备名称和该文件数量。
本申请实施例中,第二电子设备可以确定预设距离内和第二电子设备上登录的账号相关联的第一电子设备,第二电子设备可以向第一电子设备请求此应用下文件的元数据,方便用户通过第二电子设备快速查看第一电子设备上保存的数字资产的情况,满足了用户对于散落在各个设备上的数字资产统一管理的诉求,从而有助于提升用户的体验。
同时,第一电子设备向第二电子设备共享的其实并不是每个文件的原始数据,而是每个文件对应的元数据,那么在数据共享过程中也可以使得用户快速浏览其他设备上的数字资产情况,也更加节省电子设备的存储空间。
在一些可能的实现方式中,该每个文件的元数据包括每个文件的文件名、文件大小、创建时间等信息。
结合第一方面,在第一方面的某些实现方式中,该第一应用程序为相册应用,该第二电子设备,还用于向该第一电子设备请求该第一电子设备保存的一张或者多张图片的缩略图;该第二电子设备,还用于在该第一界面上检测到用户点击该文件夹的操作后,显示该一张或者多张图片的缩略图中的至少部分。
本申请实施例中,对于相册应用,第二电子设备还可以向第一电子设备请求第一电子设备中的相册应用中一张或者多张图片的缩略图,这样方便用户在点击文件夹后,第二电子设备及时向用户展示一张或者多张图片的缩略图中的至少部分。
在一些可能的实现方式中,第二电子设备也可以在检测到用户点击文件夹的操作后,向第一电子设备请求一张或者多张图片的缩略图。
在一些可能的实现方式中,第二电子设备在检测到用户点击文件夹的操作后,也可以显示该文件夹下的多个子文件夹,其中多个子文件夹中的每个子文件夹上显示一张缩略图,或者,每个子文件夹上的封面上显示该子文件夹中的一张缩略图。
结合第一方面,在第一方面的某些实现方式中,该第二电子设备,还用于在检测到用户点击第一缩略图的操作时,向该第一电子设备请求该第一缩略图对应的第一图片,该一张或者多张图片的缩略图包括该第一缩略图,该第一图片为预设屏幕分辨率的图片;该第一电子设备,还用于向该第二电子设备发送该第一图片;该第二电子设备,还用于显示第二界面,该第二界面上包括该第一图片。
本申请实施例中,当用户在第二电子设备上查看第一电子设备上保存的某一张图片的缩略图时,第二电子设备可以向第一电子设备请求预设屏幕分辨率的图片,而不是该缩略图对应的图片的原始数据,这样可以保证第二电子设备快速向用户显示该图片,从而有助于提升用户浏览的速度,也更加节省电子设备的存储空间。
结合第一方面,在第一方面的某些实现方式中,第二界面上还包括用于保存至本地的第一控件,该第二电子设备,还用于在检测到用户点击该第一控件的操作时,向该第一电子设备请求该第一缩略图对应的第二图片,该第二图片为该缩略图对应的图片的原始数据;该第一电子设备,还用于向该第二电子设备发送该第二图片;该第二电子设备,还用于将该第二图片保存在该第二电子设备中。
本申请实施例中,当用户希望将第一电子设备上的某张照片保存在第二电子设备本地时,第二电子设备才会向第一电子设备请求该图片的原始数据。这样第二电子设备在向用户展示第一电子设备图片的过程中并不需要第二电子设备存储第一电子设备上保存的每张照片的原始数据,使得用户快速浏览其他设备上的数字资产情况,也更加节省电子设备的存储空间。
结合第一方面,在第一方面的某些实现方式中,该第二电子设备,还用于在接收到该第一电子设备发送的该每一个文件的元数据后,根据该每一个文件的元数据,建立该每一个文件的元数据的索引;该第二电子设备,还用于在检测到用户在该第一应用程序的搜索框中输入的关键词后,根据该关键词和该元数据索引,显示搜索结果。
本申请实施例中,第二电子设备在获取到第一电子设备保存的每个文件的元数据后,可以根据元数据建立每个文件的索引,这样方便用户之后在搜索想到查看的文件时,快速 找到想要查看的文件。
一个实施例中,第二电子设备上也保存有第一应用程序下每个文件(例如,第二电子设备的相册应用中也包含了一张或者多张图片),那么第二电子设备可以对每个文件生成每个文件对应的元数据,并对每个文件的元数据建立索引。这样第二电子设备在检测到用户搜索文件时,可以基于关键词,第二电子设备上保存的每个文件的元数据的索引以及第一电子设备发送的每个文件的元数据索引,显示搜索结果。
结合第一方面,在第一方面的某些实现方式中,该第一电子设备,还用于在检测到该共享文件发生更新时,向该第二电子设备发送更新后的共享文件中每个文件的元数据;该第二电子设备,用于接收并更新该共享文件的元数据。
本申请实施例中,当第一电子设备保存的共享文件中元数据发生变化时,例如,第一电子设备检测到用户在共享文件中添加了部分文件或者减少了部分文件,那么第一电子设备可以向第二电子设备发送更新后的元数据,这样第二电子设备可以及时更新第一电子设备中共享文件的元数据,并向用户展示第一电子设备上保存的文件的变化情况。
在一些可能的实现方式中,第一电子设备在确定共享文件中的文件数量增加时,可以向第二电子设备发送增加的文件的元数据,也可以向第二电子设备发送共享文件中每一个文件的元数据。
结合第一方面,在第一方面的某些实现方式中,该第一电子设备上登录的账号和该第二电子设备上登录的账号相关联包括:该第一电子设备上登录的账号和该第二电子设备上登录的账号相同;或者,该第一电子设备上登录的账号和该第二电子设备上登录的账号位于同一家庭群组中;或者,该第一电子设备上登录的账号为该第二电子设备上登录的账号授权过的账号。
本申请实施例中,第一电子设备和第二电子设备之间进行数据共享时,可以是基于同一账号,也可以是基于不同账号的,这样可以使得扩大第二电子设备所能查看的电子设备的范围,方便用户对更多的电子设备的数字资产进行统一管理。
第二方面,提供了一种数据共享的方法,该方法应用于具有显示屏的电子设备,该方法包括:该电子设备确定预设距离内的另一电子设备,该另一电子设备上登录的账号和该电子设备上登录的账号相关联;该电子设备在检测到用户打开该第一应用程序的操作时,向该另一电子设备发送请求信息,该请求信息用于请求该另一电子设备中保存的该第一应用程序的共享文件中每个文件对应的元数据;该电子设备接收该另一电子设备发送的该共享文件中每个文件对应的元数据;该电子设备通过该显示屏显示第一界面,该第一界面上包括该共享文件对应的文件夹、该另一电子设备的设备名称和该文件数量,该文件数量由该电子设备根据接收到的元数据的个数确定。
结合第二方面,在第二方面的某些实现方式中,该第一应用程序为相册应用,该方法还包括:该电子设备在显示该第一界面之前,向该另一电子设备请求该另一电子设备保存的一张或者多张图片的缩略图;该电子设备在该第一界面上检测到用户点击该文件夹的操作后,显示该一张或者多张图片的缩略图中的至少部分。
结合第二方面,在第二方面的某些实现方式中,该方法还包括:该电子设备在检测到用户点击第一缩略图的操作时,向该另一电子设备请求该第一缩略图对应的第一图片,该一张或者多张图片的缩略图包括该第一缩略图,该第一图片预设屏幕分辨率的图片;该子 设备接收该另一电子设备发送该第一图片;该电子设备通过该显示屏显示第二界面,该第二界面上包括该第一图片。
结合第二方面,在第二方面的某些实现方式中,第二界面上还包括用于保存至本地的第一控件,该方法还包括:该电子设备在检测到用户点击该第一控件的操作时,向该另一电子设备请求该第一缩略图对应的第二图片,该第二图片为该缩略图对应的图片的原始数据;该电子设备接收并保存该另一电子设备发送该第二图片。
结合第二方面,在第二方面的某些实现方式中,该方法还包括:该电子设备在接收到该另一电子设备发送的该每一个文件的元数据后,根据该每一个文件的元数据,建立该每一个文件的元数据的索引;该电子设备在检测到用户在该第一应用程序的搜索框中输入的关键词后,根据该关键词和该元数据索引,显示搜索结果。
结合第二方面,在第二方面的某些实现方式中,该方法还包括:该电子设备接收并保存该另一电子设备更新后的共享文件中每个文件的元数据。
结合第二方面,在第二方面的某些实现方式中,该另一电子设备上登录的账号和该电子设备上登录的账号相关联包括:该电子设备上登录的账号和该另一电子设备上登录的账号相同;或者,该电子设备上登录的账号和该另一电子设备上登录的账号位于同一家庭群组中;或者,该电子设备上登录的账号为该另一电子设备上登录的账号授权过的账号。
第三方面,提供了一种系统,该系统包括第一电子设备和第二电子设备,其中,该第一电子设备,用于和该第二电子设备建立网络连接,该网络连接用于传输数据;该第一电子设备,还用于在检测到用户查找目标文件的操作时,向该第二电子设备请求与该目标文件相关联的共享文件;该第二电子设备,还用于向该第一电子设备发送该共享文件;该第一电子设备,还用于显示第一界面,第一界面包括第一电子设备的共享文件的标识和该第二电子设备的共享文件的标识。
本申请实施例中,第一电子设备和第二电子设备建立网络连接后,当用户希望通过第一电子设备查看散落在第二电子设备上的文件后,第一电子设备可以向第二电子设备请求共享文件,从而第一电子设备向用户显示共享文件的标识。这样其实可以方便用户在一台设备上查看其他设备上分布的数字资产的信息,满足了用户对散落在各个设备上的数字资产的信息的统一管理。
在一些可能的实现方式中,该第一电子设备的共享文件的标识可以为文件夹或者缩略图;该第二电子设备的共享文件的标识也可以为文件夹或者缩略图。
结合第三方面,在第三方面的某些实现方式中,该共享文件包括原始数据或者元数据,该元数据为该共享文件中每个文件的属性描述信息。
本申请实施例中,第二电子设备可以向第一电子设备发送共享文件的元数据信息,这样在数据共享过程中,可以使得用户快速浏览其他设备上的数字资产情况,也更加节省电子设备的存储空间。
结合第三方面,在第三方面的某些实现方式中,该第一界面还包括该第二电子设备的设备名称。
本申请实施例中,通过在显示界面上显示第二电子设备的设备名称,有助于用户快速找到自己希望查看的电子设备上的数字资产的情况。
结合第三方面,在第三方面的某些实现方式中,该第一电子设备和该第二电子设备建 立网络连接包括该第一电子设备通过近距离无线连接和该第二电子设备通信,或者,该第一电子设备通过远距离无线连接和该第二电子设备通信。
本申请实施例中,第一电子设备和第二电子设备可以通过近距离无线通信技术建立连接,也可以通过远距离无线通信技术建立连接,这样可以使得用户通过第一电子设备快速查看到近场或者远场的设备上的数字资产的情况,方便用户对散落在近场或者远场的设备上的数字资产进行统一管理。
结合第三方面,在第三方面的某些实现方式中,该共享文件为多媒体文件,该第一电子设备,还用于在向该第二电子设备请求该第二电子设备保存的一个或者多个多媒体文件的缩略图。
结合第三方面,在第三方面的某些实现方式中,该第一电子设备,还用于在检测到用户点击第一缩略图的操作时,向该第二电子设备请求该第一缩略图对应的第一多媒体文件,该一个或者多个多媒体文件的缩略图包括该第一缩略图,该第一多媒体文件为预设屏幕分辨率的多媒体文件;该第二电子设备,还用于向该第一电子设备发送该第一多媒体文件;该第一电子设备,还用于显示第二界面,该第二界面上包括该第一多媒体文件。
结合第三方面,在第三方面的某些实现方式中,第二界面上还包括用于保存至本地的第一控件,该第一电子设备,还用于在检测到用户点击该第一控件的操作时,向该第二电子设备请求该第一缩略图对应的第二多媒体文件,该第二多媒体文件为该缩略图对应的多媒体文件的原始数据;该第二电子设备,还用于向该第一电子设备发送该第二多媒体文件;该第一电子设备,还用于将该第二多媒体文件保存在该第二电子设备中。
结合第三方面,在第三方面的某些实现方式中,该共享文件包括元数据,该第一电子设备,还用于在接收到该第二电子设备发送的该每一个文件的元数据后,根据该每一个文件的元数据,建立该每一个文件的元数据的索引;该第一电子设备,还用于根据用户输入的关键词和该元数据索引,显示搜索结果。
结合第三方面,在第三方面的某些实现方式中,该第二电子设备,还用于在检测到该共享文件发生更新时,向该第一电子设备发送更新后的共享文件;该第一电子设备,用于接收该第二电子设备发送的更新后的该共享文件。
结合第三方面,在第三方面的某些实现方式中,该第一电子设备,还用于在和该第二电子设备建立网络连接之前,确定该第一电子设备上登录的账号和该第二电子设备上登录的账号相关联。
第四方面,提供了一种数据共享的方法,该方法应用于电子设备,该方法包括:该电子设备和另一电子设备建立网络连接,该网络连接用于传输数据;该电子设备在检测到用户查找目标文件的操作时,向该另一电子设备请求与该目标文件相关联的共享文件;该电子设备接收该另一电子设备发送的该共享文件;该电子设备显示第一界面,第一界面包括该电子设备的共享文件的标识和该另一电子设备的共享文件的标识。
结合第四方面,在第四方面的某些实现方式中,该共享文件包括原始数据或者元数据,该元数据为该共享文件中每个文件的属性描述信息。
结合第四方面,在第四方面的某些实现方式中,该第一界面还包括该另一电子设备的设备名称。
结合第四方面,在第四方面的某些实现方式中,该电子设备和该另一电子设备建立网 络连接包括该电子设备通过近距离无线连接和该另一电子设备通信,或者,该电子设备通过远距离无线连接和该另一电子设备通信。
结合第四方面,在第四方面的某些实现方式中,该共享文件为多媒体文件,该方法还包括:该电子设备向该另一电子设备请求该另一电子设备保存的一个或者多个多媒体文件的缩略图。
结合第四方面,在第四方面的某些实现方式中,该方法还包括:该电子设备在检测到用户点击第一缩略图的操作时,向该另一电子设备请求该第一缩略图对应的第一多媒体文件,该一个或者多个多媒体文件的缩略图包括该第一缩略图,该第一多媒体文件为预设屏幕分辨率的多媒体文件;该电子设备接收该另一电子设备发送的该第一多媒体文件;该电子设备显示第二界面,该第二界面上包括该第一多媒体文件。
结合第四方面,在第四方面的某些实现方式中,第二界面上还包括用于保存至本地的第一控件,该方法还包括:该电子设备在检测到用户点击该第一控件的操作时,向该另一电子设备请求该第一缩略图对应的第二多媒体文件,该第二多媒体文件为该缩略图对应的多媒体文件的原始数据;该电子设备接收该另一电子设备发送的该第二多媒体文件;该电子设备将该第二多媒体文件保存在该电子设备中。
结合第四方面,在第四方面的某些实现方式中,该共享文件包括元数据,该方法还包括:该电子设备在接收到该另一电子设备发送的该每一个文件的元数据后,根据该每一个文件的元数据,建立该每一个文件的元数据的索引;该电子设备根据用户输入的关键词和该元数据索引,显示搜索结果。
结合第四方面,在第四方面的某些实现方式中,该方法还包括:该电子设备接收该另一电子设备发送的更新后的该共享文件。
结合第四方面,在第四方面的某些实现方式中,该方法还包括:在和该另一电子设备建立网络连接之前,确定该电子设备上登录的账号和该另一电子设备上登录的账号相关联。
第五方面,提供了一种装置,该装置包含在电子设备中,该装置具有实现上述第二方面及上述第二方面、第四方面的可能实现方式中电子设备行为的功能。功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的模块或单元。
第六方面,提供了一种电子设备,包括:一个或多个处理器;存储器;以及一个或多个计算机程序。其中,一个或多个计算机程序被存储在存储器中,一个或多个计算机程序包括指令。当指令被电子设备执行时,使得电子设备执行上述第二方面、第四方面任一项可能的实现中的数据共享的方法。
第七方面,本技术方案提供了一种电子设备,包括一个或多个处理器和一个或多个存储器。该一个或多个存储器与一个或多个处理器耦合,一个或多个存储器用于存储计算机程序代码,计算机程序代码包括计算机指令,当一个或多个处理器执行计算机指令时,使得电子设备执行上述第二方面、第四方面任一项可能的实现中的数据共享的方法。
第八方面,本技术方案提供了一种计算机存储介质,包括计算机指令,当计算机指令在电子设备上运行时,使得电子设备执行上述第二方面、第四方面任一项可能的实现中的数据共享的方法。
第九方面,本技术方案提供了一种计算机程序产品,当计算机程序产品在电子设备上运行时,使得电子设备执行上述第二方面、第四方面任一项可能的设计中的数据共享的方法。
附图说明
图1是本申请实施例提供的电子设备的结构示意图。
图2是本申请实施例提供的电子设备的软件结构框图。
图3是本申请实施例提供的一组GUI。
图4是本申请实施例提供的另一组GUI。
图5是本申请实施例提供的另一组GUI。
图6是本申请实施例提供的另一组GUI。
图7是本申请实施例提供的电子设备的另一软件架构图。
图8是本申请实施提供的设备A和设备B之间数据共享的过程。
图9是本申请实施例提供的针对图片、视频分布式浏览、搜索和管理的示意图。
图10是本申请实施例提供的另一组GUI。
图11是本申请实施例提供的数据共享的方法的示意性流程图。
具体实施方式
以下实施例中所使用的术语只是为了描述特定实施例的目的,而并非旨在作为对本申请的限制。如在本申请的说明书和所附权利要求书中所使用的那样,单数表达形式“一个”、“一种”、“所述”、“上述”、“该”和“这一”旨在也包括例如“一个或多个”这种表达形式,除非其上下文中明确地有相反指示。还应当理解,在本申请以下各实施例中,“至少一个”、“一个或多个”是指一个、两个或两个以上。术语“和/或”,用于描述关联对象的关联关系,表示可以存在三种关系;例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A、B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。
以下介绍电子设备、用于这样的电子设备的用户界面、和使用这样的电子设备的实施例。在一些实施例中,电子设备可以是还包含其它功能诸如个人数字助理和/或音乐播放器功能的便携式电子设备,诸如手机、平板电脑、具备无线通讯功能的可穿戴电子设备(如智能手表)等。便携式电子设备的示例性实施例包括但不限于搭载
Figure PCTCN2021081024-appb-000001
Figure PCTCN2021081024-appb-000002
或者其它操作系统的便携式电子设备。上述便携式电子设备也可以是其它便携式电子设备,诸如膝上型计算机(Laptop)等。还应当理解的是,在其他一些实施例中,上述电子设备也可以不是便携式电子设备,而是台式计算机。
示例性的,图1示出了电子设备100的结构示意图。电子设备100可以包括处理器110、外部存储器接口120、内部存储器121、通用串行总线(universal serial bus,USB)接口130、充电管理模块140、电源管理模块141、电池142、天线1、天线2、移动通信模块150、无线通信模块160、音频模块170、扬声器170A、受话器170B、麦克风170C、耳机接口170D、传感器模块180、指南针190、马达191、指示器192、摄像头193、显示屏194以及用户标识模块(subscriber identification module,SIM)卡接口195等。
可以理解的是,本申请实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的部件,也可以集成在一个或多个处理器中。在一些实施例中,电子设备100也可以包括一个或多个处理器110。其中,控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。在其他一些实施例中,处理器110中还可以设置存储器,用于存储指令和数据。示例性地,处理器110中的存储器可以为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。这样就避免了重复存取,减少了处理器110的等待时间,因而提高了电子设备100处理数据或执行指令的效率。
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路间(inter-integrated circuit,I2C)接口、集成电路间音频(inter-integrated circuit sound,I2S)接口、脉冲编码调制(pulse code modulation,PCM)接口、通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口、移动产业处理器接口(mobile industry processor interface,MIPI)、用输入输出(general-purpose input/output,GPIO)接口、SIM卡接口和/或USB接口等。其中,USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口、Micro USB接口、USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。该USB接口130也可以用于连接耳机,通过耳机播放音频。
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。充电管理模块140用于从充电器接收充电输入。充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。电源管理模块141用于连接电池142,充电管理模块140与处理器110。
电子设备100的无线通信功能可以通过天线1、天线2、移动通信模块150、无线通信模块160、调制解调处理器以及基带处理器等实现。
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络)、蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS)、调频(frequency modulation,FM)、近距离无线通信技术(near field communication,NFC)、红外技术 (infrared,IR)等无线通信的解决方案。
显示屏194用于显示图像、视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD)、有机发光二极管(organic light-emitting diode,OLED)、有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED)、柔性发光二极管(flex light-emitting diode,FLED)、迷你发光二极管(mini light-emitting diode,miniled)、MicroLed、Micro-oLed、量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或多个显示屏194。
在本申请的一些实施例中,当显示面板采用OLED、AMOLED、FLED等材料时,上述图1中的显示屏194可以被弯折。这里,上述显示屏194可以被弯折是指显示屏可以在至少部分区域部位被弯折到任意角度,并可以在该角度保持,例如,显示屏194可以从中部左右对折。也可以从中部上下对折。
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。
摄像头193用于捕获静态图像或视频。外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。
外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器121可以用于存储一个或多个计算机程序,该一个或多个计算机程序包括指令。处理器110可以通过运行存储在内部存储器121的上述指令,从而使得电子设备100执行本申请一些实施例中所提供的数据共享的方法,以及各种应用以及数据处理等。
电子设备100可以通过音频模块170、扬声器170A、受话器170B、麦克风170C、耳机接口170D、以及应用处理器等实现音频功能。例如音乐播放、录音等。
传感器模块180可以包括压力传感器180A、陀螺仪传感器180B、气压传感器180C、磁传感器180D、加速度传感器180E、距离传感器180F、接近光传感器180G、指纹传感器180H、温度传感器180J、触摸传感器180K、环境光传感器180L、骨传导传感器180M等。
陀螺仪传感器180B可以用于确定电子设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备100围绕三个轴(即X、Y和Z轴)的角速度。加速度传感器180E可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。
磁传感器180D包括霍尔传感器。电子设备100可以利用磁传感器180D检测翻盖皮套的开合。
加速度传感器180E可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。
距离传感器180F,用于测量距离。
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。
环境光传感器180L用于感知环境光亮度。指纹传感器180H用于采集指纹。电子设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。
本申请实施例中,指纹传感器可以包括位于侧边屏幕下的屏下指纹传感器,屏下指纹传感器可以位于侧边屏幕的某个区域,当用户在通过侧边屏幕进行解锁时,可以在这个区域进行按压或者触摸;或者,用户在进行指纹解锁时,也可以在侧边屏幕上的任意一个区域进行按压或者触控,从而可以使得屏下指纹传感器检测到用户的指纹信息并对该指纹信息进行校验。
温度传感器180J用于检测温度。
触摸传感器180K,也称“触控面板”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。
图2是本申请实施例的电子设备100的软件结构框图。分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将设备A、设备B和设备C的软件架构分为四层,其中,设备A,设备B和设备C都包括了分布式应用层和服务层。设备A还包括鸿蒙(Harmony)操作系统核心层和Linux内核层;设备B还包括了Windows核心层和Windows内核层;设备C还包括了Android核心层和Linux内核层。
应用层可以包括相机,图库,文件管理,音乐,视频,联系人等分布式应用程序。
本申请实施例中的服务层可以包括设备知识库、设备认证管理以及设备数据存储区。其中,设备知识库中可以保存有本设备以及其他设备的设备名称、设备类型、设备状态信息、能力信息以及地址信息。设备状态信息用于指示设备在线或者离线;设备能力信息用于指示设备是否支持数据共享。
本申请实施例中,设备知识库保存的其他设备可以是和当前设备的账号相关联的设备;或者,也可以是和当前设备账号不相关联的设备,例如,当前设备和其他设备可以是位于同一社交软件的群组中的设备(例如,其他设备可以为通讯录中用户好友的设备,或者其他设备可以是和当前设备处于同一微信群组中的设备);或者,其他设备也可以是未登录任何账号的设备。
设备认证管理可以用于本设备对其他设备的认证过程。示例性的,本设备在收到其他设备发送的设备名称后,本设备可以根据其他设备的设备名称来确定本设备和其他设备是否属于同一账号下的设备。例如,用户账号A下包括设备A、设备B和设备C。那么设备A可以在接收到设备B发送的设备B的设备名称信息后,根据设备A保存的账号A下的多个设备的设备名称确定设备B为同一账号下的设备。
示例性的,本设备可以根据其他设备的设备名称来确定本设备和其他设备是否属于同一家庭群组下的设备。例如同一家庭群组下包括账号A和账号B,账号A下包括设备A、 设备B和设备C,账号B下包括设备D、设备E和设备F。那么设备A可以在接收到设备D发送的设备D的设备名称后,根据设备A上保存的账号B下的多个设备的设备名称确定设备B为同一家庭群组下的设备。
示例性的,本设备还可以对一些无未登录账号的设备进行认证。例如,设备A可以调用轻量计算平台接口生成二维码。设备G(未登录账号的设备)可以通过扫描设备A上的二维码,获取设备A的媒体接入控制(media access control,MAC)地址、网络互连协议(internet protocol,IP)地址、公钥信息、挑战值等等。设备G可以使用设备A的公钥信息对设备G的公钥进行加密并发送给设备A。设备A可以使用设备A的公钥对加密后的设备G的公钥进行解密,从而获得设备G的公钥。从而完成设备A和设备G之间的认证。设备A可以在对设备G认证通过后将设备G的设备名称、设备类型、设备状态信息、能力信息以及地址信息存储在设备知识库中。
本申请实施例中,同一账号下的设备或者同一家庭群组下的设备可以通过信任环直接信任。
设备数据存储区可以用于本设备存储其他设备的数据(例如,图片信息、视频信息、文档信息、音频信息等等),分布式应用层的SDK接口可以调用设备数据存储区的数据,通过用户界面向用户显示其他设备上的数据。
图3示出了手机的一组图形用户界面(graphical user interface,GUI)。
参见图3中的(a)所示,该GUI为手机的桌面301。当手机检测到用户点击桌面301上的相册应用(application,APP)的图标302的操作后,可以启动相册应用,显示如图3中的(b)所示的GUI。
参见图3中的(b)所示,该GUI为相册应用的显示界面。该显示界面可以显示当前手机中保存有4278张照片,134个视频。其中,通过相机获取的照片有3177张,通过截屏录屏获取的照片有12张,收藏中有25张照片,共享相册中有3张照片。同时,手机在检测到用户打开相册应用的操作时,也会自动寻找周围同一账号下的设备。例如,当前手机上登录的是用户A的账号。用户A的账号下可能还有其他设备(例如,其他手机,大屏设备,Pad,智能手表等等),此时手机会通过用户A的账号查找周围的其他设备。
本申请实施例中,同一账号下的多个设备可以通过信任环直接授权。当手机检测到用户打开相册应用的操作时,手机可以确定用户A的账号下哪些设备和手机的距离在预设距离内。对于在预设距离内且为用户A账号下的其他设备,手机可以向这些设备发起服务请求,该服务请求可以用于请求这些设备保存的数字资产(例如,照片、视频、文件等等)。从而在手机上显示这些设备的数字资产。
一个实施例中,在手机检测到用户点击图标302的操作之前,手机就可以寻找近场或者远场的设备。当手机检测到用户点击图标302的操作后,手机可以直接显示寻找到的其他设备。
参见图3中的(c)所示,该GUI为相册应用的另一显示界面。当手机查找到预设距离内用户A的账号下的其他设备,可以自动显示子标题“其他设备”。用户可以选择“本地”和“其他设备”进行浏览。当手机检测到用户点击“其他设备”控件的操作后,可以显示如图3中的(d)所示的GUI。
一个实施例中,手机可以在检测到用户打开相册应用之前就周期性地向周围设备发送 广播,广播消息用于查找预设距离内与手机上登录的账号想关联的账号下的其他电子设备。在手机检测到用户打开相册应用时,可以直接显示“本地”和“其他设备”,其中,“其他设备”为手机找到的满足条件的电子设备。
参见图3中的(d)所示,该GUI为相册应用的另一显示界面。该显示界面上可以显示手机获取到的预设距离内用户A的账号下的其他设备的信息,包括华为M7、荣耀智慧屏以及华为P30。手机可以获取到其他设备数字资产(例如,照片)的数量信息。如图3中的(d),华为M7中保存的照片数量为80张;荣耀智慧屏中保存的照片数量为120张;华为P30中保存的照片数量为120张。当手机检测到用户点击查看华为M7的相册文件夹的操作时,手机可以显示如图3中的(e)所示的GUI。
一个实施例中,图3中的(d)上可以显示其他设备的文件夹、设备名称以及文件数量;也可以只显示其中的部分信息;或者,也可以只显示文件夹的信息,或者其他标识信息。当用户点击其他设备的标识信息后,可以再显示设备名称、文件数量等信息。
参见图3中的(e)所示,该GUI为其他设备相册的显示界面。手机可以显示其他设备(华为M7)上保存的文件夹的信息,其中华为M7相册中包括文件夹305、文件夹306、文件夹307、文件夹308、文件夹309、文件夹310。文件夹305中的照片是通过华为M7的相机获取的,文件夹305中照片的数量为3177张;文件夹306中的照片是通过截屏录屏获取的,文件夹306中照片的数量为25张;文件夹307中的照片是通过数据分享(Huawei Share)获取的,文件夹307中照片数量为9张;文件夹308中的照片是通过社交应用(例如,QQ)获取的,文件夹308中照片数量为12张;文件夹309中的照片是通过社交应用(例如,微博)获取的,文件夹309中照片数量为12张;文件夹310中的照片是通过社交应用(例如,微信)获取的,文件夹310中照片数量为6张。当手机检测到用户点击文件夹305的操作后,可以显示如图3中的(f)所示的GUI。
参见图3中的(f)所示,该GUI为文件夹305的显示界面。用户可以通过向上滑动屏幕来查看文件夹305中保存的照片和视频。当手机检测到用户点击缩略图311的操作后,可以显示如图3中的(g)所示的GUI。
一个实施例中,当手机检测到用户点击查看华为M7的相册的操作时,手机可以直接显示如图3中的(f)所示的GUI。
参见图3中的(g)所示,该GUI为缩略图311对应的大图预览界面。其中,该大图预览界面上还可以显示照片的详细信息。例如,照片拍摄于2019年2月14日上午10:00,拍摄照片的电子设备为华为M7,且照片的拍摄地点为南京市雨花台区。该大图预览界面上还可以显示功能控件,例如分享功能,设备为功能,投屏功能,打印功能以及保存至本地功能。
当手机检测到用户点击缩略图311的操作后,手机可以向华为M7请求预设屏幕分辨率的图片信息。如图3中的(g)所示,该界面上显示的图片可以不是图片原始数据,而是预设屏幕分辨率的图片(例如,1080×1920像素值的图片)。
示例性的,用户可以通过分享功能将照片311分享给自己的好友;用户也可以通过设备为功能将照片311设置为桌面壁纸或者联系人头像等等;用户还可以通过投屏功能将照片311投屏到大屏设备浏览;用户还可以通过打印功能对照片311进行打印;用户还可以通过保存至本地功能将照片311保存至手机。
一个实施例中,当手机检测到用户点击分享、设置为、投屏、打印或者保存至本地功能时,手机可以通过提相框提示用户保存原始数据或者保存预设屏幕分辨率的图片。例如,当手机检测到用户点击保存原始数据时,手机可以向华为M7请求该图片原图的数据。又例如,当手机检测到用户点击保存预设屏幕分辨率的图片时,手机可以直接将预设屏幕分辨率的图片保存至本地。
本申请实施例,用户可以通过其账号下的某一个电子设备查看该账号下其他电子设备上的数字资产,满足了用户对散落在各个设备上的数字资产(例如,图片、视频、音频和文档)统一管理的诉求,减少了用户在查看各个设备上数字资产时的冗余操作,有助于提升用户的体验。
图3中的GUI介绍了用户通过手机查看其他设备上照片的过程。图4示出了本申请实施例提供的另一组GUI,介绍了用户通过手机查看其他设备上视频的过程。
参见图4中的(a)所示,该GUI为文件夹305的显示界面。用户可以通过向上滑动屏幕来查看文件夹305中保存的照片和视频。当手机检测到用户点击视频401的操作后,可以显示如图4中的(b)所示的GUI。
参见图4中的(b)所示,该GUI为视频401的大图预览界面。其中,该大图预览界面上还可以显示视频401的详细信息。例如,视频401拍摄于2019年3月20日上午11:30,拍摄视频401的电子设备为华为M7,且视频401的拍摄地点为南京市雨花台区。该大图预览界面上还可以显示功能控件,例如分享功能,投屏功能以及保存至本地功能。
例性的,用户可以通过分享功能将视频401分享给自己的好友;用户也可以通过投屏功能将视频401投屏到大屏设备浏览;用户还可以通过保存至本地功能将视频401保存至手机。
图5示出了本申请实施例提供的另一组GUI。
参见图5中的(a)所示,该GUI为相册应用的显示界面。当手机检测到用户点击搜索框501的操作后,可以显示如图5中的(b)所示的GUI。
参见图5中的(b)所示,该GUI为相册应用的搜索界面。当手机还没有检测到用户搜索的关键词时,手机可以自动向用户展示照片的分类信息。例如,手机可以将本机以及其他设备的照片按照时间、人像、地点以及标签进行分类。用户不用输入搜索的关键词就可以看到这些分类信息。
参见图5中的(c)所示,该GUI为相册应用的另一搜索界面。当手机在搜索框中检测到用户输入了关键词“花”后,手机可以对本机以及其他设备中有关“花”的照片进行分类。
示例性的,手机在本机以及其他设备中一共搜索到1385张关于“花”的照片。其中,手机可以搜索到本机以及其他设备中在南京市花都区拍摄的照片有8张;在南京市雨花台区拍摄的照片有8张;本机以及其他设备中联系人小花姐的照片有8张;本机以及其他设备中联系人花花的照片有8张等等。
参见图5中的(d)所示,该GUI为相册应用的另一搜索界面。当手机在搜索框中检测到用户输入了关键词“花朵”后,手机可以对本机以及其他设备中有关“花朵”的照片进行检索。其中,手机在本机以及其他设备上一共搜索到890张关于“花朵”的照片。手机在本机中搜索到755张关于“花朵”的照片;手机在其他设备中的华为M7上搜索到105张关 于“花朵”的照片,在其他设备中的荣耀智慧屏上搜索到130张关于“花朵”的照片。
以上图3至图5中其他设备是以和本机登录同一账号进行说明。本申请实施例中,本机还可以和非同一账号下的其他设备进行数据共享。图6示出了本申请实施例提供的另一组GUI。
如图6中的(a)所示,该GUI为相册应用的另一显示界面。当手机查找到预设距离内同一账号以及不同账号下的其他设备,可以自动显示子标题“其他设备”。用户可以选择“本地”和“其他设备”进行浏览。当手机检测到用户点击“其他设备”控件的操作后,可以显示如图6中的(b)所示的GUI。
如图6中的(b)所示,该GUI为相册应用的另一显示界面。该显示界面上可以显示手机获取到的预设距离内和本机处于同一账号下(图6中(b)所示“我的设备”)的其他设备的信息,包括华为M7、荣耀智慧屏以及华为P30;同时还可以显示和本机所登录账号处于同一家庭群组中的其他账号下(图6中(b)所示“其他人的设备”)的其他设备的信息,包括小米9、笔记本电脑(Macbook)以及平板电脑(MatePad Pro)。手机可以获取到其他设备数字资产(例如,照片)的数量信息。如图6中的(b),在“我的设备”中,华为M7中保存的照片数量为80张;荣耀智慧屏中保存的照片数量为120张;华为P30中保存的照片数量为120张。在“其他人的设备”中,小米9中保存的照片数量为250张;Macbook中保存的照片数量为220张;MatePad Pro中保存的照片数量为310张。当手机检测到用户点击查看MatePad Pro的相册的操作时,手机可以显示如图6中的(c)所示的GUI。
应理解,本申请实施例中,本机还可以和未登录账号的设备进行数据共享。例如,手机可以在开启相册后自动生成二维码,如果用户希望在本机上看到未登录账号的设备上的数据,那么用户可以打开二维码,通过未登录账号的设备进行扫描,在本机和未登录账号的设备认证通过后,本机和未登录账号的设备可以进行数据共享。
图7示出了本申请实施例提供的电子设备的另一软件架构图。下面结合图7介绍本申请实施例中本机和其他设备之间的认证流程、服务请求流程、服务数据同步流程以及设备检测流程。
认证流程
当电子设备检测到用户点击某个分布式应用,如相册、音乐播放器、文件管理或者联系人等等应用时,电子设备可以自动触发对周围设备的认证流程。
示例性的,电子设备检测到用户在电子设备的桌面点击某个分布式应用的图标后,电子设备打开该应用,显示该应用的界面。具体的,当电子设备检测到用户在电子设备的桌面点击某个应用的图标(例如,相册、音乐播放器、文件管理或者联系人)后,如果该应用分布式应用,那么分布式应用层的该应用程序会向服务层的设备监视器发送该应用对应的标号(例如,进程识别号(process identifier,PID))和该应用对应的进程名称,设备监视器可以通过该标号和进程名称确定是哪个App启动了。例如,电子设备通过确定该相册的进程识别号和进程名称确定相册应用启动了。设备监视器可以通过本机在线广播模块生成蓝牙低功耗(Bluetooth low energy,BLE)广播数据包,该广播数据包中可以携带本机的设备名称和地址(例如,MAC地址、IP地址等)。设备监视器可以通过通信协议层的蓝牙广播/扫描模块将该BLE广播数据包广播出去。电子设备还可以通过蓝牙广播/扫描 模块实时接收周围其他设备发送的BLE广播响应,BLE广播响应中可以携带其他设备的设备名称信息。设备监视器在接收到广播响应后,可以通过其他设备的名称信息确定其是否为同一账号下的设备,或者是否为同一家庭群组中其他账号下的设备。如果是同一账号下的其他设备,则本机可以和其他设备直接通过认证;或者如果是家庭群组中其他账号下的其他设备,则本机也可以和其他设备直接通过认证。分布式应用可以对设备知识库进行监听,当分布式应用发现设备知识库中增加了其他设备的信息后,可以通过显示界面显示相应的信息。
示例性的,如图3中的(c)所示,当手机确定周围有同一账号下的其他设备后,就可以通过显示界面自从显示出“其他设备”。
设备监视器还可以将其他设备的设备名称、设备类型、设备状态信息、能力信息以及地址信息等保存在设备知识库中。
本申请实施例中,若设备监视器确定广播响应中携带的设备名称不是同一账号下的其他设备,或者也不是同一家庭群组中其他账号下的设备,那么设备监视器还可以向应用层的分布式响应发送该设备名称的信息,并由分布式应用提示用户该设备不是同一账号下的其他设备,或者不是同一家庭群组中其他账号下的设备。分布式应用可以提示用户通过扫描二维码的方式对该设备进行认证。具体通过二维码认证的过程可以参考上述实施例中的描述,为了简洁,在此不再赘述。一个实施例中,用户也可以将二维码截屏发送给远场的设备,远场的设备通过扫描二维码和当前设备建立网络连接,从而可以远场的设备将数字资产的信息同步到当前设备。
一个实施例中,电子设备除了通过短距离通信发现周围的设备外,也可以通过远场通信技术发现其他设备。例如,电子设备可以通过服务器、蜂窝网络等远场通信技术和远场设备建立网络连接。
服务请求流程
在电子设备和其他设备认证通过后,分布式应用可以调用应用层的分布式服务请求生成相应的服务请求。
示例性的,电子设备检测到用户打开相册应用时,相册应用可以调用分布式服务请求生成缩略图请求。分布式服务请求可以将该缩略图请求发送给服务层的服务处理引擎(service process engine,SPE)。
本申请实施例中,SPE为逻辑处理单元,可以用于执行服务代理功能,对服务请求进行分析处理,为应用选择合适的设备/硬件/服务。SPE在接收到相应的服务请求后,可以会通过设备知识库为该服务请求选择合适的设备。示例性的,设备知识库中保存有设备A、设备B和设备C的信息。SPE可以先获取设备A、设备B和设备C的状态信息,如果SPE发现设备A处于离线状态,而设备B和设备C处于在线状态,那么SPE可以确定设备B和设备C为合适的设备。
SPE可以将该服务请求以及其他设备(设备B和设备C)的地址信息转发给数据总线(DataBus)。并由数据总线下发给通信协议层的通信层下行模块。通信层下行模块可以根据其他设备的地址信息将该服务请求转发给其他设备。
相应的,其他设备在接收到该服务请求后会对该服务请求进行解析并将请求发送给其他设备中的SPE。其他设备的SPE代理本地服务,并向电子设备返回服务响应以及相应的 数据。从而完成服务请求过程。
电子设备在获取到其他设备发送的响应和数据后,可以将数据保存在服务层的数据存储区,同时还可以向应用层的分布式应用发送相应的数据,从而用户可以通过显示界面看到其他设备上的数据。
示例性的,如图3中的(d)所示,当手机检测到用户点击“其他设备”时,可以触发上述服务请求流程,手机备可以向其他设备(华为M7,荣耀智慧屏以及华为P30)请求图片元数据。电子设备在接收到其他设备发送的元数据后,可以通过显示界面显示其他设备上相册中照片的数量。
示例性的,如图3中的(g)所示,当手机检测到用户点击照片311缩略图的操作后,可以触发上述服务请求流程,手机可以向华为M7请求预设屏幕分辨率的照片311的数据。
示例性的,如图3中的(g)所示,当手机检测到用户点击保存至本地的操作后,可以触发上述服务请求流程,手机可以向华为M7请求照片311的原始数据。
服务数据同步流程
在电子设备和其他设备相互共享数据之前,电子设备需要首先和其他设备建立数据传输的通道(DataBus PIPE)。其他设备在接收到电子设备发送的服务请求后,可以根据服务请求调用DataBus PIPE建立接口,从而建立数据传输的通道。在数据传输的通道建立好之后,其他设备可以将自己保存的数据共享给电子设备。
本申请实施例中,第一电子设备和第二电子设备之间的数据同步流程可以包括首次同步和增量同步,首次同步是指在第一电子设备和第二电子设备第一次建立数据传输的通道时触发的同步,第一电子设备将自己的数据同步到第二电子设备,或者,第二电子设备将自己的数据同步到第一电子设备;增量同步是指当第一电子设备和第二电子设备上的数据发生变化时触发的同步。例如,当第一电子设备上的数据发生变化(例如,第一电子设备上增加了一些照片或者视频),那么第一电子设备可以将自己的数据同步到第二电子设备上。
应理解,在第一电子设备和第二电子设备的网络连接未断开,或者设备间连接未断开时,第一电子设备和第二电子设备之间的数据传输的通道可以是一直存在的。当有数据需要同步时,可以直接通过数据传输通道进行数据同步。
设备检测
电子设备在认证过程中需要对周围其他设备发送的信息进行扫描,从而确定周围合适的设备。但是有些设备可能一段时间后就离线,所以这就需要电子设备对其他设备进行检测。
示例性的,电子设备可以周期性的发送BLE广播数据包,如果在电子设备在发送完BLE广播数据包后的预设时长内接收到其他设备的广播响应,则可以确定其他设备处于在线状态;相反,如果电子设备在预设时长内没有接收到广播响应,则可以确定其他设备已经离线。
一个实施例中,电子设备在初始扫描时没有发现设备B(设备B和电子设备为同一账号下的设备),后续在扫描的过程又发现了设备B。那么电子设备可以将设备B的信息保存在设备知识库中。同时,设备监视器还可以向分布式应用发送设备更新后的信息,从而通过电子设备的显示界面显示设备B的信息。
分布式应用可以监听设备知识库的信息。当设备知识库中的设备信息发生变化时,分布式应用会通过显示界面实时更新设备信息。同时,SPE在向DataBus发送服务请求时,也可以根据更新后的设备信息向DataBus发送更新后的设备的地址。
下面结合图8介绍本申请实施提供的设备A和设备B之间数据共享的过程。该过程包括:
101,当电子设备在分布式应用的显示界面上检测到用户的操作时,分布式应用通过调用业务的分布式服务的软件开发包(software development kit,SDK)发起服务请求。SDK会向服务层的SPE发送服务请求。具体服务请求的内容可以根据用户的操作而定。
例如,如图3中的(c),当电子设备检测到用户点击“其他设备”的操作后,SDK会向SPE发送图片元数据以及缩略图的服务请求。
又例如,如图3中的(f),当手机在显示屏上检测到用户向上滑动的操作后,手机可以向下展示更多的照片缩略图。手机之前向华为M7请求图片元数据以及缩略图时可能只请求到了200张照片缩略图。在手机向下滚动照片缩略图的过程中,当手机确定即将滚动到第200张照片缩略图时,SDK可以自动向华为M7再一次发起照片缩略图的服务请求。从而可以保证用户观看照片缩略图时的连续性。
又例如,如图3中的(f),当手机在显示屏上检测到用户点击照片311的操作后,手机可以向华为M7请求预设屏幕分辨率(例如,1080×1920像素值的图片)的照片311的数据。
又例如,如图3中的(g),当手机检测到用户点击保存至本地的操作后,手机可以向华为M7请求照片311的原始数据。
102,SPE将服务请求以及设备B的地址通过数据总线转发给通信协议层。
103,通信协议层根据设备B的地址向设备B发送服务请求。
104,设备B的通信协议层下接收到服务请求后,将该服务请求转发给设备B的SPE。
105,设备B的SPE将服务请求继续转发给检索服务。
106,检索服务在获取到服务请求后,可以对该服务请求进行解析,进而从设备B的数据索引存储区查找相应的数据索引。
示例性的,设备B的检索服务在确定该服务请求是用来请求图片元数据以及缩略图后,可以向数据索引存储区查找相应的设备B中保存的照片的索引。这里的照片索引可以是设备B对设备B中保存的照片进行分类后建立的索引。示例性的,设备B可以将设备B中保存的照片按照时间、任务、地点以及标签等等信息进行分类。设备B中保存的照片的索引也可以指每一张照片的分类信息。
107,检索服务根据服务请求,查找设备B中数据存储区的数据。
示例性的,设备B的检索服务在确定该服务请求是用来请求图片元数据以及缩略图后,可以向数据存储区查找设备B中保存的图片元数据以及缩略图的信息。设备B的数据存储区可以包括本地数据以及远端设备A的数据。设备B在查找时可以对本地数据进行查找,从而获取到相应的数据。
示例性的,表1示出了一种图片元数据。
表1
Figure PCTCN2021081024-appb-000003
Figure PCTCN2021081024-appb-000004
应理解,以上表1所述的图片元数据仅仅是示意性的,本申请实施例对此并不作任何限定。
还应理解,图片元数据可以是通过电子设备的存储器中保存的图片的原始数据得到的。内部存储器与图8中的数据存储区并不相同,内部存储器中保存的是图片的原始数据,原始数据的数据量是很大的;而数据存储区中保存的图片元数据以及缩略图通过图片的原始数据得到,元数据以及缩略图的数据量是很小的。
如图3中的(c),SDK会向SPE发送图片元数据以及缩略图的服务请求过程中,华为M7向手机同步的数据其实是图片元数据以及缩略图。
如图3中的(f),当手机在显示屏上检测到用户向上滑动的操作后,手机在即将展示完之前保存的缩略图时,可以再一次向华为M7请求更多的缩略图。
如图3中的(g),当手机检测到用户点击保存至本地的操作后,手机可以向华为M7请求照片311的原始数据。
本申请实施例中,在当前设备进行其他设备的数字资产访问和管理时,并不是直接将其他设备的原始数据拷贝到当前设备本地,这样有助于提升用户的浏览速度并且可以节省电子设备的存储空间。
108,设备B的检索服务向设备B的通信协议层转发对服务请求的响应以及查找到的数据。
109,设备B的通信协议层将设备A的通信协议层发送响应以及数据。
示例性的,以图片为例,设备B可以向设备A发送设备B保存的图片元数据以及缩略图。例如,如果设备B中保存了1000张图片,那么设备B可以向设备A发送这1000张图片的元数据信息以及200张图片的缩略图信息。
110,设备A的通信协议层将收到的响应以及数据发送给设备A的检索服务。
111,设备A的检索服务将接收到数据存储在设备A的数据存储区。
如图8所示,设备A的数据存储区包括设备A的本地数据以及远端设备B的数据。设备A在接收到设备B发送的数据后,可以将其存储在远端设备B数据中。
一个实施例中,设备A在接收到设备B发送的元数据后,可以根据元数据中的信息 对数据建立索引,并将设备B元数据的索引保存在设备A的数据索引存储区。
示例性的,以图片为例,设备B中保存有1000张图片,那么设备B可以向设备A发送的这1000张图片的元数据,元数据中包括了图片创建的时间、创建的地点以及图片的分类标签等等,元数据的结构可以如表2所示。
表2
Figure PCTCN2021081024-appb-000005
设备B在接收到上述1000个元数据后,可以根据上述1000个元数据中的内容建立这1000条元数据的索引,并将建立的索引保存在设备A中数据索引存储器中远端设备B中。
示例性的,设备A可以在设备A数据索引存储区中的远端设备B数据索引存储区建立这1000张图片的索引表,如表3所示。
表3
Figure PCTCN2021081024-appb-000006
Figure PCTCN2021081024-appb-000007
应理解,上述表2和表3所示的分类方式仅仅是示意性的,本申请实施例中还可以根据其他分类方式对接收到的元数据建立索引。例如,对于地点的分类可以还包括分类3,分类3中可以包括每个城市的区域信息,例如,南京市还可以进一步分为南京市花都区、南京市雨花台区等、西安市还可以进一步分为西安市碑林区、西安市雁塔区等。
本申请实施例中,当前设备可以接收到其他设备发送的元数据,并根据这些元数据中的信息建立相应的索引,这样方便用户在当前设备上搜索本地保存和另一设备上保存的数据时,快速地向用户展示搜索结果。
示例性的,如图5中的(c)所示,当用户在搜索框中输入关键词“花”后,手机可以显示根据关键词“花”得到的分类结果。在对“花”的搜索结果中包括根据地点进行分类得到的“花都区”和“雨花台区”,根据拍摄人物的名字进行分类得到的“小花姐”和“花花”。
示例性的,如图5中的(d)所示,当用户在搜索框中输入关键词“花朵”后,手机可以显示根据关键词“花朵”得到的分类结果。其中,手机可以显示在2018年拍摄的关于“花朵”的照片有8张(还可以显示2019年、2020年拍摄的关于“花朵”的照片,图中未示出),还可以显示本机找到的关于“花朵”的照片数量以及其他设备中找到的关于“花朵”的照片数据。
112,设备A的检索服务向应用层的SDK发送数据。并由设备A的用户界面呈现给用户。
示例性的,如图3中的(d)所示,检索服务可以向SDK发送华为M7、荣耀智慧屏以及华为P30中图片的数量信息。手机也可以通经过显示界面显示每台设备中的图片的数量。
本申请中,当前设备可以在数据存储区保存其他设备发送的元数据信息,例如,华为M7可以向手机发送华为M7保存的80张图片对应的80个元数据信息,那么检索服务可以对接收到的元数据的个数进行统计,元数据的个数统计结果也就是华为M7上保存的图片的个数。
示例性的,如图3中的(e)所示,当手机检测到用户点击文件夹305的操作后,检索服务可以向SDK发送华为M7中文件夹305中缩略图的信息,并由显示屏显示如图3中的(f)所示的GUI。
201,当设备B中保存的数据发生变化时,设备B的应用会调用SDK向检索服务指示共享数据发生变化。
例如,用户使用设备B又拍摄了多张照片后,可以触发SDK向检索服务指示相册应用中照片的数据发生变化。
202,检索服务在设备B数据索引存储区中建立新的共享数据索引。
示例性的,设备B根据新增加的照片的标签信息更新设备B数据索引存储区中保存的索引信息。
203,检索服务更新设备B数据存储区中的信息。
示例性的,设备B根据新增加的照片,在设备B数据存储区中增加其对应的元数据以及缩略图的信息。
此后,设备B可以通过通信协议层将更新后的数据信息发送给设备A的通信协议层。 并由设备A的检索服务对设备A数据存储区中的远端设备B数据进行更新。在更新完成后,检索服务还可以向应用层的SDK指示其更新后的数据,并由设备A的用户界面向用户呈现设备B中更新后的数据。
图9示出了本申请实施例提供的针对图片、视频分布式浏览、搜索和管理的示意图。
如图9所示,设备A、设备B和设备C的内部存储器中保存有各自的图片、视频的原始数据。设备A、设备B和设备C可以分别根据内部存储器中保存的原始数据确定服务层数据存储区中的元数据、数据索引以及缩略图的信息。
示例性的,用户使用手机在南京市花都区拍摄了一张照片后,该照片的原始数据大小为8Mb,那么手机可以将这张照片的原始数据保存在内部存储区中。同时,手机还可以将拍摄这张照片的设备的设备名称(例如,华为M7)、文件名(例如,图片的后缀.JPG)、文件的绝对路径(例如,该照片在内部存储区中的物理路径)、文件大小(例如,该照片的大小为8Mb)、文件添加到设备中的时间(例如,2019年2月14日上午10:00)、文件宽度(例如,500像素)、文件高度(例如,500像素)以及文件类型(例如,图片)保存在数据存储区中。手机可以将该照片的索引存储在数据索引存储区中,例如,手机可以自动识别照片上的信息,并根据照片上的信息对照片进行分类(或者,为照片打上相应的标签)。当照片的元数据从华为M7同步到当前设备时,当前设备可以根据该索引对图片中各类型数据(例如,时间、地点、标签信息)构建索引(如使用lucence),便于后续的搜索。手机可以将该照片对应的缩略图存储在缩略图数据库中。
应理解,图9中的数据存储区、缩略图数据库可以位于图8中所示的数据存储区;图9中的数据索引存储区为图9中的数据索引存储区。
一个实施例中,图9所示的数据存储区、数据索引存储区以及缩略图数据库还可以按照{Group ID、App ID}这两个维度进行隔离,并且手机可以控制相应的访问权限。
示例性的,表4示出了一种数据存储的结构。
表4
Figure PCTCN2021081024-appb-000008
示例性的,音乐元数据中可以包括音乐的文件名称、大小;其他业务分类和搜索使用的如音乐的作者、所属专辑名,风格等等。
图10示出了手机的另一组GUI。
参见图10中的(a)所示,该GUI为手机的桌面1001。当手机检测到用户点击桌面1001上的相册应用App的图标1002的操作后,可以启动相册应用,显示如图10中的(b)所示的GUI。
参见图10中的(b)所示,该GUI为相册应用的显示界面。该显示界面可以显示当前手机中保存有4278张照片,134个视频。其中,通过相机获取的照片有3177张,通过截屏录屏获取的照片有12张,收藏中有25张照片,共享相册中有3张照片。同时,手机在检测到用户打开相册应用的操作时,也会自动寻找周围同一账号或者与该账号相关联的其他账号下的设备。
参见图10中的(c)所示,该GUI为相册应用的另一显示界面。当手机查找到预设距离内用户A的账号下的其他设备或者与用户A的账号相关联的账号下的其他设备时,可以自动显示子标题“其他设备”以及“添加设备”。用户可以选择“本地”和“其他设备”进行浏览。其中,当手机检测到用户点击“其他设备”时,手机可以显示用户A的账号下的其他设备的设备信息以及与用户A账号相关联的账号下的其他设备的信息。当手机检测到用户点击“添加设备”控件1003的操作后,可以显示如图10中的(d)所示的GUI。
本申请实施例中,与用户A账号相关联的账号可以是和用户A的账号在同一家庭群组中的账号,或者被用户A的账号授权过的账号。
参见图10中的(d)所示,该GUI为添加数据同步设备的显示界面。当手机检测到用户点击“添加设备”时,手机可以在屏幕上弹出提醒框1004,其中,提醒框1004中包括文字提示“请使用设备扫描二维码,以进行数据同步”。用户可以使用一个未登陆账号的设备(或者,登陆与用户A的账号不相关的设备)扫描二维码,从而完成手机和该未登录账号的设备之间的数据同步。
一个实施例中,该添加数据同步设备的显示界面上除了显示二维码之外,还可以显示一些关于社交软件的群组信息,例如微信群组或者通讯录等等。用户也可以通过选择相应的社交软件群组来确定想要添加的设备。本申请实施例中,其他设备和添加设备可以是距离当前设备很近的设备,也可以是远距离通信的设备。例如,用户可以将二维码信息截屏发送给距离自己很远的其他设备,其他设备在接收到截屏后的图片后通过扫描此二维码和当前设备建立网络连接,从而将自己的数据共享到当前设备上。
参见图10中的(e)所示,手机在检测到未登陆账号的设备(例如,华为Mate30)扫描二维码的操作后,手机可以在“添加设备”中显示华为Mate30上一共有100张图片。
应理解,当前设备检测到另一电子设备(例如,华为Mate30)扫描二维码,从而进行当前设备和另一电子设备进行数据同步的过程可以参考上述描述,为了简洁,在此不再赘述。
图11示出了本申请实施例提供的数据共享的方法1100的示意性流程图。如图11所示,该方法由第一电子设备和第二电子设备执行,该方法包括:
S1101,第一电子设备保存有一个或者多个文件。
示例性的,若该第一应用程序为相册应用,则该第一文件为视频或者图片。当第一电子设备检测到用户使用相机拍摄了一段视频或者一张图片时,第一电子设备可以在本地保存该视频或者图片。例如,该第一电子设备可以将视频或者图片存储在第一电子设备的外部存储卡。
示例性的,若该第一应用程序为音乐应用,则该第一文件可以为音乐。当第一电子设备检测到用户下载某一首音乐时,电子设备可以从服务器获取这首音乐并保存在本地。例如,该第一电子设备可以将音乐存储在第一电子设备的外部存储卡。
S1102,第一电子设备对一个或者多个文件中的每一个文件生成元数据。
示例性的,第一电子设备中相册应用中有80张图片,那么第一电子设备可以针对这80张图片生成80个元数据,每个元数据中可以包括该图片的图片名称、图片大小、创建事件、创建地点等等信息。
示例性的,第一电子设备中音乐应用中有10首音乐,那么第一电子设备可以生成这10首音乐对应的元数据,每个元数据中可以包括该音乐的音乐名、音乐大小、作者、所属专辑等等信息。
可选地,第一电子设备还可以根据生成的元数据的信息建立每一个文件的索引。以相册应用为例,建立每张图片索引的过程可以参考上述表2至表3的过程,为了简洁,在此不再赘述。
可选地,若该文件为图片,那么第一电子设备还可以根据相册应用下一张或者多张图片中的每张图片生成缩略图。
应理解,本申请实施例中,第一电子设备生成的元数据可以存储在保存元数据的存储区(如图8中设备B的数据存储区的本地数据中)。对元数据建立的数据索引可以存储在数据索引存储区(如图8中设备B的数据索引存储区的本地数据索引中)。
S1103,第二电子设备发送广播消息,该广播消息用于查找预设距离内的电子设备,该广播消息中可以包括第二电子设备的设备名称以及地址信息。
示例性的,该广播消息为蓝牙低功耗BLE广播消息。
本申请实施例中,第二电子设备可以周期性的发送广播消息,也可以在第二电子设备空闲时发送广播消息,或者还可以是在检测到用户启动某个应用程序时发送广播消息。
S1104,第一电子设备根据该地址信息,向第二电子设备发送响应消息,该响应消息中包括该第一电子设备的设备名称。
S1105,第二电子设备根据该响应消息,确定第一电子设备为预设距离内的电子设备,且第一电子设备上登录的账号与第二电子设备上登录的账号相关联。
一个实施例中,第二电子设备可以根据第一电子设备发送的响应消息的信号强度或者信号质量来确定第一电子设备和第二电子设备之间的距离是否在预设距离内。
本申请实施例中涉及的信号强度和信号质量(下面以长期演进(long term evolution,LTE)系统为例进行说明)可以包括以下参数中的一种或者多种:
(1)参考信号接收功率(reference signal receiving power,RSRP);
(2)接收信号强度指示(received signal strength indicator,RSSI);
(3)参考信号接收质量(reference signal receiving quality,RSRQ);
(4)信号与干扰加噪比(signal to interference plus noise ratio,SINR)。
应理解,以上仅仅是以第二电子设备根据信号强度或者信号质量来确定第二电子设备和第一电子设备之间的距离,还可以是通过其他方式来确定,本申请实施例中对此并不作限定。
可选地,第一电子设备上登录的账号和第二电子设备上登录的账号相关联包括:第一 电子设备上登录的账号和第二电子设备上登录的账号相同;或者,第一电子设备上登录的账号和第二电子设备上登录的账号位于同一家庭群组中;或者,第一电子设备上登录的账号为第二电子设备上登录的账号授权过的账号。
示例性的,第二电子设备中可以保存有第二电子设备上登录的账号下其他电子设备的设备名称的信息,那么第二电子设备可以根据响应消息中的设备名称来判断第一电子设备是同一账号下的设备。
示例性的,第二电子设备中还可以保存有与第二电子设备上登录的账号位于同一家庭群组中的其他账号下的设备的设备名称,那么第二电子设备可以根据响应消息中的设备名称来判断第一电子设备是同一账号下的设备,或者是家庭群组中其他账号下的设备。
本申请实施例中,若第一电子设备和第二电子设备是同一账号下的设备,或者,是家庭群组中不同账号下的设备,那么第一电子设备和第二电子设备可以通过信任环直接相互信任。
S1106,第二电子设备向第一电子设备发送请求消息,该请求消息用于请求第一应用程序下一个或者多个文件的元数据。
一个实施例中,第二电子设备在确定在第一电子设备为预设距离内且和其登录的账号和第二电子设备登录的账号相关联后,就可以向第一电子设备发送请求消息。
一个实施例中,第二电子设备也可以在检测到用户打开第一应用程序时,向第一电子设备发送请求消息。
一个实施例中,第二电子设备还可以向第二电子设备发送多个请求消息,每个请求消息用于请求不同应用程序下的元数据。
S1107,第一电子设备向第二电子设备发送该第一应用程序下一个或者多个文件的元数据。
示例性的,第二电子设备可以将第一电子设备发送的一个或者多个文件的元数据存储在第二电子设备的数据存储区(如图8中的设备A的数据存储区的本地数据中)。
本申请实施例中,第二电子设备可以确定预设距离内和第二电子设备上登录的账号相关联的第一电子设备,第二电子设备可以向第一电子设备请求此应用下文件的元数据,方便用户通过第二电子设备快速查看第一电子设备上保存的数字资产的情况,满足了用户对于散落在各个设备上的数字资产统一管理的诉求,从而有助于提升用户的体验。
同时,第一电子设备向第二电子设备共享的其实并不是每个文件的原始数据,而是每个文件对应的元数据,那么在数据共享过程中也可以使得用户快速浏览其他设备上的数字资产情况,也更加节省电子设备的存储空间。
一个实施例中,第二电子设备可以根据接收到的第一电子设备发送的一个或者多个文件的元数据,生成相应的元数据索引并保存在第二电子设备的数据索引存储区(如图8中设备A的数据索引存储区的远端设备B数据索引中)。
本申请实施例中,第二电子设备在获取到第一电子设备保存的每个文件的元数据后,可以根据元数据建立每个文件的索引;并且第二电子设备也可以建立本地保存的每个文件的元数据的索引。这样方便用户之后在搜索想到查看的文件时,快速找到想要查看的文件,从而有助于提升用户体验。
可选地,若该第一应用程序为相册应用,那么第一电子设备除了向第二电子设备发送 该一张或者多张图片的元数据以外,还可以向第二电子设备发送一张或多张图片中至少部分图片的缩略图。例如,第一电子设备中保存了1000张图片,那么第一电子设备还可以在响应消息中携带其中的200张图片的缩略图。
本申请实施例中,对于相册应用,第二电子设备还可以向第一电子设备请求第一电子设备中的相册应用中一张或者多张图片的缩略图,这样方便用户在点击文件夹后,第二电子设备及时向用户展示一张或者多张图片的缩略图中的至少部分。
如图3中的(f),当手机检测到用户向上滑动的操作后,可以滚动显示缩略图。当用户即将查看到第200张缩略图(例如,查看到第150张缩略图)时,可以触发手机再一次向华为M7请求更多的缩略图,从而保证用户在查看缩略图的过程中不会有卡顿的现象。
S1108,第二电子设备通过显示屏显示文件夹,第二电子设备的设备名以及文件数量。
示例性的,如图3中的(d)所示,手机可以在界面上显示文件夹304,设备名称为“华为M7”以及文件数量“80”。
应理解,手机在S1107中可以从华为M7接收到80个元数据,那么手机在界面上显示“80”表示手机确定华为M7上保存有80张图片。
若手机检测到用户点击文件夹304的操作,那么手机可以显示如图3中的(e)或者显示如图3中的(f)。若直接显示如图3中的(f),那么手机可以在界面上显示多张缩略图,由于S1107中华为M7也可以向手机发送多张缩略图,那么手机的界面其实可以直接从图3中的(d)跳转至图3中的(f),用户不会有卡顿的现象。
可选地,当第二电子设备检测到用户点击某一张缩略图的操作后,第二电子设备可以向第一电子设备请求预设屏幕分辨率的图片。
如图3中的(f)所示,当手机检测到用户点击缩略图311的操作后,手机可以显示如图3中的(g)所示的图片,这张图片其实并不是原始的图片,相比于原始的图片,预设屏幕分辨率的图片的所占的存储空间更小,这样可以使得较快用户浏览的速度。图3中的(g)所示的GUI上还可以包括图片的拍摄时间、拍摄地点等信息,这样方便用户进一步了解图片的详细情况。
例如,缩略图所占的空间大概在20KB左右,预设屏幕分辨率的图片所占的空间大概在200KB左右,而图片原始数据所占空间大概在5MB-20MB。
如图3中的(f)所示,当手机检测到用户点击保存至本地的操作后,手机可以向华为M7请求图片的原始数据,并将华为M7发送的原始数据保存在本地。
本申请实施例中,当用户希望将第一电子设备上的某张照片保存在第二电子设备本地时,第二电子设备才会向第一电子设备请求该图片的原始数据。这样第二电子设备在向用户展示第一电子设备图片的过程中并不需要第二电子设备存储第一电子设备上保存的每张照片的原始数据,使得用户快速浏览其他设备上的数字资产情况,也更加节省电子设备的存储空间。
本申请实施例中,元数据是指包含了文件的文件名称、文件大小在内的文件信息;缩略图是指一张图片按照一定比例缩小后的图片,缩略图所占存储空间是非常小的。预设屏幕分辨率的图片以及图片的原始数据虽然都是图片,但是其所占的存储空间也是不同。预设屏幕分辨率的图片所占的空间也是小于图片的原始数据所占的空间。
可选地,当第二电子设备检测到用户在第一应用程序下的搜索框中输入关键词后,第 二电子设备可以根据关键词、本地元数据的索引以及从第一电子设备接收的元数据的索引,显示搜索结果。
示例性的,如图5中的(c),当手机在搜索框中检测到用户输入关键词“花”后,手机可以根据本地保存的元数据的索引以及其他设备发送的元数据的索引,显示对关键词“花”的搜索结果,其中搜索结果中包括拍摄地点位于“花都区”和“雨花台区”的图片,以及用户名为“小花姐”和“花花”的图片。
示例性的,如图5中的(d),当手机在搜索框中检测到用户输入关键词“花朵”后,手机可以根据本地保存的元数据的索引以及其他设备发送的元数据的索引,显示对关键词“花朵”的搜索结果,其中搜索结果中包括拍摄时间为2018年的关于“花朵”的图片,以及本地和其他设备上关于“花朵”的图片的数量。
S1109,第一电子设备检测到第一应用程序下的文件发生变化。
S1110,第一电子设备向第二电子设备发送更新后的一个或者多个文件的元数据。
示例性的,以图片为例,若华为M7上检测到用户使用相机拍摄了2张图片,则华为M7保存的图片的个数从80张增加至82张。那么华为M7可以向当前手机发送更新后的元数据。例如,华为M7可以向当前手机发送新增的2张图片的元数据,或者,也可以发送新增的两张图片的元数据以及对应的缩略图。
当第一电子设备上的文件减少时,那么第一电子设备可以向第二电子设备发送减少后所有文件的元数据,并指示第二电子设备使用所述第一电子设备新发送的数据覆盖之前的数据。或者,第一电子设备也可以指示哪些文件减少了,从而使得第二电子设备将相应文件的元数据删除。
本申请实施例中,当第一电子设备保存的共享文件中元数据发生变化时,例如,第一电子设备检测到用户在共享文件中添加了部分文件或者减少了部分文件,那么第一电子设备可以向第二电子设备发送更新后的元数据,这样第二电子设备可以及时更新第一电子设备中共享文件的元数据,并向用户展示第一电子设备上保存的文件的变化情况。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络 单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (30)

  1. 一种系统,其特征在于,所述系统包括第一电子设备和第二电子设备,其中,
    所述第一电子设备,用于和所述第二电子设备建立网络连接,所述网络连接用于传输数据;
    所述第一电子设备,还用于在检测到用户查找目标文件的操作时,向所述第二电子设备请求与所述目标文件相关联的共享文件;
    所述第二电子设备,还用于向所述第一电子设备发送所述共享文件;
    所述第一电子设备,还用于显示第一界面,第一界面包括第一电子设备的共享文件的标识和所述第二电子设备的共享文件的标识。
  2. 根据权利要求1所述的系统,其特征在于,所述共享文件包括原始数据或者元数据,所述元数据为所述共享文件中每个文件的属性描述信息。
  3. 根据权利要求1或2或所述的系统,其特征在于,所述第一界面还包括所述第二电子设备的设备名称。
  4. 根据权利要求1至3中任一项所述的系统,其特征在于,所述第一电子设备和所述第二电子设备建立网络连接包括所述第一电子设备通过近距离无线连接和所述第二电子设备通信,或者,所述第一电子设备通过远距离无线连接和所述第二电子设备通信。
  5. 根据权利要求1至4中任一项所述的系统,其特征在于,所述目标文件为多媒体文件,
    所述第一电子设备,还用于在向所述第二电子设备请求所述第二电子设备保存的一个或者多个多媒体文件的缩略图;
    所述第二电子设备,还用于向所述第一电子设备发送所述一个或者多个多媒体文件的缩略图。
  6. 根据权利要求5所述的系统,其特征在于,所述第一电子设备,还用于在检测到用户点击第一缩略图的操作时,向所述第二电子设备请求所述第一缩略图对应的第一多媒体文件,所述一个或者多个多媒体文件的缩略图包括所述第一缩略图,所述第一多媒体文件为预设屏幕分辨率的多媒体文件;
    所述第二电子设备,还用于向所述第一电子设备发送所述第一多媒体文件;
    所述第一电子设备,还用于显示第二界面,所述第二界面上包括所述第一多媒体文件。
  7. 根据权利要求6所述的系统,其特征在于,第二界面上还包括用于保存至本地的第一控件,
    所述第一电子设备,还用于在检测到用户点击所述第一控件的操作时,向所述第二电子设备请求所述第一缩略图对应的第二多媒体文件,所述第二多媒体文件为所述缩略图对应的多媒体文件的原始数据;
    所述第二电子设备,还用于向所述第一电子设备发送所述第二多媒体文件;
    所述第一电子设备,还用于将所述第二多媒体文件保存在所述第二电子设备中。
  8. 根据权利要求1至7中任一项所述的系统,其特征在于,所述共享文件包括元数据,
    所述第一电子设备,还用于在接收到所述第二电子设备发送的所述每一个文件的元数 据后,根据所述每一个文件的元数据,建立所述每一个文件的元数据的索引;
    所述第一电子设备,还用于根据用户输入的关键词和所述元数据索引,显示搜索结果。
  9. 根据权利要求1至8中任一项所述的系统,其特征在于,所述第二电子设备,还用于在检测到所述共享文件发生更新时,向所述第一电子设备发送更新后的共享文件;
    所述第一电子设备,用于接收所述第二电子设备发送的更新后的所述共享文件。
  10. 根据权利要求1至9中任一项所述的系统,其特征在于,所述第一电子设备,还用于在和所述第二电子设备建立网络连接之前,确定所述第一电子设备上登录的账号和所述第二电子设备上登录的账号相关联。
  11. 一种数据共享的方法,所述方法应用于电子设备,其特征在于,所述方法包括:
    所述电子设备和另一电子设备建立网络连接,所述网络连接用于传输数据;
    所述电子设备在检测到用户查找目标文件的操作时,向所述另一电子设备请求与所述目标文件相关联的共享文件;
    所述电子设备接收所述另一电子设备发送的所述共享文件;
    所述电子设备显示第一界面,第一界面包括所述电子设备的共享文件的标识和所述另一电子设备的共享文件的标识。
  12. 根据权利要求11所述的方法,其特征在于,所述共享文件包括原始数据或者元数据,所述元数据为所述共享文件中每个文件的属性描述信息。
  13. 根据权利要求11或12所述的方法,其特征在于,所述第一界面还包括所述另一电子设备的设备名称。
  14. 根据权利要求11至13中任一项所述的方法,其特征在于,所述电子设备和所述另一电子设备建立网络连接包括所述电子设备通过近距离无线连接和所述另一电子设备通信,或者,所述电子设备通过远距离无线连接和所述另一电子设备通信。
  15. 根据权利要求11至14中任一项所述的方法,其特征在于,所述目标文件为多媒体文件,所述方法还包括:
    所述电子设备向所述另一电子设备请求所述另一电子设备保存的一个或者多个多媒体文件的缩略图;
    所述电子设备接收所述另一电子设备发送的所述一个或者多个多媒体文件的缩略图。
  16. 根据权利要求15所述的方法,其特征在于,所述方法还包括:
    所述电子设备在检测到用户点击第一缩略图的操作时,向所述另一电子设备请求所述第一缩略图对应的第一多媒体文件,所述一个或者多个多媒体文件的缩略图包括所述第一缩略图,所述第一多媒体文件为预设屏幕分辨率的多媒体文件;
    所述电子设备接收所述另一电子设备发送的所述第一多媒体文件;
    所述电子设备显示第二界面,所述第二界面上包括所述第一多媒体文件。
  17. 根据权利要求16所述的方法,其特征在于,第二界面上还包括用于保存至本地的第一控件,所述方法还包括:
    所述电子设备在检测到用户点击所述第一控件的操作时,向所述另一电子设备请求所述第一缩略图对应的第二多媒体文件,所述第二多媒体文件为所述缩略图对应的多媒体文件的原始数据;
    所述电子设备接收所述另一电子设备发送的所述第二多媒体文件;
    所述电子设备将所述第二多媒体文件保存在所述电子设备中。
  18. 根据权利要求11至17中任一项所述的方法,其特征在于,所述共享文件包括元数据,所述方法还包括:
    所述电子设备在接收到所述另一电子设备发送的所述每一个文件的元数据后,根据所述每一个文件的元数据,建立所述每一个文件的元数据的索引;
    所述电子设备根据用户输入的关键词和所述元数据索引,显示搜索结果。
  19. 根据权利要求11至18中任一项所述的方法,其特征在于,所述方法还包括:
    所述电子设备接收所述另一电子设备发送的更新后的所述共享文件。
  20. 根据权利要求11至19中任一项所述的方法,其特征在于,所述方法还包括:
    在和所述另一电子设备建立网络连接之前,确定所述电子设备上登录的账号和所述另一电子设备上登录的账号相关联。
  21. 一种电子设备,其特征在于,包括:
    显示屏;
    一个或多个处理器;
    一个或多个存储器;
    所述一个或多个存储器存储有一个或多个计算机程序,所述一个或多个计算机程序包括指令,当所述指令被所述一个或多个处理器执行时,使得所述电子设备执行以下步骤:
    和另一电子设备建立网络连接,所述网络连接用于传输数据;
    在检测到用户查找目标文件的操作时,向所述另一电子设备请求与所述目标文件相关联的共享文件;
    接收所述另一电子设备发送的所述共享文件;
    显示第一界面,第一界面包括所述电子设备的共享文件的标识和所述另一电子设备的共享文件的标识。
  22. 根据权利要求21所述的电子设备,其特征在于,所述共享文件包括原始数据或者元数据,所述元数据为所述共享文件中每个文件的属性描述信息。
  23. 根据权利要求21或22所述的电子设备,其特征在于,所述第一界面还包括所述另一电子设备的设备名称。
  24. 根据权利要求21至23中任一项所述的电子设备,其特征在于,所述电子设备和所述另一电子设备建立网络连接包括所述电子设备通过近距离无线连接和所述另一电子设备通信,或者,所述电子设备通过远距离无线连接和所述另一电子设备通信。
  25. 根据权利要求21至24中任一项所述的电子设备,其特征在于,所述目标文件为多媒体文件,当所述指令被所述一个或多个处理器执行时,使得所述电子设备执行以下步骤:
    向所述另一电子设备请求所述另一电子设备保存的一个或者多个多媒体文件的缩略图;
    接收所述另一电子设备发送的所述一个或者多个多媒体文件的缩略图。
  26. 根据权利要求25所述的电子设备,其特征在于,当所述指令被所述一个或多个处理器执行时,使得所述电子设备执行以下步骤:
    在检测到用户点击第一缩略图的操作时,向所述另一电子设备请求所述第一缩略图对 应的第一多媒体文件,所述一个或者多个多媒体文件的缩略图包括所述第一缩略图,所述第一多媒体文件为预设屏幕分辨率的多媒体文件;
    接收所述另一电子设备发送的所述第一多媒体文件;
    显示第二界面,所述第二界面上包括所述第一多媒体文件。
  27. 根据权利要求26所述的电子设备,其特征在于,第二界面上还包括用于保存至本地的第一控件,当所述指令被所述一个或多个处理器执行时,使得所述电子设备执行以下步骤:
    在检测到用户点击所述第一控件的操作时,向所述另一电子设备请求所述第一缩略图对应的第二多媒体文件,所述第二多媒体文件为所述缩略图对应的多媒体文件的原始数据;
    接收所述另一电子设备发送的所述第二多媒体文件;
    将所述第二多媒体文件保存在所述电子设备中。
  28. 根据权利要求21至27中任一项所述的电子设备,其特征在于,所述共享文件包括元数据,当所述指令被所述一个或多个处理器执行时,使得所述电子设备执行以下步骤:
    在接收到所述另一电子设备发送的所述每一个文件的元数据后,根据所述每一个文件的元数据,建立所述每一个文件的元数据的索引;
    根据用户输入的关键词和所述元数据索引,显示搜索结果。
  29. 根据权利要求21至28中任一项所述的电子设备,其特征在于,当所述指令被所述一个或多个处理器执行时,使得所述电子设备执行以下步骤:
    接收所述另一电子设备发送的更新后的所述共享文件。
  30. 根据权利要求21至29中任一项所述的电子设备,其特征在于,所述指令被所述一个或多个处理器执行时,使得所述电子设备执行以下步骤:
    在和所述另一电子设备建立网络连接之前,确定所述电子设备上登录的账号和所述另一电子设备上登录的账号相关联。
PCT/CN2021/081024 2020-03-26 2021-03-16 一种数据共享的方法、电子设备和系统 WO2021190352A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
EP21776765.6A EP4102379A4 (en) 2020-03-26 2021-03-16 METHOD OF SHARING DATA, ELECTRONIC DEVICE AND SYSTEM
JP2022551363A JP2023518163A (ja) 2020-03-26 2021-03-16 データ共有方法、電子デバイスおよびシステム
US17/914,227 US20230122838A1 (en) 2020-03-26 2021-03-16 Data Sharing Method, Electronic Device, and System

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010225513.8 2020-03-26
CN202010225513.8A CN113449136A (zh) 2020-03-26 2020-03-26 一种数据共享的方法、电子设备和系统

Publications (1)

Publication Number Publication Date
WO2021190352A1 true WO2021190352A1 (zh) 2021-09-30

Family

ID=77807340

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/081024 WO2021190352A1 (zh) 2020-03-26 2021-03-16 一种数据共享的方法、电子设备和系统

Country Status (5)

Country Link
US (1) US20230122838A1 (zh)
EP (1) EP4102379A4 (zh)
JP (1) JP2023518163A (zh)
CN (2) CN114329020B (zh)
WO (1) WO2021190352A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113992652A (zh) * 2021-10-15 2022-01-28 珠海金山办公软件有限公司 跨终端文件同步方法及装置

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113691812B (zh) * 2021-10-25 2022-03-08 广州朗国电子科技股份有限公司 基于鸿蒙系统的分布式视频处理方法、终端和可读介质
CN114547100A (zh) * 2022-01-13 2022-05-27 Oppo广东移动通信有限公司 一种资源信息的共享方法、电子设备及计算机存储介质
CN116980431A (zh) * 2022-04-22 2023-10-31 华为技术有限公司 一种数据同步方法、介质、程序产品及电子设备
CN115208873A (zh) * 2022-06-14 2022-10-18 北京快乐茄信息技术有限公司 文件传输方法、装置及存储介质
CN117917630A (zh) * 2022-10-21 2024-04-23 华为技术有限公司 分布式数据管理方法、电子设备及系统
CN117714088A (zh) * 2023-05-11 2024-03-15 荣耀终端有限公司 数据上报的方法及电子设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103648180A (zh) * 2013-12-04 2014-03-19 北京奇虎科技有限公司 一种终端设备之间分享文件的方法及装置
CN105830475A (zh) * 2013-12-18 2016-08-03 苹果公司 附近的设备之间的基于手势的信息交换
CN107710197A (zh) * 2015-09-28 2018-02-16 谷歌有限责任公司 在通信网络上共享图像和图像相册
US20190354556A1 (en) * 2018-05-21 2019-11-21 Samsung Electronics Co., Ltd. Method for sharing content based on account group and electronic device for performing same

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140244618A1 (en) * 2013-02-26 2014-08-28 Dropbox, Inc. Search interface for an online content management system
WO2014163749A1 (en) * 2013-03-13 2014-10-09 Cambridgesoft Corporation Systems and methods for gesture-based sharing of data between separate electronic devices
US20150269177A1 (en) * 2014-03-24 2015-09-24 Ryan Louis Friedman Method and system for determining user interest in a file
KR102361400B1 (ko) * 2014-12-29 2022-02-10 삼성전자주식회사 사용자 단말장치, 서비스제공장치, 사용자 단말장치의 구동방법, 서비스제공장치의 구동방법 및 암호화 색인기반 검색 시스템
CN105847880A (zh) * 2016-03-29 2016-08-10 乐视控股(北京)有限公司 音视频共享方法、服务器及终端
US20180074775A1 (en) * 2016-06-06 2018-03-15 Quirklogic, Inc. Method and system for restoring an action between multiple devices
CN108781473B (zh) * 2016-12-12 2022-02-25 华为技术有限公司 一种在不同终端间共享文件的方法及设备
CN107301204A (zh) * 2017-05-27 2017-10-27 深圳市金立通信设备有限公司 一种分享文件的方法及终端
CN108563684A (zh) * 2018-03-12 2018-09-21 维沃移动通信有限公司 一种多媒体文件的分享方法及移动终端
WO2019183810A1 (zh) * 2018-03-27 2019-10-03 华为技术有限公司 在局域网内共享数据的方法及电子设备
CN109408476A (zh) * 2018-09-19 2019-03-01 腾讯科技(深圳)有限公司 一种文件共享管理方法、设备及存储介质
CN109388620A (zh) * 2018-09-30 2019-02-26 联想(北京)有限公司 一种跨设备访问数据的方法及第一电子设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103648180A (zh) * 2013-12-04 2014-03-19 北京奇虎科技有限公司 一种终端设备之间分享文件的方法及装置
CN105830475A (zh) * 2013-12-18 2016-08-03 苹果公司 附近的设备之间的基于手势的信息交换
CN107710197A (zh) * 2015-09-28 2018-02-16 谷歌有限责任公司 在通信网络上共享图像和图像相册
US20190354556A1 (en) * 2018-05-21 2019-11-21 Samsung Electronics Co., Ltd. Method for sharing content based on account group and electronic device for performing same

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4102379A4

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113992652A (zh) * 2021-10-15 2022-01-28 珠海金山办公软件有限公司 跨终端文件同步方法及装置
CN113992652B (zh) * 2021-10-15 2024-03-15 珠海金山办公软件有限公司 跨终端文件同步方法及装置

Also Published As

Publication number Publication date
EP4102379A1 (en) 2022-12-14
CN113449136A (zh) 2021-09-28
CN114329020A (zh) 2022-04-12
EP4102379A4 (en) 2023-04-05
CN114329020B (zh) 2024-06-11
US20230122838A1 (en) 2023-04-20
JP2023518163A (ja) 2023-04-28

Similar Documents

Publication Publication Date Title
WO2021190352A1 (zh) 一种数据共享的方法、电子设备和系统
CN113015263B (zh) 分享图像的方法及电子设备
CN111221845A (zh) 一种跨设备信息搜索方法及终端设备
US11895567B2 (en) Lending of local processing capability between connected terminals
JP2016502348A (ja) 携帯電子デバイスを用いた方法、携帯電子デバイス、およびコンピュータ・プログラム
KR102503329B1 (ko) 이미지 분류 방법 및 전자 디바이스
WO2022100222A1 (zh) 信息检索方法、装置、系统及存储介质
WO2020073808A1 (zh) 一种相册展示方法、电子设备及存储介质
CN114065706A (zh) 一种多设备数据协作的方法及电子设备
US20220215050A1 (en) Picture Search Method and Device
WO2020073317A1 (zh) 文件管理方法及电子设备
CN114567871A (zh) 文件共享的方法、装置、电子设备以及可读存储介质
WO2019165610A1 (zh) 终端通过图片搜索vr资源
WO2022222866A1 (zh) 一种内容显示方法与电子设备
WO2016070371A1 (zh) 移动终端和web终端之间互连及流传输和流媒体播放的方法
WO2021244614A1 (zh) 存储内容搜索方法、系统和电子设备
WO2023125832A1 (zh) 图片分享方法和电子设备
WO2022068578A1 (zh) 文件共享方法和电子设备
CN115515133A (zh) 一种分布式设备的认证方法及电子设备
TW201115369A (en) System and method for transmitting digital data

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: 21776765

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2022551363

Country of ref document: JP

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2021776765

Country of ref document: EP

Effective date: 20220907

NENP Non-entry into the national phase

Ref country code: DE