WO2024032400A1 - 图片的存储方法、装置和终端设备 - Google Patents

图片的存储方法、装置和终端设备 Download PDF

Info

Publication number
WO2024032400A1
WO2024032400A1 PCT/CN2023/110077 CN2023110077W WO2024032400A1 WO 2024032400 A1 WO2024032400 A1 WO 2024032400A1 CN 2023110077 W CN2023110077 W CN 2023110077W WO 2024032400 A1 WO2024032400 A1 WO 2024032400A1
Authority
WO
WIPO (PCT)
Prior art keywords
picture
file
album
system application
gallery
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2023/110077
Other languages
English (en)
French (fr)
Other versions
WO2024032400A9 (zh
Inventor
毕晟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to EP23851621.5A priority Critical patent/EP4502824A4/en
Publication of WO2024032400A1 publication Critical patent/WO2024032400A1/zh
Priority to US18/933,586 priority patent/US12524388B2/en
Publication of WO2024032400A9 publication Critical patent/WO2024032400A9/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06F—ELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23—Updating
    • G06F16/2308—Concurrency control
    • G06F16/2336—Pessimistic concurrency control approaches, e.g. locking or multiple versions without time stamps
    • G06F16/2343—Locking methods, e.g. distributed locking or locking implementation details
    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06F—ELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25—Integrating or interfacing systems involving database management systems
    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06F—ELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50—Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/51—Indexing; Data structures therefor; Storage structures
    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06F—ELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30—Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31—User authentication
    • G06F21/32—User authentication using biometric data, e.g. fingerprints, iris scans or voiceprints
    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06F—ELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60—Protecting data
    • G06F21/604—Tools and structures for managing or administering access control systems
    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06F—ELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60—Protecting data
    • G06F21/62—Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6209—Protecting access to data via a platform, e.g. using keys or access control rules to a single file or object, e.g. in a secure envelope, encrypted and accessed using a key, or with access control rules appended to the object itself
    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06F—ELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60—Protecting data
    • G06F21/62—Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218—Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6227—Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database where protection concerns the structure of data, e.g. records, types, queries

Definitions

  • the embodiments of the present application relate to the technical field of smart terminals, and in particular to a picture storage method, device and terminal equipment.
  • Pictures are important personal data. In many scenarios, users want to keep some photos private to prevent others from viewing, modifying or deleting them.
  • images can be encrypted using an encryption method. Specifically, an entrance to the encrypted album can be added to the album, and each image moved into the encrypted album by the user can be encrypted. After the image is encrypted, only the current application can decrypt the image and then display the image normally.
  • this method carries the risk of the image being deleted.
  • users cannot add or view encrypted images from other entrances.
  • users can delete the image at other entrances.
  • users can also perform other processing on these encrypted pictures through other entrances, such as using other applications to encrypt them again.
  • users cannot view the pictures after entering from the encrypted album entrance.
  • encrypting or decrypting images requires the computing power of the central processing unit (CPU) and also consumes time. For example, if a user moves 100 photos into an encrypted album at a time, due to the time-consuming encryption algorithm, additional encryption time is required.
  • Embodiments of the present application provide a method, device and terminal device for storing pictures.
  • Embodiments of the present application also provide a computer-readable storage medium to lock and store pictures without encryption or decryption or additional calculation, and even if the user clears the gallery data, the locked and stored pictures can still be retained in the terminal device.
  • embodiments of the present application provide a method for storing pictures, including: detecting a first triggering operation of a user adding an album lock to a target album; wherein the target album is stored in a first internal storage area corresponding to the gallery ; In response to the first triggering operation, add an album lock to the target album, and start the system application corresponding to the album lock; through the file opening interface between the gallery and the system application, add the target album
  • the picture name in the album is sent to the system application; if the second internal storage area corresponding to the system application does not include the picture file corresponding to the picture name, the picture is created in the second internal storage area file, obtain the first file descriptor of the picture file, and return the first file descriptor of the picture file to the gallery; obtain the gallery according to the first file descriptor and send it to the second internal
  • the picture content written in the storage area close the file opening interface and save the picture content in the second internal storage area.
  • the terminal device detects the first trigger operation of the user adding an album lock to the target album, responds to the first trigger operation, adds an album lock to the above target album, and starts the system application corresponding to the above album lock, and then Through the file opening interface between the gallery and the above-mentioned system application, the picture name in the target album is sent to the above-mentioned system application.
  • the second internal storage area corresponding to the above-mentioned system application does not include the picture file corresponding to the above-mentioned picture name, then in Create the above-mentioned picture file in the second internal storage area, obtain the first file descriptor of the above-mentioned picture file, and return the first file descriptor of the above-mentioned picture file to the gallery. Finally, obtain the gallery to the second file descriptor according to the first file descriptor. For the picture content written in the internal storage area, close the above file opening interface and save the above picture content in the second internal storage area, so that the terminal device can lock and store the picture without encryption or decryption or additional calculation.
  • the method further includes: detecting that the user has unlocked the second page of the target album. Trigger operation; in response to the second trigger operation, obtain the unlocking information input by the user; after determining that the unlocking information passes the security verification, obtain the picture name included in the target album according to the identification of the target album; Pass the name of the picture to be viewed to the system application through the file opening interface; after the system application opens the picture file to be viewed according to the name of the picture to be viewed, obtain the system application return The second file descriptor of the picture file to be viewed; according to the second file descriptor, the content of the picture to be viewed is read and displayed through the gallery.
  • the method further includes: passing the picture name of the picture content to be modified to the system application through the file opening interface; in the After the system application opens the picture file of the picture content to be modified according to the picture name of the picture content to be modified, it obtains the third file descriptor of the picture file of the picture content to be modified returned by the system application; according to the first The third file descriptor is used to read and display the picture content to be modified through the gallery; the picture content to be modified is modified through the gallery; and the modified picture content is saved to the third file descriptor through the gallery.
  • the second internal storage area is used to read and display the picture content to be modified through the gallery; the picture content to be modified is modified through the gallery; and the modified picture content is saved to the third file descriptor through the gallery.
  • the method further includes: obtaining the picture names of the picture file information to be modified through the gallery; modifying the picture file information to be modified through the gallery; Through the picture information modification interface between the gallery and the system application, the picture name of the picture file information to be modified and the modified picture file information are transferred to the system application for the system application to find. After the picture file corresponding to the picture name of the picture file information to be modified is found, the file information of the found picture file is replaced with the modified picture file information.
  • the method further includes: obtaining the names of pictures to be deleted through a gallery; and through a picture deletion interface between the gallery and the system application, Pass the name of the picture to be deleted to the system application, so that the system application can delete the picture file corresponding to the name of the picture to be deleted.
  • the method further includes: detecting a third triggering operation of the user removing the album lock of the target album; responding to the third Trigger an operation to obtain the unlocking information input by the user; after determining that the unlocking information passes the security verification, remove the album lock for the target album.
  • the clean storage area entrance of the system application is invisible to the user.
  • embodiments of the present application provide a picture storage device, which is included in a terminal device.
  • the device has the function of realizing the behavior of the terminal device in the first aspect and possible implementations of the first aspect.
  • Functions can be implemented by hardware, or by hardware executing corresponding software.
  • Hardware or software includes one or more modules or units corresponding to the above functions. For example, detect module, add module, start module, transfer module, obtain module and save module, etc.
  • embodiments of the present application provide a terminal device, including: one or more processors; memories; multiple application programs; and one or more computer programs, wherein the one or more computer programs are stored in the above In the memory, the one or more computer programs include instructions.
  • the terminal device When the instructions are executed by the terminal device, the terminal device performs the following steps: detecting the first triggering operation of the user adding an album lock to the target album; wherein, the The target album is stored in the first internal storage area corresponding to the gallery; in response to the first triggering operation, an album lock is added to the target album, and a system application corresponding to the album lock is started; through the gallery and the The file opening interface between system applications sends the picture name in the target album to the system application; if the second internal storage area corresponding to the system application does not include the picture file corresponding to the picture name, then Create the picture file in the second internal storage area, obtain the first file descriptor of the picture file, and return the first file descriptor of the picture file to the gallery; obtain the basis of the gallery The first file descriptor writes the picture content to the second internal storage area; closes the file opening interface and saves the picture content in the second internal storage area.
  • the terminal device when the instruction is executed by the terminal device, the terminal device is caused to execute the closing of the file opening interface and save the picture content in the second internal storage area.
  • the following steps are also performed: detecting a second triggering operation of the user unlocking the target album; in response to the second triggering operation, obtaining Obtain the unlocking information input by the user; after determining that the unlocking information passes the security verification, obtain the name of the picture included in the target album according to the identification of the target album; open the name of the picture to be viewed through the file
  • the interface is passed to the system application; after the system application opens the picture file to be viewed according to the name of the picture to be viewed, the second file descriptor of the picture file to be viewed returned by the system application is obtained. ; According to the second file descriptor, read and display the image content to be viewed through the gallery.
  • the following steps are also executed:
  • the picture name of the picture content is passed to the system application through the file opening interface; after the system application opens the picture file of the picture content to be modified according to the picture name of the picture content to be modified, the said The third file descriptor of the image file of the image content to be modified returned by the system application; according to the third file descriptor, the image content to be modified is read and displayed through the gallery; the image content to be modified is processed through the gallery Modify; save the modified picture content to the second internal storage area according to the third file descriptor through the gallery.
  • the following steps are also performed: obtain through the gallery The picture name of the picture file information to be modified; modify the picture file information to be modified through the gallery; and modify the picture name of the picture file information to be modified through the picture information modification interface between the gallery and the system application. and the modified picture file information is passed to the system application, so that after the system application finds the picture file corresponding to the picture name of the picture file information to be modified, it replaces the file information of the found picture file with the Describe the modified image file information.
  • the following steps are also performed: obtain through the gallery The name of the picture to be deleted; passing the name of the picture to be deleted to the system application through the picture deletion interface between the gallery and the system application, so that the system application can delete the picture to be deleted The image file corresponding to the name.
  • the following steps are also executed: detecting that the The user removes the third triggering operation of the album lock of the target album; in response to the third triggering operation, obtains the unlocking information input by the user; after determining that the unlocking information passes the security verification, the target album is Remove album lock.
  • inventions of the present application provide a computer-readable storage medium.
  • the computer-readable storage medium stores a computer program that, when run on a computer, causes the computer to execute the method provided in the first aspect.
  • embodiments of the present application provide a computer program, which when the above computer program is executed by a computer, is used to execute the method provided in the first aspect.
  • the program in the fifth aspect may be stored in whole or in part on a storage medium packaged with the processor, or in part or in whole on a memory that is not packaged with the processor.
  • Figure 1 is a schematic diagram of the division of storage areas used in existing related technologies
  • Figure 2 is a schematic diagram of a system setting providing an uninstallation entrance in the existing related art
  • Figure 3 is a schematic diagram of an application market providing an uninstall entrance in the existing related technology
  • Figure 4 is a schematic diagram of an entry for clearing application data in the related art
  • Figure 5 is a schematic structural diagram of a terminal device provided by an embodiment of the present application.
  • Figure 6 is a schematic diagram of an interface for triggering the addition of an album lock provided by an embodiment of the present application
  • Figure 7 is a schematic interface diagram of the disclaimer prompt of the album lock provided by one embodiment of the present application.
  • Figures 8(a) to 8(c) are schematic diagrams of the interface for setting the album lock password provided by one embodiment of the present application.
  • Figures 9(a) to 9(b) are schematic interface diagrams of associated biometrics provided by an embodiment of the present application.
  • Figure 10 is a comparative schematic diagram showing that the unloading entrance is blocked according to an embodiment of the present application.
  • Figure 11 is a flow chart of a picture storage method provided by an embodiment of the present application.
  • Figure 12 is a schematic diagram of an interface in which the operation entrance for cleaning the storage area is blocked according to an embodiment of the present application
  • Figure 13 is a schematic diagram of changing the deleted data entry into a prompt interface provided by one embodiment of the present application.
  • Figure 14 is a flow chart of a picture storage method provided by another embodiment of the present application.
  • Figures 15(a) to 15(b) are schematic interface diagrams of unlocking a target album provided by an embodiment of the present application.
  • Figure 16 is a flow chart of a picture storage method provided by yet another embodiment of the present application.
  • Figure 17 is a flow chart of a picture storage method provided by yet another embodiment of the present application.
  • Figure 18 is a flow chart of a picture storage method provided by yet another embodiment of the present application.
  • Figure 19 is a schematic diagram of the interface for closing and opening the album lock provided by one embodiment of the present application.
  • Figure 20 is a schematic diagram of the interface for removing an album lock provided by an embodiment of the present application.
  • Figure 21 is a schematic structural diagram of a terminal device provided by another embodiment of the present application.
  • Figure 22 is a schematic structural diagram of a terminal device provided by yet another embodiment of the present application.
  • one solution provided by the existing related technology is to use encryption to encrypt the pictures, but this method has the risk of the pictures being deleted, and the pictures are encrypted or decrypted. It requires CPU computing power and also consumes time.
  • FIG. 1 is a schematic diagram of the division of storage areas used in existing related technologies.
  • any application can access it, while for the application internal storage area, each application can and can only access its own internal storage area.
  • Disadvantage 1 You can delete internal storage data through uninstallation.
  • the operating system provides an uninstall entrance in the system settings or other settings, and the user can uninstall the applications installed on the current mobile phone from this entrance, as shown in Figures 2 and 3.
  • Figure 2 shows the system settings in the existing related technology.
  • a schematic diagram of the uninstallation entrance is provided.
  • Figure 3 is a schematic diagram of the uninstallation entrance provided by the application market in the related art.
  • Disadvantage 2 Users can delete pictures in locked albums by clearing application data.
  • the operating system provides an entrance to clear picture data in the settings.
  • Figure 4 is a schematic diagram of an entry for clearing application data in the related art.
  • the internal storage data of the system's gallery and media library can be cleared through the delete data button in Figure 4. Due to the particularity of applications such as photo gallery and media library, which contain a lot of system data, recovery measures are required if an error occurs, so the operating system believes that this entry to delete data must be retained.
  • embodiments of the present application provide a picture storage method, which can realize locked storage of pictures.
  • No encryption algorithm is used in the above picture storage method.
  • no encryption or decryption is required, and no additional data is required. calculation.
  • the embodiment of the present application enables users to access locked pictures, add, delete and/or modify pictures only through the locked album entrance of the gallery.
  • the embodiment of this application makes full use of the resources of the operating system and proposes a new implementation method, which can still retain the locked album of the gallery after the gallery application is uninstalled, and can also enable the user to clear the gallery data. Keep a locked album of your gallery.
  • the picture storage method provided by the embodiment of the present application can be applied to terminal devices, where the above-mentioned terminal devices can be smartphones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR)/virtual reality (virtual reality) , VR) equipment, laptops, ultra-mobile personal computers, UMPC), netbook or personal digital assistant (personal digital assistant, PDA) and other equipment; the embodiment of the present application does not place any restrictions on the specific type of terminal equipment.
  • the embodiment of the present application does not place any restrictions on the specific type of terminal equipment.
  • Figure 5 is a schematic structural diagram of a terminal device provided by 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) serial bus, USB) interface 130, charging management module 140, power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, Headphone interface 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and subscriber identification module (subscriber identification module, SIM) card interface 195, etc.
  • SIM subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
  • the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the terminal device 100.
  • the terminal device 100 may include more or less components than shown in the figures, or combine some components, or split some components, or arrange different components.
  • the components illustrated may be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units.
  • the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU), etc.
  • application processor application processor, AP
  • modem processor graphics processing unit
  • GPU graphics processing unit
  • image signal processor image signal processor
  • ISP image signal processor
  • controller video codec
  • digital signal processor digital signal processor
  • DSP digital signal processor
  • baseband processor baseband processor
  • neural network processor neural-network processing unit
  • the controller can generate operation control signals based on the instruction operation code and timing signals to complete the control of fetching and executing instructions.
  • the processor 110 may also be provided with a memory for storing instructions and data.
  • the memory in processor 110 is cache memory. This memory may hold instructions or data that have been recently used or recycled by processor 110 . If the processor 110 needs to use the instructions 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.
  • processor 110 may include one or more interfaces.
  • Interfaces may include integrated circuit (inter-integrated circuit, I2C) interface, integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, pulse code modulation (pulse code modulation, PCM) interface, universal asynchronous receiver and transmitter (universal asynchronous receiver/transmitter (UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and /or universal serial bus (USB) interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • UART universal asynchronous receiver and transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB universal serial bus
  • the I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (derail clock line, DCL).
  • processor 110 may include multiple sets of I2C buses.
  • the processor 110 can separately couple the touch sensor 180K, charger, flash, camera 193, etc. through different I2C bus interfaces.
  • the processor 110 can be coupled to the touch sensor 180K through an I2C interface, so that the processor 110 and the touch sensor 180K communicate through the I2C bus interface to implement the touch function of the terminal device 100 .
  • the I2S interface can be used for audio communication.
  • processor 110 may include multiple sets of I2S buses.
  • the processor 110 can be coupled with the audio module 170 through the I2S bus to implement communication between the processor 110 and the audio module 170 .
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the I2S interface to implement the function of answering calls through a Bluetooth headset.
  • the PCM interface can also be used for audio communications to sample, quantize and encode analog signals.
  • the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface.
  • the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface to implement the function of answering calls through a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
  • the UART interface is a universal serial data bus used for asynchronous communication.
  • the bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication.
  • a UART interface is generally used to connect the processor 110 and the wireless communication module 160 .
  • the processor 110 communicates with the wireless communication module 160 through the UART interface.
  • Bluetooth module communication to implement Bluetooth function.
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.
  • the MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193 .
  • MIPI interfaces include camera serial interface (CSI), display serial interface (DSI), etc.
  • the processor 110 and the camera 193 communicate through the CSI interface to implement the shooting function of the terminal device 100.
  • the processor 110 and the display screen 194 communicate through the DSI interface to implement the display function of the terminal device 100.
  • the GPIO interface can be configured through software.
  • the GPIO interface can be configured as a control signal or as a data signal.
  • the GPIO interface can be used to connect the processor 110 with the camera 193, display screen 194, wireless communication module 160, audio module 170, sensor module 180, etc.
  • the GPIO interface can also be configured as an I2C interface, I2S interface, UART interface, MIPI interface, etc.
  • the USB interface 130 is an interface that complies with the USB standard specification, and may be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc.
  • 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. It can also be used to connect headphones to play audio through them. This interface can also be used to connect other electronic devices, such as AR devices, etc.
  • the interface connection relationships between the modules illustrated in the embodiments of the present application are only schematic illustrations and do not constitute a structural limitation on the terminal device 100 .
  • the terminal device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
  • the charging management module 140 is used to receive charging input from the charger.
  • the charger can be a wireless charger or a wired charger.
  • the charging management module 140 may receive charging input from the wired charger through the USB interface 130 .
  • the charging management module 140 may receive wireless charging input through the wireless charging coil of the terminal device 100 . While the charging management module 140 charges the battery 142, it can also provide power to the terminal device 100 through the power management module 141.
  • the power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110.
  • the power management module 141 receives input from the battery 142 and/or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, the wireless communication module 160, and the like.
  • the power management module 141 can also be used to monitor battery capacity, battery cycle times, battery health status (leakage, impedance) and other parameters.
  • the power management module 141 may also be provided in the processor 110 .
  • the power management module 141 and the charging management module 140 may also be provided in the same device.
  • the wireless communication function of the terminal device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in terminal device 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example: Antenna 1 can be reused as a diversity antenna for a wireless LAN. In other embodiments, antennas may be used in conjunction with tuning switches.
  • the mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied to the terminal device 100.
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc.
  • the mobile communication module 150 can receive electromagnetic waves through the antenna 1, perform filtering, amplification and other processing on the received electromagnetic waves, and transmit them to the modem processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves through the antenna 1 for radiation.
  • at least part of the functional modules of the mobile communication module 150 may be disposed 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 provided in the same device.
  • a modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal.
  • the demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the application processor outputs sound signals through audio devices (not limited to speaker 170A, receiver 170B, etc.), or displays images or videos through display screen 194.
  • the modem processor may be a stand-alone device.
  • the modem processor may be independent of the processor 110 and may be provided in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide applications on the terminal device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth (bluetooth, BT), and global navigation satellites.
  • WLAN wireless local area networks
  • System global navigation satellite system, GNSS
  • frequency modulation frequency modulation, FM
  • near field communication technology near field communication, NFC
  • infrared technology infrared, IR
  • 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 (GPRS), 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 technology, etc.
  • the GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi-zenith satellite system (quasi) -zenith satellite system (QZSS) and/or satellite based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • BDS Beidou navigation satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite based augmentation systems
  • the terminal device 100 implements display functions through a GPU, a display screen 194, an application processor, and the like.
  • the GPU is an image processing microprocessor and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
  • the display screen 194 is used to display images, videos, etc.
  • Display 194 includes a display panel.
  • the display panel can use 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).
  • LCD liquid crystal display
  • OLED organic light-emitting diode
  • AMOLED organic light-emitting diode
  • FLED flexible light-emitting diode
  • Miniled MicroLed, Micro-oLed, quantum dot light emitting diode (QLED), etc.
  • the terminal device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
  • the terminal device 100 can implement the shooting function through the ISP, camera 193, video codec, GPU, display screen 194, application processor, etc.
  • the ISP is used to process the data fed back by the camera 193. For example, when taking a photo, the shutter is opened, the light is transmitted to the camera sensor through the lens, the optical signal is converted into an electrical signal, and the camera sensor passes the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on image noise, brightness, and skin color. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP may be provided in the camera 193.
  • Camera 193 is used to capture still images or video.
  • the object passes through the lens to produce an optical image that is projected onto the photosensitive element.
  • the photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to convert it into a digital image signal.
  • ISP outputs digital image signals to DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other format image signals.
  • the terminal device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
  • Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the terminal device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
  • Video codecs are used to compress or decompress digital video.
  • the terminal device 100 may support one or more video codecs. In this way, the terminal device 100 can play or record videos in multiple encoding formats, such as moving picture experts group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
  • MPEG moving picture experts group
  • MPEG2 MPEG2, MPEG3, MPEG4, etc.
  • NPU is a neural network (NN) computing processor.
  • NN neural network
  • the NPU can realize intelligent cognitive applications of the terminal device 100, such as image recognition, face recognition, speech recognition, text understanding, etc.
  • 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 100.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to implement the data storage function. Such as saving music, videos, etc. files in external memory card.
  • Internal memory 121 may be used to store computer executable program code, which includes instructions.
  • the internal memory 121 may include a program storage area and a data storage area.
  • the stored program area can store an operating system, at least one application program required for a function (such as a sound playback function, an image playback function, etc.).
  • the storage data area may store data created during use of the terminal device 100 (such as audio data, phone book, etc.).
  • the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
  • the processor 110 executes various functional applications and data processing of the terminal device 100 by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
  • the terminal device 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playback, recording, etc.
  • the audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. Audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be provided in the processor 110 , or some functional modules of the audio module 170 may be provided in the processor 110 .
  • Speaker 170A also called “speaker” is used to convert audio electrical signals into sound signals.
  • the terminal device 100 can listen to music through the speaker 170A, or listen to hands-free calls.
  • Receiver 170B also called “earpiece” is used to convert audio electrical signals into sound signals.
  • the terminal device 100 answers a call or a voice message, the voice can be heard by bringing the receiver 170B close to the human ear.
  • Microphone 170C also called “microphone” or “microphone” is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak close to the microphone 170C with the human mouth and input the sound signal to the microphone 170C.
  • the terminal device 100 may be provided with at least one microphone 170C. In other embodiments, the terminal device 100 may be provided with two microphones 170C, which in addition to collecting sound signals, may also implement a noise reduction function. In other embodiments, the terminal device 100 can also be equipped with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and implement directional recording functions, etc.
  • the headphone interface 170D is used to connect wired headphones.
  • the headphone interface 170D may be a USB interface 130, or may be a 3.5mm open mobile terminal platform (OMTP) standard interface, or a Cellular Telecommunications Industry Association of the USA (CTIA) standard interface.
  • OMTP open mobile terminal platform
  • CTIA Cellular Telecommunications Industry Association of the USA
  • the pressure sensor 180A is used to sense pressure signals and can convert the pressure signals into electrical signals.
  • pressure sensor 180A may be disposed on display screen 194 .
  • pressure sensors 180A there are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc.
  • a capacitive pressure sensor may include at least two parallel plates of conductive material.
  • the terminal device 100 determines the intensity of the pressure based on the change in capacitance.
  • the terminal device 100 detects the strength of the touch operation according to the pressure sensor 180A.
  • the terminal device 100 may also calculate the touched position based on the detection signal of the pressure sensor 180A.
  • touch operations acting on the same touch location but with different touch operation intensities may correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold is applied to the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold is applied to the short message application icon, an instruction to create a new short message is executed.
  • the gyro sensor 180B may be used to determine the motion posture of the terminal device 100 .
  • the angular velocity of the terminal device 100 about three axes may be determined by the gyro sensor 180B.
  • the gyro sensor 180B can be used for image stabilization. For example, when the shutter is pressed, the gyro sensor 180B detects the angle at which the terminal device 100 shakes, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shake of the terminal device 100 through reverse movement to achieve anti-shake.
  • the gyro sensor 180B can also be used for navigation and somatosensory game scenes.
  • Air pressure sensor 180C is used to measure air pressure. In some embodiments, the terminal device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
  • Magnetic sensor 180D includes a Hall sensor.
  • the terminal device 100 may detect the opening of the flip leather case using the magnetic sensor 180D. combine.
  • the terminal device 100 may detect the opening and closing of the flip according to the magnetic sensor 180D. Then, based on the detected opening and closing status of the leather case or the opening and closing status of the flip cover, features such as automatic unlocking of the flip cover are set.
  • the acceleration sensor 180E can detect the acceleration of the terminal device 100 in various directions (generally three axes). When the terminal device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of electronic devices and be used in horizontal and vertical screen switching, pedometer and other applications.
  • the terminal device 100 can measure distance through infrared or laser. In some embodiments, when shooting a scene, the terminal device 100 can use the distance sensor 180F to measure distance to achieve fast focusing.
  • Proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode.
  • the light emitting diode may be an infrared light emitting diode.
  • the terminal device 100 emits infrared light through a light emitting diode.
  • the terminal device 100 detects infrared reflected light from nearby objects using photodiodes. When sufficient reflected light is detected, it can be determined that there is an object near the terminal device 100 . When insufficient reflected light is detected, the terminal device 100 may determine that there is no object near the terminal device 100 .
  • the terminal device 100 can use the proximity light sensor 180G to detect when the user holds the terminal device 100 close to the ear for talking, so as to automatically turn off the screen to save power.
  • the proximity light sensor 180G can also be used in holster mode, and pocket mode automatically unlocks and locks the screen.
  • the ambient light sensor 180L is used to sense ambient light brightness.
  • the terminal device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness.
  • the ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures.
  • the ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the terminal device 100 is in the pocket to prevent accidental touching.
  • Fingerprint sensor 180H is used to collect fingerprints.
  • the terminal device 100 can use the collected fingerprint characteristics to realize fingerprint unlocking, access application lock, fingerprint photography, fingerprint answering incoming calls, etc.
  • Temperature sensor 180J is used to detect temperature.
  • the terminal device 100 uses the temperature detected by the temperature sensor 180J to execute the temperature processing policy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the terminal device 100 reduces the performance of a processor located near the temperature sensor 180J in order to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the terminal device 100 heats the battery 142 to avoid the low temperature causing the terminal device 100 to shut down abnormally. In some other embodiments, when the temperature is lower than another threshold, the terminal device 100 performs boosting on the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
  • Touch sensor 180K also known as "touch device”.
  • the touch sensor 180K can be disposed on the display screen 194.
  • the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen”.
  • the touch sensor 180K is used to detect a touch operation on or near the touch sensor 180K.
  • the touch sensor can pass the detected touch operation to the application processor to determine the touch event type.
  • Visual output related to the touch operation may be provided through display screen 194 .
  • the touch sensor 180K may also be disposed on the surface of the terminal device 100 in a position different from that of the display screen 194 .
  • Bone conduction sensor 180M can acquire vibration signals.
  • the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human body's vocal part.
  • the bone conduction sensor 180M can also contact the human body's pulse and receive blood pressure beating signals.
  • the bone conduction sensor 180M can also be provided in an earphone and combined into a bone conduction earphone.
  • the audio module 170 can analyze the voice signal based on the vibration signal of the vocal vibrating bone obtained by the bone conduction sensor 180M to implement the voice function.
  • the application processor can analyze the heart rate information based on the blood pressure beating signal acquired by the bone conduction sensor 180M to implement the heart rate detection function.
  • the buttons 190 include a power button, a volume button, etc.
  • 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 vibration prompts.
  • the motor 191 can be used for vibration prompts for incoming calls and can also be used for touch vibration feedback.
  • touch operations for different applications can correspond to different vibration feedback effects.
  • the motor 191 can also respond to different vibration feedback effects for touch operations in different areas of the display screen 194 .
  • Different application scenarios such as time reminders, receiving information, alarm clocks, games, etc.
  • the touch vibration feedback effect can also be customized.
  • the indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, or may be used to indicate messages, missed calls, notifications, etc.
  • the SIM card interface 195 is used to connect a SIM card.
  • the SIM card can be inserted into the SIM card interface 195, or from the SIM card interface 195 is pulled out to achieve contact and separation from the terminal device 100.
  • the terminal device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
  • SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card, etc. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the plurality of cards may be the same or different.
  • the SIM card interface 195 is also compatible with different types of SIM cards.
  • the SIM card interface 195 is also compatible with external memory cards.
  • the terminal device 100 interacts with the network through the SIM card to implement functions such as calls and data communications.
  • the terminal device 100 adopts eSIM, that is, an embedded SIM card.
  • the eSIM card can be embedded in the terminal device 100 and cannot be separated from the terminal device 100 .
  • the software system of the terminal device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture.
  • the embodiment of this application takes the Android system with a layered architecture as an example to illustrate the software structure of the terminal device 100 .
  • Figure 6 is a schematic diagram of the interface for triggering the addition of an album lock provided by an embodiment of the present application. If it is the first time to add an album lock, a corresponding disclaimer prompt will pop up, as shown in Figure 7.
  • Figure 7 is a schematic interface diagram of the disclaimer prompt for an album lock provided by an embodiment of the present application.
  • Figures 8(a) to 8(c) are schematic diagrams of the interface for setting the album lock password provided by an embodiment of the present application.
  • FIGS. 9(a) to 9(b) are schematic interface diagrams of associated biometrics provided by an embodiment of the present application. After the biometrics are associated, there will be no additional proactive prompts when the user subsequently opens the album.
  • the interface between the gallery and the system application corresponding to the album lock can be called to transfer the pictures in the locked album from the internal storage area corresponding to the gallery to the internal storage area corresponding to the system application, so as to achieve the purpose of adding a lock to the album. Confidentiality and security requirements for locked albums.
  • the storage areas that can be used by applications on the operating system are:
  • any application can access it, and the security does not meet the requirements.
  • the current operating system controls permissions at the file system level, and only the application itself can access it. However, according to the design of the operating system, when the user uninstalls the application, the system will clear the internal storage area of the corresponding application.
  • a new application (that is, the application corresponding to the album lock) is added to the operating system, and the permissions of the application are set to system applications.
  • the user cannot uninstall the application through the uninstall entrance of the operating system.
  • the application does not release updates on the application market, and users cannot uninstall newly installed applications in the application market and find the uninstallation entrance to clear the internal storage area data of the application.
  • FIG. 10 is a comparative schematic diagram showing that the unloading entrance is blocked according to an embodiment of the present application.
  • an inter-process communication interface is added between the gallery and the newly added system application.
  • Figure 11 is a flow chart of a picture storage method provided by an embodiment of the present application. As shown in Figure 11, the above picture storage method may include:
  • Step 1101 The user's first triggering operation of adding an album lock to the target album is detected.
  • the above target album is stored in the first internal storage area corresponding to the gallery.
  • the above-mentioned first triggering operation may be the user's click, long press or double-click on the "Add Album Lock” icon.
  • This embodiment does not limit the operation form of the above-mentioned first triggering operation. For example, see Figure 6.
  • users browse the target album in the gallery they can add an album lock to the target album by clicking the "Add Album Lock” icon in the menu.
  • Step 1102 In response to the first triggering operation, add an album lock to the target album, and start the system application corresponding to the album lock.
  • Step 1103 Send the picture names in the target album to the above system application through the file opening interface between the gallery and the above system application.
  • Step 1104 If the second internal storage area corresponding to the above-mentioned system application does not include the picture file corresponding to the above-mentioned picture name, create the above-mentioned picture file in the second internal storage area, obtain the first file descriptor of the above-mentioned picture file, and Return the first file descriptor of the above image file to the gallery.
  • Step 1105 Obtain the picture content written by the gallery to the second internal storage area according to the first file descriptor.
  • the image content can be written into the second internal storage area through the above-mentioned first file descriptor.
  • Step 1106 Close the above file opening interface and save the above picture content in the second internal storage area.
  • the terminal device 100 detects the first trigger operation of the user adding an album lock to the target album, responds to the first trigger operation, adds an album lock to the above target album, and starts the system application corresponding to the above album lock, Then, through the file opening interface between the gallery and the above-mentioned system application, the picture name in the target album is sent to the above-mentioned system application.
  • the second internal storage area corresponding to the above-mentioned system application does not include the picture file corresponding to the above-mentioned picture name, then Create the above-mentioned picture file in the second internal storage area, obtain the first file descriptor of the above-mentioned picture file, and return the first file descriptor of the above-mentioned picture file to the gallery. Finally, obtain the gallery to the first file descriptor according to the first file descriptor.
  • the operating system provides an operation entrance for clearing the storage area for each application.
  • the user uses this operation entrance to clear all data stored in the external storage area and internal storage area of the application.
  • the clean storage area entrance of the system application corresponding to the album lock is invisible to the user.
  • the system application corresponding to the album lock can prevent the user from clearing its storage area data in two ways to ensure the locked album. of data security.
  • Method 1 The system application can apply for system permissions to block the operation entrance of the clean storage area so that users cannot click it, just like the system settings application, as shown in Figure 12.
  • Figure 12 shows the clean storage provided by an embodiment of the present application. Schematic diagram of the interface where the operation entrance to the area is blocked. As can be seen from Figure 12, the operation entrance to the clean storage area of the Settings application is blocked and cannot be clicked by the user. Therefore, the system application of the album lock can be used in the same way as the Settings application. Block the operation entrance to clean the storage area.
  • Method 2 The system application can change the above delete data entry into a prompt interface through the configuration entry provided by the system. As shown in Figure 13, the system's original "Delete Data” text is replaced with "Management Space", or other Prompt text can be used. If the user clicks this button, a pop-up window will pop up to remind the user that the data cannot be deleted.
  • Figure 13 is a schematic diagram of changing the deleted data entry into a prompt interface provided by an embodiment of the present application.
  • Figure 14 is a flow chart of a picture storage method provided by another embodiment of the present application. As shown in Figure 14, in the embodiment shown in Figure 11 of the present application, after step 1106, it may also include:
  • Step 1401 The user's second triggering operation of unlocking the target album is detected.
  • Step 1402 In response to the above-mentioned second triggering operation, obtain the unlocking information input by the user.
  • the above unlocking information can be the password set when the user adds an album lock to the target album, or it can also be the password set by the user when adding an album lock to the target album.
  • the biometric information associated with adding an album lock to the target album is not limited in this embodiment to the specific form of the above unlocking information.
  • the terminal device 100 first displays the interface shown in Figure 15(a), and the interface shown in Figure 15(a) displays "hidden” Album is locked” prompt message, then the user can click the "unlock” icon in the interface shown in Figure 15(a). The user's click on the "unlock” icon is the second triggering operation. It is detected that the user has unlocked the target album. After the second triggering operation, the terminal device 100 can display the interface shown in Figure 15(b), and then the user can input unlocking information in the interface shown in Figure 15(b), and the terminal device 100 obtains the unlocking information input by the user, Figure 15 In (b), the unlocking information is the password.
  • Figures 15(a) to 15(b) are schematic diagrams of the interface for unlocking a target album provided by an embodiment of the present application.
  • Step 1403 After determining that the unlocking information passes the security verification, obtain the names of pictures included in the target album according to the identification of the target album.
  • Step 1404 Pass the name of the picture to be viewed to the system application through the file opening interface.
  • Step 1405 After the system application opens the image file to be viewed based on the name of the image to be viewed, the second file descriptor of the image file to be viewed returned by the system application is obtained.
  • the system application can find the corresponding picture file based on the name of the picture to be viewed, then open the picture file to be viewed, and return the second file description of the picture file to be viewed to the gallery. symbol.
  • Step 1406 According to the second file descriptor, read and display the above-mentioned picture content to be viewed through the gallery.
  • the gallery obtains the second file descriptor, it can read the image content according to the above-mentioned second file descriptor and display it.
  • Modification of pictures in the target album can be divided into two types:
  • the modification of the picture content is the same as accessing the picture.
  • the gallery can modify the picture content of the system application according to the received second file descriptor, as shown in Figure 16.
  • Figure 16 is provided by another embodiment of the present application.
  • Step 1601 Pass the image name of the image content to be modified to the system application through the file opening interface.
  • Step 1602 After the system application opens the image file of the image content to be modified based on the image name of the image content to be modified, obtain the third file descriptor of the image file of the image content to be modified returned by the system application.
  • Step 1603 According to the above third file descriptor, read and display the image content to be modified through the gallery.
  • Step 1604 Modify the above-mentioned image content to be modified through the gallery.
  • Step 1605 Save the modified picture content to the second internal storage area according to the third file descriptor through the gallery.
  • Modification of image information does not need to be done through file descriptors.
  • the gallery calls this interface and sends the modified picture information to the system application side.
  • the system application finds the picture according to the picture name, replaces the information, and completes the file information modification, as shown in Figure 17.
  • Figure 17 is provided by another embodiment of the present application.
  • the flow chart of the picture storage method In the embodiment shown in Figure 14 of this application, after step 1403, it may also include:
  • Step 1701 Obtain the picture name of the picture file information to be modified through the gallery.
  • Step 1702 Modify the above image file information to be modified through the gallery.
  • Step 1703 Pass the picture name and modified picture file information of the picture file information to be modified to the system application through the picture information modification interface between the gallery and the system application, so that the system application can find the picture file to be modified. After finding the image file corresponding to the image name of the information, the file information of the found image file is replaced with the above modified image file information.
  • the user can delete pictures in the locked album on the album browsing interface.
  • the terminal device 100 is shown in the figure
  • the album browsing interface of the library provides a multi-select interactive interface. Users can select pictures through the multi-select interactive interface, and then click delete and confirm to trigger the deletion behavior.
  • the system application provides a deletion interface, and the gallery calls this interface to send the name of the picture that the user chooses to delete to the system application.
  • the system application directly deletes the picture file according to the picture name, as shown in Figure 18.
  • Figure 18 is a flow chart of a picture storage method provided by another embodiment of the present application. In the embodiment shown in Figure 14 of the present application, after step 1403, May also include:
  • Step 1801 Obtain the name of the picture to be deleted through the gallery.
  • Step 1802 Pass the name of the picture to be deleted to the above-mentioned system application through the picture deletion interface between the gallery and the above-mentioned system application, so that the system application can delete the picture file corresponding to the above-mentioned picture name to be deleted.
  • Figure 19 is a schematic diagram of an interface for closing and opening an album lock provided by an embodiment of the present application.
  • the terminal device 100 can also respond to the third triggering operation of the user to remove the album lock of the target album.
  • the above-mentioned third triggering operation obtains the unlocking information input by the user, and after confirming that the above-mentioned unlocking information passes the security verification, removes the album lock for the above-mentioned target album.
  • Figure 20 is a schematic diagram of an interface for removing an album lock provided by an embodiment of the present application.
  • the embodiment of the present application provides a locking menu on the album interface of the gallery. After the user clicks the locking menu, the terminal device 100 performs a locking operation on the current album.
  • the user is prompted to enter a password and completes two input verifications.
  • the user can be prompted to associate fingerprint recognition or face recognition.
  • the gallery then transfers the photos in the current album to the internal storage area of the system application corresponding to the album lock. Since this system application cannot be uninstalled, users cannot clear the data in its internal storage area through the uninstall button. At the same time, this system application blocks the entrance to the system cleanup storage area, so users cannot clear the data of the above system application by clicking on the cleanup storage area.
  • the terminal device 100 can transfer the pictures in the locked album to a safe location through the gallery. Users can and can only access, modify and/or delete pictures in locked albums through the locked album entry of the gallery.
  • the picture storage method provided by the embodiments of the present application can lock any photo album.
  • the embodiments of the present application do not use encryption and decryption algorithms, and there is no need to encrypt and decrypt pictures to ensure the information security of the pictures.
  • the device does not need to perform a large amount of calculations to encrypt and decrypt the picture, which not only reduces the cost of the terminal device 100 but also reduces the time required for the user to access the picture; for the picture, there is no need to worry about the encryption and decryption algorithm being cracked. This will lead to information leakage; at the same time, there is no need to worry about the problem that although the user cannot see the picture, he can delete the picture, resulting in information loss.
  • the embodiment of the present application can block the way for users to clear data by uninstalling updates, and also blocks the user's entrance to directly clear the storage area, ensuring that users can and can only access pictures through the locked album entrance.
  • the method provided by the embodiments of this application can also be used in any other application.
  • it can also be used to store safe data or private data of any application.
  • the terminal device includes hardware and/or software modules corresponding to each function.
  • this application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is performed by hardware or computer software driving the hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions in conjunction with the embodiments for each specific application, but such implementations should not be considered to be beyond the scope of this application.
  • This embodiment can divide the terminal device into functional modules according to the above method embodiment.
  • each functional module can be divided corresponding to each function, or two or more functions can be integrated into one module.
  • the above integrated modules can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic and is only a logical function division. In actual implementation, there may be other division methods.
  • Figure 21 is a schematic structural diagram of a terminal device provided by another embodiment of the present application.
  • Figure 21 shows a possible composition of the terminal device 2100 involved in the above embodiment.
  • the terminal device 2100 may include: a detection module 2101, an adding module 2102, a startup module 2103, a transmission module 2104, an acquisition module 2105 and a saving module 2106;
  • the detection module 2101 is used to detect the first triggering operation of the user adding an album lock to the target album; wherein the above-mentioned target album is stored in the first internal storage area corresponding to the gallery;
  • Add module 2102 configured to add an album lock to the target album in response to the above-mentioned first triggering operation
  • Start module 2103 used to start the system application corresponding to the above-mentioned album lock
  • the transmission module 2104 is used to send the picture names in the target album to the system application through the file opening interface between the gallery and the system application;
  • the acquisition module 2105 is configured to create the above-mentioned image file in the second internal storage area when the second internal storage area corresponding to the system application does not include the image file corresponding to the image name, and obtain the first file descriptor of the above-mentioned image file;
  • the transmission module 2104 is also used to return the first file descriptor of the above picture file to the gallery;
  • the acquisition module 2105 is also used to obtain the picture content written by the gallery to the second internal storage area according to the first file descriptor;
  • the saving module 2106 is used to close the above-mentioned file opening interface and save the picture content in the second internal storage area.
  • the terminal device 2100 provided by this embodiment is used to execute the picture storage method provided by the embodiment shown in Figure 11 of this application, and therefore can achieve the same effect as the above method.
  • Figure 22 is a schematic structural diagram of a terminal device provided by another embodiment of the present application. Compared with the terminal device shown in Figure 21, the difference is that in this embodiment, the terminal device 2100 may also include: a display module 2107;
  • the detection module 2101 is also configured to detect the second trigger operation of the user to unlock the target album after the saving module 2106 saves the picture content in the second internal storage area;
  • the acquisition module 2105 is also configured to obtain the unlocking information input by the user in response to the second triggering operation; and after determining that the unlocking information passes the security verification, obtain the name of the picture included in the target album according to the identification of the target album;
  • the transmission module 2104 is used to pass the name of the picture to be viewed to the system application through the above-mentioned file opening interface;
  • the acquisition module 2105 is also used to obtain the second file descriptor of the image file to be viewed returned by the system application after the system application opens the image file to be viewed according to the name of the image to be viewed;
  • the display module 2107 is configured to read and display the above-mentioned picture content to be viewed through the gallery according to the second file descriptor.
  • the terminal device 2100 may also include: a modification module 2108;
  • the transmission module 2104 is also used to pass the picture name of the picture content to be modified to the system application through the file opening interface after the acquisition module 2105 obtains the picture name included in the target album;
  • the acquisition module 2105 is also used to obtain the third file descriptor of the image file of the image content to be modified returned by the system application after the system application opens the image file of the image content to be modified according to the image name of the image content to be modified;
  • the display module 2107 is used to read and display the image content to be modified through the gallery according to the above-mentioned third file descriptor;
  • Modification module 2108 used to modify the image content to be modified through the gallery
  • the saving module 2106 is used to save the modified picture content to the second internal storage area according to the above-mentioned third file descriptor.
  • the acquisition module 2105 is also configured to obtain the image name of the image file information to be modified through the gallery after acquiring the image name included in the target album;
  • Modification module 2108 used to modify the image file information to be modified through the gallery
  • the transmission module 2104 is used to transfer the image file information to be modified through the image information modification interface between the gallery and the system application.
  • the image name and modified image file information are passed to the system application, so that after the system application finds the image file corresponding to the image name of the above-mentioned image file information to be modified, it replaces the file information of the found image file with the modified one. image file information.
  • the obtaining module 2105 is also used to obtain the names of pictures to be deleted through the gallery after obtaining the names of pictures included in the target album;
  • the transmission module 2104 is also used to pass the name of the picture to be deleted to the system application through the picture deletion interface between the gallery and the system application, so that the system application can delete the picture file corresponding to the picture name to be deleted.
  • the terminal device 2100 may also include: a removal module 2109;
  • the detection module 2101 is also configured to detect the third triggering operation of the user removing the album lock of the target album after the adding module 2102 adds an album lock to the target album;
  • the acquisition module 2105 is also configured to obtain the unlocking information input by the user in response to the third trigger operation;
  • the removal module 2109 is used to remove the album lock from the target album after determining that the unlocking information passes the security verification.
  • the clean storage area entrance of the system application is invisible to the user.
  • the terminal device 2100 provided by this embodiment is used to execute the picture storage method provided by the embodiment shown in Figures 11 to 20 of this application, and therefore can achieve the same effect as the above method.
  • the terminal device 2100 may correspond to the terminal device 100 shown in FIG. 5 .
  • the functions of the detection module 2101 to the saving module 2106, and the modifying module 2108 to the removing module 2109 can be implemented by the processor 110 in the terminal device 100 shown in Figure 5; the function of the display module 2107 can be implemented by the terminal device shown in Figure 5
  • the processor 110 and display screen 194 are implemented in 100.
  • the terminal device 2100 may include a processing module, a storage module, and a communication module.
  • the processing module may be used to control and manage the actions of the terminal device 2100. For example, it may be used to support the terminal device 2100 in performing the steps performed by the detection module 2101 to the removal module 2109.
  • the storage module can be used to support the terminal device 2100 in storing program codes, data, etc.
  • the communication module can be used to support communication between the terminal device 2100 and other devices.
  • the processing module may be a processor or a controller, which may implement or execute various exemplary logical blocks, modules and circuits described in connection with the disclosure of this application.
  • a processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc.
  • the storage module may be a memory.
  • the communication module may specifically be a radio frequency circuit, a Bluetooth chip, a Wi-Fi chip, and other devices that interact with other electronic devices.
  • the terminal device 2100 involved in this embodiment may be a device with the structure shown in FIG. 5 .
  • Embodiments of the present application also provide a computer-readable storage medium.
  • the computer-readable storage medium stores a computer program. When it is run on a computer, it causes the computer to execute the steps provided by the embodiments shown in FIGS. 11 to 20 of the present application. method.
  • An embodiment of the present application also provides a computer program product.
  • the computer program product includes a computer program that, when run on a computer, causes the computer to execute the method provided by the embodiments shown in FIGS. 11 to 20 of the present application.
  • At least one refers to one or more, and “multiple” refers to two or more.
  • And/or describes the relationship between associated objects, indicating that there can be three relationships. For example, A and/or B can represent the existence of A alone, the existence of A and B at the same time, or the existence of B alone. Where A and B can be singular or plural.
  • the character “/” generally indicates that the related objects are in an “or” relationship.
  • At least one of the following" and similar expressions refers to any combination of these items, including any combination of single or plural items.
  • At least one of a, b and c can mean: a, b, c, a and b, a and c, b and c or a and b and c, where a, b, c can be single, also Can be multiple.
  • any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of the present application is essentially or the part that contributes to the existing technology or the part of the technical solution can be embodied in the form of a software product.
  • the computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program code. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Automation & Control Theory (AREA)
  • Processing Or Creating Images (AREA)
  • Television Signal Processing For Recording (AREA)
  • Storage Device Security (AREA)

Abstract

本申请实施例提供一种图片的存储方法、装置和终端设备,上述方法中,终端设备检测到用户对目标相册添加相册锁的第一触发操作,为目标相册添加相册锁,启动相册锁对应的系统应用,然后通过文件打开接口,将目标相册中的图片名称发送给系统应用,如果系统应用对应的第二内部存储区中不包括图片文件,则创建图片文件,获取图片文件的第一文件描述符,将第一文件描述符返回给图库,最后,获取图库根据第一文件描述符向第二内部存储区写入的图片内容,关闭文件打开接口,将图片内容保存在第二内部存储区,从而可以实现终端设备对图片进行加锁存储,并且不需要加密解密,不需要额外的计算,即便用户清空图库数据,终端设备中仍保留有加锁存储的图片。

Description

图片的存储方法、装置和终端设备
本申请实施例要求于2022年8月10日提交中国专利局、申请号为202210959305.X、发明名称为“图片的存储方法、装置和终端设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请实施例中。
技术领域
本申请实施例涉及智能终端技术领域,特别涉及一种图片的存储方法、装置和终端设备。
背景技术
图片是重要的个人数据。用户在很多场景下,都有把部分照片进行隐私处理,防止别人查看、修改或删除的诉求。
现有相关技术提供的一种实现方案中,可以使用加密的方式对图片进行加密处理,具体地,可以在相册中增加加密相册的入口,对用户移入加密相册的每张图片进行加密处理。图片加密之后,只有当前应用才能解密该图片,之后进行正常的图片显示。
但是,这种方式存在图片被删除的风险。图片加密之后,用户虽然不能从其他入口增加或者查看加密的图片。但是用户可以在其他入口处,删除该图片。同样地,用户还可以通过其他入口对这些加密之后的图片,再进行其他处理,比如用其他的应用再加密一次,从而导致用户从加密相册入口进入之后,也不能查看图片。另外,对图片进行加密或者解密,需要消耗中央处理器(central processing unit,CPU)的算力,并且还消耗时间。比如用户一次将100张照片挪入到加密相册,由于加密算法的耗时,需要额外多等待加密的时间。
发明内容
本申请实施例提供了一种图片的存储方法、装置和终端设备,本申请实施例还提供一种计算机可读存储介质,以实现对图片进行加锁存储,并且不需要加密解密,不需要额外的计算,并且即便用户清空图库数据,仍然可以在终端设备中保留加锁存储的图片。
第一方面,本申请实施例提供一种图片的存储方法,包括:检测到用户对目标相册添加相册锁的第一触发操作;其中,所述目标相册保存在图库对应的第一内部存储区中;响应于所述第一触发操作,为所述目标相册添加相册锁,并启动所述相册锁对应的系统应用;通过所述图库与所述系统应用之间的文件打开接口,将所述目标相册中的图片名称发送给所述系统应用;如果所述系统应用对应的第二内部存储区中不包括所述图片名称对应的图片文件,则在所述第二内部存储区中创建所述图片文件,获取所述图片文件的第一文件描述符,并将所述图片文件的第一文件描述符返回给所述图库;获取所述图库根据所述第一文件描述符向所述第二内部存储区写入的图片内容;关闭所述文件打开接口,将所述图片内容保存在所述第二内部存储区。
上述图片的存储方法中,终端设备检测到用户对目标相册添加相册锁的第一触发操作,响应于第一触发操作,为上述目标相册添加相册锁,并启动上述相册锁对应的系统应用,然后通过图库与上述系统应用之间的文件打开接口,将目标相册中的图片名称发送给上述系统应用,如果上述系统应用对应的第二内部存储区中不包括上述图片名称对应的图片文件,则在第二内部存储区中创建上述图片文件,获取上述图片文件的第一文件描述符,并将上述图片文件的第一文件描述符返回给图库,最后,获取图库根据第一文件描述符向第二内部存储区写入的图片内容,关闭上述文件打开接口,将上述图片内容保存在第二内部存储区,从而可以实现终端设备对图片进行加锁存储,并且不需要加密解密,不需要额外的计算,并且即便用户清空图库数 据,也只是清空图库对应的第一内部存储区,由于图片内容也被保存在系统应用对应的第二内部存储区中,因此终端设备中仍保留有加锁存储的图片。
其中一种可能的实现方式中,所述关闭所述文件打开接口,将所述图片内容保存在所述第二内部存储区之后,还包括:检测到所述用户解锁所述目标相册的第二触发操作;响应于所述第二触发操作,获取所述用户输入的解锁信息;确定所述解锁信息通过安全校验之后,根据所述目标相册的标识,获取所述目标相册包括的图片名称;将待查看的图片名称,通过所述文件打开接口传递给所述系统应用;在所述系统应用根据所述待查看的图片名称,打开所述待查看的图片文件之后,获取所述系统应用返回的待查看的图片文件的第二文件描述符;根据所述第二文件描述符,通过图库读取并显示所述待查看的图片内容。
其中一种可能的实现方式中,所述获取所述目标相册包括的图片名称之后,还包括:将待修改图片内容的图片名称,通过所述文件打开接口传递给所述系统应用;在所述系统应用根据所述待修改图片内容的图片名称,打开所述待修改图片内容的图片文件之后,获取所述系统应用返回的待修改图片内容的图片文件的第三文件描述符;根据所述第三文件描述符,通过图库读取并显示待修改的图片内容;通过图库对所述待修改的图片内容进行修改;通过图库根据所述第三文件描述符,将修改后的图片内容保存到所述第二内部存储区。
其中一种可能的实现方式中,所述获取所述目标相册包括的图片名称之后,还包括:通过图库获取待修改图片文件信息的图片名称;通过图库对所述待修改图片文件信息进行修改;通过所述图库与所述系统应用之间的图片信息修改接口,将所述待修改图片文件信息的图片名称和修改后的图片文件信息传递给所述系统应用,以供所述系统应用查找到所述待修改图片文件信息的图片名称对应的图片文件之后,将查找到的图片文件的文件信息替换为所述修改后的图片文件信息。
其中一种可能的实现方式中,所述获取所述目标相册包括的图片名称之后,还包括:通过图库获取待删除的图片名称;通过所述图库与所述系统应用之间的图片删除接口,将所述待删除的图片名称传递给所述系统应用,以供所述系统应用删除所述待删除的图片名称对应的图片文件。
其中一种可能的实现方式中,所述为所述目标相册添加相册锁之后,还包括:检测到所述用户移除所述目标相册的相册锁的第三触发操作;响应于所述第三触发操作,获取所述用户输入的解锁信息;确定所述解锁信息通过安全校验之后,为所述目标相册移除相册锁。
其中一种可能的实现方式中,所述系统应用的清理存储区入口处于用户不可见状态。
第二方面,本申请实施例提供一种图片的存储装置,该装置包含在终端设备中,该装置具有实现第一方面及第一方面的可能实现方式中终端设备行为的功能。功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的模块或单元。例如,检测模块、添加模块、启动模块、传输模块、获取模块和保存模块等。
第三方面,本申请实施例提供一种终端设备,包括:一个或多个处理器;存储器;多个应用程序;以及一个或多个计算机程序,其中上述一个或多个计算机程序被存储在上述存储器中,上述一个或多个计算机程序包括指令,当上述指令被上述终端设备执行时,使得上述终端设备执行以下步骤:检测到用户对目标相册添加相册锁的第一触发操作;其中,所述目标相册保存在图库对应的第一内部存储区中;响应于所述第一触发操作,为所述目标相册添加相册锁,并启动所述相册锁对应的系统应用;通过所述图库与所述系统应用之间的文件打开接口,将所述目标相册中的图片名称发送给所述系统应用;如果所述系统应用对应的第二内部存储区中不包括所述图片名称对应的图片文件,则在所述第二内部存储区中创建所述图片文件,获取所述图片文件的第一文件描述符,并将所述图片文件的第一文件描述符返回给所述图库;获取所述图库根据所述第一文件描述符向所述第二内部存储区写入的图片内容;关闭所述文件打开接口,将所述图片内容保存在所述第二内部存储区。
其中一种可能的实现方式中,当所述指令被所述终端设备执行时,使得所述终端设备执行所述关闭所述文件打开接口,将所述图片内容保存在所述第二内部存储区的步骤之后,还执行以下步骤:检测到所述用户解锁所述目标相册的第二触发操作;响应于所述第二触发操作,获 取所述用户输入的解锁信息;确定所述解锁信息通过安全校验之后,根据所述目标相册的标识,获取所述目标相册包括的图片名称;将待查看的图片名称,通过所述文件打开接口传递给所述系统应用;在所述系统应用根据所述待查看的图片名称,打开所述待查看的图片文件之后,获取所述系统应用返回的待查看的图片文件的第二文件描述符;根据所述第二文件描述符,通过图库读取并显示所述待查看的图片内容。
其中一种可能的实现方式中,当所述指令被所述终端设备执行时,使得所述终端设备执行所述获取所述目标相册包括的图片名称的步骤之后,还执行以下步骤:将待修改图片内容的图片名称,通过所述文件打开接口传递给所述系统应用;在所述系统应用根据所述待修改图片内容的图片名称,打开所述待修改图片内容的图片文件之后,获取所述系统应用返回的待修改图片内容的图片文件的第三文件描述符;根据所述第三文件描述符,通过图库读取并显示待修改的图片内容;通过图库对所述待修改的图片内容进行修改;通过图库根据所述第三文件描述符,将修改后的图片内容保存到所述第二内部存储区。
其中一种可能的实现方式中,当所述指令被所述终端设备执行时,使得所述终端设备执行所述获取所述目标相册包括的图片名称的步骤之后,还执行以下步骤:通过图库获取待修改图片文件信息的图片名称;通过图库对所述待修改图片文件信息进行修改;通过所述图库与所述系统应用之间的图片信息修改接口,将所述待修改图片文件信息的图片名称和修改后的图片文件信息传递给所述系统应用,以供所述系统应用查找到所述待修改图片文件信息的图片名称对应的图片文件之后,将查找到的图片文件的文件信息替换为所述修改后的图片文件信息。
其中一种可能的实现方式中,当所述指令被所述终端设备执行时,使得所述终端设备执行所述获取所述目标相册包括的图片名称的步骤之后,还执行以下步骤:通过图库获取待删除的图片名称;通过所述图库与所述系统应用之间的图片删除接口,将所述待删除的图片名称传递给所述系统应用,以供所述系统应用删除所述待删除的图片名称对应的图片文件。
其中一种可能的实现方式中,当所述指令被所述终端设备执行时,使得所述终端设备执行所述为所述目标相册添加相册锁的步骤之后,还执行以下步骤:检测到所述用户移除所述目标相册的相册锁的第三触发操作;响应于所述第三触发操作,获取所述用户输入的解锁信息;确定所述解锁信息通过安全校验之后,为所述目标相册移除相册锁。
应当理解的是,本申请实施例的第二~第三方面与本申请实施例的第一方面的技术方案一致,各方面及对应的可行实施方式所取得的有益效果相似,不再赘述。
第四方面,本申请实施例提供一种计算机可读存储介质,上述计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行第一方面提供的方法。
第五方面,本申请实施例提供一种计算机程序,当上述计算机程序被计算机执行时,用于执行第一方面提供的方法。
在一种可能的设计中,第五方面中的程序可以全部或者部分存储在与处理器封装在一起的存储介质上,也可以部分或者全部存储在不与处理器封装在一起的存储器上。
附图说明
图1为现有相关技术中应用的存储区的划分示意图;
图2为现有相关技术中系统设置提供卸载入口的示意图;
图3为现有相关技术中应用市场提供卸载入口的示意图;
图4为现有相关技术中清空应用数据的入口的示意图;
图5为本申请一个实施例提供的终端设备的结构示意图;
图6为本申请一个实施例提供的触发添加相册锁的界面示意图;
图7为本申请一个实施例提供的相册锁的免责提示的界面示意图;
图8(a)~图8(c)为本申请一个实施例提供的设置相册锁密码的界面示意图;
图9(a)~图9(b)为本申请一个实施例提供的关联生物识别的界面示意图;
图10为本申请一个实施例提供的卸载入口被屏蔽的对比示意图;
图11为本申请一个实施例提供的图片的存储方法的流程图;
图12为本申请一个实施例提供的清理存储区的操作入口被屏蔽的界面示意图;
图13为本申请一个实施例提供的将删除数据入口改成提示界面的示意图;
图14为本申请另一个实施例提供的图片的存储方法的流程图;
图15(a)~图15(b)为本申请一个实施例提供的解锁目标相册的界面示意图;
图16为本申请再一个实施例提供的图片的存储方法的流程图;
图17为本申请再一个实施例提供的图片的存储方法的流程图;
图18为本申请再一个实施例提供的图片的存储方法的流程图;
图19为本申请一个实施例提供的关闭和打开相册锁的界面示意图;
图20为本申请一个实施例提供的移除相册锁的界面示意图;
图21为本申请另一个实施例提供的终端设备的结构示意图;
图22为本申请再一个实施例提供的终端设备的结构示意图。
具体实施方式
本申请的实施方式部分使用的术语仅用于对本申请的具体实施例进行解释,而非旨在限定本申请。
针对如何对照片进行隐私处理这一问题,现有相关技术提供的一种方案为使用加密的方式对图片进行加密处理,但这种方式存在图片被删除的风险,并且对图片进行加密或者解密,需要消耗CPU的算力,并且还消耗时间。
而对于现有相关技术提供的,使用内部存储区机制对图片进行加密存储的方案,具体来说,就是在当前手机系统上,系统将应用的存储区分为应用外部存储区、外部公共目录存储区和应用内部存储区,如图1所示,图1为现有相关技术中应用的存储区的划分示意图。
对于图1中的应用外部存储区,任意应用都可以访问,而应用内部存储区,每个应用能且只能访问自身的内部存储区。
应用将加锁相册里面的图片存入其内部存储区之后,其他应用是无法访问的。但是从操作系统上来讲,这种方案存在以下缺点:
缺点一,可以通过卸载的途径,删除内部存储数据。操作系统在系统设置,或者是其他设置里面提供了卸载入口,用户就可以从该入口卸载安装在当前手机上的应用,如图2和图3所示,图2为现有相关技术中系统设置提供卸载入口的示意图,图3为现有相关技术中应用市场提供卸载入口的示意图。
用户可以通过图2和图3所示的卸载入口,对应用进行卸载。应用被卸载后,操作系统会清空这个应用的内部存储区的数据,这样加锁相册里面的图片,也就被删除了。
缺点二。用户可以通过清空应用数据来删除加锁相册中的图片,操作系统在设置中提供了清除图片数据的入口。如图4所示,图4为现有相关技术中清空应用数据的入口的示意图。
系统的图库,媒体库的内部存储数据,都可以通过图4删除数据按钮进行清空处理。由于图库,媒体库这些应用的特殊性,其中包含了很多系统数据,如果出错需要有可恢复措施,因此操作系统认为这个删除数据的入口必须保留。
综上,在以上两个缺点中,用户都可以绕过加锁相册入口,直接删除加锁相册中的图片。
基于以上问题,本申请实施例提供一种图片的存储方法,可以实现图片加锁存储,上述图片的存储方法中没有使用加密算法,在图片的存储过程中,不需要加密解密,也不需要额外的计算。另外,本申请实施例可以做到用户能且只能通过图库的加锁相册入口,访问加锁图片、增加、删除和/或修改图片。
本申请实施例充分使用操作系统的资源,提出一种新的实现方式,可以做到在图库应用被卸载之后,仍然保留图库的加锁相册,还可以做到用户在清空图库数据的时候,仍然保留图库的加锁相册。
本申请实施例提供的图片的存储方法可以应用于终端设备,其中,上述终端设备可以为智能手机、平板电脑、可穿戴设备、车载设备、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer, UMPC)、上网本或个人数字助理(personal digital assistant,PDA)等设备;本申请实施例对终端设备的具体类型不作任何限制。
示例性的,图5为本申请一个实施例提供的终端设备的结构示意图,如图5所示,终端设备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等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。
可以理解的是,本申请实施例示意的结构并不构成对终端设备100的具体限定。在本申请另一些实施例中,终端设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,DCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现终端设备100的触摸功能。
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的 蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现终端设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现终端设备100的显示功能。
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为终端设备100充电,也可以用于终端设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对终端设备100的结构限定。在本申请另一些实施例中,终端设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过终端设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为终端设备100供电。
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。
终端设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。终端设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块150可以提供应用在终端设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。
无线通信模块160可以提供应用在终端设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(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)。
终端设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像,视频等。显示屏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的正整数。
终端设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,终端设备100可以包括1个或N个摄像头193,N为大于1的正整数。
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当终端设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。
视频编解码器用于对数字视频压缩或解压缩。终端设备100可以支持一种或多种视频编解码器。这样,终端设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现终端设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展终端设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储终端设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行终端设备100的各种功能应用以及数据处理。
终端设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。终端设备100可以通过扬声器170A收听音乐,或收听免提通话。
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当终端设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。终端设备100可以设置至少一个麦克风170C。在另一些实施例中,终端设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,终端设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。终端设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,终端设备100根据压力传感器180A检测所述触摸操作强度。终端设备100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。
陀螺仪传感器180B可以用于确定终端设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定终端设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测终端设备100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消终端设备100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。
气压传感器180C用于测量气压。在一些实施例中,终端设备100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。
磁传感器180D包括霍尔传感器。终端设备100可以利用磁传感器180D检测翻盖皮套的开 合。在一些实施例中,当终端设备100是翻盖机时,终端设备100可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。
加速度传感器180E可检测终端设备100在各个方向上(一般为三轴)加速度的大小。当终端设备100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。
距离传感器180F,用于测量距离。终端设备100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,终端设备100可以利用距离传感器180F测距以实现快速对焦。
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。终端设备100通过发光二极管向外发射红外光。终端设备100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定终端设备100附近有物体。当检测到不充分的反射光时,终端设备100可以确定终端设备100附近没有物体。终端设备100可以利用接近光传感器180G检测用户手持终端设备100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。
环境光传感器180L用于感知环境光亮度。终端设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测终端设备100是否在口袋里,以防误触。
指纹传感器180H用于采集指纹。终端设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。
温度传感器180J用于检测温度。在一些实施例中,终端设备100利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,终端设备100执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,终端设备100对电池142加热,以避免低温导致终端设备100异常关机。在其他一些实施例中,当温度低于又一阈值时,终端设备100对电池142的输出电压执行升压,以避免低温导致的异常关机。
触摸传感器180K,也称“触控器件”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于终端设备100的表面,与显示屏194所处的位置不同。
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器180M也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于所述骨传导传感器180M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于所述骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率检测功能。
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。终端设备100可以接收按键输入,产生与终端设备100的用户设置以及功能控制有关的键信号输入。
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口 195拔出,实现和终端设备100的接触和分离。终端设备100可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时插入多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。终端设备100通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,终端设备100采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在终端设备100中,不能和终端设备100分离。
终端设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本申请实施例以分层架构的Android系统为例,示例性说明终端设备100的软件结构。
为了便于理解,本申请以下实施例将以具有图5所示结构的终端设备为例,结合附图和应用场景,对本申请实施例提供的图片的存储方法进行具体阐述。
首先,对用户添加相册锁的过程进行介绍。
用户在图库浏览相册的时候,可以通过点击菜单,对该相册进行添加相册锁,如图6所示,图6为本申请一个实施例提供的触发添加相册锁的界面示意图,如果是首次添加相册锁,对应的会弹出免责提示,如图7所示,图7为本申请一个实施例提供的相册锁的免责提示的界面示意图。
在图7所示界面中,如果用户点击“继续”,则终端设备100可以获取用户的确认指示,然后终端设备100可以显示输入密码的界面,在获取用户输入的密码之后,完成为相册添加相册锁的操作,如图8(a)~图8(c)所示,图8(a)~图8(c)为本申请一个实施例提供的设置相册锁密码的界面示意图。
用户在添加相册锁的时候,图库检测到系统有人脸识别或者指纹识别之后,会在用户添加完密码锁之后,主动弹窗提示可以进行生物识别关联,如图9(a)~图9(b)所示,图9(a)~图9(b)为本申请一个实施例提供的关联生物识别的界面示意图。在关联生物识别之后,用户后续打开相册时,不会再额外主动提示。
图库给相册添加锁之后,可以调用图库与相册锁对应的系统应用之间的接口,将加锁相册中的图片从图库对应的内部存储区转存到系统应用对应的内部存储区,以达到加锁相册的保密性和安全性要求。
下面介绍一下操作系统上,应用可以放置内容的3个存储区,参见图1,应用在操作系统上,可以使用的存储区分为:
外部:应用外部存储区和外部公共目录;
内部:应用内部存储区。
对于外部存储区,任意应用都可以进行访问,安全性达不到要求。对于内部存储区,当前操作系统通过文件系统级别的权限管控,只有应用本身可以进行访问。但是根据操作系统的设计,在用户卸载应用的时候,系统会清空对应应用的内部存储区。
本申请实施例中,在操作系统中新增加一个应用(即相册锁对应的应用),同时将该应用的权限设置为系统应用,用户无法通过操作系统的卸载入口,将该应用卸载。同时该应用不在应用市场上发布更新,用户也无法通过卸载应用市场新安装的应用,找到卸载入口清空该应用内部存储区数据。
下面给出对比图,如图10所示,从图10可以看到,图库不是系统应用,因此应用管理处有卸载入口,而媒体存储为系统应用,因此应用管理处没有卸载入口,用户也就无法卸载媒体存储这个系统应用,也无法进一步清空媒体存储对应的内部存储区。图10为本申请一个实施例提供的卸载入口被屏蔽的对比示意图。
另外,本申请实施例中,图库与新增加的系统应用之间增加进程间通信接口。
下面结合图6~图10,对本申请实施例提供的图片的存储方法进行介绍。
图11为本申请一个实施例提供的图片的存储方法的流程图,如图11所示,上述图片的存储方法可以包括:
步骤1101,检测到用户对目标相册添加相册锁的第一触发操作。
其中,上述目标相册保存在图库对应的第一内部存储区中。
具体地,上述第一触发操作可以为用户对“添加相册锁”的图标的点击、长按或双击等操作,本实施例对上述第一触发操作的操作形式不作限定,举例来说,参见图6,用户在图库浏览目标相册的时候,可以通过点击菜单中的“添加相册锁”图标,对目标相册添加相册锁。
步骤1102,响应于第一触发操作,为上述目标相册添加相册锁,并启动上述相册锁对应的系统应用。
步骤1103,通过图库与上述系统应用之间的文件打开接口,将目标相册中的图片名称发送给上述系统应用。
步骤1104,如果上述系统应用对应的第二内部存储区中不包括上述图片名称对应的图片文件,则在第二内部存储区中创建上述图片文件,获取上述图片文件的第一文件描述符,并将上述图片文件的第一文件描述符返回给图库。
步骤1105,获取图库根据第一文件描述符向第二内部存储区写入的图片内容。
具体地,图库获得上述第一文件描述符之后,可以通过上述第一文件描述符向第二内部存储区写入图片内容。
步骤1106,关闭上述文件打开接口,将上述图片内容保存在第二内部存储区。
具体地,每写完一张图片,需要关闭一次文件打开接口,再完成图片内容的保存。之后可以重新执行步骤1103~步骤1106,继续保存图片。
上述图片的存储方法中,终端设备100检测到用户对目标相册添加相册锁的第一触发操作,响应于第一触发操作,为上述目标相册添加相册锁,并启动上述相册锁对应的系统应用,然后通过图库与上述系统应用之间的文件打开接口,将目标相册中的图片名称发送给上述系统应用,如果上述系统应用对应的第二内部存储区中不包括上述图片名称对应的图片文件,则在第二内部存储区中创建上述图片文件,获取上述图片文件的第一文件描述符,并将上述图片文件的第一文件描述符返回给图库,最后,获取图库根据第一文件描述符向第二内部存储区写入的图片内容,关闭上述文件打开接口,将上述图片内容保存在第二内部存储区,从而可以实现终端设备100对图片进行加锁存储,并且不需要加密解密,不需要额外的计算,并且即便用户清空图库数据,也只是清空图库对应的第一内部存储区,由于图片内容也被保存在系统应用对应的第二内部存储区中,因此终端设备100中仍保留有加锁存储的图片。
终端设备100中,操作系统为每个应用都提供了清理存储区的操作入口,用户通过这个操作入口清空应用的外部存储区和内部存储区存储的所有数据。本申请实施例中,相册锁对应的系统应用的清理存储区入口处于用户不可见状态,具体地,相册锁对应的系统应用可以通过两种方式,阻止用户清理其存储区数据,保障加锁相册的数据安全。
方式一,系统应用可以通过申请系统权限,将清理存储区的操作入口屏蔽,用户不可点击,就像系统的设置应用一样,如图12所示,图12为本申请一个实施例提供的清理存储区的操作入口被屏蔽的界面示意图,从图12可以看出,设置应用的清理存储区的操作入口就被屏蔽了,用户不可点击,因此相册锁的系统应用可以采用与设置应用相同的方式,屏蔽清理存储区的操作入口。
方式二,系统应用可以通过系统提供的配置入口,将上面的删除数据入口,改成提示界面,如图13所示,系统原有的“删除数据”文字被替换成“管理空间”,或者其他提示文字都可以。如果用户点击该按钮,可以弹窗提示用户,该数据不能删除。图13为本申请一个实施例提供的将删除数据入口改成提示界面的示意图。
图14为本申请另一个实施例提供的图片的存储方法的流程图,如图14所示,本申请图11所示实施例中,步骤1106之后,还可以包括:
步骤1401,检测到用户解锁目标相册的第二触发操作。
步骤1402,响应于上述第二触发操作,获取用户输入的解锁信息。
其中,上述解锁信息可以为用户对目标相册添加相册锁时设置的密码,也可以为用户对目 标相册添加相册锁时关联的生物识别信息,例如:人脸识别或指纹识别等,本实施例对上述解锁信息的具体形式不作限定。
具体地,以目标相册为隐藏相册为例,用户在访问加锁的目标相册时,终端设备100首先显示图15(a)所示的界面,图15(a)所示的界面中显示“隐藏相册已锁定”的提示信息,这时用户可以点击图15(a)所示界面中的“解锁”图标,用户点击“解锁”图标的操作即为第二触发操作,检测到用户解锁目标相册的第二触发操作之后,终端设备100可以显示图15(b)所示界面,然后用户可以在图15(b)所示的界面中输入解锁信息,终端设备100获取用户输入的解锁信息,图15(b)中,解锁信息为密码。图15(a)~图15(b)为本申请一个实施例提供的解锁目标相册的界面示意图。
步骤1403,确定上述解锁信息通过安全校验之后,根据目标相册的标识,获取上述目标相册包括的图片名称。
步骤1404,将待查看的图片名称,通过文件打开接口传递给系统应用。
步骤1405,在系统应用根据上述待查看的图片名称,打开待查看的图片文件之后,获取系统应用返回的待查看的图片文件的第二文件描述符。
具体地,系统应用接收到待查看的图片名称之后,可以根据上述待查看的图片名称,找到对应的图片文件,进而打开待查看的图片文件,向图库返回待查看的图片文件的第二文件描述符。
步骤1406,根据第二文件描述符,通过图库读取并显示上述待查看的图片内容。
具体地,图库拿到第二文件描述符之后,可以根据上述第二文件描述符读取图片内容,进行显示。
对于目标相册中图片的修改,可以分为两种:
1)对图片内容的修改,比如进入编辑模式,进行涂鸦或打上水印;
2)对图片文件信息的修改,比如修改文件名称。
其中,对图片内容的修改,与访问图片一样,图库根据收到的第二文件描述符,修改系统应用的图片内容即可,如图16所示,图16为本申请再一个实施例提供的图片的存储方法的流程图,本申请图14所示实施例中,步骤1403之后,还可以包括:
步骤1601,将待修改图片内容的图片名称,通过文件打开接口传递给系统应用。
步骤1602,在系统应用根据上述待修改图片内容的图片名称,打开待修改图片内容的图片文件之后,获取系统应用返回的待修改图片内容的图片文件的第三文件描述符。
步骤1603,根据上述第三文件描述符,通过图库读取并显示待修改的图片内容。
步骤1604,通过图库对上述待修改的图片内容进行修改。
步骤1605,通过图库根据第三文件描述符,将修改后的图片内容保存到第二内部存储区。
对图片信息的修改,比如修改文件名称,这个就不用通过文件描述符来操作。可以在相册锁对应的系统应用侧增加一个进程间通信接口,用于修改图片文件信息。图库调用该接口,将修改的图片信息发送给系统应用侧,系统应用根据图片名称找到图片,并替换信息,完成文件信息修改,如图17所示,图17为本申请再一个实施例提供的图片的存储方法的流程图,本申请图14所示实施例中,步骤1403之后,还可以包括:
步骤1701,通过图库获取待修改图片文件信息的图片名称。
步骤1702,通过图库对上述待修改图片文件信息进行修改。
步骤1703,通过图库与上述系统应用之间的图片信息修改接口,将上述待修改图片文件信息的图片名称和修改后的图片文件信息传递给系统应用,以供系统应用查找到上述待修改图片文件信息的图片名称对应的图片文件之后,将查找到的图片文件的文件信息替换为上述修改后的图片文件信息。
本申请实施例中,用户可以在相册浏览界面,删除加锁相册中的图片。终端设备100在图 库的相册浏览界面上,提供多选交互界面,用户可以通过多选交互界面选择图片,之后点击删除并确认,即可触发删除行为。系统应用提供删除接口,图库调用该接口,将用户选择删除的图片的名称发送给系统应用。系统应用根据图片名称,直接删除图片文件,如图18所示,图18为本申请再一个实施例提供的图片的存储方法的流程图,本申请图14所示实施例中,步骤1403之后,还可以包括:
步骤1801,通过图库获取待删除的图片名称。
步骤1802,通过图库与上述系统应用之间的图片删除接口,将待删除的图片名称传递给上述系统应用,以供系统应用删除上述待删除的图片名称对应的图片文件。
本申请实施例中,参见图19,用户访问加锁相册,完成浏览、图片保存和/或图片修改等操作之后,可以点击返回按钮1901离开加锁相册。或者,用户可以点击加锁按钮1902,返回到加锁界面。图19为本申请一个实施例提供的关闭和打开相册锁的界面示意图。
本申请实施例中,用户可以在加锁相册打开之后,移除相册锁,将该相册恢复成一个普通相册。移除的时候,通过小弹窗提示。相册锁移除之后,导航栏锁相关菜单全部消失不可见。也就是说,如图20所示,本申请图11所示实施例中,步骤1102之后,终端设备100还可以在检测到用户移除上述目标相册的相册锁的第三触发操作之后,响应于上述第三触发操作,获取用户输入的解锁信息,确定上述解锁信息通过安全校验之后,为上述目标相册移除相册锁。图20为本申请一个实施例提供的移除相册锁的界面示意图。
本申请实施例在图库的相册界面提供加锁菜单,用户点击加锁菜单之后,终端设备100对当前相册执行加锁操作。
首先,提示用户输入密码,并完成两次输入校验。同时可以根据终端设备100的硬件情况,提示用户可以关联指纹识别,或者关联人脸识别。
之后图库将当前相册的照片,转存入相册锁对应的系统应用的内部存储区。该系统应用由于无法卸载,用户无法通过卸载按钮清除其内部存储区的数据。同时该系统应用又对系统清理存储区入口进行屏蔽,用户无法通过点击清理存储区,来清空上述系统应用的数据。
通过以上操作,终端设备100可以通过图库将加锁相册中的图片转存入一个安全位置。用户能且只能通过图库的加锁相册入口、访问、修改和/或删除加锁相册的图片。
另外,本申请实施例提供的图片的存储方法可以对任意相册进行加锁,同时本申请实施例没有使用加解密算法,不需要通过对图片进行加解密来保障图片的信息安全。这样,对设备来说就不需要进行大量运算来对图片进行加解密,在减少终端设备100开销的同时也减少了用户访问图片需要的时间;对图片来说,不需要担心加解密算法被破解导致信息泄露问题;同时也不用担心用户虽然看不到图片,但是可以删除图片,导致信息丢失的问题。
同时本申请实施例又能屏蔽用户通过卸载更新来清除数据的方式,同时也屏蔽了用户直接清理存储区的入口,保证用户能且只能通过加锁相册入口访问图片。
另外,本申请实施例提供的方法也可以作用于其他任意应用,除了可以用来存储加锁相册,还可以用来存储保密柜数据或者存储任意应用的隐私数据。
可以理解的是,上述实施例中的部分或全部步骤或操作仅是示例,本申请实施例还可以执行其它操作或者各种操作的变形。此外,各个步骤可以按照上述实施例呈现的不同的顺序来执行,并且有可能并非要执行上述实施例中的全部操作。
可以理解的是,终端设备为了实现上述功能,其包含了执行各个功能相应的硬件和/或软件模块。结合本申请所公开的实施例描述的各示例的算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。本领域技术人员可以结合实施例对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
本实施例可以根据上述方法实施例对终端设备进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个模块中。上述集成的模块可以采用硬件的形式实现。需要说明的是,本实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
图21为本申请另一个实施例提供的终端设备的结构示意图,在采用对应各个功能划分各个功能模块的情况下,图21示出了上述实施例中涉及的终端设备2100的一种可能的组成示意图,如图21所示,该终端设备2100可以包括:检测模块2101、添加模块2102、启动模块2103、传输模块2104、获取模块2105和保存模块2106;
其中,检测模块2101,用于检测到用户对目标相册添加相册锁的第一触发操作;其中,上述目标相册保存在图库对应的第一内部存储区中;
添加模块2102,用于响应于上述第一触发操作,为目标相册添加相册锁;
启动模块2103,用于启动上述相册锁对应的系统应用;
传输模块2104,用于通过图库与系统应用之间的文件打开接口,将目标相册中的图片名称发送给系统应用;
获取模块2105,用于当系统应用对应的第二内部存储区中不包括图片名称对应的图片文件时,在第二内部存储区中创建上述图片文件,获取上述图片文件的第一文件描述符;
传输模块2104,还用于将上述图片文件的第一文件描述符返回给图库;
获取模块2105,还用于获取图库根据第一文件描述符向第二内部存储区写入的图片内容;
保存模块2106,用于关闭上述文件打开接口,将图片内容保存在第二内部存储区。
需要说明的是,本申请图11所示方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。
本实施例提供的终端设备2100,用于执行本申请图11所示实施例提供的图片的存储方法,因此可以达到与上述方法相同的效果。
图22为本申请再一个实施例提供的终端设备的结构示意图,与图21所示的终端设备相比,不同之处在于,本实施例中,终端设备2100还可以包括:显示模块2107;
检测模块2101,还用于在保存模块2106将图片内容保存在第二内部存储区之后,检测到用户解锁目标相册的第二触发操作;
获取模块2105,还用于响应于第二触发操作,获取用户输入的解锁信息;以及在确定上述解锁信息通过安全校验之后,根据目标相册的标识,获取目标相册包括的图片名称;
传输模块2104,用于将待查看的图片名称,通过上述文件打开接口传递给系统应用;
获取模块2105,还用于在系统应用根据上述待查看的图片名称,打开待查看的图片文件之后,获取系统应用返回的待查看的图片文件的第二文件描述符;
显示模块2107,用于根据第二文件描述符,通过图库读取并显示上述待查看的图片内容。
另外,终端设备2100还可以包括:修改模块2108;
传输模块2104,还用于在获取模块2105获取目标相册包括的图片名称之后,将待修改图片内容的图片名称,通过文件打开接口传递给系统应用;
获取模块2105,还用于在系统应用根据待修改图片内容的图片名称,打开待修改图片内容的图片文件之后,获取系统应用返回的待修改图片内容的图片文件的第三文件描述符;
显示模块2107,用于根据上述第三文件描述符,通过图库读取并显示待修改的图片内容;
修改模块2108,用于通过图库对待修改的图片内容进行修改;
保存模块2106,用于根据上述第三文件描述符,将修改后的图片内容保存到第二内部存储区。
进一步地,获取模块2105,还用于在获取目标相册包括的图片名称之后,通过图库获取待修改图片文件信息的图片名称;
修改模块2108,用于通过图库对所述待修改图片文件信息进行修改;
传输模块2104,用于通过图库与系统应用之间的图片信息修改接口,将待修改图片文件信 息的图片名称和修改后的图片文件信息传递给系统应用,以供系统应用查找到上述待修改图片文件信息的图片名称对应的图片文件之后,将查找到的图片文件的文件信息替换为修改后的图片文件信息。
另外,获取模块2105,还用于在获取目标相册包括的图片名称之后,通过图库获取待删除的图片名称;
传输模块2104,还用于通过图库与系统应用之间的图片删除接口,将待删除的图片名称传递给系统应用,以供上述系统应用删除待删除的图片名称对应的图片文件。
进一步地,终端设备2100还可以包括:移除模块2109;
检测模块2101,还用于在添加模块2102为目标相册添加相册锁之后,检测到用户移除目标相册的相册锁的第三触发操作;
获取模块2105,还用于响应于第三触发操作,获取用户输入的解锁信息;
移除模块2109,用于确定上述解锁信息通过安全校验之后,为目标相册移除相册锁。
本实施例中,系统应用的清理存储区入口处于用户不可见状态。
需要说明的是,本申请图11~图20所示方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。
本实施例提供的终端设备2100,用于执行本申请图11~图20所示实施例提供的图片的存储方法,因此可以达到与上述方法相同的效果。
应当理解的是,终端设备2100可以对应于图5所示的终端设备100。其中,检测模块2101~保存模块2106,以及修改模块2108~移除模块2109的功能可以由图5所示终端设备100中的处理器110实现;显示模块2107的功能可以由图5所示终端设备100中的处理器110和显示屏194实现。
在采用集成的单元的情况下,终端设备2100可以包括处理模块、存储模块和通信模块。
其中,处理模块可以用于对终端设备2100的动作进行控制管理,例如,可以用于支持终端设备2100执行上述检测模块2101~移除模块2109执行的步骤。存储模块可以用于支持终端设备2100存储程序代码和数据等。通信模块,可以用于支持终端设备2100与其他设备的通信。
其中,处理模块可以是处理器或控制器,其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框、模块和电路。处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,数字信号处理(digital signal processing,DSP)和微处理器的组合等等。存储模块可以是存储器。通信模块具体可以为射频电路、蓝牙芯片和/或Wi-Fi芯片等与其他电子设备交互的设备。
在一个实施例中,当处理模块为处理器,存储模块为存储器时,本实施例所涉及的终端设备2100可以为具有图5所示结构的设备。
本申请实施例还提供一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行本申请图11~图20所示实施例提供的方法。
本申请实施例还提供一种计算机程序产品,该计算机程序产品包括计算机程序,当其在计算机上运行时,使得计算机执行本申请图11~图20所示实施例提供的方法。
本申请实施例中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示单独存在A、同时存在A和B、单独存在B的情况。其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项”及其类似表达,是指的这些项中的任意组合,包括单项或复数项的任意组合。例如,a,b和c中的至少一项可以表示:a,b,c,a和b,a和c,b和c或a和b和c,其中a,b,c可以是单个,也可以是多个。
本领域普通技术人员可以意识到,本文中公开的实施例中描述的各单元及算法步骤,能够以电子硬件、计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同 方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,任一功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。本申请的保护范围应以所述权利要求的保护范围为准。

Claims (16)

  1. 一种图片的存储方法,其特征在于,包括:
    检测到用户对目标相册添加相册锁的第一触发操作;其中,所述目标相册保存在图库对应的第一内部存储区中;
    响应于所述第一触发操作,为所述目标相册添加相册锁,并启动所述相册锁对应的系统应用;
    通过所述图库与所述系统应用之间的文件打开接口,将所述目标相册中的图片名称发送给所述系统应用;
    如果所述系统应用对应的第二内部存储区中不包括所述图片名称对应的图片文件,则在所述第二内部存储区中创建所述图片文件,获取所述图片文件的第一文件描述符,并将所述图片文件的第一文件描述符返回给所述图库;
    获取所述图库根据所述第一文件描述符向所述第二内部存储区写入的图片内容;
    关闭所述文件打开接口,将所述图片内容保存在所述第二内部存储区。
  2. 根据权利要求1所述的方法,其特征在于,所述关闭所述文件打开接口,将所述图片内容保存在所述第二内部存储区之后,还包括:
    检测到所述用户解锁所述目标相册的第二触发操作;
    响应于所述第二触发操作,获取所述用户输入的解锁信息;
    确定所述解锁信息通过安全校验之后,根据所述目标相册的标识,获取所述目标相册包括的图片名称;
    将待查看的图片名称,通过所述文件打开接口传递给所述系统应用;
    在所述系统应用根据所述待查看的图片名称,打开所述待查看的图片文件之后,获取所述系统应用返回的待查看的图片文件的第二文件描述符;
    根据所述第二文件描述符,通过图库读取并显示所述待查看的图片内容。
  3. 根据权利要求2所述的方法,其特征在于,所述获取所述目标相册包括的图片名称之后,还包括:
    将待修改图片内容的图片名称,通过所述文件打开接口传递给所述系统应用;
    在所述系统应用根据所述待修改图片内容的图片名称,打开所述待修改图片内容的图片文件之后,获取所述系统应用返回的待修改图片内容的图片文件的第三文件描述符;
    根据所述第三文件描述符,通过图库读取并显示待修改的图片内容;
    通过图库对所述待修改的图片内容进行修改;
    通过图库根据所述第三文件描述符,将修改后的图片内容保存到所述第二内部存储区。
  4. 根据权利要求2所述的方法,其特征在于,所述获取所述目标相册包括的图片名称之后,还包括:
    通过图库获取待修改图片文件信息的图片名称;
    通过图库对所述待修改图片文件信息进行修改;
    通过所述图库与所述系统应用之间的图片信息修改接口,将所述待修改图片文件信息的图片名称和修改后的图片文件信息传递给所述系统应用,以供所述系统应用查找到所述待修改图片文件信息的图片名称对应的图片文件之后,将查找到的图片文件的文件信息替换为所述修改后的图片文件信息。
  5. 根据权利要求2所述的方法,其特征在于,所述获取所述目标相册包括的图片名称之后,还包括:
    通过图库获取待删除的图片名称;
    通过所述图库与所述系统应用之间的图片删除接口,将所述待删除的图片名称传递给所述系统应用,以供所述系统应用删除所述待删除的图片名称对应的图片文件。
  6. 根据权利要求1所述的方法,其特征在于,所述为所述目标相册添加相册锁之后,还包括:
    检测到所述用户移除所述目标相册的相册锁的第三触发操作;
    响应于所述第三触发操作,获取所述用户输入的解锁信息;
    确定所述解锁信息通过安全校验之后,为所述目标相册移除相册锁。
  7. 根据权利要求1-6任意一项所述的方法,其特征在于,所述系统应用的清理存储区入口处于用户不可见状态。
  8. 一种图片的存储装置,其特征在于,包括:
    检测模块,用于检测到用户对目标相册添加相册锁的第一触发操作;其中,所述目标相册保存在图库对应的第一内部存储区中;
    添加模块,用于响应于所述第一触发操作,为所述目标相册添加相册锁;
    启动模块,用于启动所述相册锁对应的系统应用;
    传输模块,用于通过所述图库与所述系统应用之间的文件打开接口,将所述目标相册中的图片名称发送给所述系统应用;
    获取模块,用于当所述系统应用对应的第二内部存储区中不包括所述图片名称对应的图片文件时,在所述第二内部存储区中创建所述图片文件,获取所述图片文件的第一文件描述符;
    所述传输模块,还用于将所述图片文件的第一文件描述符返回给所述图库;
    所述获取模块,还用于获取所述图库根据所述第一文件描述符向所述第二内部存储区写入的图片内容;
    保存模块,用于关闭所述文件打开接口,将所述图片内容保存在所述第二内部存储区。
  9. 一种终端设备,其特征在于,包括:
    一个或多个处理器;存储器;多个应用程序;以及一个或多个计算机程序,其中所述一个或多个计算机程序被存储在所述存储器中,所述一个或多个计算机程序包括指令,当所述指令被所述终端设备执行时,使得所述终端设备执行以下步骤:
    检测到用户对目标相册添加相册锁的第一触发操作;其中,所述目标相册保存在图库对应的第一内部存储区中;
    响应于所述第一触发操作,为所述目标相册添加相册锁,并启动所述相册锁对应的系统应用;
    通过所述图库与所述系统应用之间的文件打开接口,将所述目标相册中的图片名称发送给所述系统应用;
    如果所述系统应用对应的第二内部存储区中不包括所述图片名称对应的图片文件,则在所述第二内部存储区中创建所述图片文件,获取所述图片文件的第一文件描述符,并将所述图片文件的第一文件描述符返回给所述图库;
    获取所述图库根据所述第一文件描述符向所述第二内部存储区写入的图片内容;
    关闭所述文件打开接口,将所述图片内容保存在所述第二内部存储区。
  10. 根据权利要求9所述的终端设备,其特征在于,当所述指令被所述终端设备执行时,使得所述终端设备执行所述关闭所述文件打开接口,将所述图片内容保存在所述第二内部存储区的步骤之后,还执行以下步骤:
    检测到所述用户解锁所述目标相册的第二触发操作;
    响应于所述第二触发操作,获取所述用户输入的解锁信息;
    确定所述解锁信息通过安全校验之后,根据所述目标相册的标识,获取所述目标相册包括的图片名称;
    将待查看的图片名称,通过所述文件打开接口传递给所述系统应用;
    在所述系统应用根据所述待查看的图片名称,打开所述待查看的图片文件之后,获取所述系统应用返回的待查看的图片文件的第二文件描述符;
    根据所述第二文件描述符,通过图库读取并显示所述待查看的图片内容。
  11. 根据权利要求10所述的终端设备,其特征在于,当所述指令被所述终端设备执行时,使得所述终端设备执行所述获取所述目标相册包括的图片名称的步骤之后,还执行以下步骤:
    将待修改图片内容的图片名称,通过所述文件打开接口传递给所述系统应用;
    在所述系统应用根据所述待修改图片内容的图片名称,打开所述待修改图片内容的图片文件之后,获取所述系统应用返回的待修改图片内容的图片文件的第三文件描述符;
    根据所述第三文件描述符,通过图库读取并显示待修改的图片内容;
    通过图库对所述待修改的图片内容进行修改;
    通过图库根据所述第三文件描述符,将修改后的图片内容保存到所述第二内部存储区。
  12. 根据权利要求10所述的终端设备,其特征在于,当所述指令被所述终端设备执行时,使得所述终端设备执行所述获取所述目标相册包括的图片名称的步骤之后,还执行以下步骤:
    通过图库获取待修改图片文件信息的图片名称;
    通过图库对所述待修改图片文件信息进行修改;
    通过所述图库与所述系统应用之间的图片信息修改接口,将所述待修改图片文件信息的图片名称和修改后的图片文件信息传递给所述系统应用,以供所述系统应用查找到所述待修改图片文件信息的图片名称对应的图片文件之后,将查找到的图片文件的文件信息替换为所述修改后的图片文件信息。
  13. 根据权利要求10所述的终端设备,其特征在于,当所述指令被所述终端设备执行时,使得所述终端设备执行所述获取所述目标相册包括的图片名称的步骤之后,还执行以下步骤:
    通过图库获取待删除的图片名称;
    通过所述图库与所述系统应用之间的图片删除接口,将所述待删除的图片名称传递给所述系统应用,以供所述系统应用删除所述待删除的图片名称对应的图片文件。
  14. 根据权利要求9所述的终端设备,其特征在于,当所述指令被所述终端设备执行时,使得所述终端设备执行所述为所述目标相册添加相册锁的步骤之后,还执行以下步骤:
    检测到所述用户移除所述目标相册的相册锁的第三触发操作;
    响应于所述第三触发操作,获取所述用户输入的解锁信息;
    确定所述解锁信息通过安全校验之后,为所述目标相册移除相册锁。
  15. 根据权利要求9-14任意一项所述的终端设备,其特征在于,所述系统应用的清理存储区入口处于用户不可见状态。
  16. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行如权利要求1-7任一项所述的方法。
PCT/CN2023/110077 2022-08-10 2023-07-31 图片的存储方法、装置和终端设备 Ceased WO2024032400A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP23851621.5A EP4502824A4 (en) 2022-08-10 2023-07-31 IMAGE STORAGE METHOD AND APPARATUS, AND TERMINAL DEVICE
US18/933,586 US12524388B2 (en) 2022-08-10 2024-10-31 Picture storage method and apparatus, and terminal device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210959305.XA CN117633265A (zh) 2022-08-10 2022-08-10 图片的存储方法、装置和终端设备
CN202210959305.X 2022-08-10

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US18/933,586 Continuation US12524388B2 (en) 2022-08-10 2024-10-31 Picture storage method and apparatus, and terminal device

Publications (2)

Publication Number Publication Date
WO2024032400A1 true WO2024032400A1 (zh) 2024-02-15
WO2024032400A9 WO2024032400A9 (zh) 2024-11-28

Family

ID=89850847

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/110077 Ceased WO2024032400A1 (zh) 2022-08-10 2023-07-31 图片的存储方法、装置和终端设备

Country Status (4)

Country Link
US (1) US12524388B2 (zh)
EP (1) EP4502824A4 (zh)
CN (1) CN117633265A (zh)
WO (1) WO2024032400A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118840937B (zh) * 2024-06-19 2025-11-28 海信视像科技股份有限公司 一种设备安装角度校正方法及显示设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130080773A1 (en) * 2010-05-07 2013-03-28 Zhuo Lu File protecting method and a system therefor
CN103106266A (zh) * 2013-01-31 2013-05-15 华为终端有限公司 基于安卓系统的文件夹管理和显示方法及移动终端
CN105530261A (zh) * 2015-12-23 2016-04-27 北京奇虎科技有限公司 隐私信息的保护方法及装置
CN108647513A (zh) * 2018-03-22 2018-10-12 华中科技大学 一种基于TrustZone的共享库安全隔离方法及系统
CN111046435A (zh) * 2019-12-20 2020-04-21 山东广电信通网络运营有限公司 一种暗访录像内容保护方法、装置、终端及存储介质

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9405500B1 (en) * 2012-09-12 2016-08-02 Marisa Cox Photo album device and system
US20140130182A1 (en) * 2012-11-02 2014-05-08 Genesismedia Llc Controlled Grant Of Access To Media Content
KR20140127584A (ko) * 2013-04-25 2014-11-04 (주)세이엔 비밀 사진 잠금 애플리케이션
CN103377051B (zh) 2013-07-16 2016-07-06 广东欧珀移动通信有限公司 一种基于Android系统的应用界面自定义方法
CN103645906B (zh) 2013-12-25 2018-04-10 上海斐讯数据通信技术有限公司 基于固定的界面布局文件实现界面重新布局的方法及系统
US20150245199A1 (en) * 2014-02-26 2015-08-27 Jared Blitzstein Privacy restricted photo gallery navigation for mobile devices
CN105912951A (zh) * 2016-04-15 2016-08-31 北京小米移动软件有限公司 数据迁移方法及装置
CN107516051A (zh) * 2017-09-05 2017-12-26 深圳市影踪科技有限公司 一种数据加密存储方法、装置及计算机可读存储介质
CN108229203A (zh) * 2017-12-29 2018-06-29 北京安云世纪科技有限公司 一种终端中的文件保护方法及装置
CN118612337A (zh) * 2019-07-30 2024-09-06 华为技术有限公司 一种电子设备的隐私保护方法及电子设备
CN111506262B (zh) * 2020-03-25 2021-12-28 华为技术有限公司 一种存储系统、文件存储和读取方法及终端设备
US12664222B2 (en) * 2022-06-02 2026-06-23 Videomentum, Inc. Methods and systems for prioritizing digital media content within a digital media content gallery

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130080773A1 (en) * 2010-05-07 2013-03-28 Zhuo Lu File protecting method and a system therefor
CN103106266A (zh) * 2013-01-31 2013-05-15 华为终端有限公司 基于安卓系统的文件夹管理和显示方法及移动终端
CN105530261A (zh) * 2015-12-23 2016-04-27 北京奇虎科技有限公司 隐私信息的保护方法及装置
CN109688145A (zh) * 2015-12-23 2019-04-26 北京奇虎科技有限公司 隐私信息的保护方法及装置
CN108647513A (zh) * 2018-03-22 2018-10-12 华中科技大学 一种基于TrustZone的共享库安全隔离方法及系统
CN111046435A (zh) * 2019-12-20 2020-04-21 山东广电信通网络运营有限公司 一种暗访录像内容保护方法、装置、终端及存储介质

