WO2023061298A1 - 一种图片备份***、方法与设备 - Google Patents

一种图片备份***、方法与设备 Download PDF

Info

Publication number
WO2023061298A1
WO2023061298A1 PCT/CN2022/124141 CN2022124141W WO2023061298A1 WO 2023061298 A1 WO2023061298 A1 WO 2023061298A1 CN 2022124141 W CN2022124141 W CN 2022124141W WO 2023061298 A1 WO2023061298 A1 WO 2023061298A1
Authority
WO
WIPO (PCT)
Prior art keywords
picture
user
information
target
candidate
Prior art date
Application number
PCT/CN2022/124141
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 花瓣云科技有限公司
Publication of WO2023061298A1 publication Critical patent/WO2023061298A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces

Definitions

  • the present application relates to the technical field of terminals, and in particular to a picture backup system, method and device.
  • the data volume of the pictures stored by the user using the terminal device is also increasing.
  • more and more users choose to backup and store pictures on cloud servers.
  • the user can upload the local pictures of the terminal device to the server through the picture backup software.
  • the picture backup software When a user needs to view a picture, he can search for the picture in the picture backup software at any time and download it locally.
  • the terminal device backs up the pictures to the server has great requirements on the bandwidth cost and storage cost of the server.
  • the commonly used method to improve photo transmission performance is: when uploading pictures, the terminal device recodes the pictures into high-definition thumbnails, and then uploads the high-definition thumbnails to the server. In this way, image transmission bandwidth is saved and storage costs are saved.
  • this processing method will cause the picture stored on the server to be a changed picture and cannot be restored, which will affect the user experience.
  • the present application provides a picture backup system, method and device.
  • the present application provides a picture backup system, which includes a terminal device and a storage device.
  • the terminal device is configured to send the backup request to the storage device, where the backup request is used to request to back up the target picture in the storage device;
  • the system is configured to determine, from stored picture information of at least one candidate picture, picture information of a reference picture corresponding to the target picture; wherein the at least one candidate picture includes a first A picture backed up in the storage device by at least one second user associated with the user; determining difference information of the target picture relative to the reference picture.
  • the storage device or the terminal device can determine the picture information of the reference picture corresponding to the target picture from at least one candidate picture stored.
  • at least one candidate picture includes a picture backed up in a storage device by at least one second user associated with the first user, and screening reference pictures in the pictures backed up by at least one second user can narrow the range of candidate pictures, thereby improving Determine the efficiency of the reference picture.
  • the storage device or the terminal device may determine difference information of the target picture relative to the reference picture.
  • the terminal device does not need to actually upload the target picture
  • the storage device does not need to store the target picture, but stores the difference information of the target picture to realize the backup of the target picture, saving the bandwidth cost of picture backup and saving the storage cost, and efficiently realizes Image backup.
  • the similarity between the reference picture and the target picture is greater than a set threshold.
  • the reference picture is a picture similar to the target picture
  • the picture backup system can determine the reference picture and calculate the difference information between the target picture and the reference picture, so as to back up the target picture by using the difference information.
  • system is further configured to: acquire user information of the first user; determine at least one second user associated with the first user according to the user information of the first user.
  • the storage device or the terminal device can acquire the user information of the first user and determine at least one second user associated with the first user.
  • the picture backed up by the second user in the storage device may be similar to the target picture requested by the first user, so the range of pictures to be selected when searching for a reference picture can be narrowed down to improve the accuracy of determining the reference picture. s efficiency.
  • the user information of the first user includes at least one of the following:
  • the usual wireless local area network of the first user is the usual wireless local area network of the first user
  • a tag of the first user where the tag is information selected by the first user to represent preferences or characteristics of the first user.
  • the first user and the second user meet at least one of the following conditions:
  • the first user and the second user have the same common wireless local area network
  • said first user has the same Internet Protocol address as said second user
  • the distance between the permanent address of the first user and the permanent address of the second user is less than a first threshold
  • the degree of coincidence between the movement trajectory of the first user and the movement trajectory of the second user is greater than a second threshold
  • the number of times the first user contacts the second user through a social application is greater than a third threshold
  • the second user is a user selected by the first user who has a close relationship with the first user
  • the first user has the same tag as the second user.
  • At least one second user associated with the first user can be determined according to the user information.
  • the user information can include information such as user preference or user characteristics, so as to ensure that the determined second user is associated with the first user.
  • the step of determining the picture information of the reference picture corresponding to the target picture from the stored picture information of at least one candidate picture is performed by the terminal device or the storage device.
  • both the storage device and the terminal device can be used to determine the picture information of the reference picture, and flexibly realize the picture backup method provided in this application.
  • the backup request includes the picture information of the target picture; the system is specifically configured to: acquire the picture information of the at least one candidate picture, and according to the picture information of the target picture and the match the picture information of the at least one candidate picture, and determine the picture information of the reference picture.
  • the picture information of the target picture can be carried in the backup request.
  • the storage device or the terminal device can determine the reference picture corresponding to the target picture from at least one candidate picture according to the picture information of the target picture and the picture information of the candidate picture, so that the found reference picture is a picture similar to the target picture, and can be used to calculate difference information.
  • the picture information of the target picture matches the picture information of at least one candidate picture, which may be part or all of the content contained in the picture information of the target picture and the content contained in the picture information of the candidate picture, or part or all of the content contained in the picture information. All content matches the preset matching criteria.
  • the candidate picture may be determined to be the reference picture.
  • the difference between the shooting location of the target picture and the shooting time of a candidate picture is less than a preset threshold, and the distance between the shooting location of the target picture and the shooting location of the candidate picture is smaller than the preset threshold, then it can be The candidate picture is determined as a reference picture.
  • the content contained in the picture information of the target picture and the candidate picture may involve many dimensions, such as the picture itself, attribute information of the picture, shooting information of the picture, and the like.
  • the matching condition may be that the similarity of information in one or more dimensions in the picture information of the target picture and the picture information of the candidate picture is greater than a preset threshold.
  • the backup request includes the picture information of the reference picture; the storage device is further configured to: acquire the picture information of the at least one candidate picture, and store the picture information of the at least one candidate picture The picture information is sent to the terminal device; the terminal device is further configured to: receive the picture information of at least one candidate picture sent by the storage device, and according to the picture information of the target picture and the picture information of the at least one candidate picture The picture information is used to determine the picture information of the reference picture.
  • the terminal device can determine the picture information of the reference picture corresponding to the target picture, and carry the picture information of the reference picture in the backup request, so that the storage device can obtain the picture information of the reference picture after receiving the backup request, reducing The calculation amount of the storage device improves the backup efficiency.
  • the picture information of any candidate picture or the picture information of the target picture includes at least one of the following:
  • the picture itself picture logo, picture size, shooting time, shooting location, thumbnail;
  • the picture information of the target picture and the picture information of the reference picture meet at least one of the following conditions:
  • the picture size of the target image is the same as the picture size of the reference picture
  • the difference between the shooting time of the target picture and the shooting time of the reference picture is less than a fourth threshold
  • the distance between the shooting position of the target picture and the shooting position of the reference picture is smaller than a fifth threshold.
  • the picture information can include at least one item of logo, picture size, shooting time, shooting location, and thumbnail, so that when the storage device or terminal device determines the picture information of the reference picture of the target picture, it can The picture information and the picture information of the candidate pictures select qualified candidate pictures as reference pictures to ensure that the determined reference pictures are similar pictures to the target picture and can be used to calculate difference information.
  • the step of determining the difference information of the target picture relative to the reference picture is performed by the terminal device or the storage device.
  • the difference information of the target picture can be determined by the terminal device and then sent to the storage device, or can be determined by the storage device, so that the difference information of the target picture can be flexibly calculated.
  • the picture information of the reference picture determined by the storage device is the reference picture itself.
  • the storage device is specifically configured to: determine at least one similar picture from the at least one candidate picture according to the picture information of the target picture and the picture information of the at least one candidate picture; based on a deep learning algorithm, from The reference picture is determined from the at least one similar picture.
  • the storage device is specifically configured to: respectively input at least one thumbnail of a similar picture and the thumbnail of the target picture into the deep learning model; obtain each picture output by the deep learning model The similarity between the similar picture and the target picture; using a similar picture with a similarity with the target picture greater than a set threshold as the reference picture.
  • the storage device when the storage device determines the reference picture corresponding to the target picture, it can first determine at least one similar picture from at least one candidate picture, and then determine the reference picture from at least one similar picture based on the deep learning algorithm to further optimize Search space when screening reference images, improving the efficiency and accuracy of determining reference images.
  • the terminal device is further configured to: send a download request to the storage device, where the download request is used to request acquisition of the target picture; receive the difference information sent by the storage device and the the picture information of the reference picture; generating the target picture according to the difference information and the picture information of the reference picture;
  • the storage device is further configured to: send the difference information and the picture information of the reference picture to the terminal device.
  • the terminal device after the terminal device backs up the target picture to the storage device, when the terminal device needs to download the target picture to the local again, it can send a download request to the storage device.
  • the storage device may send the picture information and difference information of the reference picture to the terminal device, and the terminal device may generate a target picture according to the picture information and difference information of the reference picture.
  • the difference information stored in the storage device and the picture information of the reference picture can be used to restore the target picture, ensuring the accuracy of the backup target picture.
  • the storage device is a server or a home storage device.
  • the present application provides a picture backup method, which is applied to a storage device.
  • the method includes:
  • the method further includes: acquiring user information of the first user; and determining at least one second user associated with the first user according to the user information of the first user.
  • the user information of the first user includes at least one of the following:
  • the usual wireless local area network of the first user is the usual wireless local area network of the first user
  • a tag of the first user where the tag is information selected by the first user to represent preferences or characteristics of the first user.
  • the first user and the second user meet at least one of the following conditions:
  • the first user and the second user have the same common wireless local area network
  • said first user has the same Internet Protocol address as said second user
  • the distance between the permanent address of the first user and the permanent address of the second user is less than a first threshold
  • the degree of coincidence between the movement trajectory of the first user and the movement trajectory of the second user is greater than a second threshold
  • the number of times the first user contacts the second user through a social application is greater than a third threshold
  • the second user is a user selected by the first user who has a close relationship with the first user
  • the first user has the same tag as the second user.
  • the determining the picture information of the reference picture corresponding to the target picture from the stored picture information of at least one candidate picture includes: acquiring the picture information of the at least one candidate picture, according to the match the picture information of the target picture with the picture information of the at least one candidate picture, and determine the picture information of the reference picture.
  • the picture information of any candidate picture or the picture information of the target picture includes at least one of the following:
  • the picture itself picture logo, picture size, shooting time, shooting location, thumbnail;
  • the picture information of the target picture and the picture information of the reference picture meet at least one of the following conditions:
  • the picture size of the target image is the same as the picture size of the reference picture
  • the difference between the shooting time of the target picture and the shooting time of the reference picture is less than a fourth threshold
  • the distance between the shooting position of the target picture and the shooting position of the reference picture is smaller than a fifth threshold.
  • the method further includes: receiving a download request sent by the terminal device, where the download request is used to request acquisition of the target picture; sending the difference information and the picture information of the reference picture to to the terminal device, so that the terminal device generates the target picture according to the difference information and the picture information of the reference picture.
  • the storage device is a server or a home storage device.
  • the present application provides a picture backup method, which is applied to a terminal device.
  • the method includes:
  • the method before determining the picture information of the reference picture corresponding to the target picture from the stored picture information of at least one candidate picture, the method further includes: receiving the at least one picture information sent by the storage device.
  • the picture information of a candidate picture before determining the picture information of the reference picture corresponding to the target picture from the stored picture information of at least one candidate picture, the method further includes: receiving the at least one picture information sent by the storage device. The picture information of a candidate picture.
  • the method further includes: sending the user information of the first user to the storage device, so that the storage device determines the user information of the first user according to the user information of the first user associated at least one second user; or determine the at least one second user selected by the first user, and send the user identification of the at least one second user to the storage device, so that the storage device At least one second user associated with the first user is determined according to the user identifier of the at least one second user.
  • the user information of the first user includes at least one of the following:
  • the usual wireless local area network of the first user is the usual wireless local area network of the first user
  • a tag of the first user where the tag is information selected by the first user to represent preferences or characteristics of the first user.
  • the first user and the second user meet at least one of the following conditions:
  • the first user and the second user have the same common wireless local area network
  • said first user has the same Internet Protocol address as said second user
  • the distance between the permanent address of the first user and the permanent address of the second user is less than a first threshold
  • the degree of coincidence between the movement trajectory of the first user and the movement trajectory of the second user is greater than a second threshold
  • the number of times the first user contacts the second user through a social application is greater than a third threshold
  • the second user is a user selected by the first user who has a close relationship with the first user
  • the first user has the same label as the second user.
  • the determining the picture information of the reference picture corresponding to the target picture from the stored picture information of at least one candidate picture includes: acquiring the picture information of the at least one candidate picture, according to the match the picture information of the target picture with the picture information of the at least one candidate picture, and determine the picture information of the reference picture.
  • the picture information of any candidate picture or the picture information of the target picture includes at least one of the following:
  • the picture itself picture logo, picture size, shooting time, shooting location, thumbnail;
  • the picture information of the target picture and the picture information of the reference picture meet at least one of the following conditions:
  • the picture size of the target image is the same as the picture size of the reference picture
  • the difference between the shooting time of the target picture and the shooting time of the reference picture is less than a fourth threshold
  • the distance between the shooting position of the target picture and the shooting position of the reference picture is smaller than a fifth threshold.
  • the method further includes: sending a download request to the storage device, where the download request is used to request acquisition of the target picture; receiving the difference information and the reference image sent by the storage device Picture information of a picture; generating the target picture according to the difference information and the picture information of the reference picture.
  • the present application provides a picture backup device, the device includes a plurality of functional modules; the plurality of functional modules interact to implement the methods in any one of the above aspects and implementations thereof.
  • the multiple functional modules can be implemented based on software, hardware or a combination of software and hardware, and the multiple functional modules can be combined or divided arbitrarily based on specific implementations.
  • the present application provides a storage device, including at least one processor and at least one memory, where computer program instructions are stored in the at least one memory, and when the storage device is running, the at least one processor executes any of the above-mentioned Aspects and methods executed by storage devices in various implementations thereof.
  • the present application provides a terminal device, including at least one processor and at least one memory, where computer program instructions are stored in the at least one memory, and when the electronic device is running, the at least one processor executes any of the above-mentioned Aspects and methods executed by a terminal device in various implementation manners thereof.
  • the present application further provides a computer program, which, when the computer program is run on a computer, causes the computer to execute the method in any one of the above aspects and its various implementation manners.
  • the present application also provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a computer, the computer executes any one of the above-mentioned aspects and its methods in various embodiments.
  • the present application further provides a chip, which is used for reading a computer program stored in a memory, and executing the method in any one of the above aspects and each implementation manner thereof.
  • the present application further provides a system-on-a-chip, where the system-on-a-chip includes a processor, configured to support a computer device to implement any one of the above aspects and the method in each implementation manner.
  • the chip system further includes a memory, and the memory is used to store necessary programs and data of the computer device.
  • the system-on-a-chip may consist of chips, or may include chips and other discrete devices.
  • FIG. 1 is a schematic diagram of a picture backup scene provided by an embodiment of the present application
  • FIG. 2 is a schematic interface diagram of a picture backup application provided by an embodiment of the present application
  • FIG. 3 is a schematic structural diagram of a terminal device provided in an embodiment of the present application.
  • FIG. 4 is a software structural block diagram of a terminal device provided in an embodiment of the present application.
  • FIG. 5 is a flow chart of a picture backup method provided by an embodiment of the present application.
  • FIG. 6 is a schematic diagram of a terminal device reporting user information to a server according to an embodiment of the present application
  • FIG. 7A is a schematic diagram of a server accessing a user's backup picture collection provided by an embodiment of the present application.
  • FIG. 7B is a schematic diagram of yet another server accessing a user's backup picture collection provided by an embodiment of the present application.
  • FIG. 8 is a flow chart of a method for determining a reference picture provided in an embodiment of the present application.
  • FIG. 9 is a schematic diagram of a difference calculation provided by an embodiment of the present application.
  • Fig. 10 is a method flowchart of the first picture backup example provided by the present application.
  • Fig. 11 is a method flow chart of the second picture backup example provided by the present application.
  • Fig. 12 is the method flowchart of the third picture backup example provided by the present application.
  • Fig. 13 is a method flowchart of the fourth picture backup example provided by the present application.
  • FIG. 14 is a schematic diagram of a module structure and functions of a server provided by an embodiment of the present application.
  • Difference calculation refers to performing difference calculation on at least two pictures to determine the difference information between the pictures, and the difference information can be used to represent the difference between the pictures.
  • Thumbnails refer to pictures with reduced pixels after recoding the pictures, and the data volume of the thumbnail pictures will be reduced compared with the original picture.
  • FIG. 1 is a schematic diagram of a picture backup scenario provided by an embodiment of the present application.
  • the scenario includes multiple terminal devices and at least one storage device.
  • three terminal devices terminal device A, terminal device B, and terminal device C
  • the storage device may be a server or a home storage device, such as a network attached storage (network attached storage, NAS).
  • network attached storage network attached storage
  • the user When the user needs to back up the pictures, he can operate to upload the pictures on the terminal device to the server, so as to save the uploaded pictures in the server, so as to realize the picture backup. After the user uploads the picture to the server, he can choose to delete the picture stored on the terminal device, thereby releasing the storage space of the terminal device. When the user wants to view these pictures, he can view the pictures uploaded to the server through the picture backup application and choose to download them locally, so as to obtain these pictures again.
  • FIG. 2 is a schematic interface diagram of an image backup application provided in an embodiment of the present application.
  • the user may click "upload picture" and select a picture to be uploaded in the picture preview interface.
  • the terminal device uploads the picture selected by the user to the server, and the server receives the picture and stores the received picture in the storage space of the server.
  • the picture backup application may be an application or preset function built into the operating system of the terminal device, such as a cloud disk application built into the operating system; or the picture backup application may be an embedded application developed by a third-party manufacturer. This embodiment of the present application does not limit it.
  • the image backup method has great requirements on the bandwidth cost and storage cost of the server.
  • the following two methods to improve image transmission performance are introduced.
  • Method 1 The terminal device uploads the thumbnail image to the server.
  • the terminal device After responding to the upload instruction triggered by the user, the terminal device recodes the picture to be uploaded into a high-definition thumbnail, and uploads the high-definition thumbnail to the server, so as to save picture transmission bandwidth and storage cost of the server.
  • the terminal device After responding to the upload instruction triggered by the user, the terminal device sends a request for uploading pictures to the server, and the request may carry an identifier of the picture to be uploaded.
  • the server After the server receives the request for uploading pictures, it determines that the ID of the picture to be uploaded is the same as the ID of the picture stored in the server, indicating that the picture to be uploaded has been stored in the server. Create a picture reference in the folder, and the picture reference may include the identification and/or storage address of the picture uploaded to the server.
  • the server searches the pictures stored in the server according to the identification of picture A, and determines that picture B and picture A have the same identification, that is, picture A and picture B is the same picture.
  • the server may notify the terminal device that there is no need to upload the picture A, but to create a new picture reference in the folder corresponding to the user requesting to upload the picture A, and the picture reference includes the identification and/or storage address of the picture B.
  • the server stores the picture information of the picture A in a folder corresponding to the user, and completes the backup of the picture A.
  • the server can search for the picture B stored in the server according to the identification and/or storage address of picture B in the picture reference, and the server sends the picture information of picture B and picture A to the terminal device , the terminal device saves the picture information of picture B and picture A locally, and completes the download of backed up picture A.
  • the terminal device can realize picture backup without actually uploading the picture to be uploaded to the server. That is to say, for the same picture, only one copy of the picture needs to be stored in the server, and the picture can be associated with multiple picture information, and each picture information includes relevant data when the user uploads the picture.
  • the clarity of the picture needs to be lost, and the method of recoding to a thumbnail will cause the picture stored on the server to be a changed picture, which cannot be restored, affecting users. experience.
  • the instant transmission function in method 2 can only obtain greater benefits in the scenario where the user uploads pictures with a high repetition rate, while the benefit is small in the scenario where individual users upload pictures, and cannot significantly improve the image transmission performance.
  • an embodiment of the present application provides a picture backup method, which is used to save bandwidth cost and storage cost in the picture backup method.
  • the server may obtain user information and determine a user set.
  • the terminal device corresponding to any user in the user set sends an upload request to the server for backing up the target picture
  • the server can determine the reference picture of the target picture in the candidate picture set composed of the backup pictures of all users in the user set, and determine Difference information of the target picture compared to the reference picture. Therefore, the server can use the reference picture identifier and difference information as the backup information of the target picture, and the target picture can be backed up without the terminal device uploading the target picture.
  • the terminal device in the embodiment of the present application can be a mobile phone, a tablet computer, a wearable device (such as a watch, a bracelet, a helmet, a headset, etc.), a vehicle device, an augmented reality (augmented reality, AR)/virtual reality (virtual reality, VR) devices, laptops, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), smart home devices (e.g., smart TVs, smart speakers, smart camera, etc.) etc.
  • augmented reality augmented reality, AR
  • VR virtual reality
  • laptops laptops
  • UMPCs ultra-mobile personal computers
  • PDAs personal digital assistants
  • smart home devices e.g., smart TVs, smart speakers, smart camera, etc.
  • FIG. 3 is a schematic structural diagram of a terminal device 100 provided in an embodiment of the present application.
  • the terminal device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charging management module 140, a power management module 141, and a battery 142 , antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193 , a display screen 194, and a subscriber identification module (subscriber identification module, SIM) card interface 195, etc.
  • SIM subscriber identification module
  • the processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU) wait. Wherein, different processing units may be independent devices, or may be integrated in one or more processors. Wherein, the controller may be the nerve center and command center of the terminal device 100 . The controller can generate an operation control signal according to the instruction opcode and timing signal, and complete the control of fetching and executing the instruction.
  • a memory may also be provided in the processor 110 for storing instructions and data.
  • the memory in processor 110 is a cache memory.
  • the memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated access is avoided, and the waiting time of the processor 110 is reduced, thus improving the efficiency of the system.
  • the USB interface 130 is an interface conforming to the USB standard specification, specifically, it can be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like.
  • the USB interface 130 can be used to connect a charger to charge the terminal device 100, and can also be used to transmit data between the terminal device 100 and peripheral devices.
  • the charging management module 140 is configured to receive a charging input from a charger.
  • the power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 .
  • the power management module 141 receives the input from the battery 142 and/or the charging management module 140 to provide power for the processor 110 , the internal memory 121 , the external memory, the display screen 194 , the camera 193 , and the wireless communication module 160 .
  • the wireless communication function of the terminal device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in the terminal device 100 can be used to cover single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas.
  • Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network.
  • the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied on the terminal device 100 .
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA) and the like.
  • the mobile communication module 150 can receive electromagnetic waves through the antenna 1, filter and amplify the received electromagnetic waves, and send them to the modem processor for demodulation.
  • the mobile communication module 150 can also amplify the signals modulated by the modem processor, and convert them into electromagnetic waves through the antenna 1 for radiation.
  • at least part of the functional modules of the mobile communication module 150 may be set in the processor 110 .
  • at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be set in the same device.
  • the wireless communication module 160 can provide wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (Wireless Fidelity, Wi-Fi) network), bluetooth (bluetooth, BT), global navigation satellite, etc. System (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions.
  • the wireless communication module 160 may be one or more devices integrating 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 can also receive the signal to be sent from the processor 110 , frequency-modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.
  • the antenna 1 of the terminal device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the terminal device 100 can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), broadband Code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC , FM, and/or IR techniques, etc.
  • GSM global system for mobile communications
  • GPRS general packet radio service
  • code division multiple access code division multiple access
  • CDMA broadband Code division multiple access
  • WCDMA wideband code division multiple access
  • time division code division multiple access time-division code division multiple access
  • TD-SCDMA time-division code division multiple access
  • the GNSS may include a global positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a Beidou navigation satellite system (beidou navigation satellite system, BDS), 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
  • Beidou navigation satellite system beidou navigation satellite system
  • BDS Beidou navigation satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite based augmentation systems
  • the display screen 194 is used for displaying a display interface of an application, for example, displaying a desktop of the terminal device 100, which may include icons of applications installed on the terminal device 100, and the like.
  • the display screen 194 includes a display panel.
  • the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode (active-matrix organic light emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diodes (quantum dot light emitting diodes, QLED), etc.
  • the terminal device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
  • Camera 193 is used to capture still images or video.
  • the object generates an optical image through the lens and projects it to the 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 light signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal.
  • the ISP outputs the digital image signal to the DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other image signals.
  • the terminal device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
  • the internal memory 121 may be used to store computer-executable program codes including instructions.
  • the processor 110 executes various functional applications and data processing of the terminal device 100 by executing instructions stored in the internal memory 121.
  • the internal memory 121 may include an area for storing programs and an area for storing data.
  • the storage program area can store an operating system, software codes of at least one application program, and the like.
  • the storage data area can store data generated during use of the terminal device 100 (such as captured images, recorded videos, etc.) and the like.
  • the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (universal flash storage, UFS) and the like.
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the terminal device.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, save pictures, videos and other files in the external memory card.
  • the terminal device 100 may implement an audio function through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, and an application processor. Such as music playback, recording, etc.
  • the sensor module 180 may include a pressure sensor 180A, an acceleration sensor 180B, a touch sensor 180C and the like.
  • the pressure sensor 180A is used to sense the pressure signal and convert the pressure signal into an electrical signal.
  • pressure sensor 180A may be disposed on display screen 194 .
  • the touch sensor 180C is also called “touch panel”.
  • the touch sensor 180C can be disposed on the display screen 194, and the touch sensor 180C and the display screen 194 form a touch screen, also called “touch screen”.
  • the touch sensor 180C is used to detect a touch operation on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • Visual output related to the touch operation can be provided through the display screen 194 .
  • the touch sensor 180C may also be disposed on the surface of the terminal device 100 , which is different from the position of the display screen 194 .
  • the keys 190 include a power key, a volume key and the like.
  • the key 190 may be a mechanical key. It can also be a touch button.
  • the terminal device 100 may receive key input and generate key signal input related to user settings and function control of the terminal device 100 .
  • the motor 191 can generate a vibrating reminder.
  • the motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations applied to different applications (such as taking pictures, playing audio, etc.) may correspond to different vibration feedback effects.
  • the touch vibration feedback effect can also support customization.
  • the indicator 192 can be an indicator light, and can be used to indicate charging status, power change, and can also be used to indicate messages, missed calls, notifications, and the like.
  • the SIM card interface 195 is used for connecting a SIM card. The SIM card can be connected and separated from the terminal device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195 .
  • the components shown in FIG. 3 do not constitute a specific limitation on the terminal device 100, and the terminal device may also include more or fewer components than shown in the figure, or combine some components, or split some components , or different component arrangements.
  • the combination/connection relationship between the components in FIG. 3 can also be adjusted and modified.
  • FIG. 4 is a block diagram of a software structure of a terminal device provided by an embodiment of the present application.
  • the software structure of the terminal device may be a layered architecture, for example, the software may be divided into several layers, and each layer has a clear role and division of labor. Layers communicate through software interfaces.
  • the operating system is divided into four layers, which are application program layer, application program framework layer (framework, FWK), runtime and system library, and kernel layer from top to bottom.
  • the application layer can consist of a series of application packages. As shown in FIG. 4 , the application layer may include camera, setting, skin module, user interface (user interface, UI), three-party application program, and the like. Among them, the three-party application may include gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and so on.
  • the application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer.
  • the application framework layer can include some predefined functions. As shown in Figure 4, the application framework layer can include window manager, content provider, view system, phone manager, resource manager, notification manager, etc.
  • a window manager is used to manage window programs.
  • the window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, capture the screen, etc.
  • Content providers are used to store and retrieve data and make it accessible to applications. Said data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebook, etc.
  • the view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on.
  • the view system can be used to build applications.
  • a display interface can consist of one or more views.
  • a display interface including a text message notification icon may include a view for displaying text and a view for displaying pictures.
  • the telephony manager is used to provide the communication function of the terminal equipment. For example, the management of call status (including connected, hung 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, and can automatically disappear after a short stay without user interaction.
  • the notification manager is used to notify the download completion, message reminder, etc.
  • the notification manager can also be a notification that appears on the top status bar 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. For example, a text message is displayed in the status bar, a prompt sound is issued, the terminal device vibrates, and the indicator light flashes, etc.
  • the runtime includes the core library and virtual machine.
  • the runtime is responsible for the scheduling and management of the operating system.
  • the core library consists of two parts: one part is the function function that the java language needs to call, and the other part is the core library of the operating system.
  • the application layer and the application framework layer run in virtual machines.
  • the virtual machine executes the java files of the application program layer and the application program framework layer as binary files.
  • the virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
  • a system library can include multiple function modules. For example: surface manager (surface manager), media library (media libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.
  • the surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.
  • the media library supports playback and recording of various commonly used audio and video formats, as well as still image files, etc.
  • the media library can support a variety of 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, etc.
  • 2D graphics engine is a drawing engine for 2D drawing.
  • a 3D graphics processing library can be used to draw a 3D motion track image
  • a 2D graphics engine can be used to draw a 2D motion track image
  • the kernel layer is the layer between hardware and software.
  • the kernel layer includes at least a display driver, a camera driver, an audio driver, and a sensor driver.
  • the hardware layer may include various types of sensors, such as acceleration sensors, gyroscope sensors, touch sensors, and the like.
  • FIG. 5 is a flow chart of a picture backup method provided by an embodiment of the present application. With reference to Fig. 5, this method comprises the following steps:
  • S501 The server acquires user information of a first user, and determines at least one second user associated with the first user.
  • the user information may include a user identifier of the first user, information of a wireless local area network (wlan) commonly used by the first user, an IP address of a terminal device corresponding to the first user, a resident location of the first user, and the like.
  • the resident location of the first user may be, for example, the GPS location of the terminal device or the location of the base station with which the terminal device is always connected.
  • the terminal device may report the user information of the first user to the server. Before the terminal device reports user information to the server, it needs to obtain user authorization. For example, the terminal device displays a message of obtaining user authorization on the display screen, and after the user agrees to the authorization, the terminal device sends the user information of the first user to the server.
  • the terminal device may report the encrypted user information to the server, and the server may determine the user set of the first user according to the encrypted user information after receiving the encrypted user information.
  • the manner in which the terminal device encrypts the user information may be, for example, to process the user information by using an encryption algorithm.
  • FIG. 6 is a schematic diagram of a terminal device reporting user information to a server according to an embodiment of the present application.
  • FIG. 6 shows three terminal devices as an example, each terminal device corresponds to a user, and each terminal device reports the user information of the user to the server respectively.
  • the server may receive user information reported by all terminal devices, analyze the received user information, and determine multiple user sets. The users included in each user set can be considered as closely related users, and there may be similar pictures in the pictures that these users need to back up.
  • the server may determine at least one second user associated with the first user, and at least one second user and the first user may form the first user corresponding The first user set of .
  • the second user may be a second user who has a close relationship with the first user.
  • the second user who has a close relationship with the first user may be a user who is closer to the permanent address of the first user, or a user who has frequent contacts with the first user.
  • the first user may select a second user who is closely related to the first user, and the first user and the second user together form the first user set.
  • the terminal device may send the user identifiers of the first user and the selected second user to the server, so that the server can determine the first user set.
  • the relationship between the first user and the second user in the first user set is different according to the manner in which the server determines the first user set.
  • the following describes the manner in which the server determines the first user set in the embodiment of the present application.
  • the first user and the second user have the same common wlan.
  • the server may determine the second users who have the same common wlan as the first user, and the terminal devices used by these second users have accessed the same wireless local area network as the terminal device used by the first user, then these second users may be considered as The user may have a close relationship with the first user, and the server may divide the first user and the determined second user into a first user set.
  • IP Internet protocol address
  • the server may determine that the second user has the same IP address as the first user, that is, the first user and the second user have logged in their own accounts using the same terminal device, then the first user and the second user may be considered as The two users may have a close relationship, and the server may divide the first user and the second user into a first user set.
  • the server may determine the second users whose distance to the permanent address of the first user is less than a first threshold, and the server may divide the first users and the second users into a first user set.
  • the server may divide the first users and the second users into a first user set.
  • the resident address of the first user may be, for example, the GPS address of the terminal device, or may be the location of the base station to which the terminal device is always connected.
  • Mode 4 The degree of coincidence between the movement trajectory of the first user and the movement trajectory of the second user is greater than a second threshold.
  • the user information of the first user may include the movement track of the first user, and the server may determine the second user whose movement track coincidence with the first user is greater than a second threshold, and the server may combine the first user and the second user
  • the users are divided into a first set of users.
  • the activity areas of the second user and the first user determined in this way are relatively similar, and the pictures uploaded by the first user and the second user may be relatively similar at this time.
  • Manner 5 The number of times the first user contacts the second user through social applications is greater than a third threshold.
  • the user information of the first user may also include users and contact times of the first user through social applications, and the server may associate the second user whose contact times with the first user through social applications is greater than a third threshold with the first user.
  • the users are divided into a first set of users.
  • the pictures uploaded by the first user and the second user may be relatively similar.
  • the first user may send pictures to the second user through social applications, and the first user And the second user chooses to backup the picture to the server.
  • the second user is a user selected by the first user who has a close relationship with the first user.
  • the user information of the first user may further include an identifier of a second user selected by the first user as a closely related user.
  • the server may divide the first user and the second user into a first user set.
  • the first user and the second user are users with the same tag.
  • the user information of the first user may also include the user's label, which may be selected by the user, for example, the user's label may be the user's hobbies: travel, food, and so on.
  • the server may divide the first user and the second user with the same tag as the first user into a first user set.
  • the server may determine the first user set in combination with at least one of the above multiple methods during implementation, which is not limited in this embodiment of the present application.
  • each way of determining the first user set may correspond to a different weight, so that the server may determine the first user set according to the multiple ways and the weight corresponding to each way,
  • priorities may be set for multiple methods, and the server may select a method with a higher priority to determine the first user set.
  • the server determines the first user set corresponding to the first user, when there are many pictures similar to the pictures to be uploaded by the first user in the second user's backup picture set in the first user set , the picture backup method provided by this application can obtain greater benefits.
  • the server may also add a third user to the first user set, and the third user may be a virtual user.
  • the backup picture set of the third user may include pictures preset by the server. For example, when the first user and the second user in the first user set are users with relatively close resident addresses, the third user's backup picture set may include pictures of landmark buildings near the first user's resident address. For another example, when the first user and the second user in the first user set have the same travel tag, the backup picture set of the third user may include pictures of common scenic spots.
  • S502 The server receives the upload request sent by the terminal device.
  • the terminal device is a terminal device corresponding to the first user, and the upload request is used to request to upload the target picture to the server, so as to realize picture backup.
  • the upload request may include image information of the target image, and the image information of the target image may include part or all of image ID, image size, shooting time, shooting location, thumbnail, and pixel feature value.
  • the picture identifier may be, for example, a hash value of the picture, and it can be seen from the foregoing introduction that the hash value of the picture may be used as a unique identifier of the picture to distinguish different pictures.
  • the thumbnail image may be a recoded image of the target icon, and the pixels of the thumbnail image are lower than those of the target image.
  • the pixel feature value is a vector feature extracted based on the pixel information of the picture.
  • the pixel feature value may include the brightness of the picture, the shape of the object in the picture, and so on.
  • S503 The server determines picture information of a reference picture corresponding to the target picture.
  • the server may use the pictures in the backup picture set corresponding to some or all users in the first user set as candidate pictures, and at least one candidate picture forms the candidate picture set .
  • the server when it receives an upload request sent by any user in the first user set, it may access the backup picture sets of some or all users in the first user set to determine the reference picture corresponding to the picture to be uploaded. image information. For example, the server may determine the picture itself of the reference picture from at least one candidate picture in the candidate picture set. Before accessing the user's backup picture collection, the server may send an authorization request to the terminal device used by the user, and then access the user's backup picture collection after receiving a message from the terminal device that the user agrees to the authorization. Alternatively, the user may choose to enable the function of sharing the backup picture collection, and at this time the server may access the user's backup picture collection. Further, when the server accesses the user's backup picture collection, it can access the encrypted backup picture, that is, what the server can obtain is the encrypted ciphertext of the backup picture.
  • FIG. 7A is a schematic diagram of a server accessing a user's backup picture collection according to an embodiment of the present application.
  • the first user is user A
  • the second users are user B and user C
  • user D does not belong to the first user set.
  • the server can access the backup picture sets of user B and user C after obtaining the authorization of user A, user B and user C, and when receiving the upload request sent by the terminal device corresponding to user A.
  • the server cannot access user D's backup picture collection at this time.
  • FIG. 7B is a schematic diagram of yet another server accessing a user's backup picture collection provided by an embodiment of the present application.
  • the first user is user A
  • the second users are user B, user C, and user D.
  • the server receives the upload request sent by the terminal device corresponding to user A, if the server determines that the authorization of user D is not obtained, or the server determines that user D has disabled the function of sharing the backup picture collection, the server cannot access user D's backup Picture collection.
  • the server may store picture information of at least one candidate picture in the set of candidate pictures. After receiving the upload request sent by the terminal device, the server may determine the reference picture from the at least one candidate picture according to the picture information of the target picture and the picture information of the at least one candidate picture in the upload request.
  • the server may also send the picture information of at least one candidate picture in the candidate picture set to the terminal device.
  • the server may send the picture information of at least one candidate picture to the terminal device through wireless fidelity (wireless fidelity, WiFi) direct connection technology or Bluetooth technology.
  • the terminal device stores the picture information of at least one candidate picture, and determines the picture information of the reference picture according to the picture information of the target picture and the picture information of the at least one candidate picture.
  • the terminal device may carry the picture information of the reference picture in the upload request, for example, carry the picture identifier of the reference picture in the upload request.
  • the server may determine the reference picture according to the picture information of the reference picture in the upload request.
  • the server may determine the picture information of the reference picture, or the terminal device may determine the picture information of the reference picture, and then send the picture information of the reference picture to the server through an upload request.
  • the method for determining the reference picture provided by the embodiment of the present application is introduced below by taking the server determining the reference picture as an example.
  • FIG. 8 is a flowchart of a method for determining a reference picture provided by an embodiment of the present application. Referring to Figure 8, the method comprises the following steps:
  • S801 The server obtains the image information of the target image from the received upload request.
  • S802 The server judges whether there is a candidate picture with the same identifier as the target picture in the set of candidate pictures; if yes, go to S803; otherwise, go to S804.
  • S803 The server transmits the target picture within seconds.
  • the server may transmit the target picture in seconds. That is to say, the terminal device does not need to actually upload the target picture, and the server can create a reference to the target picture in the backup picture set of the first user, so as to realize the backup of the target picture by the first user.
  • S804 The server judges whether there is a similar picture similar to the target picture in the set of candidate pictures; if yes, go to S805; otherwise, go to S807.
  • S804 may be regarded as a step in which the server initially screens pictures similar to the target picture from the candidate picture set.
  • the server may determine whether there is a similar picture similar to the target picture in the set of candidate pictures according to information such as picture size, shooting time, and shooting location included in the picture information.
  • the server may use a candidate picture whose picture size is the same as that of the target picture as a similar picture.
  • the server may use candidate pictures whose shooting time and shooting time of the target picture are smaller than a fourth threshold as similar pictures.
  • the server may also use candidate pictures whose distance between the shooting location and the shooting location of the target picture is smaller than the fifth threshold as similar pictures.
  • the server in the embodiment of the present application judges whether there are similar pictures in the set of candidate pictures, it is not limited to the above examples in the embodiment of the present application.
  • the picture information may also include information such as the brightness and contrast of the picture. It can also be used to determine whether there are similar pictures in the candidate picture set, which is not limited in this embodiment of the present application.
  • S805 The server judges whether there is a reference picture among the similar pictures based on a deep learning algorithm; if yes, go to S806; otherwise, go to S807.
  • S806 The server determines a reference picture corresponding to the target picture.
  • the server may input the thumbnails of the similar pictures and the thumbnails of the target picture into the deep learning model, and obtain the similarity between the similar pictures output by the deep learning model and the target picture.
  • the server may use a similar picture whose similarity with the target picture is greater than a set threshold as a reference picture.
  • the deep learning model in the embodiment of the present application can be a model that has been trained and can be used to calculate the similarity of pictures.
  • the deep learning module can be a support vector machine (support vector machines, SVM) model, volume product neural network models, etc.
  • the deep learning model can be trained based on the feature information of the picture, where the feature information of the picture can include, for example, the histogram of oriented gradient (HOG) feature of the picture, cosine similarity, and histogram-based Calculated similarity, etc.
  • HOG histogram of oriented gradient
  • the server may also input the similar picture and the target picture into the deep learning model to determine the similarity between the similar picture and the target picture.
  • the terminal device is required to upload the target picture to the server first.
  • the server may not store the target picture in the backup picture set of the first user, but determine the target picture corresponding to the target picture in the candidate picture set according to the above method. reference image.
  • the bandwidth cost of the terminal device does not change during the process of backing up the target picture, but when the server determines that there is a reference picture corresponding to the target picture in the candidate picture set, the picture backup method provided in the embodiment of the application can be used The difference information of the target picture is determined, and the difference information is stored in the server, thereby saving storage cost.
  • the server may determine a plurality of pictures whose similarity with the target picture is greater than a set threshold from the similar pictures, and at this time, the server may use the picture with the highest similarity as a reference picture; or, the server may Use these multiple pictures as reference pictures.
  • S807 The server determines that there is no reference picture corresponding to the target picture in the candidate picture set.
  • the server determines that there is no similar picture in the candidate picture set, or there is no reference picture in the similar picture.
  • the server determines that there is no reference picture corresponding to the target picture in the candidate picture set.
  • the terminal device needs to upload the target picture normally, and after receiving the target picture, the server stores it in the backup picture set corresponding to the first user.
  • the manner of determining the reference picture can also be performed by the terminal device, and can be specifically implemented with reference to the manner shown in FIG. 8 , which will not be repeated here.
  • S504 The server determines difference information between the target picture and the reference picture.
  • the difference information may be binary data corresponding to a difference part between the target picture and the reference picture, or the difference information may be information of a position where there is a difference between the target picture and the reference picture.
  • the server may perform difference calculation on the target picture and the reference picture to determine difference information corresponding to the target picture.
  • the terminal device may perform difference calculation on the target picture and the reference picture, determine the difference information corresponding to the target picture, and send the difference information corresponding to the target picture to the server.
  • the server may receive the message sent by the terminal device and obtain difference information corresponding to the target picture therefrom.
  • FIG. 9 is a schematic diagram of difference calculation provided by the embodiment of the present application.
  • the server or the terminal device when it calculates the difference between the target picture and the reference picture, it may calculate the pixel values at the same position of the target picture and the reference picture, such as subtracting the pixel values to obtain difference information; or The server or the terminal device may use the information on the location of the difference between the target picture and the reference picture as the difference information.
  • the server or terminal device may separately calculate the difference between each reference picture and the target picture, determine multiple difference information, and retain the difference information with the smallest amount of data and its Corresponding reference pictures.
  • S505 The server saves the difference information corresponding to the target picture.
  • the server may use the reference picture identifier and the difference information as backup information of the target icon, and store the backup information. That is to say, the terminal device does not need to upload the target picture, and the server does not need to store the target picture, but stores backup information to realize the backup of the target picture.
  • the server When the backup information of the target picture is stored in the server, if the server receives a download request sent by the terminal device, the download request is used to request to download the target picture, and the server can send the backup information of the target picture and the reference picture to the terminal device, The terminal device synthesizes the target picture according to the backup information and the reference picture; or, the server can synthesize the target picture according to the backup information of the target picture and the reference picture, and then sends the target picture to the terminal device.
  • the server when the terminal device needs to back up the target picture on the server, the server can first determine at least one second user associated with the first user, and the pictures backed up by at least one second user in the storage device Can be used as at least one candidate picture. Screening the reference picture from at least one picture backed up by the second user can narrow down the range of candidate pictures, thereby improving the efficiency of determining the reference picture.
  • the storage device or the terminal device may determine difference information of the target picture relative to the reference picture.
  • the terminal device does not need to actually upload the target picture
  • the storage device does not need to store the target picture, but stores the difference information of the target picture to realize the backup of the target picture, saving the bandwidth cost of picture backup and saving the storage cost, and efficiently realizes Image backup.
  • the first user set may further include multiple subsets, and different subsets may correspond to different relationships between the first user and the second user.
  • a first set of users may include subset A, subset B, subset C, and subset D.
  • the second user in the subset A is a user who has the same common wlan as the first user
  • the second user's motion track in the subset B is a user whose motion track coincidence degree with the first user is greater than a second threshold
  • the subset The second user in the set C is the user who has the same label as the first user
  • the second user in the subset D is the user who has the same label as the first user.
  • the terminal device may request to upload multiple pictures in batches to the server.
  • the terminal device may classify the multiple pictures, and different types of pictures may correspond to different sub-sets in the first user set. For example, pictures whose type is "attractions" may correspond to the above-mentioned subset C, and pictures whose type is "food” may correspond to the above-mentioned subset D.
  • the server or terminal device can search for the reference picture corresponding to the picture to be uploaded in the backup pictures of the sub-set corresponding to the type, so as to prioritize the search space and improve the efficiency of searching for the reference picture.
  • FIG. 10 is a flow chart of the method for the first picture backup example provided in this application.
  • the server determines the reference picture corresponding to the target picture requested to be uploaded by the terminal device, and calculates the difference information corresponding to the target picture.
  • the method includes the following steps:
  • S1001 The server acquires user information of a first user, and determines a first user set corresponding to the first user.
  • the first user set includes at least one second user associated with the first user.
  • S1002 The server determines a candidate picture set corresponding to the first user set.
  • the set of candidate pictures includes at least one candidate picture.
  • S1003 The terminal device sends an upload request to the server.
  • the upload request is used to request to upload the target picture, and the upload request includes the target picture and the picture information of the target picture.
  • the server determines a reference picture corresponding to the target picture according to the picture information of the target picture and the picture information of at least one candidate picture.
  • S1005 The server performs difference calculation on the target picture and the reference picture, and determines difference information corresponding to the target picture.
  • S1006 The server saves the difference information corresponding to the target picture.
  • FIG. 11 is a flow chart of the second picture backup example method provided by the present application.
  • the server determines the reference picture corresponding to the target picture that the terminal device requests to upload, but the terminal device calculates the difference information corresponding to the target picture.
  • the method includes the following steps:
  • the server acquires user information of the first user, and determines a first user set corresponding to the first user.
  • the first user set includes at least one second user associated with the first user.
  • S1102 The server determines a candidate picture set corresponding to the first user set.
  • the set of candidate pictures includes at least one candidate picture.
  • S1103 The terminal device sends an upload request to the server.
  • the upload request is used to request to upload the target picture, and the upload request includes picture information of the target picture.
  • S1104 The server determines a reference picture corresponding to the target picture according to the picture information of the target picture and the picture information of at least one candidate picture in the candidate picture set.
  • S1105 The server sends the thumbnail of the reference picture to the terminal device.
  • S1106 The terminal device performs difference calculation on the thumbnail image of the target picture and the thumbnail image of the reference picture, and determines difference information corresponding to the target picture.
  • the terminal device sends the difference information corresponding to the target picture to the server.
  • S1108 The server saves the difference information corresponding to the target picture.
  • FIG. 12 is a flow chart of the third example of picture backup provided by the present application.
  • the terminal device determines the reference picture corresponding to the target picture, and the server calculates the difference information corresponding to the target picture.
  • the method includes the following steps:
  • S1201 The server acquires user information of the first user, and determines a first user set corresponding to the first user.
  • the first user set includes at least one second user associated with the first user.
  • S1202 The server determines a candidate picture set corresponding to the first user set.
  • the set of candidate pictures includes at least one candidate picture.
  • S1203 The server sends the picture information of at least one candidate picture in the candidate picture set to the terminal device.
  • the terminal device determines the picture information of a reference picture corresponding to the target picture according to the picture information of the target picture and the picture information of at least one candidate picture.
  • S1205 The terminal device sends an upload request to the server.
  • the upload request is used to request to upload the target picture, and the upload request may include picture information of the target picture and picture information of the reference picture.
  • S1206 The server obtains the picture information of the reference picture in the upload request, and performs difference calculation on the target picture and the reference picture to determine difference information corresponding to the target picture.
  • S1207 The server saves the difference information corresponding to the target picture.
  • FIG. 13 is a flowchart of a fourth example of picture backup provided by the present application.
  • the terminal device determines the reference picture corresponding to the target picture, and calculates the difference information corresponding to the target picture.
  • the method includes the following steps:
  • the server acquires user information of the first user, and determines a first user set corresponding to the first user.
  • the first user set includes at least one second user associated with the first user.
  • S1302 The server determines a candidate picture set corresponding to the first user set.
  • the set of candidate pictures includes at least one candidate picture.
  • the server sends the picture information of at least one candidate picture in the candidate picture set to the terminal device.
  • the terminal device determines the picture information of a reference picture corresponding to the target picture according to the picture information of the target picture and the picture information of at least one candidate picture.
  • S1305 The terminal device performs difference calculation on the thumbnail image of the target picture and the thumbnail image of the reference picture, and determines difference information corresponding to the target picture.
  • S1306 The terminal device sends an upload request to the server.
  • the upload request includes the picture information of the reference picture corresponding to the target picture and the difference information corresponding to the target picture.
  • S1307 The server saves the difference information corresponding to the target picture.
  • the server determines the reference picture corresponding to the target picture requested by the terminal device to be uploaded, and the server calculates difference information corresponding to the target picture.
  • the server may include the following modules: a user set identification module, a candidate picture set determination module, a reference photo identification module, a difference calculation module, and a backup information storage module.
  • FIG. 14 is a schematic diagram of a module structure and functions of a server provided by an embodiment of the present application. The function of each module in the server will be further introduced below in conjunction with FIG. 14 .
  • the user set identification module is configured to determine the first user set corresponding to the first user according to the user information of the first user and user information of other users after receiving the user information of the first user reported by the terminal device.
  • the manner in which the user set identification module determines the first user set can refer to the implementation of S501 in FIG. 5 , which will not be repeated here.
  • the candidate picture set determining module is configured to form a candidate picture set from all pictures in the backup picture set uploaded by all users in the first user set to the server. All the pictures in the candidate picture set can be used to find whether there is a reference picture similar to the target picture to be uploaded.
  • a reference picture identifying module configured to determine a reference picture corresponding to the target picture from the candidate picture set.
  • the reference picture module may perform preliminary screening according to the picture information of the target picture and the picture information of all candidate pictures in the candidate picture set to determine similar pictures corresponding to the target picture. Then, the reference picture module can determine a reference picture corresponding to the target picture from similar pictures based on a deep learning algorithm.
  • the difference calculation module is configured to perform difference calculation on the target picture and the reference picture to obtain difference information corresponding to the target picture.
  • the difference calculation module may calculate the thumbnails of the target picture and the thumbnails of the reference picture to determine the difference information corresponding to the target picture.
  • the backup information storage module is used to generate the backup information of the target picture and store the backup information.
  • the backup information of the target picture may be a reference picture identifier and difference information corresponding to the target picture.
  • the present application further provides a picture backup device, the device includes multiple functional modules; the multiple functional modules interact to implement the methods described in the embodiments of the present application.
  • the multiple functional modules can be implemented based on software, hardware or a combination of software and hardware, and the multiple functional modules can be combined or divided arbitrarily based on specific implementations.
  • the present application also provides a storage device, which includes at least one processor and at least one memory, where computer program instructions are stored in the at least one memory, and when the storage device is running, the at least one processing The device executes the methods described in the embodiments of this application.
  • the present application further provides a computer program that, when the computer program is run on a computer, causes the computer to execute the methods described in the embodiments of the present application.
  • the present application also provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a computer, the computer executes the computer program described in the embodiments of the present application. methods described.
  • the present application also provides a chip, the chip is used to read the computer program stored in the memory, and implement the methods described in the embodiments of the present application.
  • the present application provides a system-on-a-chip, where the system-on-a-chip includes a processor, configured to support a computer device to implement the methods described in the embodiments of the present application.
  • the chip system further includes a memory, and the memory is used to store necessary programs and data of the computer device.
  • the system-on-a-chip may consist of chips, or may include chips and other discrete devices.
  • the embodiments of the present application may be provided as methods, systems, or computer program products. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions
  • the device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Quality & Reliability (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Multimedia (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本申请提供一种图片备份***、方法与设备。图片备份***包括终端设备和存储设备。在该***中,终端设备需要在存储设备上备份目标图片时,终端设备向存储设备发送备份请求,图片备份***可以从存储的至少一张候选图片中确定目标图片对应的参考图片的图片信息。其中,至少一张候选图片包括与第一用户关联的至少一个第二用户在存储设备中备份的图片,在至少一个第二用户备份的图片中筛选参考图片,可以缩小候选图片的范围,从而提高确定参考图片的效率。在确定出参考图片后,图片备份***可以确定目标图片相对于参考图片的差异信息,从而节省图片备份的带宽成本和存储成本,高效地实现图片备份。

Description

一种图片备份***、方法与设备
相关申请的交叉引用
本申请要求在2021年10月15日提交中国专利局、申请号为202111202758.X、申请名称为“一种图片备份***、方法与设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及终端技术领域,尤其涉及一种图片备份***、方法与设备。
背景技术
随着终端设备的拍照能力的增强,用户使用终端设备存储的图片的数据量也越来越大。考虑终端设备的存储容量有限,越来越多的用户选择将图片在云端服务器备份存储。例如用户可以在图片备份软件将终端设备本地的图片上传到服务器。当用户需要查看图片时,可以随时到图片备份软件中查找图片并下载到本地。
终端设备将图片备份到服务器的方式,对服务器的带宽成本和存储成本都有较大的要求。目前在相同带宽条件下,常采用的提升照片传输性能的方式为:终端设备在上传图片时,将图片重编码为高清缩略图后,将高清缩略图上传到服务器。通过该方式节省图片传输带宽并节省存储成本。但这种处理方式会导致服务器存储的图片其实是变更后的图片,且无法还原,影响用户体验。
综上,目前亟需一种高效的图片备份方法。
发明内容
本申请提供一种图片备份***、方法与设备。
第一方面,本申请提供一种图片备份***,该***包括终端设备和存储设备。
所述终端设备,用于向所述存储设备发送所述备份请求,所述备份请求用于请求在所述存储设备中备份目标图片;
所述***,用于从存储的至少一张候选图片的图片信息中确定所述目标图片对应的参考图片的图片信息;其中,所述至少一张候选图片包括与所述终端设备对应的第一用户关联的至少一个第二用户在所述存储设备中备份的图片;确定所述目标图片相对于所述参考图片的差异信息。
在该***中,终端设备需要在存储设备上备份目标图片时,存储设备或终端设备可以从存储的至少一张候选图片中确定目标图片对应的参考图片的图片信息。其中,至少一张候选图片包括与第一用户关联的至少一个第二用户在存储设备中备份的图片,在至少一个第二用户备份的图片中筛选参考图片,可以缩小候选图片的范围,从而提高确定参考图片的效率。在确定出参考图片后,存储设备或终端设备可以确定目标图片相对于参考图片的差异信息。通过该方案,终端设备无需实际上传目标图片,存储设备也无需存储目标图片,而是存储目标图片的差异信息即可实现目标图片的备份,节省图片备份的带宽成本同时节 省存储成本,高效地实现图片备份。
可选地,参考图片与目标图片的相似度大于设定阈值。
也就是说,参考图片为与目标图片相似的图片,图片备份***可以确定出参考图片并计算目标图片与参考图片之间的差异信息,从而利用差异信息备份目标图片。
在一个可能的设计中,所述***还用于:获取所述第一用户的用户信息;根据所述第一用户的用户信息确定与所述第一用户关联的至少一个第二用户。
通过该设计,存储设备或终端设备可以获取第一用户的用户信息并确定与第一用户关联的至少一个第二用户。其中,第一用户与第二用户关联,则第二用户在存储设备中备份的图片可能与第一用户请求备份的目标图片相似,则可以缩小查找参考图片时候选图片的范围,提高确定参考图片的效率。
在一个可能的设计中,所述第一用户的用户信息包括以下至少一项:
所述第一用户的用户标识;
所述第一用户的常用无线局域网;
所述第一用户对应的网际协议地址;
所述第一用户的常住地址;
所述第一用户的运动轨迹;
所述第一用户的社交应用信息;
所述第一用户的标签,所述标签为所述第一用户选择的用于表示所述第一用户的喜好或特征的信息。
在一个可能的设计中,所述第一用户与所述第二用户满足以下至少一个条件:
所述第一用户与所述第二用户具有相同的常用无线局域网;
所述第一用户与所述第二用户具有相同的网际协议地址;
所述第一用户的常住地址与所述第二用户的常住地址之间的距离小于第一阈值;
所述第一用户的运动轨迹与所述第二用户的运动轨迹的重合度大于第二阈值;
所述第一用户与所述第二用户通过社交应用联系的次数大于第三阈值;
所述第二用户为所述第一用户选择的与所述第一用户关系密切的用户;
所述第一用户与所述第二用户具有相同的标签。
通过以上设计,可以根据用户信息确定与第一用户关联的至少一个第二用户,用户信息可以包含用户喜好或用户特征等信息,保证确定出的第二用户与第一用户具有关联。
在一个可能的设计中,所述从存储的至少一张候选图片的图片信息中确定所述目标图片对应的参考图片的图片信息的步骤为所述终端设备或所述存储设备执行的。
通过该设计,存储设备或终端设备都可以用于确定参考图片的图片信息,灵活实现本申请提供的图片备份方法。
在一个可能的设计中,所述备份请求中包括所述目标图片的图片信息;所述***具体用于:获取所述至少一张候选图片的图片信息,根据所述目标图片的图片信息以及所述至少一张候选图片的图片信息相匹配,确定所述参考图片的图片信息。
通过该设计,终端设备在向存储设备备份目标图片时,可以在备份请求中携带目标图片的图片信息。存储设备或终端设备可以根据目标图片的图片信息和候选图片的图片信息,从至少一张候选图片中确定目标图片对应的参考图片,使得查找出的参考图片为与目标图片相似的图片,可以用于计算差异信息。
可选的,目标图片的图片信息与至少一个候选图片的图片信息相匹配,可以为目标图片的图片信息包含的内容与候选图片的图片信息包含的内容中有部分或全部内容相同,或者部分或全部内容符合预设的匹配条件。
例如,目标图片的图片大小与一张候选图片的图片大小相同,则可以确定该候选图片为参考图片。
又例如,目标图片的拍摄地点与一张候选图片的拍摄时间之间的差值小于预设阈值,且目标图片的拍摄位置与该候选图片的拍摄位置之间的距离小于预设阈值,则可以确定该候选图片为参考图片。
当然,目标图片和候选图片的图片信息中包含的内容可以涉及很多维度,如图片本身以及图片的属性信息、图片的拍摄信息等。在确定参考图片时,匹配条件可以为目标图片的图片信息和候选图片的图片信息中的一个或多个维度的信息的相似度大于预设阈值。
在一个可能的设计中,所述备份请求中包括所述参考图片的图片信息;所述存储设备还用于:获取所述至少一张候选图片的图片信息,将所述至少一张候选图片的图片信息发送给所述终端设备;所述终端设备还用于:接收所述存储设备发送的至少一张候选图片的图片信息,根据所述目标图片的图片信息以及所述至少一张候选图片的图片信息,确定所述参考图片的图片信息。
通过该设计,可以由终端设备确定目标图片对应的参考图片的图片信息,并在备份请求中携带参考图片的图片信息,从而存储设备在接收到备份请求后可以获取到参考图片的图片信息,减少存储设备的计算量,提升备份效率。
在一个可能的设计中,任一张候选图片的图片信息或所述目标图片的图片信息包括以下至少一项:
图片本身、图片标识、图片大小、拍摄时间、拍摄位置、缩略图;
所述目标图片的图片信息和所述参考图片的图片信息满足以下至少一个条件:
所述目标图像的图片大小与所述参考图片的图片大小相同;
所述目标图片的拍摄时间与所述参考图片的拍摄时间之间的差值小于第四阈值;
所述目标图片的拍摄位置与所述参考图片的拍摄位置之间的距离小于第五阈值。
通过该设计,图片信息可以包括标识、图片大小、拍摄时间、拍摄位置、缩略图中的至少一项,从而存储设备或终端设备在确定目标图片的参考图片的图片信息时,可以根据目标图片的图片信息以及候选图片的图片信息筛选符合条件的候选图片作为参考图片,保证确定出的参考图片与目标图片为相似的图片,可以用于计算差异信息。
在一个可能的设计中,所述确定所述目标图片相对于所述参考图片的差异信息的步骤为所述终端设备或所述存储设备执行的。
通过以上设计,目标图片的差异信息可以为终端设备确定后发送给存储设备的,也可以由存储设备确定,进而灵活实现计算目标图片的差异信息。
在一个可能的设计中,存储设备确定出的参考图片的图片信息为参考图片本身。所述存储设备具体用于:根据所述目标图片的图片信息以及所述至少一张候选图片的图片信息,从所述至少一张候选图片中确定至少一张相似图片;基于深度学习算法,从所述至少一张相似图片中确定所述参考图片。
在一个可能的设计中,所述存储设备具体用于:分别将至少一张相似图片的缩略图和所述目标图片的缩略图输入到深度学习模型中;获取所述深度学习模型输出的每张相似图 片与所述目标图片的相似度;将与所述目标图片的相似度大于设定阈值的相似图片作为所述参考图片。
通过以上设计,存储设备在确定目标图片对应的参考图片时,可以先从至少一张候选图片中确定至少一张相似图片,再基于深度学习算法从至少一张相似图片中确定参考图片,进一步优化筛选参考图片时的搜索空间,提升确定参考图片的效率与准确性。
在一个可能的设计中,所述终端设备还用于:向所述存储设备发送下载请求,所述下载请求用于请求获取所述目标图片;接收所述存储设备发送的所述差异信息以及所述参考图片的图片信息;根据所述差异信息以及所述参考图片的图片信息生成所述目标图片;
所述存储设备还用于:将所述差异信息以及所述参考图片的图片信息发送给所述终端设备。
通过该设计,终端设备在向存储设备备份目标图片后,终端设备需要再次将目标图片下载到本地时,可以向存储设备发送下载请求。存储设备可以将参考图片的图片信息和差异信息发送给终端设备,终端设备可以根据参考图片的图片信息和差异信息生成目标图片。通过该方案,存储设备中存储的差异信息和参考图片的图片信息可以用于恢复得到目标图片,保证备份目标图片的准确性。
在一个可能的设计中,所述存储设备为服务器或家庭存储设备。
第二方面,本申请提供一种图片备份方法,应用于存储设备。该方法包括:
接收终端设备发送的备份请求,所述备份请求用于请求在所述存储设备中备份目标图片;从存储的至少一张候选图片的图片信息中确定所述目标图片对应的参考图片的图片信息;其中,所述至少一张候选图片包括与所述终端设备对应的第一用户关联的至少一个第二用户在所述存储设备中备份的图片;确定所述目标图片相对于所述参考图片的差异信息。
在一个可能的设计中,所述方法还包括:获取所述第一用户的用户信息;根据所述第一用户的用户信息确定与所述第一用户关联的至少一个第二用户。
在一个可能的设计中,所述第一用户的用户信息包括以下至少一项:
所述第一用户的用户标识;
所述第一用户的常用无线局域网;
所述第一用户对应的网际协议地址;
所述第一用户的常住地址;
所述第一用户的运动轨迹;
所述第一用户的社交应用信息;
所述第一用户的标签,所述标签为所述第一用户选择的用于表示所述第一用户的喜好或特征的信息。
在一个可能的设计中,所述第一用户与所述第二用户满足以下至少一个条件:
所述第一用户与所述第二用户具有相同的常用无线局域网;
所述第一用户与所述第二用户具有相同的网际协议地址;
所述第一用户的常住地址与所述第二用户的常住地址之间的距离小于第一阈值;
所述第一用户的运动轨迹与所述第二用户的运动轨迹的重合度大于第二阈值;
所述第一用户与所述第二用户通过社交应用联系的次数大于第三阈值;
所述第二用户为所述第一用户选择的与所述第一用户关系密切的用户;
所述第一用户与所述第二用户具有相同的标签。
在一个可能的设计中,所述从存储的至少一张候选图片的图片信息中确定所述目标图片对应的参考图片的图片信息,包括:获取所述至少一张候选图片的图片信息,根据所述目标图片的图片信息以及所述至少一张候选图片的图片信息相匹配,确定所述参考图片的图片信息。
在一个可能的设计中,任一张候选图片的图片信息或所述目标图片的图片信息包括以下至少一项:
图片本身、图片标识、图片大小、拍摄时间、拍摄位置、缩略图;
所述目标图片的图片信息和所述参考图片的图片信息满足以下至少一个条件:
所述目标图像的图片大小与所述参考图片的图片大小相同;
所述目标图片的拍摄时间与所述参考图片的拍摄时间之间的差值小于第四阈值;
所述目标图片的拍摄位置与所述参考图片的拍摄位置之间的距离小于第五阈值。
在一个可能的设计中,所述方法还包括:接收所述终端设备发送的下载请求,所述下载请求用于请求获取所述目标图片;将所述差异信息以及所述参考图片的图片信息发送给所述终端设备,以使所述终端设备根据所述差异信息以及所述参考图片的图片信息生成所述目标图片。
在一个可能的设计中,所述存储设备为服务器或家庭存储设备。
第三方面,本申请提供一种图片备份方法,应用于终端设备。该方法包括:
获取待备份的目标图片的图片信息;从存储的至少一张候选图片的图片信息中确定所述目标图片对应的参考图片的图片信息;其中,所述至少一张候选图片包括与所述终端设备对应的第一用户关联的至少一个第二用户在所述存储设备中备份的图片;确定所述目标图片相对于所述参考图片的差异信息;向存储设备发送备份请求,以使所述存储设备备份所述目标图片,所述备份请求中包括所述参考图片的图片信息和所述差异信息。
在一个可能的设计中,在所述从存储的至少一张候选图片的图片信息中确定所述目标图片对应的参考图片的图片信息之前,还包括:接收所述存储设备发送的所述至少一张候选图片的图片信息。
在一个可能的设计中,所述方法还包括:向所述存储设备发送所述第一用户的用户信息,以使所述存储设备根据所述第一用户的用户信息确定与所述第一用户关联的至少一个第二用户;或者确定所述第一用户选择的所述至少一个第二用户,并将所述至少一个第二用户的用户标识发送给所述存储设备,以使所述存储设备根据所述至少一个第二用户的用户标识确定与所述第一用户关联的至少一个第二用户。
在一个可能的设计中,所述第一用户的用户信息包括以下至少一项:
所述第一用户的用户标识;
所述第一用户的常用无线局域网;
所述第一用户对应的网际协议地址;
所述第一用户的常住地址;
所述第一用户的运动轨迹;
所述第一用户的社交应用信息;
所述第一用户的标签,所述标签为所述第一用户选择的用于表示所述第一用户的喜好 或特征的信息。
在一个可能的设计中,所述第一用户与所述第二用户满足以下至少一个条件:
所述第一用户与所述第二用户具有相同的常用无线局域网;
所述第一用户与所述第二用户具有相同的网际协议地址;
所述第一用户的常住地址与所述第二用户的常住地址之间的距离小于第一阈值;
所述第一用户的运动轨迹与所述第二用户的运动轨迹的重合度大于第二阈值;
所述第一用户与所述第二用户通过社交应用联系的次数大于第三阈值;
所述第二用户为所述第一用户选择的与所述第一用户关系密切的用户;
所述第一用户与所述第二用户具有相同的标签。
在一个可能的设计中,所述从存储的至少一张候选图片的图片信息中确定所述目标图片对应的参考图片的图片信息,包括:获取所述至少一张候选图片的图片信息,根据所述目标图片的图片信息以及所述至少一张候选图片的图片信息相匹配,确定所述参考图片的图片信息。
在一个可能的设计中,任一张候选图片的图片信息或所述目标图片的图片信息包括以下至少一项:
图片本身、图片标识、图片大小、拍摄时间、拍摄位置、缩略图;
所述目标图片的图片信息和所述参考图片的图片信息满足以下至少一个条件:
所述目标图像的图片大小与所述参考图片的图片大小相同;
所述目标图片的拍摄时间与所述参考图片的拍摄时间之间的差值小于第四阈值;
所述目标图片的拍摄位置与所述参考图片的拍摄位置之间的距离小于第五阈值。
在一个可能的设计中,所述方法还包括:向所述存储设备发送下载请求,所述下载请求用于请求获取所述目标图片;接收所述存储设备发送的所述差异信息以及所述参考图片的图片信息;根据所述差异信息以及所述参考图片的图片信息生成所述目标图片。
第四方面,本申请提供一种图片备份装置,所述装置包括多个功能模块;所述多个功能模块相互作用,实现上述任一方面及其各实施方式中的方法。所述多个功能模块可以基于软件、硬件或软件和硬件的结合实现,且所述多个功能模块可以基于具体实现进行任意组合或分割。
第五方面,本申请提供一种存储设备,包括至少一个处理器和至少一个存储器,所述至少一个存储器中存储计算机程序指令,所述存储设备运行时,所述至少一个处理器执行上述任一方面及其各实施方式中存储设备执行的方法。
第六方面,本申请提供一种终端设备,包括至少一个处理器和至少一个存储器,所述至少一个存储器中存储计算机程序指令,所述电子设备运行时,所述至少一个处理器执行上述任一方面及其各实施方式中终端设备执行的方法。
第七方面,本申请还提供一种计算机程序,当所述计算机程序在计算机上运行时,使得所述计算机执行上述任一方面及其各实施方式中的方法。
第八方面,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,当所述计算机程序被计算机执行时,使得所述计算机执行上述任一方面及其各实施方式中的方法。
第九方面,本申请还提供一种芯片,所述芯片用于读取存储器中存储的计算机程序, 执行上述任一方面及其各实施方式中的方法。
第十方面,本申请还提供一种芯片***,该芯片***包括处理器,用于支持计算机装置实现上述任一方面及其各实施方式中的方法。在一种可能的设计中,所述芯片***还包括存储器,所述存储器用于保存该计算机装置必要的程序和数据。该芯片***可以由芯片构成,也可以包含芯片和其他分立器件。
附图说明
图1为本申请实施例提供的一种图片备份场景的示意图;
图2为本申请实施例提供的一种图片备份应用的界面示意图;
图3为本申请实施例提供的一种终端设备的结构示意图;
图4为本申请实施例提供的一种终端设备的软件结构框图;
图5为本申请实施例提供的一种图片备份方法的流程图;
图6为本申请实施例提供的一种终端设备向服务器上报用户信息的示意图;
图7A为本申请实施例提供的一种服务器访问用户的备份图片集合的示意图;
图7B为本申请实施例提供的又一种服务器访问用户的备份图片集合的示意图;
图8为本申请实施例提供的一种确定参考图片的方法流程图;
图9为本申请实施例提供的一种差分计算的示意图;
图10为本申请提供的第一种图片备份示例的方法流程图;
图11为本申请提供的第二种图片备份示例的方法流程图;
图12为本申请提供的第三种图片备份示例的方法流程图;
图13为本申请提供的第四种图片备份示例的方法流程图;
图14为本申请实施例提供的一种服务器的模块结构及功能示意图。
具体实施方式
为了方便理解本申请实施例,下面介绍与本申请实施例相关的术语:
(1)差分计算,是指对至少两张图片进行差异化计算,以确定图片间的差异信息,该差异信息可以用于表示图片间的差异部分。
(2)缩略图,是指对图片进行重编码后降低了像素的图片,缩略图相较于原图的数据量会减少。
图1为本申请实施例提供的一种图片备份场景的示意图。参考图1,该场景包括多个终端设备和至少一个存储设备,图1中以三个终端设备(终端设备A、终端设备B和终端设备C)和一个存储设备为例示出。其中,存储设备可以为服务器或家庭存储设备,如网络附属存储(network attached storage,NAS)。为便于介绍,在以下描述中,以存储设备为服务器为例进行说明。
用户在需要进行图片备份时,可以操作将终端设备上的图片上传到服务器,从而将上传的图片保存在服务器中,以实现图片备份。当用户将图片上传到服务器后,可以选择删除终端设备上存储的图片,从而释放终端设备的存储空间。当用户想要查看这些图片时,可以通过图片备份应用查看上传到服务器的图片并选择下载到本地,从而再次获取到这些图片。
可选的,终端设备上可以安装图片备份应用,用户可以在该应用中操作上传图片到服务器。例如,图2为本申请实施例提供的一种图片备份应用的界面示意图。参考图2,用户可以点击“上传图片”,并在图片预览界面中选择待上传的图片。终端设备将用户选择的图片上传到服务器,服务器接收图片并将接收到的图片存储到服务器的存储空间中。
需要说明的是,图片备份应用可以为终端设备的操作***自带的应用或预置的功能,如操作***自带的云盘应用;或者图片备份应用可以为第三方厂商开发的嵌入式应用。本申请实施例对此不作限定。
通过上述介绍可以看出,图片备份方式对服务器的带宽成本和存储成本都有较大的要求,下面对两种提升图片传输性能的方式进行介绍。
方式一、终端设备上传缩略图到服务器。
终端设备响应于用户触发的上传指令后,将待上传图片重新编码为高清缩略图,并将高清缩略图上传至服务器,以节省图片传输带宽并节省服务器的存储成本。
方式二、秒传功能
终端设备响应于用户触发的上传指令后,向服务器发送上传图片的请求,该请求中可以携带待上传图片的标识。服务器接收到上传图片的请求后,确定待上传图片的标识与服务器中已存储的图片的标识相同,表示待上传图片已存储在服务器中,则此时服务器只需要在待上传图片的用户对应的文件夹中新建一个图片引用,该图片引用可以包括已上传到服务器中的图片的标识和/或存储地址。
举例来说,假设终端设备请求向服务器备份图片A,服务器根据图片A的标识在服务器中已存储的图片中进行查找,确定图片B与图片A具有相同的标识,也就是说,图片A和图片B是相同的图片。服务器可以通知终端设备无需上传图片A,而在请求上传图片A的用户对应的文件夹中新建图片引用,该图片引用包含图片B的标识和/或存储地址。并且,服务器将图片A的图片信息存储到用户对应的文件夹中,完成对图片A的备份。当用户操作终端设备向服务器请求下载图片A时,服务器可以根据图片引用中图片B的标识和/或存储地址查找服务器中存储的图片B,服务器将图片B以及图片A的图片信息发送给终端设备,终端设备将图片B以及图片A的图片信息保存在本地,完成对备份的图片A的下载。
通过秒传功能,当服务器中已存储有相同的图片时,终端设备无需将待上传图片实际上传至服务器,就可以实现图片备份。也就是说,对于相同的图片,服务器中只需要存储一份图片,而该图片可以关联多个图片信息,每个图片信息包括用户上传图片时的相关数据。
通过上述内容可以看出,方式一中为提升图片传输性能,需要损失图片的清晰度,并且重编码为缩略图的方式会导致服务器存储的图片其实是变更后的图片,且无法还原,影响用户体验。方式二中的秒传功能只有在用户上传图片重复率较高的场景下才会获得较大的收益,而个人用户上传图片的场景中收益较小,并不能明显提升图片传输性能。
综上,目前亟需一种高效的图片备份方法。
基于上述问题,本申请实施例提供一种图片备份方法,用于节省图片备份方法中的带宽成本与存储成本。在本申请实施例提供的图片备份方法中,当用户有图片备份需求时,服务器可以获取用户信息并确定用户集合。当用户集合中的任一用户对应的终端设备向服务器发送上传请求,请求备份目标图片时,服务器可以在用户集合中所有用户的备份图片 构成的候选图片集合中确定目标图片的参考图片,并确定目标图片相较于参考图片的差异信息。从而服务器可以将参考图片标识和差异信息作为目标图片的备份信息,无需终端设备上传目标图片也可以实现目标图片的备份。
可以理解的是,本申请实施例中终端设备可以为手机、平板电脑、可穿戴设备(例如,手表、手环、头盔、耳机等)、车载设备、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)、智能家居设备(例如,智能电视,智能音箱,智能摄像头等)等。
下面结合附图对本申请实施例中终端设备的结构进行介绍。
图3为本申请实施例提供的一种终端设备100的结构示意图。如图3所示,终端设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。
处理器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的等待时间,因而提高了***的效率。
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为终端设备100充电,也可以用于终端设备100与***设备之间传输数据。充电管理模块140用于从充电器接收充电输入。电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏194,摄像头193,和无线通信模块160等供电。
终端设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。天线1和天线2用于发射和接收电磁波信号。终端设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块150可以提供应用在终端设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大 器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。
无线通信模块160可以提供应用在终端设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星***(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块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)。
显示屏194用于显示应用的显示界面,例如显示终端设备100的桌面,桌面上可以包括终端设备100安装的应用的图标等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(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个显示屏194,N为大于1的正整数。
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,终端设备100可以包括1个或N个摄像头193,N为大于1的正整数。
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行终端设备100的各种功能应 用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作***,以及至少一个应用程序的软件代码等。存储数据区可存储终端设备100使用过程中所产生的数据(例如拍摄的图像、录制的视频等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展终端设备的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将图片,视频等文件保存在外部存储卡中。
终端设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
其中,传感器模块180可以包括压力传感器180A,加速度传感器180B,触摸传感器180C等。
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。
触摸传感器180C,也称“触控面板”。触摸传感器180C可以设置于显示屏194,由触摸传感器180C与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180C用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180C也可以设置于终端设备100的表面,与显示屏194所处的位置不同。
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。终端设备100可以接收按键输入,产生与终端设备100的用户设置以及功能控制有关的键信号输入。马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。SIM卡接口195用于连接SIM卡。SIM卡可以通过***SIM卡接口195,或从SIM卡接口195拔出,实现与终端设备100的接触和分离。
可以理解的是,图3所示的部件并不构成对终端设备100的具体限定,终端设备还可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。此外,图3中的部件之间的组合/连接关系也是可以调整修改的。
图4为本申请实施例提供的一种终端设备的软件结构框图。如图4所示,终端设备的软件结构可以是分层架构,例如可以将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将操作***分为四层,从上至下分别为应用程序层,应用程序框架层(framework,FWK),运行时和***库,以及内核层。
应用程序层可以包括一系列应用程序包。如图4所示,应用程序层可以包括相机、设置、皮肤模块、用户界面(user interface,UI)、三方应用程序等。其中,三方应用程序可以包括图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming  interface,API)和编程框架。应用程序框架层可以包括一些预先定义的函数。如图4所示,应用程序框架层可以包括窗口管理器,内容提供器,视图***,电话管理器,资源管理器,通知管理器等。
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。
视图***包括可视控件,例如显示文字的控件,显示图片的控件等。视图***可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。
电话管理器用于提供终端设备的通信功能。例如通话状态的管理(包括接通,挂断等)。
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在***顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,终端设备振动,指示灯闪烁等。
运行时包括核心库和虚拟机。运行时负责操作***的调度和管理。
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是操作***的核心库。应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。
***库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(media libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。
表面管理器用于对显示子***进行管理,并且为多个应用程序提供了2D和3D图层的融合。
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。
2D图形引擎是2D绘图的绘图引擎。
在一些实施例中,三维图形处理库可以用于绘制三维的运动轨迹图像,2D图形引擎可以用于绘制二维的运动轨迹图像。
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。
硬件层可以包括各类传感器,例如加速度传感器、陀螺仪传感器、触摸传感器等。
下面结合说明书附图,对本申请实施例的图片备份方法进行说明。
图5为本申请实施例提供的一种图片备份方法的流程图。参考图5,该方法包括以下步骤:
S501:服务器获取第一用户的用户信息,确定与第一用户关联的至少一个第二用户。
可选地,用户信息可以包括第一用户的用户标识、第一用户常用无线局域网(wireless local area network,wlan)信息、第一用户对应的终端设备的IP地址、第一用户的常住位置等。其中第一用户的常住位置例如可以为终端设备的GPS位置或终端设备的常连基站位置等。
需要说明的是,本申请实施例中,当第一用户有图片备份需求时,终端设备可以向服务器上报第一用户的用户信息。终端设备在向服务器上报用户信息之前,需要获取用户授权。例如,终端设备在显示屏上显示获取用户授权的消息,在用户同意授权后,终端设备再向服务器发送第一用户的用户信息。
在一些实施例中,终端设备可以向服务器上报加密处理后的用户信息,服务器在接收到加密处理后的用户信息后,可以根据加密处理后的用户信息确定第一用户的用户集合。其中,终端设备对用户信息进行加密处理的方式例如可以为采用加密算法对用户信息进行处理。
可以理解的是,每个有图片备份需求的用户对应的终端设备在向服务器上传需要备份的图片之前,可以向服务器上报用户的用户信息。例如,图6为本申请实施例提供的一种终端设备向服务器上报用户信息的示意图。图6以3个终端设备为例示出,每个终端设备对应一个用户,每个终端设备分别向服务器上报用户的用户信息。服务器可以接收所有终端设备上报的用户信息,并对接收到的用户信息进行分析,确定多个用户集合。每个用户集合中包含的用户可以认为是关系密切的用户,这些用户需要备份的图片中可能存在相似的图片。
一种可选的实施方式中,服务器在获取到第一用户的用户信息后,可以确定与第一用户关联的至少一个第二用户,至少一个第二用户以及第一用户可以组成第一用户对应的第一用户集合。其中,第二用户可以为与第一用户关系密切的第二用户。例如,与第一用户关系密切的第二用户可能为与第一用户常住地址距离较近的用户,或者与第一用户联络频繁的用户。
另一种可选的实施方式中,第一用户可以自己选择与第一用户关系密切的第二用户,第一用户与第二用户共同组成第一用户集合。此时终端设备可以将第一用户及其选择的第二用户的用户标识发送给服务器,以使服务器可以确定第一用户集合。
可选地,根据服务器确定第一用户集合的方式不同,第一用户集合中第一用户与第二用户的关系不同。下面对本申请实施例中服务器确定第一用户集合的方式进行介绍。
方式1、第一用户与第二用户具有相同的常用wlan。
示例性的,服务器可以确定与第一用户具有相同常用wlan的第二用户,这些第二用户使用的终端设备与第一用户使用的终端设备接入过相同的无线局域网,则可以认为这些第二用户与第一用户可能具有密切的关系,服务器可以将第一用户以及确定出的第二用户划分为第一用户集合。
方式2、第一用户与第二用户具有相同的网际协议(internet protocol address,IP)地址。
示例性的,服务器可以确定与第一用户具有相同IP地址的第二用户,也就是说,第一用户与第二用户使用相同的终端设备登陆过自己的账号,则可以认为第一用户与第二用户可能具有密切的关系,服务器可以将第一用户以及第二用户划分为第一用户集合。
方式3、第一用户的常住地址与第二用户的常住地址之间的距离小于第一阈值。
示例性的,服务器可以确定与第一用户的常住地址之间的距离小于第一阈值的范围内的第二用户,服务器可以将第一用户以及第二用户划分为第一用户集合。当第一用户与第二用户的常住地址较近时,第一用户与第二用户的工作或学习地点可能相同或距离较近,此时第一用户与第二用户上传的图片可能较为相似。
需要说明的是,第一用户的常住地址例如可以为终端设备的GPS地址,或者可以为终端设备的常连基站的位置。
方式4、第一用户的运动轨迹与第二用户的运动轨迹的重合度大于第二阈值。
示例性的,第一用户的用户信息中可以包括第一用户的运动轨迹,服务器可以确定与第一用户的运动轨迹重合度大于第二阈值的第二用户,服务器可以将第一用户以及第二用户划分为第一用户集合。根据该方式确定出的第二用户和第一用户的活动区域较为相似,此时第一用户与第二用户上传的图片可能较为相似。
方式5、第一用户与第二用户通过社交应用联系的次数大于第三阈值。
示例性的,第一用户的用户信息中还可以包括第一用户通过社交应用联系的用户及联系次数,服务器可以将与第一用户通过社交应用联系次数大于第三阈值的第二用户与第一用户划分为第一用户集合。第一用户与第二用户通过社交应用联系的频率较高时,第一用户与第二用户上传的图片可能较为相似,如第一用户可能通过社交应用向第二用户发送图片,且第一用户和第二用户选择将该图片备份到服务器。
方式6、第二用户为第一用户选择的与第一用户关系密切的用户。
示例性的,第一用户的用户信息中还可以包括第一用户选择作为关系密切用户的第二用户的标识。服务器在接收到第一用户的用户信息后,可以将第一用户以及第二用户划分为第一用户集合。
方式7、第一用户和第二用户为具有相同标签的用户。
示例性的,第一用户的用户信息中还可以包括用户的标签,用户的标签可以为用户选择的,例如用户的标签可以为用户的爱好:旅游、美食等。服务器可以将第一用户以及与第一用户具有相同标签的第二用户划分为第一用户集合。
需要说明的是,上述服务器确定第一用户集合的方式仅作为示例,实施中服务器可以结合以上多种方式中的至少一种确定第一用户集合,本申请实施例对此不做限制。例如,当服务器根据多种方式确定第一用户集合时,每种确定第一用户集合的方式可以对应不同的权重,从而服务器可以根据多种方式以及每种方式对应的权重确定第一用户集合,或者可以为多种方式设置优先级,服务器可以选择其中优先级更高的方式确定第一用户集合。
本申请实施例提供的图片备份方法中,服务器确定第一用户对应的第一用户集合,当第一用户集合中第二用户的备份图片集合中与第一用户待上传的图片的相似图片较多时,本申请提供的图片备份方法可以获得较大的收益。基于该设计思路,服务器还可以在第一用户集合中添加第三用户,第三用户可以为一个虚拟用户。第三用户的备份图片集合中可以包括服务器预设的图片。例如,当第一用户集合中的第一用户和第二用户为常住地址距离较近的用户,第三用户的备份图片集合中可以包括第一用户常住地址附近的地标建筑的图片。又例如,当第一用户集合中的第一用户和第二用户具有相同的旅游标签,第三用户的备份图片集合中可以包括常见景点的图片。
S502:服务器接收终端设备发送的上传请求。
其中,终端设备为第一用户对应的终端设备,上传请求用于请求将目标图片上传到服务器,以实现图片备份。
可选地,上传请求中可以包括目标图片的图片信息,目标图片的图片信息可以包括图片标识、图片大小、拍摄时间、拍摄位置、缩略图、像素特征值中的部分或全部。其中,图片标识例如可以为图片的哈希值,通过前述介绍可知,图片的哈希值可以作为图片的唯一标识以区分不同图片。缩略图可以为对目标图标重编码后的图片,缩略图的像素低于目标图片。像素特征值是基于图片的像素信息提取出来的向量特征,例如,像素特征值可以包括图片亮度、图片中物体的形状等。
S503:服务器确定目标图片对应的参考图片的图片信息。
可选地,服务器在确定出第一用户的第一用户集合后,可以将第一用户集合内部分或全部用户对应的备份图片集合中的图片作为候选图片,至少一张候选图片组成候选图片集合。
可以理解的是,服务器在接收到第一用户集合内的任何一个用户发送的上传请求时,可以访问第一用户集合内的部分或全部用户的备份图片集合,以确定待上传图片对应的参考图片的图片信息。例如,服务器可以从候选图片集合的至少一张候选图片中确定参考图片的图片本身。服务器在访问用户的备份图片集合之前,可以向用户使用的终端设备发送授权请求,在接收到终端设备发送的用户同意授权的消息后,再访问用户的备份图片集合。或者,用户可以选择打开共享备份图片集合的功能,此时服务器可以访问用户的备份图片集合。进一步的,服务器访问用户的备份图片集合时,可以访问加密处理后的备份图片,也就是说,服务器可以获取到的为对备份图片进行加密处理后的密文。
举例来说,图7A为本申请实施例提供的一种服务器访问用户的备份图片集合的示意图。参考图7A,第一用户为用户A,第二用户为用户B和用户C,用户D不属于第一用户集合。则服务器可以在获取到用户A、用户B和用户C的授权之后,在接收到用户A对应的终端设备发送的上传请求时,访问用户B和用户C的备份图片集合。同时,服务器此时并不能访问用户D的备份图片集合。
又例如,图7B为本申请实施例提供的又一种服务器访问用户的备份图片集合的示意图。参考图7B,第一用户为用户A,第二用户为用户B、用户C和用户D。服务器在接收到用户A对应的终端设备发送的上传请求时,若服务器确定未获取到用户D的授权,或者服务器确定用户D已关闭共享备份图片集合的功能,则服务器也不能访问用户D的备份图片集合。
一种可选的实施方式中,服务器可以存储候选图片集合中至少一张候选图片的图片信息。服务器在接收到终端设备发送的上传请求后,可以根据上传请求中目标图片的图片信息以及至少一张候选图片的图片信息从至少一张候选图片中确定参考图片。
另一种可选的实施方式中,服务器还可以将候选图片集合中至少一张候选图片的图片信息发送给终端设备。例如,服务器可以通过无线保真(wireless fidelity,WiFi)直连技术或蓝牙技术向终端设备发送至少一张候选图片的图片信息。终端设备保存至少一张候选图片的图片信息,并根据目标图片的图片信息以及至少一张候选图片的图片信息确定参考图片的图片信息。终端设备在确定出参考图片的图片信息后,可以在上传请求中携带参考图片的图片信息,如在上传请求中携带参考图片的图片标识。服务器可以根据上传请求中参考图片的图片信息确定参考图片。
综上,本申请实施例中可以由服务器确定参考图片的图片信息,或者可以由终端设备确定参考图片的图片信息,再通过上传请求将参考图片的图片信息发送给服务器。下面以服务器确定参考图片为例,对本申请实施例提供的确定参考图片的方式进行介绍。
图8为本申请实施例提供的一种确定参考图片的方法流程图。参考图8,该方法包括以下步骤:
S801:服务器从接收到的上传请求中获取目标图片的图片信息。
S802:服务器判断候选图片集合中是否存在与目标图片的标识相同的候选图片;若是,进行S803;否则,进入S804。
S803:服务器秒传目标图片。
可选地,若服务器确定候选图片集合中存在与目标图片的标识相同的候选图片,表示目标图片之前已被上传到服务器,则此时服务器可以秒传目标图片。也就是说,终端设备无需真正上传目标图片,服务器可以在第一用户的备份图片集合中新建一个目标图片的引用,实现第一用户对目标图片的备份。
S804:服务器判断候选图片集合中是否存在与目标图片相似的相似图片;若是,进入S805;否则,进入S807。
一种可选的实施方式中,S804可以认为是服务器从候选图片集合中初筛与目标图片相似的图片的步骤。可选地,服务器可以根据图片信息中包含的图片大小、拍摄时间、拍摄位置等信息判断候选图片集合中是否存在与目标图片相似的相似图片。
例如,服务器可以将图片大小与目标图片的图片大小相同的候选图片作为相似图片。又例如,服务器可以将拍摄时间与目标图片的拍摄时间之间差值小于第四阈值的候选图片作为相似图片。又例如,服务器还可以将拍摄地点与目标图片的拍摄地点之间距离小于第五阈值的候选图片作为相似图片。
需要说明的是,本申请实施例服务器在判断候选图片集合中是否存在相似图片时,不仅限于本申请实施例中的上述举例,例如图片信息中还可以包括图片的亮度、对比度等信息,这些信息也可以用于判断候选图片集合中是否存在相似图片,本申请实施例对此不作限定。
S805:服务器基于深度学习算法判断相似图片中是否存在参考图片;若是,进入S806;否则,进入S807。
S806:服务器确定目标图片对应的参考图片。
一种可选的实施方式中,服务器可以将相似图片的缩略图和目标图片的缩略图输入到深度学习模型中,获取深度学习模型输出的相似图片与目标图片的相似度。服务器可以将与目标图片的相似度大于设定阈值的相似图片作为参考图片。
需要说明的是,本申请实施例中的深度学习模型可以为已训练完成的、可以用于计算图片相似度的模型,例如深度学习模块可以为支持向量机(support vector machines,SVM)模型、卷积神经网络模型等。本申请实施例中深度学习模型可以是基于图片的特征信息训练得到的,其中图片的特征信息例如可以包括图片的方向梯度直方图(histogram of oriented gradient,HOG)特征、余弦相似度、基于直方图计算得到的相似度等。
另一种可选的实施方式中,服务器还可以将相似图片和目标图片输入到深度学习模型中确定相似图片和目标图片的相似度。在这种设计中,需要终端设备先将目标图片上传至服务器,此时服务器可以先不将目标图片存储至第一用户的备份图片集合中,而是根据上 述方法确定候选图片集合中目标图片对应的参考图片。当然,在该实施方式中,终端设备在备份目标图片过程中带宽成本没有发生变化,但当服务器确定候选图片集合中存在目标图片对应的参考图片时,可以根据本申请实施例提供的图片备份方法确定目标图片的差异信息,并将差异信息存储在服务器中,进而节省存储成本。
在一些实施例中,服务器可能从相似图片中确定出多张与目标图片的相似度大于设定阈值的图片,此时服务器可以将其中相似度最高的一张图片作为参考图片;或者,服务器可以将这多张图片作为参考图片。
S807:服务器确定候选图片集合中不存在目标图片对应的参考图片。
可选地,若服务器确定候选图片集合中不存在相似图片,或者相似图片中不存在参考图片时,服务器确定候选图片集合中不存在目标图片对应的参考图片。此时,终端设备需要正常上传目标图片,服务器在接收到目标图片后,存储到第一用户对应的备份图片集合中。
可以理解的是,确定参考图片的方式也可以由终端设备执行,具体可以参见图8所示的方式实施,在此不再赘述。
S504:服务器确定目标图片与参考图片之间的差异信息。
其中,差异信息可以为目标图片与参考图片之间的差异部分对应的二进制数据,或者差异信息可以为目标图片与参考图片之间存在差异的位置的信息。
一种可选的实施方式中,服务器可以对目标图片和参考图片进行差分计算,以确定目标图片对应的差异信息。
又一种可选的实施方式中,终端设备可以对目标图片和参考图片进行差分计算,确定目标图片对应的差异信息,并将目标图片对应的差异信息发送给服务器。服务器可以接收终端设备发送的消息并从中获取目标图片对应的差异信息。
举例来说,图9为本申请实施例提供的一种差分计算的示意图。参考图9,当服务器或终端设备对目标图片和参考图片进行差分计算时,可以为对目标图片和参考图片的相同位置上的像素值进行计算,如进行像素值相减,得到差异信息;或者服务器或终端设备可以将目标图片和参考图片之间存在差异的位置的信息作为差异信息。
在一些实施例中,若确定出多张参考图片时,服务器或终端设备可以分别对每张参考图片与目标图片进行差分计算,确定多个差异信息,并保留其中数据量最小的差异信息及其对应的参考图片。
S505:服务器保存目标图片对应的差异信息。
可选的,当服务器确定出目标图片对应的差异信息后,可以将参考图片标识以及差异信息作为目标图标的备份信息,并存储该备份信息。也就是说,终端设备无需上传目标图片,服务器也无需存储目标图片,而是存储备份信息以实现目标图片的备份。
当服务器中存储的是目标图片的备份信息时,若服务器接收到终端设备发送的下载请求,该下载请求用于请求下载目标图片,服务器可以将目标图片的备份信息以及参考图片发送给终端设备,终端设备根据备份信息以及参考图片合成得到目标图片;或者,服务器可以根据目标图片的备份信息和参考图片合成得到目标图片,再将目标图片发送给终端设备。
通过本申请实施例提供的图片备份方法,终端设备需要在服务器上备份目标图片时, 服务器可以先确定与第一用户关联的至少一个第二用户,至少一个第二用户在存储设备中备份的图片可以作为至少一张候选图片。在至少一个第二用户备份的图片中筛选参考图片,可以缩小候选图片的范围,从而提高确定参考图片的效率。在确定出参考图片后,存储设备或终端设备可以确定目标图片相对于参考图片的差异信息。通过该方案,终端设备无需实际上传目标图片,存储设备也无需存储目标图片,而是存储目标图片的差异信息即可实现目标图片的备份,节省图片备份的带宽成本同时节省存储成本,高效地实现图片备份。
在一些实施例中,第一用户集合还可以包括多个子集合,不同子集合可以对应不同的第一用户与第二用户的关系。例如,第一用户集合可以包括子集合A、子集合B、子集合C和子集合D。其中,子集合A中的第二用户为与第一用户具有相同常用wlan的用户,子集合B中的第二用户运动轨迹为与第一用户的运动轨迹重合度大于第二阈值的用户,子集合C中的第二用户为与第一用户同样具有“旅游”标签的用户,子集合D中的第二用户为与第一用户同样具有“美食”标签的用户。
一些场景中,终端设备可能会请求向服务器批量上传多张图片,此时终端设备可以对多张图片进行分类,不同类型的图片可以对应第一用户集合中的不同子集合。例如,类型为“景点”的图片可以对应与上述的子集合C,类型为“美食”的图片可以对应于上述的子集合D。通过该方法,在上传不同类型的图片时,服务器或终端设备可以在该类型对应的子集合的备份图片中查找待上传图片对应的参考图片,从而优先搜索空间,提升查找参考图片的效率。
下面以几个具体示例对本申请实施例提供的图片备份方法进行进一步介绍:
示例1
图10为本申请提供的第一种图片备份示例的方法流程图。参考图10,在该示例中,服务器接收到终端设备的上传请求后,由服务器确定终端设备请求上传的目标图片对应的参考图片,并计算目标图片对应的差异信息。具体的,该方法包括以下步骤:
S1001:服务器获取第一用户的用户信息,确定第一用户对应的第一用户集合。
其中,第一用户集合中包括与第一用户关联的至少一个第二用户。
S1002:服务器确定第一用户集合对应的候选图片集合。
其中,候选图片集合中包括至少一张候选图片。
S1003:终端设备向服务器发送上传请求。
其中,上传请求用于请求上传目标图片,上传请求中包括目标图片以及目标图片的图片信息。
S1004:服务器根据目标图片的图片信息与至少一张候选图片的图片信息确定目标图片对应的参考图片。
S1005:服务器对目标图片和参考图片进行差分计算,确定目标图片对应的差异信息。
S1006:服务器保存目标图片对应的差异信息。
示例2
图11为本申请提供的第二种图片备份示例的方法流程图。参考图11,在该示例中,服务器接收到终端设备的上传请求后,由服务器确定终端设备请求上传的目标图片对应的 参考图片,但由终端设备计算目标图片对应的差异信息。具体的,该方法包括以下步骤:
S1101:服务器获取第一用户的用户信息,确定第一用户对应的第一用户集合。
其中,第一用户集合中包括与第一用户关联的至少一个第二用户。
S1102:服务器确定第一用户集合对应的候选图片集合。
其中,候选图片集合中包括至少一张候选图片。
S1103:终端设备向服务器发送上传请求。
其中,上传请求用于请求上传目标图片,上传请求中包括目标图片的图片信息。
S1104:服务器根据目标图片的图片信息与候选图片集合中至少一张候选图片的图片信息确定目标图片对应的参考图片。
S1105:服务器将参考图片的缩略图发送给终端设备。
S1106:终端设备对目标图片的缩略图和参考图片的缩略图进行差分计算,确定目标图片对应的差异信息。
S1107:终端设备将目标图片对应的差异信息发送给服务器。
S1108:服务器保存目标图片对应的差异信息。
示例3
图12为本申请提供的第三种图片备份示例的方法流程图。参考图12,在该示例中,终端设备需要向服务器备份目标图片时,由终端设备确定目标图片对应的参考图片,并由服务器计算目标图片对应的差异信息。具体的,该方法包括以下步骤:
S1201:服务器获取第一用户的用户信息,确定第一用户对应的第一用户集合。
其中,第一用户集合中包括与第一用户关联的至少一个第二用户。
S1202:服务器确定第一用户集合对应的候选图片集合。
其中,候选图片集合中包括至少一张候选图片。
S1203:服务器将候选图片集合中至少一张候选图片的图片信息发送给终端设备。
S1204:终端设备根据目标图片的图片信息与至少一张候选图片的图片信息确定目标图片对应的参考图片的图片信息。
S1205:终端设备向服务器发送上传请求。
其中,上传请求用于请求上传目标图片,上传请求中可以包括目标图片的图片信息以及参考图片的图片信息。
S1206:服务器获取上传请求中的参考图片的图片信息,并对目标图片和参考图片进行差分计算,确定目标图片对应的差异信息。
S1207:服务器保存目标图片对应的差异信息。
示例4
图13为本申请提供的第四种图片备份示例的方法流程图。参考图13,在该示例中,终端设备需要向服务器备份目标图片时,由终端设备确定目标图片对应的参考图片,并计算目标图片对应的差异信息。具体的,该方法包括以下步骤:
S1301:服务器获取第一用户的用户信息,确定第一用户对应的第一用户集合。
其中,第一用户集合中包括与第一用户关联的至少一个第二用户。
S1302:服务器确定第一用户集合对应的候选图片集合。
其中,候选图片集合中包括至少一张候选图片。
S1303:服务器将候选图片集合中至少一张候选图片的图片信息发送给终端设备。
S1304:终端设备根据目标图片的图片信息与至少一张候选图片的图片信息确定目标图片对应的参考图片的图片信息。
S1305:终端设备对目标图片的缩略图和参考图片的缩略图进行差分计算,确定目标图片对应的差异信息。
S1306:终端设备向服务器发送上传请求。
其中,上传请求中包括目标图片对应的参考图片的图片信息以及目标图片对应的差异信息。
S1307:服务器保存目标图片对应的差异信息。
可选的,在图10所示的图片备份方法中,服务器确定终端设备请求上传的目标图片对应的参考图片,以及由服务器计算目标图片对应的差异信息。此时,参考图14,按照服务器所实现功能,服务器内可以包括以下模块:用户集合识别模块、候选图片集合确定模块、参考照片识别模块、差分计算模块以及备份信息存储模块。图14为本申请实施例提供的一种服务器的模块结构及功能示意图。下面结合图14对服务器中各个模块的功能进行进一步介绍。
用户集合识别模块,用于在接收到终端设备上报的第一用户的用户信息后,根据第一用户的用户信息以及其它用户的用户信息确定第一用户对应的第一用户集合。具体实施中,用户集合识别模块确定第一用户集合的方式可以参见图5中的S501实施,在此不再赘述。
候选图片集合确定模块,用于将第一用户集合中所有用户已上传到服务器的备份图片集合中的所有图片组成候选图片集合。候选图片集合中的所有图片可以用于查找是否存在与待上传的目标图片相似的参考图片。
参考图片识别模块,用于从候选图片集合中确定目标图片对应的参考图片。具体的,参考图片模块可以根据目标图片的图片信息以及候选图片集合中所有候选图片的图片信息进行初筛,确定目标图片对应的相似图片。然后,参考图片模块可以基于深度学习算法从相似图片中确定目标图片对应的参考图片。
差分计算模块,用于对目标图片以及参考图片进行差分计算,得到目标图片对应的差异信息。可选的,差分计算模块可以对目标图片的缩略图以及参考图片的缩略图进行计算,以确定目标图片对应的差异信息。
备份信息存储模块,用于生成目标图片的备份信息,并存储该备份信息。可选的,目标图片的备份信息可以为参考图片标识以及目标图片对应的差异信息。
需要说明的是,参考图10-图13所示的图片备份方法可知,本申请实施例中确定目标图片对应的参考图片以及确定目标图片对应的差异信息的步骤可以由服务器执行,也可以由终端设备执行,则在不同的方法中,可以认为参考图片识别模块和差分计算模块处于不同的设备中,而各个模块实现的功能可以参见图14,此处不再赘述。
基于以上实施例,本申请还提供一种图片备份装置,所述装置包括多个功能模块;所述多个功能模块相互作用,实现本申请实施例所描述的各方法。所述多个功能模块可以基于软件、硬件或软件和硬件的结合实现,且所述多个功能模块可以基于具体实现进行任意组合或分割。
基于以上实施例,本申请还提供一种存储设备,该存储设备包括至少一个处理器和至少一个存储器,所述至少一个存储器中存储计算机程序指令,所述存储设备运行时,所述至少一个处理器执行本申请实施例所描述的各方法。
基于以上实施例,本申请还提供一种计算机程序,当所述计算机程序在计算机上运行时,使得所述计算机执行本申请实施例所描述的各方法。
基于以上实施例,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,当所述计算机程序被计算机执行时,使得所述计算机执行本申请实施例所描述的各方法。
基于以上实施例,本申请还提供了一种芯片,所述芯片用于读取存储器中存储的计算机程序,实现本申请实施例所描述的各方法。
基于以上实施例,本申请提供了一种芯片***,该芯片***包括处理器,用于支持计算机装置实现本申请实施例所描述的各方法。在一种可能的设计中,所述芯片***还包括存储器,所述存储器用于保存该计算机装置必要的程序和数据。该芯片***,可以由芯片构成,也可以包含芯片和其他分立器件。
本领域内的技术人员应明白,本申请的实施例可提供为方法、***、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请的方法、设备(***)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的保护范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。

Claims (30)

  1. 一种图片备份***,其特征在于,所述***包括终端设备和存储设备;
    所述终端设备,用于向所述存储设备发送所述备份请求,所述备份请求用于请求在所述存储设备中备份目标图片;
    所述***,用于从存储的至少一张候选图片的图片信息中确定所述目标图片对应的参考图片的图片信息;其中,所述至少一张候选图片包括与所述终端设备对应的第一用户关联的至少一个第二用户在所述存储设备中备份的图片;确定所述目标图片相对于所述参考图片的差异信息。
  2. 如权利要求1所述的***,其特征在于,所述***还用于:
    获取所述第一用户的用户信息;
    根据所述第一用户的用户信息确定与所述第一用户关联的至少一个第二用户。
  3. 如权利要求2所述的***,其特征在于,所述第一用户的用户信息包括以下至少一项:
    所述第一用户的用户标识;
    所述第一用户的常用无线局域网;
    所述第一用户对应的网际协议地址;
    所述第一用户的常住地址;
    所述第一用户的运动轨迹;
    所述第一用户的社交应用信息;
    所述第一用户的标签,所述标签为所述第一用户选择的用于表示所述第一用户的喜好或特征的信息。
  4. 如权利要求3所述的***,其特征在于,所述第一用户与所述第二用户满足以下至少一个条件:
    所述第一用户与所述第二用户具有相同的常用无线局域网;
    所述第一用户与所述第二用户具有相同的网际协议地址;
    所述第一用户的常住地址与所述第二用户的常住地址之间的距离小于第一阈值;
    所述第一用户的运动轨迹与所述第二用户的运动轨迹的重合度大于第二阈值;
    所述第一用户与所述第二用户通过社交应用联系的次数大于第三阈值;
    所述第二用户为所述第一用户选择的与所述第一用户关系密切的用户;
    所述第一用户与所述第二用户具有相同的标签。
  5. 如权利要求2-4任一项所述的***,其特征在于,所述从存储的至少一张候选图片的图片信息中确定所述目标图片对应的参考图片的图片信息的步骤为所述终端设备或所述存储设备执行的。
  6. 如权利要求5所述的***,其特征在于,所述备份请求中包括所述目标图片的图片信息;所述***具体用于:
    获取所述至少一张候选图片的图片信息,根据所述目标图片的图片信息以及所述至少一张候选图片的图片信息相匹配,确定所述参考图片的图片信息。
  7. 如权利要求5所述的***,其特征在于,所述备份请求中包括所述参考图片的图片信息;
    所述存储设备还用于:获取所述至少一张候选图片的图片信息,将所述至少一张候选图片的图片信息发送给所述终端设备;
    所述终端设备还用于:接收所述存储设备发送的至少一张候选图片的图片信息,根据所述目标图片的图片信息以及所述至少一张候选图片的图片信息,确定所述参考图片的图片信息。
  8. 如权利要求6或7所述的***,其特征在于,任一张候选图片的图片信息或所述目标图片的图片信息包括以下至少一项:
    图片本身、图片标识、图片大小、拍摄时间、拍摄位置、缩略图;
    所述目标图片的图片信息和所述参考图片的图片信息满足以下至少一个条件:
    所述目标图像的图片大小与所述参考图片的图片大小相同;
    所述目标图片的拍摄时间与所述参考图片的拍摄时间之间的差值小于第四阈值;
    所述目标图片的拍摄位置与所述参考图片的拍摄位置之间的距离小于第五阈值。
  9. 如权利要求1-8任一项所述的***,其特征在于,所述确定所述目标图片相对于所述参考图片的差异信息的步骤为所述终端设备或所述存储设备执行的。
  10. 如权利要求1-9任一项所述的***,其特征在于,所述终端设备还用于:
    向所述存储设备发送下载请求,所述下载请求用于请求获取所述目标图片;
    接收所述存储设备发送的所述差异信息以及所述参考图片的图片信息;根据所述差异信息以及所述参考图片的图片信息生成所述目标图片;
    所述存储设备还用于:
    将所述差异信息以及所述参考图片的图片信息发送给所述终端设备。
  11. 如权利要求1-10任一项所述的***,其特征在于,所述存储设备为服务器或家庭存储设备。
  12. 一种图片备份方法,应用于存储设备,其特征在于,所述方法包括:
    接收终端设备发送的备份请求,所述备份请求用于请求在所述存储设备中备份目标图片;
    从存储的至少一张候选图片的图片信息中确定所述目标图片对应的参考图片的图片信息;其中,所述至少一张候选图片包括与所述终端设备对应的第一用户关联的至少一个第二用户在所述存储设备中备份的图片;
    确定所述目标图片相对于所述参考图片的差异信息。
  13. 如权利要求12所述的方法,其特征在于,所述方法还包括:
    获取所述第一用户的用户信息;
    根据所述第一用户的用户信息确定与所述第一用户关联的至少一个第二用户。
  14. 如权利要求13所述的方法,其特征在于,所述第一用户的用户信息包括以下至少一项:
    所述第一用户的用户标识;
    所述第一用户的常用无线局域网;
    所述第一用户对应的网际协议地址;
    所述第一用户的常住地址;
    所述第一用户的运动轨迹;
    所述第一用户的社交应用信息;
    所述第一用户的标签,所述标签为所述第一用户选择的用于表示所述第一用户的喜好或特征的信息。
  15. 如权利要求14所述的方法,其特征在于,所述第一用户与所述第二用户满足以下至少一个条件:
    所述第一用户与所述第二用户具有相同的常用无线局域网;
    所述第一用户与所述第二用户具有相同的网际协议地址;
    所述第一用户的常住地址与所述第二用户的常住地址之间的距离小于第一阈值;
    所述第一用户的运动轨迹与所述第二用户的运动轨迹的重合度大于第二阈值;
    所述第一用户与所述第二用户通过社交应用联系的次数大于第三阈值;
    所述第二用户为所述第一用户选择的与所述第一用户关系密切的用户;
    所述第一用户与所述第二用户具有相同的标签。
  16. 如权利要求12-15任一项所述的方法,其特征在于,所述从存储的至少一张候选图片的图片信息中确定所述目标图片对应的参考图片的图片信息,包括:
    获取所述至少一张候选图片的图片信息,根据所述目标图片的图片信息以及所述至少一张候选图片的图片信息相匹配,确定所述参考图片的图片信息。
  17. 如权利要求16所述的方法,其特征在于,任一张候选图片的图片信息或所述目标图片的图片信息包括以下至少一项:
    图片本身、图片标识、图片大小、拍摄时间、拍摄位置、缩略图;
    所述目标图片的图片信息和所述参考图片的图片信息满足以下至少一个条件:
    所述目标图像的图片大小与所述参考图片的图片大小相同;
    所述目标图片的拍摄时间与所述参考图片的拍摄时间之间的差值小于第四阈值;
    所述目标图片的拍摄位置与所述参考图片的拍摄位置之间的距离小于第五阈值。
  18. 如权利要求12-17任一项所述的方法,其特征在于,所述方法还包括:
    接收所述终端设备发送的下载请求,所述下载请求用于请求获取所述目标图片;
    将所述差异信息以及所述参考图片的图片信息发送给所述终端设备,以使所述终端设备根据所述差异信息以及所述参考图片的图片信息生成所述目标图片。
  19. 如权利要求12-18任一项所述的方法,其特征在于,所述存储设备为服务器或家庭存储设备。
  20. 一种图片备份方法,应用于终端设备,其特征在于,所述方法包括:
    获取待备份的目标图片的图片信息;
    从存储的至少一张候选图片的图片信息中确定所述目标图片对应的参考图片的图片信息;其中,所述至少一张候选图片包括与所述终端设备对应的第一用户关联的至少一个第二用户在所述存储设备中备份的图片;确定所述目标图片相对于所述参考图片的差异信息;
    向存储设备发送备份请求,以使所述存储设备备份所述目标图片,所述备份请求中包括所述参考图片的图片信息和所述差异信息。
  21. 如权利要求20所述的方法,其特征在于,在所述从存储的至少一张候选图片的图片信息中确定所述目标图片对应的参考图片的图片信息之前,还包括:
    接收所述存储设备发送的所述至少一张候选图片的图片信息。
  22. 如权利要求20或21所述的方法,其特征在于,所述方法还包括:
    向所述存储设备发送所述第一用户的用户信息,以使所述存储设备根据所述第一用户的用户信息确定与所述第一用户关联的至少一个第二用户;或者
    确定所述第一用户选择的所述至少一个第二用户,并将所述至少一个第二用户的用户标识发送给所述存储设备,以使所述存储设备根据所述至少一个第二用户的用户标识确定与所述第一用户关联的至少一个第二用户。
  23. 如权利要求22所述的方法,其特征在于,所述第一用户的用户信息包括以下至少一项:
    所述第一用户的用户标识;
    所述第一用户的常用无线局域网;
    所述第一用户对应的网际协议地址;
    所述第一用户的常住地址;
    所述第一用户的运动轨迹;
    所述第一用户的社交应用信息;
    所述第一用户的标签,所述标签为所述第一用户选择的用于表示所述第一用户的喜好或特征的信息。
  24. 如权利要求23所述的方法,其特征在于,所述第一用户与所述第二用户满足以下至少一个条件:
    所述第一用户与所述第二用户具有相同的常用无线局域网;
    所述第一用户与所述第二用户具有相同的网际协议地址;
    所述第一用户的常住地址与所述第二用户的常住地址之间的距离小于第一阈值;
    所述第一用户的运动轨迹与所述第二用户的运动轨迹的重合度大于第二阈值;
    所述第一用户与所述第二用户通过社交应用联系的次数大于第三阈值;
    所述第二用户为所述第一用户选择的与所述第一用户关系密切的用户;
    所述第一用户与所述第二用户具有相同的标签。
  25. 如权利要求20-24任一项所述的方法,其特征在于,所述从存储的至少一张候选图片的图片信息中确定所述目标图片对应的参考图片的图片信息,包括:
    获取所述至少一张候选图片的图片信息,根据所述目标图片的图片信息以及所述至少一张候选图片的图片信息相匹配,确定所述参考图片的图片信息。
  26. 如权利要求25所述的方法,其特征在于,任一张候选图片的图片信息或所述目标图片的图片信息包括以下至少一项:
    图片本身、图片标识、图片大小、拍摄时间、拍摄位置、缩略图;
    所述目标图片的图片信息和所述参考图片的图片信息满足以下至少一个条件:
    所述目标图像的图片大小与所述参考图片的图片大小相同;
    所述目标图片的拍摄时间与所述参考图片的拍摄时间之间的差值小于第四阈值;
    所述目标图片的拍摄位置与所述参考图片的拍摄位置之间的距离小于第五阈值。
  27. 如权利要求20-26任一项所述的方法,其特征在于,所述方法还包括:
    向所述存储设备发送下载请求,所述下载请求用于请求获取所述目标图片;
    接收所述存储设备发送的所述差异信息以及所述参考图片的图片信息;
    根据所述差异信息以及所述参考图片的图片信息生成所述目标图片。
  28. 一种存储设备,其特征在于,包括至少一个处理器,所述至少一个处理器与至少一 个存储器耦合,所述至少一个处理器用于读取所述至少一个存储器所存储的计算机程序,以执行如权利要求12-19中任一所述的方法。
  29. 一种终端设备,其特征在于,包括至少一个处理器,所述至少一个处理器与至少一个存储器耦合,所述至少一个处理器用于读取所述至少一个存储器所存储的计算机程序,以执行如权利要求20-27中任一所述的方法。
  30. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行如权利要求12-19中任一所述的方法,或执行如权利要求20-27中任一所述的方法。
PCT/CN2022/124141 2021-10-15 2022-10-09 一种图片备份***、方法与设备 WO2023061298A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111202758.XA CN115994051A (zh) 2021-10-15 2021-10-15 一种图片备份***、方法与设备
CN202111202758.X 2021-10-15

Publications (1)

Publication Number Publication Date
WO2023061298A1 true WO2023061298A1 (zh) 2023-04-20

Family

ID=85988094

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/124141 WO2023061298A1 (zh) 2021-10-15 2022-10-09 一种图片备份***、方法与设备

Country Status (2)

Country Link
CN (1) CN115994051A (zh)
WO (1) WO2023061298A1 (zh)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100119170A1 (en) * 2008-11-07 2010-05-13 Yahoo! Inc. Image compression by comparison to large database
CN102999400A (zh) * 2012-11-22 2013-03-27 中国电信股份有限公司云计算分公司 一种云存储***数据备份方法及装置
CN103713964A (zh) * 2012-09-29 2014-04-09 联想(北京)有限公司 一种数据备份、恢复的方法和电子设备
CN105069075A (zh) * 2015-07-31 2015-11-18 小米科技有限责任公司 照片共享方法和装置
WO2017023332A1 (en) * 2015-08-06 2017-02-09 Hewlett Packard Enterprise Development Lp Difference datasets
CN109271538A (zh) * 2018-08-20 2019-01-25 深圳和而泰智能控制股份有限公司 一种图片存储方法及相关设备

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100119170A1 (en) * 2008-11-07 2010-05-13 Yahoo! Inc. Image compression by comparison to large database
CN103713964A (zh) * 2012-09-29 2014-04-09 联想(北京)有限公司 一种数据备份、恢复的方法和电子设备
CN102999400A (zh) * 2012-11-22 2013-03-27 中国电信股份有限公司云计算分公司 一种云存储***数据备份方法及装置
CN105069075A (zh) * 2015-07-31 2015-11-18 小米科技有限责任公司 照片共享方法和装置
WO2017023332A1 (en) * 2015-08-06 2017-02-09 Hewlett Packard Enterprise Development Lp Difference datasets
CN109271538A (zh) * 2018-08-20 2019-01-25 深圳和而泰智能控制股份有限公司 一种图片存储方法及相关设备

Also Published As

Publication number Publication date
CN115994051A (zh) 2023-04-21

Similar Documents

Publication Publication Date Title
JP2022532102A (ja) スクリーンショット方法及び電子装置
JP7268275B2 (ja) 着信があるときに電子デバイス上に映像を提示するための方法、および電子デバイス
US20230070358A1 (en) File Sharing Method, System, and Related Device
US20220358089A1 (en) Learning-Based Keyword Search Method and Electronic Device
WO2021088881A1 (zh) 一种选择图片的方法和电子设备
CN113805797B (zh) 网络资源的处理方法、电子设备及计算机可读存储介质
US12010257B2 (en) Image classification method and electronic device
CN116095413B (zh) 视频处理方法及电子设备
WO2023236794A1 (zh) 一种音轨标记方法及电子设备
US20240126424A1 (en) Picture sharing method and electronic device
WO2022121445A1 (zh) 添加widget的方法、装置及计算机可读存储介质
CN113391743B (zh) 一种显示方法及电子设备
WO2023061298A1 (zh) 一种图片备份***、方法与设备
WO2021204103A1 (zh) 照片预览方法、电子设备和存储介质
WO2024041456A1 (zh) 一种应用数据保存方法及电子设备
WO2024041338A1 (zh) 访问数据的方法及电子设备
WO2022252805A1 (zh) 显示方法及电子设备
CN115567666B (zh) 屏幕录制方法、电子设备及可读存储介质
WO2024093703A1 (zh) 一种实例的管理方法、装置、电子设备及存储介质
WO2022206600A1 (zh) 一种投屏方法、***及相关装置
WO2024022119A1 (zh) 数据同步方法、电子设备及***
WO2023045774A1 (zh) 显示方法及电子设备
CN118170966A (zh) 一种推荐方法、电子设备及服务器
CN118057798A (zh) 一种应用分享方法及电子设备
CN117724640A (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: 22880237

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE