WO2020034075A1 - 一种照片共享方法及电子设备 - Google Patents

一种照片共享方法及电子设备 Download PDF

Info

Publication number
WO2020034075A1
WO2020034075A1 PCT/CN2018/100304 CN2018100304W WO2020034075A1 WO 2020034075 A1 WO2020034075 A1 WO 2020034075A1 CN 2018100304 W CN2018100304 W CN 2018100304W WO 2020034075 A1 WO2020034075 A1 WO 2020034075A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
photo
photo information
information
user
Prior art date
Application number
PCT/CN2018/100304
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 US17/268,415 priority Critical patent/US11470153B2/en
Priority to CN201880072582.0A priority patent/CN111316619B/zh
Priority to EP18929930.8A priority patent/EP3813334A4/en
Priority to PCT/CN2018/100304 priority patent/WO2020034075A1/zh
Publication of WO2020034075A1 publication Critical patent/WO2020034075A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • 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/178Techniques for file synchronisation in file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]
    • H04L51/046Interoperability with other network applications or services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications
    • H04L65/403Arrangements for multi-party communication, e.g. for conferences
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management
    • G06Q10/109Time management, e.g. calendars, reminders, meetings or time accounting
    • G06Q10/1093Calendar-based scheduling for persons or groups
    • G06Q10/1095Meeting or appointment
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/60Digital content management, e.g. content distribution
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Definitions

  • the present application relates to the field of terminal technology, and in particular, to a photo sharing method and an electronic device.
  • the current data sharing methods mainly include traditional data sharing schemes and centralized data sharing schemes.
  • the traditional data sharing scheme uses traditional privacy protection methods to achieve internal sharing, and at the same time, in order to reduce the risk of exposing private data, it refuses to open the sharing authority to the outside world;
  • the centralized data sharing scheme uses a third party as the center for data opening and sharing. The data owner trusts the third party and opens the data to the third party, and the data sharing process is implemented through the third party scheduling.
  • the shortcomings of the existing traditional data sharing schemes are to reduce the risk of privacy by refusing to open to the outside world. Not only cannot the potential value of data be maximized, but its benefits cannot be maximized, and the information construction can be delayed.
  • the problem of mutual distrust is solved, but because the data is concentrated in a third party, there is a security risk, that is, if the third party cannot guarantee the absolute data security, once the data leak occurs, it will cause serious consequences.
  • the present application provides a photo sharing method and electronic device, which are used to provide a safe and effective photo sharing method to fully tap the potential value of data and improve user experience.
  • an embodiment of the present application provides a photo sharing method, which is applicable to a first electronic device.
  • the method includes: when the first electronic device and the second electronic device do not initiate synchronization, the first electronic device detects A first operation of the user; in response to the first operation, the first electronic device adds first photo information to a first shared album of the first electronic device. Then, when the first electronic device initiates synchronization with the second electronic device, a first request message for adding the first photo information is sent to the second electronic device. In this way, when the first electronic device receives the first request response message for refusing to add the first photo information sent by the second electronic device, it deletes the first photo information in the first shared album.
  • This method can realize decentralized data sharing, and electronic devices can share photos in each other's shared albums.
  • the photo sharing method further includes: the first electronic device deletes the first photo information from the second electronic device.
  • the photo information of the fourth shared album is synchronized to the first electronic device.
  • the fourth shared album includes photo information of the first shared album, photo information of the second shared album of the second electronic device, and photo information of the third shared album of the third electronic device; the first shared album The photo information does not include the first photo information.
  • the first electronic device can synchronize the photo information in the fourth shared album to the local, so the photo information of other electronic devices can be shared, and the second electronic device can guarantee the area corresponding to the first shared album The orderly growth of the blockchain.
  • the first electronic device before the first operation of the user is detected, when the first electronic device does not initiate synchronization with the second electronic device, the first electronic device detects the second operation of the user; in response to the second Operation: adding second photo information to the first shared album, and when the first electronic device initiates synchronization with the second electronic device, the first electronic device sends a second request to the second electronic device to add the second photo information Message. Next, the first electronic device receives a second request response message sent by the second electronic device, where the second photo information is successfully added. In this way, the second photo information in the first sharing book of the first electronic device is successfully added.
  • the first electronic device detects the user's third operation; in response to the third operation, including the Add third photo information to the first shared album of the second photo information; when the first electronic device initiates synchronization with the second electronic device, the first electronic device sends the third photo information to the second electronic device A third request message, and the first electronic device receives a third request response message sent by the second electronic device that successfully added the third photo information. In this way, the third photo information in the first sharing book of the first electronic device is successfully added.
  • the first electronic device, the second electronic device, and the third electronic device are devices in a blockchain network; the second electronic device is equivalent to the blockchain network.
  • the central node, and the first electronic device and the third electronic device are equivalent to ordinary nodes of a blockchain network.
  • the photo information may be added to the shared album in the form of a record.
  • the first photo corresponding to the second photo information includes a first identifier, a hash value of the second photo, and content data of the second photo.
  • the second record corresponding to the three photo information includes a second identification, a hash value of the second photo, content data of the third photo, and a first identification. That is, the second record is associated with the first record.
  • the photo information in the shared album is essentially a blockchain. Because the blockchain has the characteristics of decentralization, highly transparent data, without relying on trust, and information traceability, the embodiments of the present application Compared with the existing data sharing methods, the generated shared album has significant advantages such as decentralization and information traceability.
  • the first electronic device when the first electronic device does not initiate synchronization with the second electronic device, the first electronic device detects a fourth operation of the user; in response to the fourth operation, the first electronic device converts the first shared phase The third photo information in the book is deleted.
  • the first electronic device sends a fourth request message to the second electronic device to delete the third photo information; the first electronic device receives the deletion successfully sent by the second electronic device.
  • a fourth request response message for photo information when the first electronic device does not initiate synchronization with the second electronic device, the first electronic device detects a fourth operation of the user; in response to the fourth operation, the first electronic device converts the first shared phase The third photo information in the book is deleted.
  • the first electronic device sends a fourth request message to the second electronic device to delete the third photo information; the first electronic device receives the deletion successfully sent by the second electronic device.
  • a fourth request response message for photo information when the first electronic device does not initiate synchronization with the second electronic device, the first electronic device detects a fourth operation of the user; in
  • the first electronic device can request the second electronic device to delete the photos in the shared album, so the second electronic device can ensure the orderly growth of the blockchain corresponding to the fourth shared album, which can effectively avoid Conflicting behavior of adding and deleting photos on various electronic devices.
  • an embodiment of the present application provides a photo sharing method, which is applied to a second electronic device.
  • the method includes: the second electronic device establishes a network connection with the first electronic device, and then the second electronic device receives the first A first request message sent by the electronic device to add the first photo information.
  • the second electronic device sends a first request response message to the first electronic device that refuses to add the first photo information.
  • This method can realize decentralized data sharing, electronic devices can share photos in each other's shared album, and the second electronic device can ensure the orderly growth of the blockchain corresponding to the shared album.
  • the specific execution steps of the second electronic device correspond to the first electronic device, so the specific content can be referred to the description above, which will not be repeated in this embodiment.
  • an embodiment of the present application provides a first electronic device, including a processor and a memory.
  • the memory is used to store one or more computer programs; when the one or more computer programs stored in the memory are executed by a processor, the first electronic device can implement any one of the possible design methods of the first aspect.
  • an embodiment of the present application further provides an apparatus, which includes a module / unit that executes the first aspect or a method of any possible design of the first aspect.
  • modules / units can be implemented by hardware, and can also be implemented by hardware executing corresponding software.
  • an embodiment of the present application further provides a computer-readable storage medium, where the computer-readable storage medium includes a computer program, and when the computer program runs on an electronic device, the electronic device executes the first aspect or Any one of the possible design methods of the first aspect.
  • an embodiment of the present application further provides a computer program product that, when the computer program product runs on a terminal, causes the electronic device to execute the first aspect or any one of the possible designs of the first aspect.
  • FIG. 1 is a schematic diagram of an interconnection scenario according to an embodiment of the present application.
  • FIG. 2 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • FIG. 3 is a software structural block diagram of an electronic device according to an embodiment of the present application.
  • 4a to 4f are schematic diagrams of a blockchain technology provided by an embodiment of the present application.
  • FIG. 5 is a schematic diagram of a group of interfaces according to an embodiment of the present application.
  • FIG. 6 is a schematic diagram of another group of interfaces according to an embodiment of the present application.
  • FIG. 7 is a schematic diagram of another group of interfaces according to an embodiment of the present application.
  • FIG. 8 is a schematic diagram of another group of interfaces according to an embodiment of the present application.
  • FIG. 9 is a schematic diagram of another group of interfaces according to an embodiment of the present application.
  • FIG. 10 is a schematic diagram of another group of interfaces according to an embodiment of the present application.
  • FIG. 11 is a schematic diagram of another group of interfaces according to an embodiment of the present application.
  • FIG. 12 is a schematic diagram of another group of interfaces according to an embodiment of the present application.
  • FIG. 13 is a schematic diagram of another group of interfaces according to an embodiment of the present application.
  • FIG. 14 is a schematic diagram of another group of interfaces according to an embodiment of the present application.
  • FIG. 15 is a schematic diagram of another group of interfaces according to an embodiment of the present application.
  • FIG. 16 is a schematic diagram of another group of interfaces according to an embodiment of the present application.
  • FIG. 17 is a schematic diagram of another group of interfaces according to an embodiment of the present application.
  • FIG. 18 is a schematic diagram of another group of interfaces according to an embodiment of the present application.
  • FIG. 19 is a schematic flowchart of a photo sharing method according to an embodiment of the present application.
  • 20 is a schematic diagram of another group of interfaces according to an embodiment of the present application.
  • FIG. 21 is a schematic diagram of another group of interfaces according to an embodiment of the present application.
  • FIG. 22 is a schematic flowchart of another photo sharing method according to an embodiment of the present application.
  • FIG. 23 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • FIG. 24 is a schematic structural diagram of another electronic device according to an embodiment of the present application.
  • 25 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • FIG. 26 is a schematic structural diagram of another electronic device according to an embodiment of the present application.
  • Blockchain It is a kind of chained data structure that combines blocks in a sequential manner in a chronological order, and is a non-tamperable and unforgeable decentralized database that is guaranteed by cryptography.
  • Block It is a collection of a lot of data. The block is marked with a time stamp and a unique mark of the previous block. Valid blocks will be added to the blockchain after they have been recognized by the entire network or by the central node.
  • Blockchain network It is an end-to-end (Peer-to-Peer, P2P) network, where nodes are directly connected to other nodes. Its topology is flat, and nodes can be equal.
  • Node refers to the computers in the blockchain network, including mobile phones, mining machines, desktops and servers, etc.
  • the nodes of the blockchain have the following characteristics: 1. Have a certain storage space; 2. Can connect to the network; The nodes with the above characteristics can run the corresponding programs of the blockchain in the storage space under the condition of connecting to the network, and through visual operation The terminal performs operations such as transactions.
  • Wireless fidelity (wifi) direct connection also known as wifi P2P, a point-to-point connection technology, electronic devices within a certain range are directly interconnected via wifi to share and exchange content with each other.
  • the data sharing method provided in the embodiment of the present application can be applied to a scenario in which multiple electronic devices 01 shown in FIG. 1 are interconnected based on a communication network.
  • the communication network may be a local area network or a wide area network transferred through a relay device.
  • the communication network may be a short distance communication network such as a wifi hotspot network, a wifi P2P network, a Bluetooth network, a zigbee network, or a near field communication (NFC) network.
  • the communication network may be a 3rd-generation wireless communication technology (3G) network, a 4th generation mobile communication technology (4G) ) Networks, 5th-generation mobile communication technology (5G) networks, public land mobile networks (PLMN) or the Internet that are evolving in the future.
  • 3G 3rd-generation wireless communication technology
  • 4G 4th generation mobile communication technology
  • 5G 5th-generation mobile communication technology
  • PLMN public land mobile networks
  • different electronic devices can exchange data through a communication network, such as interactive pictures, text, and videos, or results of interactive electronic devices processing objects such as pictures, text, or videos.
  • the electronic device 01 shown in FIG. 1 may be a portable electronic device that further includes other functions such as a personal digital assistant and / or a music player function, such as a mobile phone, a tablet computer, and a wireless communication function.
  • Wearable devices such as smart watches).
  • Exemplary embodiments of 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 having a touch-sensitive surface (eg, a touch panel), or the like.
  • the electronic device 01 may not be a portable electronic device, but a desktop computer with a touch-sensitive surface (such as a touch panel).
  • the electronic device 01 in the embodiment of the present application may be the electronic device 100.
  • the embodiment is specifically described below by taking the electronic device 100 as an example.
  • the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a USB interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, and a wireless communication module 160 , Audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone interface 170D, sensor module 180, button 190, motor 191, pointer 192, camera 193, display 194, and SIM card interface 195, etc.
  • a processor 110 an external memory interface 120, an internal memory 121, a USB interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, and a wireless communication module 160 , Audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone interface 170D, sensor module 180, button 190, motor 191, pointer 192, camera 193, display 194, and SIM card interface 195, etc
  • the sensor module 180 may include a pressure sensor 180A, a gyro 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 ambient light. Sensor 180L, bone conduction sensor 180M, etc.
  • the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100.
  • the electronic device 100 may include more or fewer parts than shown, or some parts may be combined, or some parts may be split, or different parts may be arranged.
  • 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, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU) Wait.
  • AP application processor
  • modem processor graphics processing unit
  • GPU graphics processing unit
  • image signal processor image, signal processor, ISP
  • controller memory
  • video codec digital signal processor
  • DSP digital signal processor
  • NPU neural network processing unit
  • different processing units may be independent devices or integrated in one or more processors.
  • the controller may be a nerve center and a command center of the electronic device 100.
  • the controller can generate operation control signals according to the instruction operation code and timing signals, and complete the control of fetching and executing instructions.
  • the processor 110 may further include a memory for storing instructions and data.
  • the memory in the processor 110 is a cache memory.
  • the memory may store instructions or data that the processor 110 has just used or used cyclically. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. Repeated accesses are avoided and the waiting time of the processor 110 is reduced, thereby improving the efficiency of the system.
  • the processor 110 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit (inter-integrated circuit, sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transceiver receiver / transmitter (UART) interface, mobile industry processor interface (MIPI), general-purpose input / output (GPIO) interface, subscriber identity module (SIM) interface, and / Or universal serial bus (universal serial bus, USB) interface.
  • I2C integrated circuit
  • I2S integrated circuit
  • PCM pulse code modulation
  • UART universal asynchronous transceiver receiver / transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input / output
  • SIM subscriber identity module
  • USB universal serial bus
  • the I2C interface is a two-way synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL).
  • the processor 110 may include multiple sets of I2C buses.
  • the processor 110 may be respectively coupled to a touch sensor 180K, a charger, a flash, a camera 193, and the like through different I2C bus interfaces.
  • the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 and the touch sensor 180K communicate through the I2C bus interface to implement the touch function of the electronic device 100.
  • the I2S interface can be used for audio communication.
  • the processor 110 may include multiple sets of I2S buses.
  • the processor 110 may be coupled with the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170.
  • the audio module 170 may transmit an audio signal to the wireless communication module 160 through an I2S interface to implement a function of receiving a call through a Bluetooth headset.
  • the PCM interface can also be used for audio communications, sampling, quantizing, and encoding analog signals.
  • the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface.
  • the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to implement the function of receiving calls through a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
  • the UART interface is a universal serial data bus for asynchronous communication.
  • the bus may be a two-way communication bus. It converts the data to be transferred between serial and parallel communications.
  • a UART interface is generally used to connect the processor 110 and the wireless communication module 160.
  • the processor 110 communicates with a Bluetooth module in the wireless communication module 160 through a UART interface to implement a Bluetooth function.
  • the audio module 170 may transmit audio signals to the wireless communication module 160 through a UART interface, so as to implement a function of playing music through a Bluetooth headset.
  • the MIPI interface can be used to connect the processor 110 with peripheral devices such as the display 194, the camera 193, and the like.
  • the MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), and the like.
  • CSI camera serial interface
  • DSI display serial interface
  • the processor 110 and the camera 193 communicate through a CSI interface to implement a shooting function of the electronic device 100.
  • the processor 110 and the display screen 194 communicate through a DSI interface to implement a display function of the electronic device 100.
  • the GPIO interface can be configured by software.
  • the GPIO interface can be configured as a control signal or as a data signal.
  • the GPIO interface may be used to connect the processor 110 with the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like.
  • GPIO interface can also be configured as I2C interface, I2S interface, UART interface, MIPI interface, etc.
  • the USB interface 130 is an interface that complies with the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like.
  • the USB interface 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 a peripheral device. It can also be used to connect headphones and play audio through headphones. This interface can also be used to connect other electronic devices, such as AR devices.
  • the interface connection relationship between the modules illustrated in the embodiments of the present invention is only a schematic description, and does not constitute a limitation on the structure of the electronic device 100.
  • the electronic device 100 may also adopt different interface connection modes or a combination of multiple interface connection modes in the above embodiments.
  • the charging management module 140 is configured to receive a charging input from a charger.
  • the charger may be a wireless charger or a wired charger.
  • the charging management module 140 may receive a charging input of a wired charger through a USB interface.
  • the charging management module 140 may receive a wireless charging input through a wireless charging coil of the electronic device 100. While the charge management module 140 is charging the battery 142, the power management module 141 can also provide power to the electronic device.
  • the power management module 141 is used to connect the battery 142, the charge management module 140 and the processor 110.
  • the power management module 141 receives inputs from the battery 142 and / or the charge management module 140, and supplies power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, and the wireless communication module 160.
  • the power management module 141 can also be used to monitor parameters such as battery capacity, number of battery cycles, battery health (leakage, impedance) and other parameters.
  • the power management module 141 may also be disposed in the processor 110.
  • the power management module 141 and the charge management module 140 may be provided in the same device.
  • the wireless communication function of the electronic device 100 may be implemented by the antenna module 1, the antenna module 2 mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
  • the antenna 1 and the antenna 2 are used for transmitting and receiving electromagnetic wave signals.
  • Each antenna in the electronic device 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, a cellular network antenna can be multiplexed into a wireless LAN diversity antenna. In other embodiments, the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 150 may provide a wireless communication solution including 2G / 3G / 4G / 5G and the like applied on the electronic device 100.
  • the mobile communication module 150 may include at least one filter, a switch, a power amplifier, a Low Noise Amplifier (LNA), and the like.
  • the mobile communication module 150 may receive the electromagnetic wave by the antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic wave, and transmit it to the modem processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic wave radiation through the antenna 1.
  • at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110.
  • at least part of the functional modules of the mobile communication module 150 may be provided in the same device as at least part of the modules of the processor 110.
  • the modem processor may include a modulator and a demodulator.
  • the modulator is configured to modulate a low-frequency baseband signal to be transmitted into a high-frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal.
  • the demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the low-frequency baseband signal is processed by the baseband processor and then passed to the application processor.
  • the application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays an image or video through the display screen 194.
  • the modem processor may be a separate device.
  • the modem processor may be independent of the processor 110 and disposed in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide wireless local area networks (WLAN), Bluetooth (Bluetooth, BT), global navigation satellite system (GNSS), frequency modulation (frequency modulation) FM), near field communication technology (NFC), infrared technology (infrared, IR) and other wireless communication solutions.
  • the wireless communication module 160 may be one or more devices that integrate at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency-modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110.
  • the wireless communication module 160 may also receive a signal to be transmitted from the processor 110, frequency-modulate it, amplify it, and convert it into electromagnetic wave radiation through the antenna 2.
  • the antenna 1 of the electronic device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include a global mobile communication system (GSM), a general packet radio service (GPRS), a code division multiple access (CDMA), and broadband. Code division multiple access (wideband code division multiple access, WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC , FM, and / or IR technology.
  • the GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a beidou navigation system (BDS), and a quasi-zenith satellite system (quasi -zenith satellite system (QZSS)) and / or satellite-based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • BDS beidou navigation system
  • QZSS quasi-zenith satellite system
  • SBAS satellite-based augmentation systems
  • the electronic device 100 implements a display function through a GPU, a display screen 194, and an application processor.
  • the GPU is a microprocessor for image processing and is connected to the display 194 and an application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • the processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
  • 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 LCD (liquid crystal display), OLED (organic light-emitting diode), active matrix organic light-emitting diode or active-matrix organic light-emitting diode (active-matrix organic light-emitting diode) emitting diodes (AMOLED), flexible light-emitting diodes (FLEDs), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diodes (QLEDs), etc.
  • the electronic device 100 may include one or N display screens, where N is a positive integer greater than 1.
  • the electronic device 100 may implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
  • the ISP processes the data fed back from the camera 193. For example, when taking a picture, the shutter is opened, and the light is transmitted to the light receiving element of the camera through the lens. The light signal is converted into an electrical signal, and the light receiving element of the camera passes the electrical signal to the ISP for processing and converts the image to the naked eye. ISP can also optimize the image's noise, brightness, and skin tone. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, an ISP may be provided in the camera 193.
  • the camera 193 is used to capture still images or videos.
  • An object generates an optical image through a lens and projects it onto a photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to convert it into a digital image signal.
  • the ISP outputs digital image signals to the DSP for processing.
  • DSP converts digital image signals into image signals in standard RGB, YUV and other formats.
  • the electronic device 100 may include one or N cameras, where N is a positive integer greater than 1.
  • a digital signal processor is used to process digital signals. In addition to digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform a Fourier transform on the frequency point energy and the like.
  • Video codecs are used to compress or decompress digital video.
  • the electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can play or record videos in multiple encoding formats, such as: MPEG1, MPEG2, MPEG3, MPEG4, and so on.
  • NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • the NPU can realize applications such as intelligent recognition of the electronic device 100, such as image recognition, face recognition, speech recognition, text understanding, and the like.
  • the external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to extend the storage capacity of the electronic device 100.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, save music, videos and other files on an external memory card.
  • the internal memory 121 may be used to store computer executable program code, where the executable program code includes instructions.
  • the processor 110 executes various functional applications and data processing of the electronic device 100 by executing instructions stored in the internal memory 121.
  • the memory 121 may include a storage program area and a storage data area.
  • the storage program area may store an operating system, at least one application required by a function (such as a sound playback function, an image playback function, etc.) and the like.
  • the storage data area may store data (such as audio data, phone book, etc.) created during the use of the electronic device 100.
  • the memory 121 may include a high-speed random access memory, and may further include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (UFS), and the like.
  • UFS universal flash memory
  • the electronic device 100 can implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone interface 170D, and an application processor. Such as music playback, recording, etc.
  • the audio module 170 is configured to convert digital audio information into an analog audio signal and output, and is also used to convert an analog audio input into a digital audio signal.
  • the audio module 170 may also be used to encode and decode audio signals.
  • the audio module 170 may be disposed in the processor 110, or some functional modules of the audio module 170 may be disposed in the processor 110.
  • the speaker 170A also called a "horn" is used to convert audio electrical signals into sound signals.
  • the electronic device 100 can listen to music through the speaker 170A, or listen to a hands-free call.
  • the receiver 170B also referred to as the "handset" is used to convert audio electrical signals into sound signals.
  • the electronic device 100 answers a call or a voice message, it can answer the voice by holding the receiver 170B close to the human ear.
  • the microphone 170C also called “microphone”, “microphone”, is used to convert sound signals into electrical signals.
  • the user can make a sound through the mouth near the microphone 170C, and input a sound signal into the microphone 170C.
  • the electronic device 100 may be provided with at least one microphone 170C.
  • the electronic device 100 may be provided with two microphones, in addition to collecting sound signals, it may also implement a noise reduction function.
  • the electronic device 100 may also be provided with three, four or more microphones to achieve sound signal collection, noise reduction, identification of sound sources, and directional recording.
  • the headset interface 170D is used to connect a wired headset.
  • the earphone interface can be a USB interface or a 3.5mm open mobile electronic platform (OMTP) standard interface, and the American Cellular Telecommunications Industry Association (of the United States, CTIA) standard interface.
  • OMTP open mobile electronic platform
  • CTIA American Cellular Telecommunications Industry Association
  • the pressure sensor 180A is used to sense a pressure signal, and can convert the pressure signal into an electrical signal.
  • the pressure sensor 180A may be disposed on the display screen 194.
  • the capacitive pressure sensor may be at least two parallel plates having a conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes.
  • the electronic device 100 determines the intensity of the pressure according to the change in capacitance.
  • the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A.
  • the electronic device 100 may also calculate the touched position based on the detection signal of the pressure sensor 180A.
  • touch operations acting on the same touch position but different touch operation intensities may correspond to different operation instructions. For example, when a touch operation with a touch operation intensity lower than the first pressure threshold is applied to the short message application icon, an instruction for viewing the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold is applied to the short message application icon, an instruction for creating a short message is executed.
  • the gyro sensor 180B may be used to determine a movement posture of the electronic device 100.
  • the angular velocity of the electronic device 100 around three axes ie, the x, y, and z axes
  • the gyro sensor 180B can be used for image stabilization.
  • the gyro sensor 180B detects the angle of the electronic device 100 shake, and calculates the distance that the lens module needs to compensate according to the angle, so that the lens cancels the shake of the electronic device 100 through the backward movement to achieve image stabilization.
  • the gyro sensor 180B can also be used for navigation and somatosensory game scenes.
  • the barometric pressure sensor 180C is used to measure air pressure.
  • the electronic device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C, and assists in positioning and navigation.
  • the magnetic sensor 180D includes a Hall sensor.
  • the electronic device 100 can detect the opening and closing of the flip leather case by using the magnetic sensor 180D.
  • the electronic device 100 may detect the opening and closing of the flip according to the magnetic sensor 180D. Further, according to the opened and closed state of the holster or the opened and closed state of the flip cover, characteristics such as automatic unlocking of the flip cover are set.
  • the acceleration sensor 180E can detect the magnitude of acceleration of the electronic device 100 in various directions (generally three axes).
  • the magnitude and direction of gravity can be detected when the electronic device 100 is stationary. It can also be used to recognize the posture of electronic devices, and is used in applications such as switching between horizontal and vertical screens, and pedometers.
  • the electronic device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 may use the distance sensor 180F to measure the distance to achieve fast focusing.
  • 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 electronic device 100 emits infrared light through a light emitting diode.
  • the electronic device 100 uses a photodiode to detect infrared reflected light from a nearby object. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficiently reflected light is detected, the electronic device 100 may determine that there is no object near the electronic device 100.
  • the electronic device 100 may use the proximity light sensor 180G to detect that the user is holding the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power.
  • the proximity light sensor 180G can also be used in holster mode, and the pocket mode automatically unlocks and locks the screen.
  • the ambient light sensor 180L is used to sense ambient light brightness.
  • the electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness.
  • Ambient light sensor 180L can also be used to automatically adjust white balance when taking pictures.
  • the ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touch.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the electronic device 100 may use the collected fingerprint characteristics to realize fingerprint unlocking, access application lock, fingerprint photographing, fingerprint answering an incoming call, and the like.
  • the temperature sensor 180J is used to detect the temperature.
  • the electronic device 100 executes a temperature processing strategy using the temperature detected by the temperature sensor 180J. For example, when the temperature reported by the temperature sensor 180J exceeds the threshold, the electronic device 100 performs a performance reduction of a processor located near the temperature sensor 180J so as to reduce power consumption and implement thermal protection.
  • the electronic device 100 when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid the abnormal shutdown of the electronic device 100 caused by the low temperature.
  • the electronic device 100 when the temperature is lower than another threshold, performs a boost on the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
  • the touch sensor 180K is also called “touch panel”. Can be set on display 194. Used to detect touch operations on or near it. The detected touch operation may be passed to the application processor to determine the type of touch event, and a corresponding visual output is provided through the display screen 194. In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100, which is different from the position where the display screen 194 is located.
  • the bone conduction sensor 180M can acquire vibration signals.
  • the bone conduction sensor 180M can acquire a vibration signal of a human voice oscillating bone mass.
  • Bone conduction sensor 180M can also contact the human pulse and receive blood pressure beating signals.
  • the bone conduction sensor 180M may also be provided in the headset.
  • the audio module 170 may analyze a voice signal based on the vibration signal of the oscillating bone mass of the vocal part obtained by the bone conduction sensor 180M to implement a voice function.
  • the application processor may analyze the heart rate information based on the blood pressure beating signal acquired by the bone conduction sensor 180M to implement a heart rate detection function.
  • the keys 190 include a power-on key, a volume key, and the like.
  • the keys can be mechanical keys. It can also be a touch button.
  • the electronic device 100 may receive a key input, and generate a key signal input related to user settings and function control of the electronic device 100.
  • the motor 191 may generate a vibration alert.
  • the motor 191 can be used for vibration alert for incoming calls, and can also be used for touch vibration feedback.
  • the touch operation applied to different applications can correspond to different vibration feedback effects.
  • Acting on touch operations in different areas of the display 194, the motor 191 can also correspond to different vibration feedback effects.
  • Different application scenarios (such as time reminders, receiving information, alarm clocks, games, etc.) can also correspond to different vibration feedback effects.
  • Touch vibration feedback effect can also support customization.
  • the indicator 192 can be an indicator light, which can be used to indicate the charging status, power change, and can also be used to indicate messages, missed calls, notifications, and so on.
  • the SIM card interface 195 is used to connect to a subscriber identity module (SIM).
  • SIM subscriber identity module
  • the SIM card can be contacted and separated from the electronic device 100 by inserting or removing the SIM card interface.
  • the electronic device 100 may support one or N SIM card interfaces, and N is a positive integer greater than 1.
  • SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card, etc. Multiple SIM cards can be inserted into the same SIM card interface at the same time. The types of the multiple cards may be the same or different.
  • the SIM card interface 195 may also be compatible with different types of SIM cards.
  • the SIM card interface 195 is also compatible with external memory cards.
  • the electronic device 100 interacts with the network through a SIM card to implement functions such as calling and data communication.
  • the electronic device 100 uses an eSIM, that is, an embedded SIM card.
  • the eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
  • the software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture.
  • the embodiment of the present invention takes the layered architecture Android system as an example, and exemplifies the software structure of the electronic device 100.
  • FIG. 3 is a software structural block diagram of an electronic device 100 according to an embodiment of the present invention.
  • the layered architecture divides the software into several layers, each of which has a clear role and division of labor.
  • the layers communicate with each other through a software interface.
  • the Android system is divided into four layers, which are an application layer, an application framework layer, an Android runtime and system libraries, and a kernel layer from top to bottom.
  • the application layer can include a series of application packages.
  • the application package can include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, SMS, etc.
  • the application framework layer provides an application programming interface (API) and a programming framework for applications at the application layer.
  • API application programming interface
  • the application framework layer includes some predefined functions.
  • the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.
  • the window manager is used to manage window programs.
  • the window manager can obtain the display size, determine whether there is a status bar, lock the screen, take a screenshot, etc.
  • Content providers are used to store and retrieve data and make it accessible to applications.
  • the data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, and so on.
  • the view system includes visual controls, such as controls that display text, controls that display pictures, and so on.
  • the view system can be used to build applications.
  • the display interface can consist of one or more views.
  • the display interface including the SMS notification icon may include a view that displays text and a view that displays pictures.
  • the phone manager is used to provide a communication function of the electronic device 100. For example, management of call status (including connection, hang up, etc.).
  • the resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and so on.
  • the notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages that can disappear automatically after a short stay without user interaction.
  • the notification manager is used to inform download completion, message reminders, etc.
  • the notification manager can also be a notification that appears in the status bar at the top of the system in the form of a chart or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window.
  • text messages are displayed in the status bar, sounds are emitted, electronic equipment vibrates, and the indicator light flashes.
  • Android Runtime includes core libraries and virtual machines. Android runtime is responsible for the scheduling and management of the Android system.
  • the core library contains two parts: one is the functional functions that the Java language needs to call, and the other is the Android core library.
  • the application layer and the application framework layer run in a virtual machine.
  • the virtual machine executes the java files of the application layer and the application framework layer as binary files.
  • Virtual machines are used to perform object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
  • the system library can include multiple functional modules. For example: surface manager (media manager), media library (Media library), three-dimensional graphics processing library (for example: OpenGL ES), 2D graphics engine (for example: SGL) and so on.
  • surface manager media manager
  • media library Media library
  • Three-dimensional graphics processing library for example: OpenGL ES
  • 2D graphics engine for example: SGL
  • the Surface Manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
  • the media library supports a variety of commonly used audio and video formats for playback and recording, as well as still image files.
  • the media library can support multiple audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
  • the 2D graphics engine is a graphics engine for 2D graphics.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer contains at least a display driver, a camera driver, an audio driver, and a sensor driver.
  • the following describes the workflow of the software and hardware of the electronic device 100 by way of example in conjunction with capturing a photographing scene.
  • a corresponding hardware interrupt is sent to the kernel layer.
  • the kernel layer processes touch operations into raw input events (including touch coordinates, time stamps of touch operations, and other information). Raw input events are stored at the kernel level.
  • the application framework layer obtains the original input event from the kernel layer and identifies the control corresponding to the input event. Taking the touch operation as a touch and click operation, and the control corresponding to the click operation is the control of the camera application icon as an example, the camera application calls the interface of the application framework layer to start the camera application, and then starts the camera driver by calling the kernel layer. The camera captures still images or videos.
  • the following embodiments can all be implemented in the electronic device 01 (for example, the electronic device 100, a tablet computer, etc.) having the above-mentioned hardware structure.
  • the following embodiments will use the electronic device 100 as a mobile terminal as an example to describe the data sharing method provided in the embodiments of the present application.
  • the embodiment of the present application provides a new blockchain technology.
  • the blockchain technology proposes the concepts of public blockchain and private blockchain.
  • the so-called public blockchain refers to all nodes in the blockchain network.
  • the corresponding blockchain the so-called private blockchain refers to the blockchain corresponding to each node.
  • the blockchain network composed of nodes in the new blockchain technology is shown in Figure 4a, where node 2 is the central node, and the central node is used to ensure that the blocks in the public blockchain can grow in an orderly manner.
  • nodes 1 and 3 are ordinary nodes, and nodes 1, 2, and 3 each have a private blockchain.
  • the private blockchain of node 1 includes subblocks 11 and 12
  • the private blockchain of node 2 includes subblocks 21, 22, and the private block of node 3.
  • the chain includes sub-blocks 31 and 32.
  • the public blockchain corresponding to the current blockchain network consisting of Node 1, Node 2 and Node 3 is shown in Figure 4c
  • the public block chain includes main block 01 and main block 02, where main block 01 includes sub-block 11, sub-block 21 and sub-block 31, and main block 02 includes sub-block 12, sub-region Block 22 and sub-block 32.
  • the existing blockchain technology also has a central node
  • the behavior of ordinary nodes to generate blocks also needs to be recognized by the central node.
  • the central node After the central node confirms that the behavior of generating blocks is legal, it will be in the public blockchain.
  • the legal block is sequentially increased, but the existing blockchain network only has a public blockchain, and the central node must always be online in order to perform real-time authentication of the block generation behavior of ordinary nodes. If the central node is offline, the public area Blockchains cannot grow sequentially. In this case, when the existing blockchain technology is applied to mobile terminals, defects will be exposed. Because the battery power of mobile terminals is limited, mobile terminals cannot be guaranteed to be always online, that is, they cannot always establish network connections with other nodes. .
  • node 1, node 2, and node 3 can grow subblocks on their own private blockchain at any time, regardless of whether they are connected to the network.
  • node 1 is offline in its own Sub-block 13 was added to the private block chain; when node 3 was offline, sub-block 33 and sub-block 34 were added to its own private block chain.
  • node 1 and node 3 access the network again, they will submit a request to node 2 to request node 2 to grow block 03 on the public blockchain.
  • This block 03 includes sub-block 13, sub-block 33, and sub-blocks. Block 34.
  • node 2 If node 2 verifies that sub-block 13, sub-block 33, and sub-block 34 are legal, node 2 will increase block 03 on the public blockchain.
  • This block 03 includes sub-block 13, sub-block 33, and sub-block. Block 34. Then, nodes 1 and 3 obtain the increased public blockchain from node 2.
  • the public blockchain is shown in Figure 4e.
  • the block 03 includes sub-block 13, sub-block 33, and sub-block 34. If node 2 authenticates Sub-blocks 13 and 33 are legal, but sub-block 34 is illegal. Node 2 sends a notification to node 3, which includes that sub-block 34 is illegal and cannot be added to the public blockchain. After receiving this notification, node 3 will choose to sequentially grow the next sub-block 35 after sub-block 33, that is, sub-block 34 is discarded. Node 2 grows block 03 on the public blockchain, and block 03 includes sub-block 13 and sub-block 33. Then, node 1 and node 3 obtain the increased public blockchain from node 2 as shown in Figure 4f.
  • the central node can authenticate the behavior of the growth block submitted by the ordinary node when accessing the network, and only in the public area will the central node pass the authentication. New blocks are added to the blockchain, so the central node can ensure the sequential growth of the public blockchain, effectively avoiding conflicting behaviors of growing blocks.
  • each node is provided with a private blockchain, and each node can submit growth sub-blocks on its own private blockchain in real time, online or offline. The behavior of adding sub-blocks is sent to the central node for authentication, so it can effectively solve the problem that the mobile terminal cannot add blocks without being online.
  • each node stores a public blockchain, which is equivalent to a distributed database. Even if a single node fails, the public blockchain can still be recovered from other nodes, so data security can be effectively guaranteed.
  • an embodiment of the present application provides a data sharing scheme, which can implement data sharing between multiple electronic devices.
  • a group including multiple electronic devices can be established, and each electronic device in the group can share data in other electronic devices.
  • the shared data may refer to information such as pictures, videos, transaction data, and health data in an electronic device.
  • the shared data scheme provided in the embodiments of the present application can both ensure data sharing in the group and ensure data security in the group.
  • the data sharing method provided in the embodiment of the present application will be described below by taking the shared data as a picture in an electronic device as an example.
  • the picture may be a picture taken by the electronic device, a picture stored in the electronic device, or a picture received by the electronic device from another device.
  • the electronic device 1 runs the application program of the family space in response to the user 1 clicking the icon 200 of the family space shown in FIG. 5 a.
  • the electronic device 1 detects an operation (for example, clicking) by the user 1 on the new button 201 of the family space interface in FIG. 5b, in response to the operation, the electronic device 1 displays two options as shown in FIG. 5b . These two options include creating spaces and inviting or joining.
  • 5c when the user 1 selects the creation space 202, the electronic device 1 displays an input box 203 for creating the space.
  • the user 1 enters the space name “family photo” a group shown in FIG. 5d is generated. Referring to FIG. 5d, the group of currently created family photos has no photos yet. User 1 can upload photos via the floating button +204.
  • the electronic device runs the family space application for the first time
  • the user is generally notified to perform account registration.
  • the operation shown in FIG. 5 can be continued.
  • user 1 can use Huawei account or other application accounts (such as WeChat account and Weibo account) to complete registration in the family space.
  • the electronic device 1 when the electronic device 1 detects an operation (for example, clicking) performed by the user 1 on the floating button +204 in FIG. 5d, in response to the operation, the electronic device 1 displays two controls shown in FIG. 6a , Ie camera and shoot.
  • FIG. 6b when the user selects the album 300, the electronic device 1 displays a list of pictures in the album.
  • the electronic device 1 When the user 1 selects the first picture 301 from the album list, the electronic device 1 generates a family photo group shown in FIG. 6c.
  • the background picture in FIG. 6c is a thumbnail of the first picture 301 selected by the user.
  • the tag information displays the current family photo. There are only 1 member and 1 photo, that is, only a thumbnail of the user 1 (the nickname of the user 1 is Xiaomei) and the first picture 301.
  • the group information can automatically generate QR code information of the group.
  • the electronic device 1 detects an operation (for example, clicking) performed by the user 1 on the group button 303 in FIG. 6 c, in response to the operation, the electronic device 1 displays the group information list information shown in FIG. 7 a, where Figure 7a includes a group member (ie, the electronic device name huaweiP20 of user 1), and the space name is "family photo", the nickname of user 1 in the space is Xiaomei, the QR code of the space, and the backup photo to the cloud Options, etc.
  • a group member ie, the electronic device name huaweiP20 of user 1
  • the space name is "family photo”
  • the nickname of user 1 in the space is Xiaomei
  • the QR code of the space and the backup photo to the cloud Options, etc.
  • the electronic device 1 displays the space two-dimensional code information interface shown in FIG. 7b.
  • the electronic device 2 used by user 2 can download the family space application, and then scan the two-dimensional code to choose to join by inviting or joining this option. Family Photos "group.
  • the electronic device 2 of the user 2 downloads and installs the family space application, it is detected that the user 2 acts on the option of inviting or joining 500 in FIG. 8 a (for example, clicking)
  • the electronic device 2 displays the interface shown in FIG. 8b, which includes two options: I want to join 501 and I want to invite 502.
  • FIG. 8c when the electronic device 2 detects an operation (for example, clicking) that the user 2 acts on the option I want to add 501 in FIG. 8b, in response to the operation, the electronic device 2 displays the interface shown in FIG. 8c.
  • Figure 8c Search Nearby 503 and Scan QR Code 504.
  • the electronic device 2 detects an operation (for example, clicking) on the option of scanning the QR code 504 by the user 2 in FIG. 8c, in response to the operation, the QR code scanning is started in FIG. 8c, and when the user 2 is aligned with FIG. 7b When scanning the QR code in, you can join the group of "family photos".
  • the electronic device 2 searches for nearby electronics For example, the electronic device 1 with the device name of huaweiP20 is displayed in FIG. 9a. After the user clicks the avatar, the user can add the family space created by the electronic device 1 with the device name of huaweiP20.
  • the manner in which the electronic device 2 searches for nearby electronic devices may be, but is not limited to, short-distance network connection methods such as Bluetooth, wifi hotspot, wifi direct connection, or NFC.
  • the user 2 can enter the setting menu to open the network type of wifi hotspot, and search for nearby electronic devices through the wifi hotspot.
  • user 2 can also choose to open the wifi hotspot network type through the shortcut function control in the notification bar.
  • the electronic device 1 detects that the user 1 acts on the option of invitation or join 600 in FIG. 10a (for example, click ), In response to this operation, the electronic device 1 displays the interface shown in FIG. 10b, which includes two options: I want to join 601 and I want to invite 602.
  • FIG. 10c when the electronic device 1 detects that the user 1 acts on the operation I want to invite 602 in FIG. 10b (for example, click), in response to the operation, the electronic device 1 displays the interface shown in FIG. 6c.
  • the interface displays two options of searching nearby 603 and spatial QR code 604.
  • Method 1 When the electronic device 1 detects an operation (for example, clicking) performed by the user 1 on the option of the space two-dimensional code 604 in FIG. 10c, in response to the operation, a two-dimensional code of the space of "family photo" is displayed. .
  • Method 2 When the electronic device 1 detects an operation (for example, clicking) performed by the user 1 on the option of searching for nearby 603 in FIG. 10c, the response is s, and the electronic device 1 searches for the electronic device 2 whose device name is huaweiP10. As shown in FIG. 10d, when the electronic device 1 detects an operation (for example, clicking) performed by the user 1 on the avatar in FIG. 10d, in response to the operation, the electronic device 1 displays the interface shown in FIG.
  • the third scenario after user 2 joins the "family photo” group, for example, referring to FIG. 11, when the electronic device 2 detects that the user 2 acts on the album option in FIG. 11 a (for example, click ), In response to the operation, the electronic device 2 displays pictures in the application of a photo album, as shown in FIG. 11b. After the user selects the second picture 702, the third picture 703, and the fourth picture 704 in FIG. 11b, in response to the user 2's operation (for example, clicking) on the upload option in FIG. 11b, the electronic device 2 generates a second picture 702 , A third picture 703, a fourth picture 704, a hash value and a thumbnail, and then upload the hash value and the thumbnail to a space of "family photos".
  • the electronic device 2 displays thumbnails of the second picture 702, the third picture 703, and the fourth picture 704 uploaded by the user.
  • the information uploaded by the electronic device 2 needs to be authenticated by the creator of the space “family photo” (ie, the electronic device 1).
  • the electronic device 1 is equivalent to a central node. After the electronic device 1 is online and the information uploaded by the electronic device 2 is authenticated, the information uploaded by the electronic device 2 can be truly uploaded to the "family photo" space.
  • the electronic device 2 after the electronic device 2 uploads the second picture 702, the third picture 703, and the fourth picture 704, the second picture 702, the third picture 703, A first logo is added to the thumbnail of the fourth picture 704, and the picture marked on the first logo currently belongs to a state to be authenticated, that is, the second picture 702, the third picture 703, and the fourth picture 704 have not been authenticated by the electronic device 1. If the electronic device 1 receives the request from the electronic device 2 to upload information about the hash value and the thumbnail of the second picture 702, the third picture 703, and the fourth picture 704 after receiving the request from the electronic device 2, the electronic device 2 responds to the request The information is authenticated. If the authentication is passed, the information is uploaded to the space.
  • both the electronic device 2 and the electronic device 1 show that there are two members (Xiaomei and Huawei) in the current "family photo" space.
  • Xiaomei is the nickname of the user 1 of the electronic device 1
  • Huawei is the nickname of the user 2 of the electronic device 2.
  • the member of Xiaomei has one picture information
  • the member of Huaweing has three picture information.
  • the interface displays the information of the electronic device 2 Thumbnails of the three pictures uploaded by the user 2 (Xiao Ming) to the space on July 12, 2018.
  • the electronic device 1 detects an operation (for example, clicking) on the thumbnail 707 of the second picture in FIG. 11e by the user, in response to the operation, the electronic device 1 obtains from the electronic device 2 according to the hash value of the second picture
  • the original image data of the second image is then displayed on the interface shown in FIG. 11f.
  • the reason why the electronic device 1 can obtain the original image data of the second picture from the electronic device 2 is because a short-distance network connection is established between the electronic device 1 and the electronic device 2, or because the electronic device 1 and the electronic device 2 Turn on the data flow switch, and a data network connection is established between electronic device 1 and electronic device 2.
  • the electronic device 1 authenticates the information uploaded by the electronic device 2, the third image may have a large amount of data, and the finally generated authentication result includes the third image authentication. If the authentication fails, the second picture and the fourth picture are successfully authenticated.
  • the second identifier of the third picture displayed in the member information of the electronic device 2 is that the authentication has failed.
  • FIG. 12b after the synchronization update, both the electronic device 2 and the electronic device 1 show that there are two members (Xiaomei and Huaweing) in the current "family photo" space. There is a picture information in the Xiaomei member, Xiaoming this There are two pieces of picture information in a member. Among them, the picture information of Xiaoming does not include the third picture that fails authentication, and only includes the second picture and the fourth picture.
  • the reason why the electronic device 1 failed to authenticate the third photo may also be that the electronic device 1 did not receive the authentication request sent by the electronic device 2 due to the unstable network, or the electronic device 1 believed that the third photo did not meet the sharing Conditions (such as indecent photos, etc.). It may also be that the electronic device 1 sets a capacity for each member's album. If the electronic device 1 determines that adding the third photo will cause the maximum capacity of the electronic device 2 to be exceeded, the authentication of the electronic device 2 fails.
  • FIG. 13 if the electronic device 2 detects an operation (for example, clicking) performed by the user 2 on the option 801 in FIG. 13 a, in response to the operation, the electronic device 2 displays FIG. 13 b
  • the interface shown in Figure 13b shows that user 2 uploaded the second picture on July 5, 2018, and uploaded the third picture and the fourth picture on July 12, 2017.
  • the electronic device 2 detects an operation (for example, clicking) on the option of the thumbnail 802 of the second picture in FIG. 13b by the user 2, in response to the operation, the electronic device 2 obtains the original of the second picture from its own database.
  • the electronic device 2 detects an operation (for example, clicking) performed by the user 2 to delete this control 803 in FIG. 13c, in response to the operation, the thumbnail 802 of the second picture of the electronic device 2 is removed from the "family photo" space. After removal, the electronic device 1 and the electronic device 2 display an interface as shown in FIG. 13d, that is, there are two members in the "family photo” space, and the number of pictures uploaded by Xiaoming is changed to 2.
  • family photo shown in FIG. 13d above is classified according to member information.
  • family photo can also support according to the shooting location, time, or type of person, scenery Types are used to classify and display photos in space. The embodiments of the present application will not list illustrations one by one.
  • the electronic device 1 detects an operation (for example, clicking) performed by the user 1 on the option 901 in FIG. 14 a, in response to the operation, the electronic device 1 displays a display diagram
  • the interface shown in FIG. 14b shows that user 2 uploaded the second picture on July 5, 2018, and uploaded the third picture and the fourth picture on July 12, 2017.
  • the electronic device 1 detects an operation (for example, clicking) performed by the user 1 on the option 902 of the second picture in FIG. 14b
  • the electronic device 1 according to the hash value corresponding to the thumbnail 902 , Obtaining the original picture data information of the second picture from the electronic device 2 and displaying the interface shown in FIG. 14c.
  • the electronic device 1 detects an operation (for example, clicking) performed by the user 1 on deleting this control 903 in FIG. 14c, in response to the operation, the thumbnail 902 of the second picture of the electronic device 1 is removed from the space of “family photos” Removed, the electronic device 2 displays an interface as shown in FIG. 14d, that is, there are only two thumbnails of the member Huaweing. However, the electronic device 1 displays an interface as shown in FIG. 14a.
  • the subsequent electronic device 1 synchronizes the data of all members of the space of "family photos”
  • the electronic device 1 returns to the interface shown in FIG. 14a. That is, the electronic device 1 can only temporarily delete other successful thumbnails in the group, and once the data is synchronized later, the deleted thumbnails can also be restored.
  • the electronic device 2 can also back up the original image of the picture uploaded in the space to the cloud.
  • the electronic device 1 detects the operation of the user 1 on the thumbnail 902, the electronic device 1 obtains the thumbnail from the cloud 902 corresponds to the original image data, thereby displaying the original image on the interface shown in FIG. 14a.
  • the electronic device 1 when the electronic device 1 detects an operation (for example, clicking) on the option of the thumbnail 902 of the second picture in FIG. 14b by the user 1, in response to the operation, the electronic device 1 obtains the original image data information of the second picture from the cloud server according to the hash value corresponding to the thumbnail 902, and displays the interface shown in FIG. 14c.
  • an operation for example, clicking
  • the electronic device 1 obtains the original image data information of the second picture from the cloud server according to the hash value corresponding to the thumbnail 902, and displays the interface shown in FIG. 14c.
  • the family relationship space also provides a good time function, which can implement editing processing for pictures in each member.
  • a good time function which can implement editing processing for pictures in each member.
  • FIG. 15 for example, when the electronic device 1 detects the operation of the good time control of the user 1 in FIG. 15a, the electronic device 1 displays the interface shown in FIG. 15b.
  • FIG. 15b Xiaomei
  • the picture in this member can be edited into a video, and the picture in this member can also be edited into a video.
  • the "family photo" space can also be provided with functions such as comments or likes. For example, when user 1 of the electronic device 1 views the photos of other members in the "family photo", he can comment or like the photo. .
  • the “family photo” space may also be provided with a sharing function.
  • the user 1 of the electronic device 1 views the first photos of other members in the “family photo”, he may choose to share the first photo.
  • the electronic device 1 detects that the user 1 acts on the sharing control, it generates a link about the first photo, and the electronic device 1 completes the sharing by sending the link to another member.
  • the above uses the shared data as an example for illustration.
  • the shared data may also be Taobao order information, text information, videos or folders, health data, exercise data, etc. in the electronic device. Similar to the data sharing method in which the shared data is pictures, when the shared data is Taobao order information, text information, videos or folders, health data, sports data, etc., the above-mentioned "family photo" sharing method can be used for data sharing.
  • the family space may further include a group for sharing exercise data, and the exercise data of each member in the group may be shared by other members.
  • the electronic device 1 and the electronic device 2 respond to the operation of the user 1 and the user 2 on the exercise bracelet APP, and authorize the data viewing permission of the exercise bracelet APP to the family space, that is, the sports bracelet APP and the family space account Establish a binding relationship. As shown in FIG.
  • the electronic device 1 when the electronic device 1 detects an operation (for example, clicking) on the motion icon 1001 of the family space shown in FIG. 16 a by the user 1, in response to the operation, the electronic device 1 displays an interface shown in FIG. 16 b , The interface shows that there are currently Xiaomei and Xiaoming who are members of the sport.
  • the electronic device 1 detects that the user 1 acts on Xiaomei's image operation (such as clicking) shown in FIG. 16b, the electronic device 1 displays the movement data of the user 1 obtained from the exercise bracelet APP, including the number of walking steps, sleep time, Heart rate, weight and other data.
  • the interface shown in FIG. 16b of the electronic device 1 also provides an option for backing up exercise data to the cloud.
  • the electronic device 1 can obtain it from the cloud.
  • the motion data can also save the motion data locally, so that the electronic device 1 can obtain the motion data from the storage space at any time in the offline state, but it will occupy the local storage space.
  • the family space may further include a group of health data, and the health data of each member in the group may be shared by other members.
  • the process of establishing a group to share health data and the process of joining or inviting group members to join, refer to the process of establishing a “family photo” space above.
  • FIG. 17 for example, when the electronic device 1 detects an operation (for example, clicking) performed by the user 1 on the health record 1101 of the family space shown in FIG. 17 a, in response to the operation, the electronic device 1 displays FIG. 17 b The interface shown shows that there are currently family members Xiaomei and Xiaoming.
  • the electronic device 1 When the electronic device 1 detects that the user 1 acts on Xiaomei's image operation (for example, clicking) shown in FIG. 17b, the electronic device 1 displays the interface shown in FIG. 17c. After the electronic device 1 detects the case picture uploaded by the user 1, it can automatically obtain the hospital, department, and consultation time from the case picture information.
  • the interface shown in FIG. 17c of the electronic device 1 also provides the option of backing up the case to the cloud. When user 1 acts on this option to upload the case to the cloud, the next time user 1 views the case, electronic device 1 can obtain the case from the cloud.
  • the electronic device 1 can also store the case locally, so that the electronic device 1 can obtain the case data from the storage space at any time in the offline state, but it will occupy the local storage space.
  • the electronic device 1 when the electronic device 1 detects an operation (for example, clicking) performed by the user 1 on the family space 1201 shown in FIG. 18a, in response to the operation, the electronic device 1 displays a diagram The list shown in 18b shows the nickname, gender, birthday, data flow mode, and feedback of the user 1 of the electronic device 1 in the "family space". Check for updates, clear cache, and more.
  • an operation for example, clicking
  • the electronic device 1 turns on or off the data flow switch, and when the electronic device 1 turns on the data When the flow is switched, the picture information of other members of the "family space" is synchronized.
  • the electronic device 1 turns off the data flow switch, but when the WiFi hotspot is turned on, the picture information of other members connected to the WiFi hotspot can also be synchronized.
  • the electronic device 1 in the space of "family photos", the electronic device 1 may be equivalent to a central node of the blockchain network, and other members may be equivalent to ordinary nodes of the blockchain network. If electronic device 2 is connected to the network, but electronic device 1 is not connected to the network, electronic device 2 cannot obtain the picture information of all members of the "family photo" from electronic device 1, then electronic device 2 cannot update the picture information of other members synchronously .
  • the creator of the space of "family photos” in the above scenario is equivalent to the central node of the blockchain network, and other members are equivalent to the ordinary of the blockchain network.
  • node For example, the electronic device 1 is equivalent to the node 2 in FIG. 4a, and the electronic device 2 is equivalent to the node 1 or the node 3 in FIG. 4a.
  • the image information of Xiaomei under the space of "family photos” is equivalent to the private blockchain of electronic device 1
  • the image information of Huaweing under the space of "family photos” is equivalent to the private blockchain of electronic devices 2.
  • a “family photo” space with the same picture information is generated, which is equivalent to a public blockchain.
  • the data uploaded by each electronic device each time constitutes a sub-block in the private blockchain corresponding to the electronic device.
  • Each time the electronic device 1 is successfully authenticated all the data that passes the authentication constitutes the main block of the public blockchain.
  • electronic device 1 and electronic device 2 can upload photos to their own private blockchain when offline.
  • electronic device 2 connects to the network, it can send an authentication request to electronic device 1 to request authentication in
  • the picture information uploaded by the electronic device 2 is synchronized to the public blockchain.
  • the "family space" on the electronic device 1 also includes the uploaded by the electronic device 2. image. Therefore, each member of the group can share pictures anytime, anywhere, and record the picture information into their own private blockchain. It does not require electronic device 1 (central node) to be always online or respond in time to share pictures.
  • electronic device 1 central node
  • electronic device 1 and electronic device 2 may be equivalent to ordinary nodes, and electronic device 1 and electronic device 2 may generate a hash of uploaded photos offline or online. Value and thumbnail, and add a new sub-block to its own private blockchain.
  • the sub-block information holds the hash value and thumbnail, and the correspondence between the hash value and the thumbnail and the uploaded picture. relationship.
  • the cloud server can establish a network connection with the electronic device 1 and the electronic device 2.
  • the electronic device 1 reports the newly-added subblock information of its own private blockchain.
  • the sub-block information is saved to the main block added by the public blockchain.
  • the electronic device 2 reports the newly-added subblock information of its private blockchain to the cloud server side, and the cloud server side authenticates the subblock. After passing, the sub-block information is saved to the main block added by the public blockchain.
  • An embodiment of the present application further provides a photo sharing method. As shown in FIG. 19, the method may include the following steps:
  • the first electronic device detects a first operation of the user.
  • the first electronic device In response to the first operation, the first electronic device adds first photo information to a first shared album of the first electronic device.
  • the first shared album includes photo information added by the first electronic device.
  • the first electronic device sends a first request message for adding the first photo information to the second electronic device when the first electronic device initiates synchronization with the second electronic device.
  • the first electronic device receives a first request response message sent by the second electronic device that refuses to add the first photo information.
  • the first electronic device deletes the first photo information in the first shared album.
  • the first electronic device is equivalent to the electronic device 2 in the figure
  • the second electronic device is equivalent to the electronic device 1 in the figure
  • the first photo information may directly refer to the first photo, and may also refer to index information corresponding to the first photo, such as link information or a thumbnail image with the first photo.
  • the first photo information is equivalent to the third photo in FIG. 12.
  • the electronic device 2 uploads a third photo to an album (that is, the first shared album) in the “family photo” for storing photo information of the user Huaweing of the electronic device 2.
  • the so-called non-synchronization can refer to that the electronic device 2 has not established a network connection with the electronic device 1, or it can mean that the electronic device 2 has established a network connection with the electronic device 1, and the electronic device 2 is currently in a period of time that is not synchronized with the electronic device 1.
  • the electronic device 1 may receive an authentication request for the third photo sent by the electronic device 2, and the authentication request is equivalent to the first request message for adding the first photo information in step 1903.
  • the electronic device 1 determines that the data amount of the third photo is too large, and fails to add the third photo to the “family photo” when the authentication of the third photo fails, the electronic device 1 sends a first request response message to the electronic device 2 to notify the electronic device The third photo of device 2 is in a state of authentication failure, and the third photo is refused to be added. In this way, the electronic device 2 deletes the third photo from the first shared album. As shown in FIG. 12b, Xiaoming's album has only two photo information.
  • the photo sharing method further includes: the first electronic device deletes the second photo information from the second electronic device.
  • the photo information of the fourth shared album is synchronized to the first electronic device.
  • the fourth shared album includes photo information of the first shared album, photo information of the second shared album of the second electronic device, and photo information of the third shared album of the third electronic device; the first share The photo information of the album does not include the first photo information.
  • the electronic device 2 synchronizes the "family photo" of the electronic device 1
  • the "family photo” in the electronic device 2 includes a photo of the electronic device 1, a photo of the electronic device 2, and a photo of the electronic device 3.
  • the fourth shared album is equivalent to the space of “family photos” in FIG. 20
  • the second shared album is equivalent to an album for storing photo information of the user Xiaomei of the electronic device 1.
  • the third shared album is equivalent to an album for storing photo information of the user Wang of the electronic device 3. It can be seen from FIG. 20 that after synchronization, Xiaoming of the electronic device 2 does not include a third photo that fails authentication.
  • the first electronic device before the first operation of the user is detected, when the first electronic device does not initiate synchronization with the second electronic device, the first electronic device detects the second operation of the user; a response In this second operation, second photo information is added to the first shared album.
  • the first electronic device initiates synchronization with the second electronic device, the first electronic device sends the second photo information to the second electronic device. Second request message.
  • the first electronic device receives a second request response message sent by the second electronic device, where the second photo information is successfully added. In this way, the second photo information in the first sharing book of the first electronic device is successfully added.
  • the first electronic device detects the user's third operation; in response to the third operation, including the Add third photo information to the first shared album of the second photo information; when the first electronic device initiates synchronization with the second electronic device, the first electronic device sends the third photo information to the second electronic device A third request message, and the first electronic device receives a third request response message sent by the second electronic device that successfully added the third photo information. In this way, the third photo information in the first sharing book of the first electronic device is successfully added.
  • the electronic device 2 detects the operation of the user 2 acting on the photo 2101 in the album.
  • the electronic device 1 sends a request message to the electronic device 1 to add the photo 2101 to the "family photo" space.
  • the electronic device 1 successfully adds a photo
  • Huawei's shared album corresponding to the electronic device 2 displays a photo, as shown in FIG. 21c.
  • the electronic device 2 detects the operation of the user 2 acting on the photo 2102 in the album.
  • the electronic device 1 sends a request message to the electronic device 1 to add the photo 2102 to the "family photo” space.
  • Xiaoming's shared album corresponding to the electronic device 2 displays two photos, as shown in FIG. 21f.
  • the first electronic device, the second electronic device, and the third electronic device are devices in a blockchain network; the second electronic device is equivalent to the blockchain network.
  • the central node, and the first electronic device and the third electronic device are equivalent to ordinary nodes of a blockchain network.
  • the photo information may be added to the shared album in the form of a record.
  • the first photo corresponding to the second photo information includes a first identifier, a hash value of the second photo, and content data of the second photo.
  • the second record corresponding to the three photo information includes a second identification, a hash value of the second photo, content data of the third photo, and a first identification. That is, the second record is associated with the first record.
  • the first record is equivalent to the sub-block 11 in FIG. 4b
  • the second record is equivalent to the sub-block 12 in FIG. 4b.
  • the first electronic device when the first electronic device and the second electronic device do not initiate synchronization, the first electronic device detects a fourth operation of the user; in response to the fourth operation, the first electronic device changes the first operation The third photo information in a shared album is deleted.
  • the first electronic device sends a fourth request message to the second electronic device to delete the third photo information; the first electronic device receives the deletion successfully sent by the second electronic device.
  • a fourth request response message for photo information when the first electronic device and the second electronic device do not initiate synchronization, the first electronic device detects a fourth operation of the user; in response to the fourth operation, the first electronic device changes the first operation The third photo information in a shared album is deleted.
  • the first electronic device sends a fourth request message to the second electronic device to delete the third photo information; the first electronic device receives the deletion successfully sent by the second electronic device.
  • a fourth request response message for photo information when the first electronic device and the second electronic device do not initiate synchronization, the first electronic device detects a fourth operation of the user; in
  • the electronic device 2 when the electronic device 2 does not establish a network connection with the electronic device 1, the electronic device 2 deletes the picture 802 in FIG. 13b.
  • the electronic device 2 sends a request message to the electronic device 1 to delete the picture 802.
  • the electronic device 1 deletes the picture 802 in the "family photo” successfully, it returns to the electronic device 2
  • the successful response message is deleted, so that the photo 802 in the "family photo” space is deleted.
  • the method includes: 2201, a second electronic device establishes a network connection with the first electronic device.
  • the first electronic device and the second electronic device may be connected at a short distance based on a communication network such as a wifi hotspot, wifi direct connection, Bluetooth, zigbee, or NFC.
  • the second electronic device receives a first request message for adding first photo information sent by the first electronic device. 2203.
  • the second electronic device sends a first request response message to the first electronic device that refuses to add the first photo information.
  • the first electronic device is equivalent to the electronic device 2 in the figure
  • the second electronic device is equivalent to the electronic device 1 in the figure.
  • the first photo information may directly refer to the first photo, and may also refer to index information corresponding to the first photo, such as link information or a thumbnail image with the first photo.
  • the first photo information is equivalent to the third photo in FIG. 12. Because the above-mentioned execution steps of the second electronic device correspond to the first electronic device, the specific content can be referred to the description above, and details are not repeated in this embodiment.
  • an embodiment of the present application discloses a first electronic device.
  • the first electronic device is used to implement the methods described in the foregoing method embodiments, and includes: detecting The unit 2301, the processing unit 2302, the sending unit 2303, and the receiving unit 2304.
  • the detection unit 2301 is configured to support the first electronic device to execute step 1901 in FIG. 19;
  • the processing unit 2302 is configured to support the first electronic device to execute steps 1902 and 1905 in FIG. 19;
  • the sending unit 2303 is configured to support the electronic device to execute In step 1903 in FIG. 19,
  • the receiving unit 2304 is configured to support the electronic device to perform step 1904 in FIG. 19.
  • all relevant content of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, which will not be repeated here.
  • an embodiment of the present application discloses a first electronic device.
  • the electronic device may include a touch screen 2401, where the touch screen 2401 includes a touch-sensitive surface 2406 and Display screen 2407; one or more processors 2402; memory 2403; one or more application programs (not shown); and one or more computer programs 2404, each of which may be connected through one or more communication buses 2405.
  • the one or more computer programs 2404 are stored in the memory 2403 and are configured to be executed by the one or more processors 2402.
  • the one or more computer programs 2404 include instructions, and the instructions can be used to execute 19 and the corresponding steps in the respective embodiments.
  • an embodiment of the present application discloses a second electronic device.
  • the second electronic device is used to implement the methods described in the foregoing method embodiments, and includes: connecting A unit 2501, a receiving unit 2502, and a transmitting unit 2503.
  • the connection unit 2501 is configured to support the second electronic device to execute step 2501 in FIG. 22;
  • the receiving unit 2502 is configured to support the second electronic device to execute step 2202 in FIG. 22;
  • step 2203. all relevant content of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, which will not be repeated here.
  • an embodiment of the present application discloses a second electronic device.
  • the electronic device may include a touch screen 2601, where the touch screen 2601 includes a touch-sensitive surface 2606 and Display screen 2607; one or more processors 2602; memory 2603; one or more application programs (not shown); and one or more computer programs 2604, each of which may be connected through one or more communication buses 2605.
  • the one or more computer programs 2604 are stored in the memory 2603 and are configured to be executed by the one or more processors 2602.
  • the one or more computer programs 2604 include instructions, and the instructions can be used to execute 22 and the corresponding steps in the respective embodiments.
  • An embodiment of the present application further provides a computer storage medium.
  • the computer storage medium stores computer instructions.
  • the computer instructions When the computer instructions are run on an electronic device, the electronic device is caused to execute the foregoing related method steps to implement the photo sharing method in the foregoing embodiment. .
  • An embodiment of the present application further provides a computer program product, and when the computer program product runs on a computer, the computer is caused to execute the foregoing related steps to implement the photo sharing method in the foregoing embodiment.
  • an embodiment of the present application further provides a device.
  • the device may specifically be a chip, a component, or a module.
  • the device may include a connected processor and a memory.
  • the memory is used to store a computer to execute instructions.
  • the processor may execute computer execution instructions stored in the memory, so that the chip executes the photo sharing method in the foregoing method embodiments.
  • the electronic devices, computer storage media, computer program products, or chips provided in the embodiments of the present application are used to execute the corresponding methods provided above. Therefore, for the beneficial effects that can be achieved, refer to the corresponding methods provided above. The beneficial effects in the method are not repeated here.
  • the disclosed apparatus and method may be implemented in other ways.
  • the device embodiments described above are only schematic.
  • the division of modules or units is only a logical function division.
  • multiple units or components may be combined or It can be integrated into another device, 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, which may be 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 be one physical unit or multiple physical units, that is, they may be located in one place, or may be distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the objective of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each of the units may exist separately physically, or two or more units may be integrated into one unit.
  • the above integrated unit may be implemented in the form of hardware or in the form of software functional unit.
  • the integrated unit When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium.
  • the technical solution of the embodiments of the present application is essentially a part that contributes to the existing technology or all or part of the technical solution may be embodied in the form of a software product that is stored in a storage medium.
  • the instructions include a number of instructions for causing a device (which can be a single-chip microcomputer, a chip, or the like) or a processor to execute all or part of the steps of the methods in the embodiments of the present application.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Telephone Function (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本申请提供一种照片共享方法及电子设备,该方法包括:当第一电子设备与第二电子设备未发起同步时,第一电子设备检测到用户的第一操作;响应于该第一操作,第一电子设备在第一电子设备的第一共享相簿中添加第一照片信息。然后当第一电子设备与第二电子设备发起同步时,向第二电子设备发送添加第一照片信息的第一请求消息,这样当第一电子设备接收所述第二电子设备发送的拒绝添加所述第一照片信息的第一请求响应消息后,就将第一共享相簿中的第一照片信息删掉,该方法可以实现去中心化数据共享,电子设备之间可以共享对方共享相簿中的照片。

Description

一种照片共享方法及电子设备 技术领域
本申请涉及终端技术领域,尤其涉及一种照片共享方法及电子设备。
背景技术
随着数据大规模增长和数据价值的日益提升,通过数据共享的方式来挖掘数据的潜在价值变得越来越重要,但如何在数据共享的同时,保护敏感数据、涉密数据等不被非法窃取,是数据共享的重要前提。
目前的数据共享方法,主要包括传统数据共享方案和中心化数据共享方案。其中,传统数据共享方案是使用传统的隐私保护手段实现内部共享,同时为降低暴露隐私数据的风险选择拒绝对外开放共享权限;中心化数据共享方案是以第三方作为数据开放和共享的中枢,各数据拥有者对第三方信任并对第三方开放数据,通过第三方调度来实现数据共享过程。
但是,现有的传统数据共享方案的缺点是,以拒绝对外开放来降低隐私风险,不仅无法挖掘数据的潜在价值,不能最大化其利益,且会导致信息建设滞后;中心化数据共享方案虽然解决了互不信任的问题,但却由于数据集中在第三方,所以存有安全隐患,即如果第三方无法保证绝对数据安全,一旦发生数据泄漏会造成严重后果。
发明内容
本申请提供一种照片共享方法及电子设备,用以提供一种安全有效的照片共享方式,以充分挖掘数据的潜在价值,提高用户体验。
第一方面,本申请实施例提供一种照片共享方法,所述方法适用于第一电子设备,该方法包括:当第一电子设备与第二电子设备未发起同步时,第一电子设备检测到用户的第一操作;响应于该第一操作,第一电子设备在第一电子设备的第一共享相簿中添加第一照片信息。然后当第一电子设备与第二电子设备发起同步时,向第二电子设备发送添加第一照片信息的第一请求消息。这样当第一电子设备接收所述第二电子设备发送的拒绝添加所述第一照片信息的第一请求响应消息后,就将第一共享相簿中的第一照片信息删掉。
该方法可以实现去中心化数据共享,电子设备之间可以共享对方共享相簿中的照片。
在一种可能的设计中,在第一电子设备将所述第一共享相簿中的所述第一照片信息删除之后,该照片共享方法还包括:第一电子设备将第二电子设备中的第四共享相簿的照片信息同步至所述第一电子设备。其中,第四共享相簿包括第一共享相簿的照片信息、第二电子设备的第二共享相簿的照片信息和第三电子设备的第三共享相簿的照片信息;第一共享相簿的照片信息不包括第一照片信息。
本申请实施例中,第一电子设备可以将第四共享相簿中的照片信息同步到本地,所以可以实现共享其它电子设备的照片信息,第二电子设备可以保证第一共享相簿对应的区块链的有序增长。
在一种可能的设计中,在检测到用户的第一操作之前,当第一电子设备与第二电子设 备未发起同步时,第一电子设备检测到用户的第二操作;响应于该第二操作,在第一共享相簿中添加第二照片信息,当第一电子设备与第二电子设备发起同步时,第一电子设备向所述第二电子设备发送添加第二照片信息的第二请求消息。接着,第一电子设备接收所述第二电子设备发送的添加成功所述第二照片信息的第二请求响应消息。这样第一电子设备的第一共享薄中的第二照片信息添加成功。
仍然是在检测到用户的第一操作之前,当第一电子设备与第二电子设备未发起同步时,第一电子设备检测到用户的第三操作;响应于该第三操作,在包括所述第二照片信息的第一共享相簿中添加第三照片信息;当第一电子设备与第二电子设备发起同步时,第一电子设备向所述第二电子设备发送添加所述第三照片信息的第三请求消息,接着,第一电子设备接收所述第二电子设备发送的添加成功所述第三照片信息的第三请求响应消息。这样第一电子设备的第一共享薄中的第三照片信息添加成功。结合本申请实施例提供的区块链技术来说,第一电子设备和所述第二电子设备、第三电子设备为区块链网络中的设备;第二电子设备相当于是区块链网络的中心节点,而第一电子设备和第三电子设备则相当于区块链网络的普通节点。
其中,照片信息可以以记录的形式添加到共享相簿中,例如第二照片信息对应第一记录包括第一标识、所述第二照片的哈希值和所述第二照片的内容数据;第三照片信息对应的第二记录包括第二标识、第二照片的哈希值和第三照片的内容数据,以及第一标识。也就是说第二记录是与第一记录相关联的。
可见,本申请实施例中,共享相簿中的照片信息本质是区块链,因区块链具有去中心化、数据高度透明、无须依赖信任以及信息可回溯性的特点,所以本申请实施例生成的共享相簿相比现有数据共享方式,具有显著的去中心化,信息可回溯等优点。
在一种可能的设计中,当第一电子设备与第二电子设备未发起同步时,第一电子设备检测到用户的第四操作;响应于第四操作,第一电子设备将第一共享相簿中的第三照片信息删除。当第一电子设备与第二电子设备发起同步时,第一电子设备向第二电子设备发送删除第三照片信息的第四请求消息;第一电子设备接收第二电子设备发送的删除成功第三照片信息的第四请求响应消息。
本申请实施例中,第一电子设备可以请求第二电子设备删除共享相簿中的照片,因此第二电子设备可以保证第四共享相簿对应的区块链的有序增长,能够有效地避免各个电子设备增删照片的冲突行为。
第二方面,本申请实施例提供一种照片共享方法,该方法应用于第二电子设备,该方法包括:第二电子设备建立与第一电子设备的网络连接,然后第二电子设备接收第一电子设备发送的添加第一照片信息的第一请求消息。响应于该第一请求消息,第二电子设备向第一电子设备发送拒绝添加第一照片信息的第一请求响应消息。
该方法可以实现去中心化数据共享,电子设备之间可以共享对方共享相簿中的照片,第二电子设备可以保证共享相簿对应的区块链的有序增长。其中,第二电子设备的具体执行步骤与第一电子设备相对应,所以具体内容可以参见上文介绍,本实施例中不再重复赘述。
第三方面,本申请实施例提供一种第一电子设备,包括处理器和存储器。其中,存储器用于存储一个或多个计算机程序;当存储器存储的一个或多个计算机程序被处理器执行时,使得第一电子设备能够实现第一方面的任意一种可能的设计的方法。
第四方面,本申请实施例还提供一种装置,该装置包括执行第一方面或者第一方面的任意一种可能的设计的方法的模块/单元。这些模块/单元可以通过硬件实现,也可以通过硬件执行相应的软件实现。
第五方面,本申请实施例中还提供一种计算机可读存储介质,所述计算机可读存储介质包括计算机程序,当计算机程序在电子设备上运行时,使得所述电子设备执行第一方面或上述第一方面的任意一种可能的设计的方法。
第六方面,本申请实施例还提供一种包含计算机程序产品,当所述计算机程序产品在终端上运行时,使得所述电子设备执行第一方面或上述第一方面的任意一种可能的设计的方法。
本申请的这些方面或其他方面在以下实施例的描述中会更加简明易懂。
附图说明
图1为本申请实施例提供的一种互联场景示意图;
图2为本申请实施例提供的一种电子设备的结构示意图;
图3为本申请实施例提供的一种电子设备的软件结构框图;
图4a至图4f为本申请实施例提供的一种区块链技术示意图;
图5为本申请实施例提供的一组界面示意图;
图6为本申请实施例提供的另一组界面示意图;
图7为本申请实施例提供的另一组界面示意图;
图8为本申请实施例提供的另一组界面示意图;
图9为本申请实施例提供的另一组界面示意图;
图10为本申请实施例提供的另一组界面示意图;
图11为本申请实施例提供的另一组界面示意图;
图12为本申请实施例提供的另一组界面示意图;
图13为本申请实施例提供的另一组界面示意图;
图14为本申请实施例提供的另一组界面示意图;
图15为本申请实施例提供的另一组界面示意图;
图16为本申请实施例提供的另一组界面示意图;
图17为本申请实施例提供的另一组界面示意图;
图18为本申请实施例提供的另一组界面示意图;
图19为本申请实施例提供的一种照片共享方法流程示意图;
图20为本申请实施例提供的另一组界面示意图;
图21为本申请实施例提供的另一组界面示意图;
图22为本申请实施例提供的另一种照片共享方法流程示意图;
图23为本申请实施例提供的一种电子设备的结构示意图;
图24为本申请实施例提供的另一种电子设备的结构示意图。
图25为本申请实施例提供的一种电子设备的结构示意图;
图26为本申请实施例提供的另一种电子设备的结构示意图。
具体实施方式
为了便于理解,示例的给出了部分与本申请实施例相关概念的说明以供参考。如下所示:
区块链:是一种按照时间顺序将区块以顺序相连的方式组合成的一种链式数据结构,并以密码学方式保证的不可篡改和不可伪造的去中心化的数据库。
区块:是很多数据的集合,区块上标记有时间戳和之前一个区块的独特标记。有效的区块获得全网络的共识认可或者中心节点的认可后会被追加到区块链中。
区块链网络:是一个端到端(Peer-to-Peer,P2P)的网络,即节点直接连接到其他节点。它的拓扑是扁平的,节点之间可以是平等的。
节点:指的是区块链网络中的计算机,包括手机、矿机、台式机和服务器等等。区块链的节点有如下特点:1、具有一定的存储空间;2、能够连接上网络;具体上述特点的节点可以在连接网络条件下,运行存储空间中的区块链相应程序,通过可视化操作终端进行交易等操作。
无线保真(wireless fidelity,wifi)直连:也称wifi P2P,一种点对点连接技术,一定范围内的电子设备通过wifi直接互连,相互分享和交换内容。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。其中,在本申请实施例的描述中,以下,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本申请实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。
本申请实施例提供的数据共享方法可以应用于如图1所示的多个电子设备01基于通信网络互联的场景。其中,该通信网络可以是局域网,也可以是通过中继(relay)设备转接的广域网。当该通信网络为局域网时,示例性的,该通信网络可以是wifi热点网络、wifi P2P网络、蓝牙网络、zigbee网络或近场通信(near field communication,NFC)网络等近距离通信网络。当该通信网络为广域网时,示例性的,该通信网络可以是第三代移动通信技术(3rd-generation wireless telephone technology,3G)网络、第四代移动通信技术(the 4th generation mobile communication technology,4G)网络、第五代移动通信技术(5th-generation mobile communication technology,5G)网络、未来演进的公共陆地移动网络(public land mobile network,PLMN)或因特网等。在图1所示的场景中,不同电子设备之间可以通过通信网络交互数据,例如交互图片、文本、视频,或者交互电子设备对图片、文本或视频等对象处理后的结果。
在本申请一些实施例中,图1所示的电子设备01可以是还包含其他功能诸如个人数字助理和/或音乐播放器功能的便携式电子设备,诸如手机、平板电脑、具备无线通讯功能的可穿戴设备(如智能手表)等。便携式电子设备的示例性实施例包括但不限于搭载
Figure PCTCN2018100304-appb-000001
Figure PCTCN2018100304-appb-000002
或者其他操作系统的便携式电子设备。上述便携式电子设备也可以是其他便携式电子设备,诸如具有触敏表面(例如触控面板)的膝上型计算机(laptop)等。还应当理解的是,在本申请其他一些实施例中,上述电子设备01也可以不是便携式电子设备,而是具有触敏表面(例如触控面板)的台式计算机。
示例性地,如图2所示,本申请实施例中的电子设备01可以为电子设备100。下面以 电子设备100为例对实施例进行具体说明。
电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,USB接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及SIM卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。
可以理解的是,本发明实施例示意的结构并不构成对电子设备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可以包括一个或多个接口。接口可以包括集成电路(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)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现电子设备100的触摸功能。
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频 信号,实现通过蓝牙耳机接听电话的功能。
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现电子设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现电子设备100的显示功能。
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。
可以理解的是,本发明实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。
电子设备100的无线通信功能可以通过天线模块1,天线模块2移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖 单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将蜂窝网天线复用为无线局域网分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(Low Noise Amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS))和/或星基增强系统(satellite based augmentation systems,SBAS)。
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采 用LCD(liquid crystal display,液晶显示屏),OLED(organic light-emitting diode,有机发光二极管),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏,N为大于1的正整数。
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备100可以包括1个或N个摄像头,N为大于1的正整数。
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。
视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:MPEG1,MPEG2,MPEG3,MPEG4等。
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行电子设备100的各种功能应用以及数据处理。存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳 机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器170A收听音乐,或收听免提通话。
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备100可以设置至少一个麦克风170C。在另一些实施例中,电子设备100可以设置两个麦克风,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备100还可以设置三个,四个或更多麦克风,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。
耳机接口170D用于连接有线耳机。耳机接口可以是USB接口,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。电子设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备100根据压力传感器180A检测所述触摸操作强度。电子设备100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。
陀螺仪传感器180B可以用于确定电子设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测电子设备100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消电子设备100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。
气压传感器180C用于测量气压。在一些实施例中,电子设备100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。
磁传感器180D包括霍尔传感器。电子设备100可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当电子设备100是翻盖机时,电子设备100可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。
加速度传感器180E可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。
距离传感器180F,用于测量距离。电子设备100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,电子设备100可以利用距离传感器180F测距以实现快速对焦。
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。电子设备100通过发光二极管向外发射红外光。电子设备100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定电子设备100附近有物体。当检测到不充分的反射光时,电子设备100可以确定电子设备100附近没有物体。电子设备100可以利用接近光传感器180G检测用户手持电子设备100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。
环境光传感器180L用于感知环境光亮度。电子设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测电子设备100是否在口袋里,以防误触。
指纹传感器180H用于采集指纹。电子设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。
温度传感器180J用于检测温度。在一些实施例中,电子设备100利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,电子设备100执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,电子设备100对电池142加热,以避免低温导致电子设备100异常关机。在其他一些实施例中,当温度低于又一阈值时,电子设备100对电池142的输出电压执行升压,以避免低温导致的异常关机。
触摸传感器180K,也称“触控面板”。可设置于显示屏194。用于检测作用于其上或附近的触摸操作。可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型,并通过显示屏194提供相应的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器180M也可以设置于耳机中。音频模块170可以基于所述骨传导传感器180M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于所述骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率检测功能。
按键190包括开机键,音量键等。按键可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈 效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。
SIM卡接口195用于连接用户标识模块(subscriber identity module,SIM)。SIM卡可以通过插入SIM卡接口,或从SIM卡接口拔出,实现和电子设备100的接触和分离。电子设备100可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口可以同时插入多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。电子设备100通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,电子设备100采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在电子设备100中,不能和电子设备100分离。电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本发明实施例以分层架构的Android系统为例,示例性说明电子设备100的软件结构。
图3是本发明实施例的电子设备100的软件结构框图。
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。
应用程序层可以包括一系列应用程序包。
如图3所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。
如图3所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。
电话管理器用于提供电子设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例 如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。
Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。
2D图形引擎是2D绘图的绘图引擎。
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。
下面结合捕获拍照场景,示例性说明电子设备100软件以及硬件的工作流程。
当触摸传感器180K接收到触摸操作,相应的硬件中断被发给内核层。内核层将触摸操作加工成原始输入事件(包括触摸坐标,触摸操作的时间戳等信息)。原始输入事件被存储在内核层。应用程序框架层从内核层获取原始输入事件,识别该输入事件所对应的控件。以该触摸操作是触摸单击操作,该单击操作所对应的控件为相机应用图标的控件为例,相机应用调用应用框架层的接口,启动相机应用,进而通过调用内核层启动摄像头驱动,通过摄像头捕获静态图像或视频。
以下实施例均可以在具有上述硬件结构的电子设备01(例如电子设备100、平板电脑等)中实现。以下实施例将以电子设备100是移动终端为例,对本申请实施例提供的数据共享方法进行说明。
首先,本申请实施例提供一种新的区块链技术,该区块链技术提出公有区块链和私有区块链的概念,所谓公有区块链指的是区块链网络中的所有节点对应的区块链,所谓私有区块链指的是每个节点对应的区块链。举例来说,该新的区块链技术中的节点组成的区块链网络如图4a所示,其中节点2为中心节点,中心节点用于保证公有区块链中的区块可以有序增长,避免出现冲突;节点1和节点3为普通节点,节点1、节点2、节点3均设有一个私有区块链。如图4b所示,节点1的私有区块链上包括子区块11、子区块12,节点2的私有区块链上包括子区块21、子区块22,节点3的私有区块链上包括子区块31、子区块32。当各个私有区块链上的子区块均被节点2确认为合法的子区块时,则当前节点1、节点2和节点3构成的区块链网络对应的公有区块链如图4c所示,该公有区块链包括主区块01、主区块02,其中主区块01包括子区块11、子区块21和子区块31,主区块02包括子区块12、子区块22和子区块32。
需要说明的是,虽然现有的区块链技术也有中心节点,普通节点生成区块的行为也需要得到中心节点的认可,当中心节点确认生成区块的行为合法之后,会在公有区块链上顺序增长该合法的区块,但是现有的区块链网络仅有公有区块链,中心节点必须始终在线,才能对普通节点生成区块的行为进行实时认证,如果中心节点离线,公有区块链就不能按顺序增长。这样的话,当现有区块链技术应用到移动终端时就会暴露出缺陷,因移动终端的电池电量是有限的,所以移动终端无法保证始终在线,也就是说无法始终与其它节点建立网络连接。
与现有的区块链技术相比,本申请实施例提供的区块链技术通过增加私有区块链,可以有效地解决移动终端无法始终在线的问题。举例来说,节点1、节点2、节点3无论是否接入网络,都可以随时在自身的私有区块链上增长子区块,如图4d所示,假设节点1在离线时,在自身的私有区块链上增长了子区块13;节点3在离线时,在自身的私有区块链上增长子区块33、子区块34。当节点1、节点3再次接入到网络时,会向节点2提交请求,请求节点2在公有区块链上增长区块03,该区块03包括子区块13、子区块33、子区块34。如果节点2认证子区块13、子区块33、子区块34合法后,节点2在公有区块链上增长区块03,该区块03包括子区块13、子区块33、子区块34。然后,节点1和节点3再从节点2获取增长后的公有区块链,该公有区块链如图4e所示。
另外,当节点1、节点3向节点2提交请求,请求在公有区块链上增长区块03,该区块03包括子区块13、子区块33、子区块34,如果节点2认证子区块13、子区块33合法,但子区块34不合法,则节点2向节点3发送通知,该通知包括子区块34不合法,不能增长到公有区块链中。节点3收到该通知之后,会选择在子区块33之后顺序增长下一个子区块35,即子区块34被丢弃。节点2在公有区块链上增长区块03,该区块03包括子区块13、子区块33。然后,节点1和节点3再从节点2获取增长后的公有区块链,该公有区块链如图4f所示。
从上述内容可见,本申请实施例提供的区块链技术中,中心节点可以在接入网络时,对普通节点提交的增长区块的行为进行认证,只有中心节点认证通过后才会在公有区块链上增加新的区块,所以中心节点可以保证公有区块链的顺序增长,有效的避免增长区块的冲突行为。另外,每个节点都设有私有区块链,每个节点可以在在线或者离线状态下,实时地在自身的私有区块链上提交增长子区块的行为,一旦接入网络时,再将该增加子区块的行为发送到中心节点认证,所以可以有效地解决移动终端不在线无法增加区块的问题。另一方面,每个节点均存储有公有区块链,相当于分布式数据库,即便单个节点发生故障,仍然可以从其它节点恢复出公有区块链,所以可以有效地保证数据安全性。
基于上述区块链技术,本申请实施例提供一种数据共享方案,该方案可以实现在多个电子设备之间共享数据。具体地,通过上述区块链技术,可以建立包括多个电子设备的群组,该群组中每个电子设备可以共享其它电子设备中的数据。其中,共享数据可以指电子设备中的图片、视频或交易数据、健康数据等信息。相比现有的中心化数据共享方案,本申请实施例提供的共享数据方案既能够保证群组中的数据共享性,也能保证群组中的数据安全性。
以下将结合附图和应用场景,对本申请实施例提供的数据共享方案进行详细介绍。
以下将以共享的数据为电子设备中的图片为例,对本申请实施例提供的数据共享方法 进行说明。该图片可以是电子设备拍摄的一张图片,也可以是电子设备中保存的一张图片,还可以是电子设备从其他设备接收到的一张图片。
举例来说,如图5所示,电子设备1响应于用户1对图5a所示的亲情空间的图标200点击操作,运行亲情空间这一应用程序。参见图5b,当电子设备1检测到用户1作用于图5b中亲情空间界面的新增按钮201的操作(例如点击)时,响应于该操作,电子设备1显示如图5b中的两个选项。这两个选项包括创建空间和邀请或加入。可参考图5c,当用户1选择创建空间202时,电子设备1显示创建空间的输入框203。当用户1输入空间名称“家庭照片”时,生成图5d所示的群组。参见图5d,当前创建的家庭照片这一群组尚没有照片,用户1可以通过悬浮按钮+204上传照片。
需要说明的是,电子设备在初次运行亲情空间这一应用程序时,一般会通知用户进行账号注册,当用户账号注册完成之后,才能继续执行图5所示的操作。例如用户1可以采用华为账号或者其它应用的账号(例如微信账号、微博账号)在亲情空间完成注册。
示例性的,参见图6,当电子设备1检测到用户1作用于图5d中悬浮按钮+204的操作(例如点击)时,响应于该操作,电子设备1显示图6a所示的两个控件,即相机和拍摄。可参考图6b,当用户选择相册300时,电子设备1显示相册中的图片列表。当用户1从相册列表中选中第一图片301时,电子设备1生成图6c所示家庭照片群组,图6c中背景图片是用户选中的第一图片301的缩略图,标记信息显示当前家庭照片仅有1成员和1照片,即仅有用户1(用户1的昵称是小美)和第一图片301的缩略图。
第一种场景,当用户1创建了“家庭照片”这一群组,群组信息中可以自动生成该群组的二维码信息。参见图7,当电子设备1检测到用户1作用于图6c中群组按钮303的操作(例如点击)时,响应于该操作,电子设备1显示图7a所示的群组信息列表信息,其中图7a中包括一个群成员(即用户1的电子设备名称huaweiP20),以及空间名称是“家庭照片”,用户1在空间中的昵称是小美,该空间的二维码、以及备份照片到云端的选项等。当用户1选中空间二维码选项400时,电子设备1显示图7b所示空间二维码信息界面。当用户1向另一用户2展示图7b所示的二维码,用户2使用的电子设备2可以下载亲情空间这一应用程序,然后通过邀请或加入这一选项扫描该二维码选择加入“家庭照片”这一群组。
示例性的,方式一,参见图8,当用户2的电子设备2下载安装亲情空间这一应用程序后,检测到用户2作用于图8a中邀请或加入500这一选项的操作(例如点击)时,响应于该操作,电子设备2显示图8b所示的界面,该界面中包括两个选项:我要加入501和我要邀请502。可参考图8c,当电子设备2检测到用户2作用于图8b中我要加入501这一选项的操作(例如点击)时,响应于该操作,电子设备2显示图8c所示的界面。图8c中显示有两个选项:搜索附近503和扫描二维码504。当电子设备2检测到用户2作用于图8c中扫描二维码504这一选项的操作(例如点击)时,响应于该操作,图8c中启动二维码扫描,当用户2对准图7b中的二维码扫描时,可以加入到“家庭照片”这一群组。
示例性的,方式二,参见图9,当电子设备2检测到用户2作用于图8c中搜索附近503这一选项的操作(例如点击)时,响应于该操作,电子设备2搜索附近的电子设备,例如图9a中显示搜索到设备名称为huaweiP20的电子设备1,当用户点击头像后可以加入设备名称为huaweiP20的电子设备1创建的“家庭照片”这一亲情空间。需要说明的是,电子设备2扫搜附近的电子设备的方式可以但不限于蓝牙、wifi热点、wifi直连或NFC等近距离网络连接方式。示例性地,如图9b所示,用户2可以进入设置菜单打开wifi热点这一网 络类型,通过wifi热点搜索附近的电子设备。除此之外,用户2也可以通过通知栏的快捷功能控件选择打开wifi热点这一网络类型。
第二种场景,如图10所示,当用户1创建了“家庭照片”这一群组后,电子设备1检测到用户1作用于图10a中邀请或加入600这一选项的操作(例如点击)时,响应于该操作,电子设备1显示图10b所示的界面,该界面中包括两个选项:我要加入601和我要邀请602。可参考图10c,当电子设备1检测到用户1作用于图10b中我要邀请602这一选项的操作(例如点击)时,响应于该操作,电子设备1显示图6c所示的界面,该界面显示有搜索附近603和空间二维码604这两个选项。方式一,当电子设备1检测到用户1作用于图10c中空间二维码604这一选项的操作(例如点击)时,响应于该操作,显示有“家庭照片”这一空间的二维码。方式二,当电子设备1检测到用户1作用于图10c中搜索附近603这一选项的操作(例如点击)时,响s应于该操作,电子设备1搜索到设备名称为huaweiP10的电子设备2,如图10d所示,当电子设备1检测到用户1作用于图10d中的头像的操作(例如点击)时,响应于该操作,电子设备1显示图10e所示的界面,图10e中显示有电子设备1所创建的“家庭照片”这一空间,当电子设备1检测到用户1的确认操作后,设备名称为huaweiP10的电子设备2被邀请到家庭照片”这一空间。
第三种场景,当用户2加入到“家庭照片”这一群组后,示例性的,参见图11,当电子设备2检测到用户2作用于图11a中相册这一选项的操作(例如点击)时,响应于该操作,电子设备2显示相册这一应用中的图片,如图11b所示。当用户选中图11b中的第二图片702、第三图片703、第四图片704之后,响应于用户2作用于图11b中上传选项的操作(例如点击),电子设备2生成关于第二图片702、第三图片703、第四图片704的哈希值(hash)和缩略图,然后将该哈希值和缩略图上传到“家庭照片”这一空间。参见图11c所示,电子设备2显示用户上传的关于第二图片702、第三图片703、第四图片704的缩略图。其中,电子设备2上传的信息需要得到“家庭照片”这一空间的创建者(即电子设备1)的认证。也就是说,电子设备1相当于是中心节点,当电子设备1在线且对电子设备2上传的信息认证通过后,电子设备2上传的信息才能够真正上传到“家庭照片”这一空间中。
在一种可能的设计中,如图11c所示,当电子设备2上传第二图片702、第三图片703、第四图片704后,电子设备2中关于第二图片702、第三图片703、第四图片704的缩略图上添加有第一标识,第一标识上标记图片当前属于待认证的状态,即第二图片702、第三图片703、第四图片704尚未被电子设备1认证通过。如果电子设备1接入网后,收到来自电子设备2的请求上传关于第二图片702、第三图片703、第四图片704的哈希值和缩略图的信息,则电子设备2对该请求信息进行认证,若认证通过,则该信息被上传到该空间中,如图11d所示,电子设备2和电子设备1上均显示当前“家庭照片”空间有两个成员(小美和小明),其中小美是电子设备1的用户1的昵称,小明是电子设备2的用户2的昵称,小美这一成员中有一张图片信息,小明这一成员中有三张图片信息。当电子设备1检测到用户作用于图11d中小明这一选项706的操作(例如点击)时,响应于该操作,电子设备1显示如图11e所述的界面,该界面中显示电子设备2的用户2(小明)在2018年7月12日上传到该空间的三张图片的缩略图。当电子设备1检测到用户作用于图11e中第二图片的缩略图707的操作(例如点击)时,响应于该操作,电子设备1根据该第二图片的哈希值从电子设备2上获取该第二图片的原图数据,然后显示在如图11f所示的界面。其中,电子设备1之所以能够从电子设备2上获取第二图片的原图数据,是因为电子 设备1和电子设备2之间建立了近距离网络连接,或者是因为电子设备1和电子设备2打开数据流量开关,电子设备1和电子设备2之间建立了数据网络连接。
在一种可能的设计中,如图12所示,如果电子设备1对电子设备2所上传的信息进行认证,可能因第三图片的数据量过大,最后生成的认证结果包括第三图片认证失败,第二图片和第四图片认证成功,如图12a所示,电子设备2中自身的成员信息中显示有第三图片的第二标识为认证失败的状态。参见图12b所示,同步更新之后,电子设备2和电子设备1上均显示当前“家庭照片”空间有两个成员(小美和小明),其小美这一成员中有一张图片信息,小明这一成员中有两张图片信息,其中,小明这一成员的图片信息中不包括认证失败的的第三图片,仅包括第二图片和第四图片。
需要说明的是,电子设备1对第三照片认证失败原因还可能是因网络不稳定,导致电子设备1未收到电子设备2发送的认证请求,或者是电子设备1认为第三照片不符合共享条件(例如不雅照等)。也可能是电子设备1为每个成员的相簿设置了容量大小,若电子设备1判断若添加第三照片会导致超出电子设备2的最大容量,则对电子设备2认证失败。
在一种可能的设计中,如图13所示,如果电子设备2检测到用户2作用于图13a中801这一选项的操作(例如点击)时,响应于该操作,电子设备2显示图13b所示的界面,图13b中显示用户2在2018年7月5日上传了第二图片,在2017年7月12日上传了第三图片和第四图片。当电子设备2检测到用户2作用于图13b中的第二图片的缩略图802这一选项的操作(例如点击)时,响应于该操作,电子设备2从自身数据库中获取第二图片的原图数据信息,并显示图13c所示的界面。如果电子设备2检测到用户2作用于图13c中删除这一控件803的操作(例如点击)时,响应于该操作,电子设备2的第二图片的缩略图802从“家庭照片”这一空间移除,最后电子设备1和电子设备2显示如图13d所示的界面,即“家庭照片”这一空间中有两个成员,其中小明上传的图片数量变更为2。
需要说明的是,上述图13d中显示的“家庭照片”是按照成员信息进行照片分类,除此之外,“家庭照片”还可以支持按照照片的拍摄地点、拍摄时间、或者按照人物类型、风景类型对空间中的照片进行分类显示,本申请实施例不再一一列举图例说明。
在一种可能的设计中,如图14所示,如果电子设备1检测到用户1作用于图14a中901这一选项的操作(例如点击)时,响应于该操作,电子设备1显示显示图14b所示的界面,图14b中显示用户2在2018年7月5日上传了第二图片,在2017年7月12日上传了第三图片和第四图片。当电子设备1检测到用户1作用于图14b中的第二图片的缩略图902这一选项的操作(例如点击)时,响应于该操作,电子设备1根据该缩略图902对应的哈希值,从电子设备2中获取第二图片的原图数据信息,并显示图14c所示的界面。如果电子设备1检测到用户1作用于图14c中删除这一控件903的操作(例如点击)时,响应于该操作,电子设备1的第二图片的缩略图902从“家庭照片”这一空间移除,电子设备2显示如图14d所示的界面,即小明这一成员的缩略图仅有两个。但是,电子设备1显示如图14a所示的界面。当后续电子设备1同步“家庭照片”这一空间的所有成员的数据后,电子设备1恢复至如图14a所示的界面。也就是说,电子设备1只能临时删除群组中的其它成功的缩略图,而且后期一旦同步数据,还可以恢复该被删除的缩略图。
补充来说,电子设备2也可以将在空间中上传的图片的原图备份到云端,当电子设备1检测到用户1作用于缩略图902的操作时,则电子设备1从云端获取该缩略图902对应的原图数据,从而显示该原图在如图14a所示的界面。
需要说明的是,在一种可能的实现中,当电子设备1检测到用户1作用于图14b中的第二图片的缩略图902这一选项的操作(例如点击)时,响应于该操作,电子设备1根据该缩略图902对应的哈希值,从云端服务器获取第二图片的原图数据信息,并显示图14c所示的界面。
在本申请实施例中,亲情空间还提供一种美好时光功能,该功能能够可以实现对各个成员中的图片进行编辑处理。如图15所示,示例性地,当电子设备1检测到用户1作用于图15a的美好时光这一控件的操作时,电子设备1显示图15b所示的界面,在图15b中,小美这一成员中的图片可以被编辑成视频,小明这一成员中的图片也可以被编辑成视频。另外,“家庭照片”这一空间还可以设置有评论或者点赞等功能,例如当电子设备1的用户1查看“家庭照片”中的其它成员的照片时,可以对该照片进行评论或者点赞。在一种可能的设计中,“家庭照片”这一空间还可以设置有分享功能,例如当电子设备1的用户1查看“家庭照片”中的其它成员的第一照片时,可以选择分享该第一照片至“家庭照片”群组之外的成员。打比方说,电子设备1检测到用户1作用于分享这一控件的操作时,生成关于第一照片的链接,电子设备1通过发送该链接至另一成员,完成分享。
以上是以共享数据为图片为例进行说明的,共享数据也可以为电子设备中的淘宝订单信息、文本信息、视频或文件夹、健康数据、运动数据等。与共享数据为图片的数据共享方法类似,当共享数据为淘宝订单信息、文本信息、视频或文件夹、健康数据、运动数据等时,可以采用上述“家庭照片”共享方式进行数据共享。
示例性地,在本申请另一实施例中,当共享数据是运动数据时,亲情空间还可以包括共享运动数据的群组,群组中的各成员的运动数据可以被其它成员共享。其中,共享运动数据的群组的建立过程,以及群成员加入或者邀请加入的过程可以参考上文建立“家庭照片”空间的过程。举例来说,电子设备1和电子设备2响应于用户1和用户2作用于运动手环APP的操作,将运动手环APP的数据查看权限授权给亲情空间,即运动手环APP与亲情空间账号建立绑定关系。如图16所示,当电子设备1检测到用户1作用于图16a所示的亲情空间的运动图标1001的操作(例如点击)时,响应于该操作,电子设备1显示图16b所示的界面,该界面显示当前有运动成员小美和小明。当电子设备1检测到用户1作用于图16b所示的小美的图像操作(例如点击)时,电子设备1显示从运动手环APP获取的用户1的运动数据,包括行走步数、睡眠时间、心率、体重等数据。电子设备1的图16b所示的界面还提供备份运动数据到云端的选项,当用户1作用于该选项将运动数据上传到云端,则用户1下次查看运动数据,电子设备1可以从云端获取该运动数据。当然,电子设备1也可以将运动数据保存在本地,这样电子设备1可以在离线状态下随时从存储空间获取运动数据,但是会占用本地的存储空间。
在本申请其它实施例中,当共享数据是健康数据时,亲情空间还可以包括健康数据的群组,群组中的各成员的健康数据可以被其它成员共享。其中,共享健康数据的群组的建立过程,以及群成员加入或者邀请加入的过程可以参考上文建立“家庭照片”空间的过程。如图17所示,举例来说,当电子设备1检测到用户1作用于图17a所示的亲情空间的健康记录1101的操作(例如点击)时,响应于该操作,电子设备1显示图17b所示的界面,该界面显示当前有家庭成员小美和小明。当电子设备1检测到用户1作用于图17b所示的小美的图像操作(例如点击)时,电子设备1显示图17c所示的界面。电子设备1检测到用户1上传的病例图片后,可以从该病例图片信息中自动获取医院、科室、就诊时间等信息, 电子设备1的图17c所示的界面中还提供备份病例到云端的选项,当用户1作用于该选项将病例上传到云端,则用户1下次查看该病例,电子设备1可以从云端获取该病例。当然,电子设备1也可以将病例保存在本地,这样电子设备1可以在离线状态下随时从存储空间获取病例数据,但是会占用本地的存储空间。
在一种可能的设计中,如图18所示,当电子设备1检测到用户1作用于图18a所示的亲情空间1201的操作(例如点击)时,响应于该操作,电子设备1显示图18b所示的列表,列表中显示有电子设备1的用户1在“家庭空间”中的昵称、性别、生日、数据流程模式、意见反馈。检查更新、清理缓存等信息。其中,当电子设备1检测到用户1作用于图18b所示的数据流程模式1202的操作(例如点击)时,响应于该操作,电子设备1打开或关闭数据流量开关,当电子设备1打开数据流量开关时,则同步该“家庭空间”其它成员的图片信息。当然,当电子设备1关闭数据流量开关,但打开WiFi热点时,也可以同步接入到该WiFi热点的其它成员的图片信息。
在一种情况下,在“家庭照片”这一空间中电子设备1可以相当于是区块链网络的中心节点,其它成员则相当于是区块链网络的普通节点。如果电子设备2接入网络,但是电子设备1没有接入网络时,则电子设备2无法从电子设备1获取“家庭照片”所有成员的图片信息,则电子设备2无法同步更新其它成员的图片信息。
结合本申请实施例提供的区块链技术来说,可见上述场景中“家庭照片”这一空间的创建者相当于区块链网络的中心节点,而其它成员则相当于区块链网络的普通节点。例如电子设备1相当于图4a中的节点2,电子设备2相当于图4a中的节点1或节点3。其中,“家庭照片”这一空间下面的小美的图片信息相当于电子设备1的私有区块链,“家庭照片”这一空间下面的小明的图片信息相当于电子设备2的私有区块链。最终,电子设备1和电子设备2同步数据后会生成具有相同图片信息的“家庭照片”空间,这一空间相当于公有区块链。各个电子设备每次上传的数据构成该电子设备对应的私有区块链中的一个子区块,电子设备1每次认证成功,所认证通过的所有数据构成公有区块链的主区块。
换句话说,电子设备1和电子设备2可以在离线状态下,上传照片到自身的私有区块链中,当电子设备2接入网络时,可以将向电子设备1发送认证请求,请求认证在离线状态下上传的图片,若电子设备1认证通过,则电子设备2上传的图片信息被同步到公有区块链中,最终电子设备1上的“家庭空间”中也包括电子设备2上传的该图片。所以说,群组的各个成员,可以随时随地地分享图片,并记录到图片信息到自身的私有区块链中,并不需要电子设备1(中心节点)始终在线或及时响应才能分享图片。对于各个电子设备来说,当认证失败时,也只需要回退到最后一个认证成功的区块,例如回退到最后一次上传成功的状态。
在另一种情况下,在“家庭照片”这一空间中电子设备1和电子设备2可以相当于是普通节点,电子设备1和电子设备2可以在离线或在线状态下,生成上传照片的哈希值和缩略图,并在自身的私有区块链新增子区块,该子区块信息中保存有该哈希值和缩略图,以及该哈希值和缩略图与上传图片之间的对应关系。其中,云服务器可以与电子设备1和电子设备2建立网络连接,当云服务器与电子设备1之间建立网络连接时,电子设备1将自身的私有区块链的新增的子区块信息上报至云服务器侧,云服务器侧对该子区块认证通过后,将该子区块信息保存至公有区块链新增的主区块中。同样的,当云服务器与电子设备2之间建立网络连接时,电子设备2将自身的私有区块链的新增的子区块信息上报至云服 务器侧,云服务器侧对该子区块认证通过后,将该子区块信息保存至公有区块链新增的主区块中。
本申请实施例进一步提供了一种照片共享方法,如图19所示,该方法可以包括以下步骤:
1901、当第一电子设备与第二电子设备未发起同步时,第一电子设备检测到用户的第一操作。
1902、第一电子设备响应于该第一操作,在第一电子设备的第一共享相簿中添加第一照片信息。
其中,第一共享相簿包括所述第一电子设备添加的照片信息。
1903、第一电子设备当所述第一电子设备与所述第二电子设备发起同步时,向第二电子设备发送添加所述第一照片信息的第一请求消息。
1904、第一电子设备接收所述第二电子设备发送的拒绝添加所述第一照片信息的第一请求响应消息。
1905、第一电子设备将所述第一共享相簿中的所述第一照片信息删除。
结合上述场景图11和图12来说,第一电子设备相当于图中的电子设备2,第二电子设备相当于图中的电子设备1。另外,第一照片信息可以直接指第一照片,也可以指与第一照片对应的索引信息,例如链接信息或与第一照片的缩略图等。结合图12来说,第一照片信息相当于图12中的第三照片。
当电子设备2与电子设备1未发起同步时,电子设备2向“家庭照片”里面用于存储电子设备2的用户小明的照片信息的相簿(即第一共享相簿)上传第三照片。所谓未发起同步可以指电子设备2没有与电子设备1建立网络连接,也可能指电子设备2与电子设备1建立了网络连接,电子设备2当前处于不与电子设备1进行同步的时段。
当电子设备2与电子设备1发起同步时,电子设备1可以接收到电子设备2发送第三照片的认证请求,该认证请求相当于步骤1903中的添加所述第一照片信息的第一请求消息,当电子设备1确定第三照片的数据量过大,对第三照片认证失败未添加第三照片到“家庭照片”时,电子设备1向电子设备2发送第一请求响应消息,即通知电子设备2第三照片为认证失败的状态,拒绝添加第三照片。这样电子设备2就将第三照片从第一共享相簿中删除,如图12b所示,小明的相簿中仅有两个照片信息。
在一种可能的实施例中,在第一电子设备将所述第一共享相簿中的所述第一照片信息删除之后,该照片共享方法还包括:第一电子设备将第二电子设备中的第四共享相簿的照片信息同步至所述第一电子设备。其中,第四共享相簿包括所述第一共享相簿的照片信息、第二电子设备的第二共享相簿的照片信息和第三电子设备的第三共享相簿的照片信息;第一共享相簿的照片信息不包括第一照片信息。
结合图20来说,假设“家庭照片”这一空间中又新增一个成员电子设备3,其中电子设备3的用户昵称为小王,且小王在空间中自身的相簿中添加成功一张照片。那么当电子设备2同步电子设备1的“家庭照片”之后,电子设备2中“家庭照片”包括电子设备1的照片、电子设备2的照片和电子设备3的照片。也就是说,第四共享相簿相当于图20中的“家庭照片”这一空间,第二共享相簿相当于用于存储电子设备1的用户小美的照片信息的相簿。第三共享相簿相当于用于存储电子设备3的用户小王的照片信息的相簿。从图20中可见, 同步之后,电子设备2小明的相簿中不包括认证失败的第三照片。
进一步地,在一种可能的实施例中,在检测到用户的第一操作之前,当第一电子设备与第二电子设备未发起同步时,第一电子设备检测到用户的第二操作;响应于该第二操作,在第一共享相簿中添加第二照片信息,当第一电子设备与第二电子设备发起同步时,第一电子设备向所述第二电子设备发送添加第二照片信息的第二请求消息。接着,第一电子设备接收所述第二电子设备发送的添加成功所述第二照片信息的第二请求响应消息。这样第一电子设备的第一共享薄中的第二照片信息添加成功。
仍然是在检测到用户的第一操作之前,当第一电子设备与第二电子设备未发起同步时,第一电子设备检测到用户的第三操作;响应于该第三操作,在包括所述第二照片信息的第一共享相簿中添加第三照片信息;当第一电子设备与第二电子设备发起同步时,第一电子设备向所述第二电子设备发送添加所述第三照片信息的第三请求消息,接着,第一电子设备接收所述第二电子设备发送的添加成功所述第三照片信息的第三请求响应消息。这样第一电子设备的第一共享薄中的第三照片信息添加成功。
参见图21来说,电子设备2检测到用户2作用于相册中的照片2101的操作,参见图21a和图21b所示,向电子设备1发送添加照片2101至“家庭照片”空间的请求消息,当电子设备1添加照片成功后,电子设备2对应的小明的共享相簿显示有一张照片,参见图21c所示。接着,电子设备2检测到用户2作用于相册中的照片2102的操作,参见图21d和图21e所示,向电子设备1发送添加照片2102至“家庭照片”空间的请求消息,当电子设备1添加照片成功后,电子设备2对应的小明的共享相簿显示有两张照片,参见图21f所示。
结合本申请实施例提供的区块链技术来说,第一电子设备和所述第二电子设备、第三电子设备为区块链网络中的设备;第二电子设备相当于是区块链网络的中心节点,而第一电子设备和第三电子设备则相当于区块链网络的普通节点。
其中,照片信息可以以记录的形式添加到共享相簿中,例如第二照片信息对应第一记录包括第一标识、所述第二照片的哈希值和所述第二照片的内容数据;第三照片信息对应的第二记录包括第二标识、第二照片的哈希值和第三照片的内容数据,以及第一标识。也就是说第二记录是与第一记录相关联的。结合本申请实施例提供的区块链技术举例来说,第一记录相当于图4b中子区块11,第二记录相当于图4b中的子区块12。
在本申请一种可能的实施例中,当第一电子设备与第二电子设备未发起同步时,第一电子设备检测到用户的第四操作;响应于第四操作,第一电子设备将第一共享相簿中的第三照片信息删除。当第一电子设备与第二电子设备发起同步时,第一电子设备向第二电子设备发送删除第三照片信息的第四请求消息;第一电子设备接收第二电子设备发送的删除成功第三照片信息的第四请求响应消息。
结合上述场景图13来说,电子设备2在没有与电子设备1建立网络连接时,电子设备2删除了图13b中的图片802。当电子设备2与电子设备1建立网络连接时,电子设备2向电子设备1发送删除该图片802的请求消息,电子设备1将“家庭照片”中的照片802删除成功后,向电子设备2返回删除成功的响应消息,这样“家庭照片”这一空间中的照片802就被删除了。
本申请其他一些实施例提供了另一种照片共享方法,如图22所示,该方法包括:2201、第二电子设备建立与第一电子设备的网络连接。例如,第一电子设备和第二电子设备可以 基于wifi热点、wifi直连、蓝牙、zigbee或NFC等通信网络近距离连接。2202、第二电子设备接收第一电子设备发送的添加第一照片信息的第一请求消息。2203、响应于该第一请求消息,第二电子设备向第一电子设备发送拒绝添加第一照片信息的第一请求响应消息。
结合上述场景图11和图12来说,第一电子设备相当于图中的电子设备2,第二电子设备相当于图中的电子设备1。另外,第一照片信息可以直接指第一照片,也可以指与第一照片对应的索引信息,例如链接信息或与第一照片的缩略图等。结合图12来说,第一照片信息相当于图12中的第三照片。因第二电子设备的上述执行步骤与第一电子设备相对应,所以具体内容可以参见上文介绍,本实施例中不再重复赘述。
在本申请的一些实施例中,本申请实施例公开了一种第一电子设备,如图23所示,该第一电子设备用于实现以上各个方法实施例中记载的方法,其包括:检测单元2301、处理单元2302、发送单元2303、接收单元2304。其中,检测单元2301用于支持第一电子设备执行图19中的步骤1901;处理单元2302用于支持第一电子设备执行图19中的步骤1902和步骤1905;发送单元2303用于支持电子设备执行图19中的步骤1903,接收单元2304用于支持电子设备执行图19中的步骤1904。其中,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。
在本申请的另一些实施例中,本申请实施例公开了一种第一电子设备,如图24所示,该电子设备可以包括:触摸屏2401,其中,所述触摸屏2401包括触敏表面2406和显示屏2407;一个或多个处理器2402;存储器2403;一个或多个应用程序(未示出);以及一个或多个计算机程序2404,上述各器件可以通过一个或多个通信总线2405连接。其中该一个或多个计算机程序2404被存储在上述存储器2403中并被配置为被该一个或多个处理器2402执行,该一个或多个计算机程序2404包括指令,上述指令可以用于执行如图19及相应实施例中的各个步骤。
在本申请的一些实施例中,本申请实施例公开了一种第二电子设备,如图25所示,该第二电子设备用于实现以上各个方法实施例中记载的方法,其包括:连接单元2501、接收单元2502、以及发送单元2503。其中,连接单元2501用于支持第二电子设备执行图22中的步骤2501;接收单元2502用于支持第二电子设备执行图22中的步骤2202;发送单元用于支持第二电子设备执行图22中的步骤2203。其中,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。
在本申请的另一些实施例中,本申请实施例公开了一种第二电子设备,如图26所示,该电子设备可以包括:触摸屏2601,其中,所述触摸屏2601包括触敏表面2606和显示屏2607;一个或多个处理器2602;存储器2603;一个或多个应用程序(未示出);以及一个或多个计算机程序2604,上述各器件可以通过一个或多个通信总线2605连接。其中该一个或多个计算机程序2604被存储在上述存储器2603中并被配置为被该一个或多个处理器2602执行,该一个或多个计算机程序2604包括指令,上述指令可以用于执行如图22及相应实施例中的各个步骤。
本申请实施例还提供一种计算机存储介质,该计算机存储介质中存储有计算机指令,当该计算机指令在电子设备上运行时,使得电子设备执行上述相关方法步骤实现上述实施例中的照片共享方法。
本申请实施例还提供了一种计算机程序产品,当该计算机程序产品在计算机上运行时, 使得计算机执行上述相关步骤,以实现上述实施例中的照片共享方法。
另外,本申请的实施例还提供一种装置,这个装置具体可以是芯片,组件或模块,该装置可包括相连的处理器和存储器;其中,存储器用于存储计算机执行指令,当装置运行时,处理器可执行存储器存储的计算机执行指令,以使芯片执行上述各方法实施例中的照片共享方法。
其中,本申请实施例提供的电子设备、计算机存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。
通过以上实施方式的描述,所属领域的技术人员可以了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其他的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其他的形式。
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上内容,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。

Claims (11)

  1. 一种照片共享方法,应用于第一电子设备,其特征在于,包括:
    当所述第一电子设备与第二电子设备未发起同步时,检测到用户的第一操作;
    响应于所述第一操作,在第一电子设备的第一共享相簿中添加第一照片信息,所述第一共享相簿包括所述第一电子设备添加的照片信息;
    当所述第一电子设备与所述第二电子设备发起同步时,向所述第二电子设备发送添加所述第一照片信息的第一请求消息;
    接收所述第二电子设备发送的拒绝添加所述第一照片信息的第一请求响应消息;
    将所述第一共享相簿中的所述第一照片信息删除。
  2. 根据权利要求1所述的方法,其特征在于,所述第一电子设备将所述第一共享相簿中的所述第一照片信息删除之后,还包括:
    将所述第二电子设备中的第四共享相簿的照片信息同步至所述第一电子设备,其中,所述第四共享相簿包括所述第一共享相簿的照片信息、所述第二电子设备的第二共享相簿的照片信息和第三电子设备的第三共享相簿的照片信息;所述第一共享相簿的照片信息不包括所述第一照片信息。
  3. 根据权利要求2所述的方法,其特征在于,还包括:
    在检测到用户的第一操作之前,当所述第一电子设备与所述第二电子设备未发起同步时,检测到用户的第二操作;
    响应于所述第二操作,在所述第一共享相簿中添加第二照片信息;
    当所述第一电子设备与所述第二电子设备发起同步时,向所述第二电子设备发送添加所述第二照片信息的第二请求消息;
    接收所述第二电子设备发送的添加成功所述第二照片信息的第二请求响应消息;
    当所述第一电子设备与所述第二电子设备未发起同步时,检测到用户的第三操作;
    响应于所述第三操作,在包括所述第二照片信息的所述第一共享相簿中添加第三照片信息;
    当所述第一电子设备与所述第二电子设备发起同步时,向所述第二电子设备发送添加所述第三照片信息的第三请求消息;
    接收所述第二电子设备发送的添加成功所述第三照片信息的第三请求响应消息。
  4. 根据权利要求3所述的方法,其特征在于,还包括:
    所述第一电子设备、所述第二电子设备为区块链网络中的设备;
    所述第二照片信息对应第一记录包括第一标识、所述第二照片的哈希值和所述第二照片的内容数据;
    所述第三照片信息对应的第二记录包括第二标识、所述第二照片的哈希值和所述第三照片的内容数据,以及所述第一标识。
  5. 根据权利要求3所述的方法,其特征在于,
    当所述第一电子设备与所述第二电子设备未发起同步时,检测到用户的第四操作;
    响应于所述第四操作,将所述第一共享相簿中的所述第三照片信息删除;
    当所述第一电子设备与所述第二电子设备发起同步时,向所述第二电子设备发送删除所述第三照片信息的第四请求消息;
    接收所述第二电子设备发送的删除成功所述第三照片信息的第四请求响应消息。
  6. 一种照片共享方法,应用于第二电子设备,其特征在于,包括:
    建立与第一电子设备的网络连接;
    接收所述第一电子设备发送的添加第一照片信息的第一请求消息;
    响应于所述第一请求消息,向所述第一电子设备发送拒绝添加所述第一照片信息的第一请求响应消息。
  7. 根据权利要求6所述的方法,其特征在于,还包括:
    接收所述第一电子设备发送的添加第二照片信息的第二请求消息;
    响应于所述第二请求消息,向所述第一电子设备发送添加成功所述第二照片信息的第二请求响应消息;
    接收所述第一电子设备发送的添加第三照片信息的第三请求消息;
    响应于所述第三请求消息,向所述第一电子设备发送添加成功所述第三照片信息的第三请求响应消息。
  8. 根据权利要求7所述的方法,其特征在于,还包括:
    所述第一电子设备、所述第二电子设备为区块链网络中的设备;
    所述第二照片信息对应第一记录包括第一标识、所述第二照片的哈希值和所述第二照片的内容数据;
    所述第三照片信息对应的第二记录包括第二标识、所述第二照片的哈希值和所述第三照片的内容数据,以及所述第一标识。
  9. 根据权利要求7所述的方法,其特征在于,还包括:
    接收所述第一电子设备发送的删除所述第三照片信息的第四请求消息;
    响应于所述第四请求消息,向所述第一电子设备发送删除成功所述第三照片信息的第四请求响应消息。
  10. 一种电子设备,其特征在于,包括一个或多个处理器和一个或多个存储器;
    所述一个或多个存储器与所述一个或多个处理器耦合,所述一个或多个存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,当所述一个或多个处理器执行所述计算机指令时,所述电子设备执行如权利要求1至9任一项所述的照片共享方法。
  11. 一种计算机存储介质,其特征在于,所述计算机可读存储介质包括计算机程序,当计算机程序在终端上运行时,使得所述终端执行如权利要求1至9任一所述的方法。
PCT/CN2018/100304 2018-08-13 2018-08-13 一种照片共享方法及电子设备 WO2020034075A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
US17/268,415 US11470153B2 (en) 2018-08-13 2018-08-13 Photo sharing method and electronic device
CN201880072582.0A CN111316619B (zh) 2018-08-13 2018-08-13 一种照片共享方法及电子设备
EP18929930.8A EP3813334A4 (en) 2018-08-13 2018-08-13 PHOTO SHARING PROCESS AND ELECTRONIC DEVICE
PCT/CN2018/100304 WO2020034075A1 (zh) 2018-08-13 2018-08-13 一种照片共享方法及电子设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/100304 WO2020034075A1 (zh) 2018-08-13 2018-08-13 一种照片共享方法及电子设备

Publications (1)

Publication Number Publication Date
WO2020034075A1 true WO2020034075A1 (zh) 2020-02-20

Family

ID=69524615

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/100304 WO2020034075A1 (zh) 2018-08-13 2018-08-13 一种照片共享方法及电子设备

Country Status (4)

Country Link
US (1) US11470153B2 (zh)
EP (1) EP3813334A4 (zh)
CN (1) CN111316619B (zh)
WO (1) WO2020034075A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112488717A (zh) * 2020-12-30 2021-03-12 国网河南省电力公司南阳供电公司 一种基于区块链的电力管理方法
CN115695639A (zh) * 2022-10-27 2023-02-03 维沃移动通信有限公司 图像分享方法、装置、电子设备和可读存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100211863A1 (en) * 2009-02-19 2010-08-19 Microsoft Corporation Action-based pre-population of user profiles
CN103108007A (zh) * 2011-11-14 2013-05-15 联想(北京)有限公司 终端设备及其文件接收方法
CN104954150A (zh) * 2014-03-28 2015-09-30 中国移动通信集团公司 一种多屏互动方法及装置
CN105612472A (zh) * 2012-06-10 2016-05-25 苹果公司 跨不同的设备来分享图像和评论

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100363030B1 (ko) * 2001-03-27 2002-11-30 서영현 인터넷을 이용한 자료공유방법 및 그 시스템
CN100563197C (zh) * 2006-03-16 2009-11-25 腾讯科技(深圳)有限公司 一种图片共享系统和方法
KR101381297B1 (ko) * 2012-09-06 2014-04-04 (주)제이이모바일 원본 이미지와 동일 사이즈 비율의 이미지 출력이 가능한 이미지 공유방법
US10275609B2 (en) * 2012-12-07 2019-04-30 Benedict Ow File sharing system and method
CN203104515U (zh) * 2012-12-14 2013-07-31 四川九洲电器集团有限责任公司 一种智能终端设备间图片共享系统
US8943140B1 (en) * 2014-03-26 2015-01-27 Ankit Dilip Kothari Assign photographers on an event invite and automate requesting, uploading, and sharing of photos and videos for an event
US9747297B2 (en) * 2014-09-23 2017-08-29 Amazon Technologies, Inc. Synchronization of shared folders and files
US10402792B2 (en) 2015-08-13 2019-09-03 The Toronto-Dominion Bank Systems and method for tracking enterprise events using hybrid public-private blockchain ledgers
KR20170097980A (ko) 2016-02-19 2017-08-29 삼성전자주식회사 전자 장치의 컨텐트 그룹 공유 방법 및 그 전자 장치
CN105975868A (zh) 2016-04-29 2016-09-28 杭州云象网络技术有限公司 一种基于区块链的证据保全方法及装置
CN106022681A (zh) 2016-05-13 2016-10-12 杭州云象网络技术有限公司 一种基于区块链的物流追踪方法
CN106779737B (zh) 2016-11-30 2021-06-11 电子科技大学 基于区块链技术的产品溯源验证方法
CN206237441U (zh) 2016-12-19 2017-06-09 杜伯仁 资源共享区块链网络
CN107466089B (zh) * 2017-08-23 2020-04-10 Oppo广东移动通信有限公司 一种数据共享方法、装置及终端设备
CN108183959B (zh) * 2017-12-29 2021-09-07 深圳市轱辘车联数据技术有限公司 一种基于区块链的车辆共享方法、服务器及可读存储介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100211863A1 (en) * 2009-02-19 2010-08-19 Microsoft Corporation Action-based pre-population of user profiles
CN103108007A (zh) * 2011-11-14 2013-05-15 联想(北京)有限公司 终端设备及其文件接收方法
CN105612472A (zh) * 2012-06-10 2016-05-25 苹果公司 跨不同的设备来分享图像和评论
CN104954150A (zh) * 2014-03-28 2015-09-30 中国移动通信集团公司 一种多屏互动方法及装置

Non-Patent Citations (1)

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

Also Published As

Publication number Publication date
US11470153B2 (en) 2022-10-11
US20210320974A1 (en) 2021-10-14
CN111316619A (zh) 2020-06-19
EP3813334A1 (en) 2021-04-28
CN111316619B (zh) 2021-08-03
EP3813334A4 (en) 2021-07-14

Similar Documents

Publication Publication Date Title
WO2020034227A1 (zh) 一种多媒体内容同步方法及电子设备
CN113609498B (zh) 数据保护方法及电子设备
CN111628916B (zh) 一种智能音箱与电子设备协作的方法及电子设备
US20230021994A1 (en) Cross-Device Content Projection Method and Electronic Device
WO2020224447A1 (zh) 一种在联系人中添加智能家居设备的方法及系统
WO2021159746A1 (zh) 文件共享方法、系统及相关设备
CN113542839A (zh) 电子设备的投屏方法和电子设备
WO2021253975A1 (zh) 应用程序的权限管理方法、装置和电子设备
WO2021052204A1 (zh) 基于通讯录的设备发现方法、音视频通信方法及电子设备
WO2021233161A1 (zh) 一种家庭日程融合的方法及装置
CN113536374A (zh) 图像隐私的保护方法及电子设备
WO2020062304A1 (zh) 一种文件传输方法及电子设备
WO2020034075A1 (zh) 一种照片共享方法及电子设备
WO2021082620A1 (zh) 一种图像识别方法及电子设备
CN114064160A (zh) 应用图标布局方法及相关装置
WO2020051916A1 (zh) 一种传输信息的方法及电子设备
WO2021147483A1 (zh) 数据分享的方法和装置
CN116527266A (zh) 数据归集方法及相关设备
CN114117367A (zh) 一种数据保护方法及电子设备
CN114567871A (zh) 文件共享的方法、装置、电子设备以及可读存储介质
WO2023045876A1 (zh) 应用程序安装方法及相关设备
WO2022222733A1 (zh) 数据传输方法及相关设备
WO2023142941A1 (zh) 播放记录显示方法及相关设备
WO2024093614A1 (zh) 设备输入方法、系统、电子设备及存储介质
CN114071055B (zh) 一种快速加入会议的方法以及相关设备

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

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2018929930

Country of ref document: EP

Effective date: 20210119

NENP Non-entry into the national phase

Ref country code: DE