Non-Patent Citations (1)

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

Also Published As

Publication number Publication date
WO2024032400A9 (zh) 2024-11-28
US12524388B2 (en) 2026-01-13
CN117633265A (zh) 2024-03-01
EP4502824A1 (en) 2025-02-05
EP4502824A4 (en) 2025-07-16
US20250061106A1 (en) 2025-02-20

Similar Documents

Publication Publication Date Title
CN110262877B (zh) 一种卡片处理方法及设备
US20210149578A1 (en) Data Restoration Method Used When Terminal Is Restored to Factory Settings, and Terminal
CN112930533B (zh) 一种电子设备的控制方法及电子设备
WO2020015259A1 (zh) 一种数据备份方法及终端
CN113452945A (zh) 分享应用界面的方法、装置、电子设备及可读存储介质
CN114528581A (zh) 一种安全显示方法及电子设备
WO2021175266A1 (zh) 身份验证方法、装置和电子设备
EP4138357A1 (en) Method and device for negotiating permission during communication process, and electronic apparatus
CN113536374A (zh) 图像隐私的保护方法及电子设备
CN114254334B (zh) 数据处理方法、装置、设备及存储介质
US12524388B2 (en) Picture storage method and apparatus, and terminal device
CN114637441A (zh) 空间管理的方法、装置、电子设备和可读存储介质
CN113901485B (zh) 应用程序加载方法、电子设备及存储介质
WO2023051094A1 (zh) 内存回收方法、装置、电子设备及可读存储介质
CN118113184A (zh) 保护隐私信息的方法及电子设备
CN113676440B (zh) 通信过程中的权限协商方法、装置和电子设备
CN114117461B (zh) 一种数据保护方法、电子设备及存储介质
WO2022037725A1 (zh) 一种系统服务恢复方法、装置和电子设备
CN115495721A (zh) 一种访问控制方法及相关装置
CN114125144A (zh) 一种防误触的方法及终端
EP4394636A1 (en) Application display method, electronic device, and storage medium
CN116382810A (zh) Meta模式的启动方法、电子设备及存储介质
CN113704209A (zh) 数据共享方法、电子设备及存储介质
CN114117367A (zh) 一种数据保护方法及电子设备
EP4478195A1 (en) Background application recovery method, apparatus, electronic device and readable storage medium

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

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2023851621

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2023851621

Country of ref document: EP

Effective date: 20241025

NENP Non-entry into the national phase

Ref country code: DE