Picture storage method and apparatus, and terminal device
By transferring pictures from the gallery storage area to the internal storage area of the system application in the terminal device, the deletion risks and CPU consumption problems of image encryption processing in the prior art are solved, and the lock is still retained when the user clears the gallery data. The data of the album is blocked and illegally deleted portals are improved, improving the security and stability of the data.
Patent Information
- Application Number
- PCT/CN2023/110077
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2022-08-10
- Filing Date
- 2023-07-31
- Publication Date
- 2024-11-28
AI Technical Summary
The prior art has the risk of image deletion in image encryption processing, and the encryption and decryption process consumes CPU computing power and time-consuming, and the user can directly delete the pictures in the locked album by uninstalling the application or clearing the data portal.
By realizing image lock storage in terminal devices, the file interface between the system application and the gallery is used to transfer the image content from the internal storage area of the gallery to the internal storage area of the system application, avoiding encryption and decryption operations, and blocking users by uninstalling the application or Clean the storage entrance and delete the data of the locked album.
It realizes locking storage of pictures without encryption and decryption, ensuring that the data of the locked album remains when the user clears the library data, and blocks the user's way of deleting or cleaning data through the non-locked album entrance, improving the Data security and stability.
Smart Images

Figure CN2023110077_28112024_PF_FP_ABST
Abstract
Description
Image storage method, device and terminal equipment
[0001] This application embodiment claims priority to the Chinese patent application filed with the China Patent Office on August 10, 2022, with application number 202210959305.X and invention name “Image Storage Method, Device and Terminal Device”, all contents of which are incorporated by reference in the present application embodiment. Technical Field
[0002] The embodiments of the present application relate to the field of smart terminal technology, and in particular to a method, apparatus, and terminal device for storing pictures. Background Art
[0003] Images are important personal data. In many scenarios, users want to keep some photos private to prevent others from viewing, modifying, or deleting them.
[0004] One implementation solution provided by existing related technologies is to encrypt images. Specifically, an encrypted album entry can be added to the album, and each image the user moves into the encrypted album is encrypted. After the image is encrypted, only the current application can decrypt it, and then display it normally.
[0005] However, this method carries the risk of picture deletion. After the picture is encrypted, the user cannot add or view the encrypted picture from other entrances. However, the user can delete the picture from other entrances. Similarly, the user can also perform other processing on these encrypted pictures through other entrances, such as re-encrypting them with other applications, which will result in the user being unable to view the pictures even after entering from the encrypted album entrance. In addition, encrypting or decrypting pictures consumes the computing power of the central processing unit (CPU) and also consumes time. For example, if a user moves 100 photos into the encrypted album at once, due to the time-consuming encryption algorithm, additional time will be required to wait for encryption.
[0006] Summary of the Invention
[0007] The embodiments of the present application provide a method, apparatus, and terminal device for storing pictures. The embodiments of the present application also provide a computer-readable storage medium to implement locked storage of pictures without the need for encryption or decryption, or additional calculations. Even if the user clears the gallery data, the locked stored pictures can still be retained in the terminal device.
[0008] In the first aspect, an embodiment of the present application provides a method for storing pictures, comprising: detecting a first trigger operation of a user to add an album lock to a target album; wherein the target album is saved in a first internal storage area corresponding to a gallery; in response to the first trigger operation, adding an album lock to the target album, and starting a system application corresponding to the album lock; sending the picture name in the target album to the system application through a file opening interface between the gallery and the system application; if the picture file corresponding to the picture name is not included in a second internal storage area corresponding to the system application, creating the picture file in the second internal storage area, obtaining a first file descriptor of the picture file, and returning the first file descriptor of the picture file to the gallery; obtaining the picture content written by the gallery to the second internal storage area according to the first file descriptor; closing the file opening interface, and saving the picture content in the second internal storage area.
[0009] In the above-mentioned image storage method, the terminal device detects a first trigger operation of a user to add an album lock to a target album. In response to the first trigger operation, the terminal device adds an album lock to the target album and starts the system application corresponding to the album lock. Then, through the file opening interface between the gallery and the system application, the name of the image in the target album is sent to the system application. If the second internal storage area corresponding to the system application does not include the image file corresponding to the image name, the image file is created in the second internal storage area, the first file descriptor of the image file is obtained, and the first file descriptor of the image file is returned to the gallery. Finally, the image content written by the gallery to the second internal storage area according to the first file descriptor is obtained, the file opening interface is closed, and the image content is saved in the second internal storage area. In this way, the terminal device can lock and store the image without encryption and decryption, and without additional calculation. Even if the user clears the gallery data, only the first internal storage area corresponding to the gallery is cleared. Since the image content is also saved in the second internal storage area corresponding to the system application, the locked and stored image is still retained in the terminal device.
[0010] In one possible implementation, after closing the file opening interface and saving the picture content in the second internal storage area, it also includes: detecting a second trigger operation in which the user unlocks the target album; obtaining the unlock information input by the user in response to the second trigger operation; after determining that the unlock information passes the security check, obtaining the name of the picture included in the target album according to the identifier of the target album; passing 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, obtaining the second file descriptor of the picture file to be viewed returned by the system application; and reading and displaying the picture content to be viewed through the gallery according to the second file descriptor.
[0011] In one possible implementation method, after obtaining the picture names included in the target album, it also includes: passing the picture name of the picture content to be modified 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, obtaining the third file descriptor of the picture file of the picture content to be modified returned by the system application; according to the third file descriptor, reading and displaying the picture content to be modified through the picture library; modifying the picture content to be modified through the picture library; and saving the modified picture content to the second internal storage area through the picture library according to the third file descriptor.
[0012] In one possible implementation method, after obtaining the picture names included in the target album, it also includes: obtaining the picture names of the picture file information to be modified through the picture library; modifying the picture file information to be modified through the picture library; passing the picture name of the picture file information to be modified and the modified picture file information to the system application through the picture information modification interface between the picture library and the system application, so that the system application finds the picture file corresponding to the picture name of the picture file information to be modified, and then replaces the file information of the found picture file with the modified picture file information.
[0013] In one possible implementation method, after obtaining the picture names included in the target album, it also includes: obtaining the picture names to be deleted through the gallery; passing the picture names to be deleted to the system application through the picture deletion interface between the gallery and the system application, so that the system application deletes the picture files corresponding to the picture names to be deleted.
[0014] In one possible implementation, after adding an album lock for the target album, the method further includes: detecting a third trigger operation in which the user removes the album lock of the target album; obtaining the unlocking information input by the user in response to the third triggering operation; and removing the album lock for the target album after determining that the unlocking information passes the security check.
[0015] In one possible implementation, the cleanup storage area entry of the system application is in a state invisible to the user.
[0016] In a second aspect, an embodiment of the present application provides a device for storing images, which is included in a terminal device and has the function of implementing the terminal device behavior in the first aspect and possible implementations of the first aspect. The functions can be implemented through hardware or through hardware executing corresponding software implementations. The hardware or software includes one or more modules or units corresponding to the above functions. For example, a detection module, an addition module, a startup module, a transmission module, an acquisition module, and a storage module.
[0017] In a third aspect, an embodiment of the present application provides a terminal device, comprising: one or more processors; a memory; multiple applications; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, which, when executed by the terminal device, cause the terminal device to perform the following steps: detecting a first trigger operation of a user to add an album lock to a target album; wherein the target album is saved in a first internal storage area corresponding to a gallery; in response to the first trigger operation, adding an album lock to the target album, and starting a system application corresponding to the album lock; sending the name of the picture in the target album to the system application through a file opening interface between the gallery and 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, creating the picture file in the second internal storage area, obtaining the first file descriptor of the picture file, and returning the first file descriptor of the picture file to the gallery; obtaining the picture content written by the gallery to the second internal storage area according to the first file descriptor; closing the file opening interface, and saving the picture content in the second internal storage area.
[0018] In one possible implementation, when the instruction is executed by the terminal device, the terminal device executes the steps of closing the file opening interface and saving the picture content in the second internal storage area, and then further executes the following steps: detecting a second trigger operation of the user unlocking the target album; obtaining the unlocking information input by the user in response to the second triggering operation; after determining that the unlocking information passes the security check, obtaining the name of the picture included in the target album according to the identifier of the target album; passing 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, obtaining the second file descriptor of the picture file to be viewed returned by the system application; and reading and displaying the picture content to be viewed through the gallery according to the second file descriptor.
[0019] In one possible implementation, when the instruction is executed by the terminal device, after the terminal device executes the step of obtaining the picture names included in the target album, it also executes the following steps: passing the picture name of the picture content to be modified 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, obtaining the third file descriptor of the picture file of the picture content to be modified returned by the system application; according to the third file descriptor, reading and displaying the picture content to be modified through the gallery; modifying the picture content to be modified through the gallery; and saving the modified picture content to the second internal storage area through the gallery according to the third file descriptor.
[0020] In one possible implementation, when the instruction is executed by the terminal device, after the terminal device executes the step of obtaining the picture names included in the target album, it also executes the following steps: obtaining the picture name of the picture file information to be modified through the gallery; modifying the picture file information to be modified through the gallery; passing the picture name of the picture file information to be modified and the modified picture file information to the system application through the picture information modification interface between the gallery and the system application, so that the system application finds the picture file corresponding to the picture name of the picture file information to be modified, and then replaces the file information of the found picture file with the modified picture file information.
[0021] In one possible implementation, when the instruction is executed by the terminal device, after the terminal device executes the step of obtaining the picture names included in the target album, it also executes the following steps: obtaining the picture names to be deleted through the gallery; passing the picture names 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.
[0022] In one possible implementation, when the instruction is executed by the terminal device, after the terminal device executes the step of adding an album lock for the target album, it also executes the following steps: detecting a third trigger operation of the user removing the album lock of the target album; in response to the third trigger operation, obtaining the unlocking information input by the user; and after determining that the unlocking information passes the security check, removing the album lock for the target album.
[0023] It should be understood that the second to third aspects of the embodiments of the present application are consistent with the technical solutions of the first aspect of the embodiments of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated here.
[0024] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer-readable storage medium is run on a computer, the computer executes the method provided in the first aspect.
[0025] In a fifth aspect, an embodiment of the present application provides a computer program, which, when executed by a computer, is used to execute the method provided in the first aspect.
[0026] In one possible design, the program in the fifth aspect may be stored in whole or in part on a storage medium packaged with the processor, or may be stored in whole or in part on a memory not packaged with the processor. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] FIG1 is a schematic diagram of the division of storage areas used in the prior art;
[0028] FIG2 is a schematic diagram of a system setting providing an uninstallation entry in the prior art;
[0029] FIG3 is a schematic diagram of an application market providing an uninstall entrance in the prior art;
[0030] FIG4 is a schematic diagram of an entry for clearing application data in the prior art;
[0031] FIG5 is a schematic diagram of the structure of a terminal device provided in one embodiment of the present application;
[0032] FIG6 is a schematic diagram of an interface for triggering the addition of an album lock according to an embodiment of the present application;
[0033] FIG7 is a schematic diagram of an interface of a disclaimer prompt for an album lock provided in one embodiment of the present application;
[0034] Figures 8(a) to 8(c) are schematic diagrams of interfaces for setting a password for an album lock according to an embodiment of the present application;
[0035] Figures 9(a) to 9(b) are schematic diagrams of interfaces for associated biometric identification according to one embodiment of the present application;
[0036] FIG10 is a comparative schematic diagram of a shielded unloading entrance provided by an embodiment of the present application;
[0037] FIG11 is a flowchart of a method for storing pictures provided in one embodiment of the present application;
[0038] FIG12 is a schematic diagram of an interface in which an operation entry for clearing a storage area is blocked according to an embodiment of the present application;
[0039] FIG13 is a schematic diagram of changing a data deletion entry into a prompt interface according to an embodiment of the present application;
[0040] FIG14 is a flowchart of a method for storing pictures provided in another embodiment of the present application;
[0041] Figures 15(a) to 15(b) are schematic diagrams of interfaces for unlocking a target album according to one embodiment of the present application;
[0042] FIG16 is a flowchart of a method for storing pictures according to another embodiment of the present application;
[0043] FIG17 is a flowchart of a method for storing pictures provided in yet another embodiment of the present application;
[0044] FIG18 is a flowchart of a method for storing pictures according to another embodiment of the present application;
[0045] FIG19 is a schematic diagram of an interface for closing and opening an album lock provided by an embodiment of the present application;
[0046] FIG20 is a schematic diagram of an interface for removing an album lock provided in one embodiment of the present application;
[0047] FIG21 is a schematic structural diagram of a terminal device provided in another embodiment of the present application;
[0048] FIG22 is a schematic structural diagram of a terminal device provided in yet another embodiment of the present application. DETAILED DESCRIPTION
[0049] The terms used in the implementation section of this application are only used to explain the specific embodiments of this application and are not intended to limit this application.
[0050] Regarding the issue of how to handle the privacy of photos, one solution provided by existing related technologies is to encrypt the pictures using encryption. However, this method has the risk of pictures being deleted, and encrypting or decrypting pictures requires CPU computing power and is time-consuming.
[0051] As for the solution provided by the existing related technology, which uses the internal storage area mechanism to encrypt and store pictures, specifically, on the current mobile phone system, the system divides the application storage area into an application external storage area, an external public directory storage area and an application internal storage area, as shown in Figure 1. Figure 1 is a schematic diagram of the division of the storage area of the application in the existing related technology.
[0052] As for the application external storage area in FIG1 , any application can access it, while as for the application internal storage area, each application can and can only access its own internal storage area.
[0053] After an application stores the images in the locked album in its internal storage, other applications cannot access them. However, from the operating system's perspective, this solution has the following disadvantages:
[0054] Disadvantage 1: Internal storage data can be deleted through uninstallation. The operating system provides an uninstallation entry in the system settings or other settings, and the user can uninstall the application installed on the current mobile phone from this entry, as shown in Figures 2 and 3. Figure 2 is a schematic diagram of the system settings providing an uninstallation entry in the existing related art, and Figure 3 is a schematic diagram of the application market providing an uninstallation entry in the existing related art.
[0055] The user can uninstall the application through the uninstallation entrance shown in Figures 2 and 3. After the application is uninstalled, the operating system will clear the data in the internal storage area of the application, so that the pictures in the locked album will be deleted.
[0056] Disadvantage 2. Users can delete images in locked albums by clearing the application data. The operating system provides an entry for clearing image data in the settings. As shown in Figure 4, Figure 4 is a schematic diagram of the entry for clearing application data in the existing related art.
[0057] The system's gallery and media library can be cleared of internal data using the Delete Data button in Figure 4. Due to the specific nature of these applications, which contain a lot of system data and require recovery measures if errors occur, the operating system considers this entry for deleting data to be retained.
[0058] In summary, in the above two shortcomings, users can bypass the locked album entrance and directly delete the pictures in the locked album.
[0059] To address the above issues, embodiments of the present application provide a method for storing images that enables locked image storage. This method does not utilize an encryption algorithm, and neither encryption nor decryption, nor any additional computation, is required during image storage. Furthermore, embodiments of the present application ensure that users can access locked images, add, delete, and / or modify images only through the locked album entry in the gallery.
[0060] The embodiment of the present application makes full use of the resources of the operating system and proposes a new implementation method, which can retain the locked album of the gallery after the gallery application is uninstalled, and can also retain the locked album of the gallery when the user clears the gallery data.
[0061] The image storage method provided in the embodiments of the present application can be applied to terminal devices, wherein the above-mentioned terminal devices can be smart phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, laptop computers, ultra-mobile personal computers (UMPCs), netbooks or personal digital assistants (PDAs) and other devices; the embodiments of the present application do not impose any restrictions on the specific type of terminal devices.
[0062] For example, Figure 5 is a structural diagram of a terminal device provided by an embodiment of the present application. As shown in Figure 5, the terminal device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0063] It should be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the terminal device 100. In other embodiments of the present application, the terminal device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0064] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.
[0065] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
[0066] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.
[0067] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.
[0068] The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (DCL). In some embodiments, the processor 110 may include multiple I2C busses. The processor 110 may be coupled to the touch sensor 180K, charger, flash, camera 193, etc. via different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 180K via the I2C interface, enabling communication between the processor 110 and the touch sensor 180K via the I2C bus interface, thereby implementing the touch function of the terminal device 100.
[0069] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the I2S interface, enabling the function of answering calls through a Bluetooth headset.
[0070] The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface, enabling the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
[0071] The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the UART interface, enabling the function of playing music through Bluetooth headphones.
[0072] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display screen 194 and the camera 193. MIPI interfaces include the camera serial interface (CSI) and the display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the camera function of the terminal device 100. The processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the terminal device 100.
[0073] The GPIO interface can be configured via software. The GPIO interface can be configured as either a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to the camera 193, display 194, wireless communication module 160, audio module 170, sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0074] The USB interface 130 is an interface that complies with USB standards and specifications, and may be a Mini USB interface, a Micro USB interface, a USB Type-C interface, or the like. The USB interface 130 can be used to connect a charger to charge the terminal device 100, or to transfer data between the terminal device 100 and peripheral devices. It can also be used to connect headphones to play audio. This interface can also be used to connect other electronic devices, such as AR devices.
[0075] It is understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is merely an illustrative illustration and does not constitute a structural limitation on the terminal device 100. In other embodiments of the present application, the terminal device 100 may also adopt a different interface connection method from the above embodiments, or a combination of multiple interface connection methods.
[0076] The charging management module 140 is configured to receive charging input from a charger. The charger can be either a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 can receive wireless charging input via the wireless charging coil of the terminal device 100. While charging the battery 142, the charging management module 140 can also provide power to the terminal device 100 via the power management module 141.
[0077] 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 provides power to the processor 110, the internal memory 121, the display 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage, impedance). In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.
[0078] 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.
[0079] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in terminal device 100 can 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 local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.
[0080] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the terminal device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0081] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted 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. After being processed by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.
[0082] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the terminal device 100. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0083] In some embodiments, 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), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).
[0084] The terminal device 100 implements display functions through a GPU, display screen 194, and an application processor. The GPU is a microprocessor for image processing that connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.
[0085] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-oLed, or a quantum dot light-emitting diode (QLED). In some embodiments, terminal device 100 may include one or N display screens 194, where N is a positive integer greater than 1.
[0086] The terminal device 100 can realize the shooting function through the ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0087] The ISP processes data fed back by camera 193. For example, when taking a photo, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, which is then passed to the ISP for processing and converted into a visible image. The ISP can also perform algorithmic optimization on image noise, brightness, and skin tone. It can also optimize parameters such as exposure and color temperature of the captured scene. In some embodiments, the ISP can be located within camera 193.
[0088] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then passes the electrical signal to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the terminal device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0089] The digital signal processor is used to process digital signals. In addition to processing digital image signals, it 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.
[0090] Video codecs are used to compress or decompress digital video. Terminal device 100 may support one or more video codecs. This allows terminal device 100 to play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, and MPEG4.
[0091] The NPU is a neural network (NN) computing processor. Drawing on the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it rapidly processes input information and can continuously self-learn. The NPU can enable intelligent cognitive applications in the terminal device 100, such as image recognition, face recognition, speech recognition, and text comprehension.
[0092] 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 via the external memory interface 120 to implement data storage functions. For example, files such as music and videos can be stored on the external memory card.
[0093] The internal memory 121 can 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. Among them, the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area can store data created during the use of the terminal device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the terminal device 100 by running instructions stored in the internal memory 121 and / or instructions stored in a memory provided in the processor.
[0094] The terminal device 100 can implement audio functions such as music playback and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0095] 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. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be provided in the processor 110, or some functional modules of the audio module 170 can be provided in the processor 110.
[0096] The speaker 170A, also called a "speaker", is used to convert audio electrical signals into sound signals. The terminal device 100 can listen to music or listen to hands-free calls through the speaker 170A.
[0097] The receiver 170B, also called a "handset", is used to convert audio electrical signals into sound signals. When the terminal device 100 receives a call or voice message, the user can hear the voice by placing the receiver 170B close to the ear.
[0098] Microphone 170C, also known as "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 by putting their mouth close to the microphone 170C to input the sound signal into the microphone 170C. The terminal device 100 can be provided with at least one microphone 170C. In other embodiments, the terminal device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the terminal device 100 can also be provided with three, four or more microphones 170C to realize sound signal collection, noise reduction, and can also identify the source of sound, realize directional recording function, etc.
[0099] The headphone jack 170D is used to connect a wired headphone and can be the USB interface 130 or a 3.5mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0100] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180A can be located on display screen 194. There are many types of pressure sensors 180A, such as resistive, inductive, and capacitive. A capacitive pressure sensor can include at least two parallel plates made of conductive material. When force is applied to pressure sensor 180A, the capacitance between the electrodes changes. Terminal device 100 determines the intensity of the pressure based on this change in capacitance. When a touch operation is applied to display screen 194, terminal device 100 detects the intensity of the touch operation based on pressure sensor 180A. Terminal device 100 can also calculate the location of the touch based on the detection signal from pressure sensor 180A. In some embodiments, touch operations applied to the same touch location but with different touch operation intensities can correspond to different operation instructions. For example, when a touch operation with an intensity less than a first pressure threshold is applied to a short message application icon, an instruction to view short messages is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to a short message application icon, an instruction to create a new short message is executed.
[0101] The gyroscope sensor 180B can be used to determine the motion posture of the terminal device 100. In some embodiments, the angular velocity of the terminal device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for shooting anti-shake. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the terminal device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the terminal device 100 through reverse movement to achieve anti-shake. The gyroscope sensor 180B can also be used for navigation and somatosensory game scenes.
[0102] The 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 in positioning and navigation.
[0103] The magnetic sensor 180D includes a Hall effect sensor. The terminal device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip case. In some embodiments, when the terminal device 100 is a flip phone, the terminal device 100 can detect the opening and closing of the flip cover based on the magnetic sensor 180D. Furthermore, based on the detected opening and closing status of the case or flip cover, features such as automatic unlocking of the flip cover can be configured.
[0104] Accelerometer 180E can detect the magnitude of acceleration of the terminal device 100 in all directions (generally three axes). When the terminal device 100 is stationary, it can detect the magnitude and direction of gravity. It can also be used to identify the electronic device's posture, enabling applications such as switching between landscape and portrait modes and pedometers.
[0105] The distance sensor 180F is used to measure distance. The terminal device 100 can measure distance using 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.
[0106] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The terminal device 100 emits infrared light outward through the light emitting diode. The terminal device 100 uses a photodiode to detect infrared reflected light from nearby objects. 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 can 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 to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode and pocket mode to automatically unlock and lock the screen.
[0107] Ambient light sensor 180L is used to sense ambient light brightness. Terminal device 100 can adaptively adjust the brightness of display screen 194 based on the perceived ambient light. Ambient light sensor 180L can also be used to automatically adjust white balance when taking photos. Ambient light sensor 180L can also work with proximity light sensor 180G to detect whether terminal device 100 is in a pocket to prevent accidental touches.
[0108] The fingerprint sensor 180H is used to collect fingerprints. The terminal device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.
[0109] The temperature sensor 180J is used to detect temperature. In some embodiments, the terminal device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the terminal device 100 reduces the performance of the processor located near the temperature sensor 180J 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 prevent the terminal device 100 from shutting down abnormally due to low temperature. In other embodiments, when the temperature is lower than another threshold, the terminal device 100 boosts the output voltage of the battery 142 to prevent abnormal shutdown due to low temperature.
[0110] The touch sensor 180K is also called a "touch control device." The touch sensor 180K can be provided on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen." The touch sensor 180K is used to detect touch operations applied thereto or in the vicinity thereof. The touch sensor can transmit the detected touch operations to the application processor to determine the type of touch event. Visual output related to the touch operations can be provided via the display screen 194. In other embodiments, the touch sensor 180K can also be provided on the surface of the terminal device 100, at a location different from that of the display screen 194.
[0111] The bone conduction sensor 180M can obtain vibration signals. In some embodiments, the bone conduction sensor 180M can obtain vibration signals from the vibrating bones of the human body. The bone conduction sensor 180M can also contact the human pulse to receive blood pressure pulse signals. In some embodiments, the bone conduction sensor 180M can also be set in headphones to form bone conduction headphones. The audio module 170 can parse out voice signals based on the vibration signals of the vibrating bones of the human body obtained by the bone conduction sensor 180M to implement voice functions. The application processor can parse heart rate information based on the blood pressure pulse signals obtained by the bone conduction sensor 180M to implement heart rate detection functions.
[0112] The buttons 190 include a power button, a volume button, etc. The buttons 190 may be mechanical buttons or touch buttons. The terminal device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the terminal device 100.
[0113] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
[0114] The indicator 192 may be an indicator light, which may be used to indicate the charging status, power level changes, messages, missed calls, notifications, etc.
[0115] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to and disconnected from the terminal device 100 by inserting or removing it from the SIM card interface 195. The terminal device 100 can support one or N SIM card interfaces, where N is a positive integer greater than one. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 simultaneously. The multiple cards can be of the same or different types. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be 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. In some embodiments, the terminal device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the terminal device 100 and cannot be separated from the terminal device 100.
[0116] The software system of the terminal device 100 can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present application, the Android system with a layered architecture is used as an example to illustrate the software structure of the terminal device 100.
[0117] For ease of understanding, the following embodiments of this application will take a terminal device having the structure shown in Figure 5 as an example, and combine the accompanying drawings and application scenarios to specifically explain the image storage method provided in the embodiments of this application.
[0118] First, the process of users adding album locks is introduced.
[0119] When a user browses an album in the gallery, he can add an album lock to the album by clicking the menu, as shown in Figure 6, which 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 will pop up, as shown in Figure 7, which is a schematic diagram of the interface for the disclaimer of the album lock provided by an embodiment of the present application.
[0120] In the interface shown in Figure 7, if the user clicks "Continue", the terminal device 100 can obtain the user's confirmation indication, and then the terminal device 100 can display the interface for entering the password. After obtaining the password entered by the user, the operation of adding an album lock to the album is completed, as shown in Figures 8(a) to 8(c). Figures 8(a) to 8(c) are schematic diagrams of the interface for setting the album lock password provided in an embodiment of the present application.
[0121] When a user adds an album lock, the gallery detects that the system has facial recognition or fingerprint recognition. After the user completes adding the password lock, a pop-up window will automatically prompt the user to associate the biometrics, as shown in Figures 9(a) and 9(b). Figures 9(a) and 9(b) are schematic diagrams of the biometric association interface provided in one embodiment of the present application. After associating the biometrics, the user will not be prompted again when opening the album subsequently.
[0122] After the gallery adds a lock to the album, you can call the interface between the gallery and the system application corresponding to the album lock 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 to meet the confidentiality and security requirements of the locked album.
[0123] The following describes the three storage areas where applications can place content on the operating system. See Figure 1. The storage areas that applications can use on the operating system are divided into:
[0124] External: Application external storage area and external public directory;
[0125] Internal: App internal storage area.
[0126] Any application can access external storage, which doesn't meet security requirements. Current operating systems control internal storage through file system-level permissions, limiting access to only the application itself. However, due to operating system design, when a user uninstalls an application, the system clears the corresponding application's internal storage.
[0127] In this embodiment of the present application, a new application (i.e., the application corresponding to the album lock) is added to the operating system, and its permissions are set to system applications. Users cannot uninstall the application through the operating system's uninstall portal. Furthermore, the application does not release updates on the app market, and users cannot find the uninstall portal to clear the application's internal storage data by uninstalling newly installed applications from the app market.
[0128] Below is a comparison diagram, as shown in Figure 10. As can be seen from Figure 10, the Gallery app is not a system application, so there is an uninstall entry in the Application Manager. However, the Media Storage app is a system application, so there is no uninstall entry in the Application Manager. Therefore, the user cannot uninstall the Media Storage app, nor can they clear the corresponding internal storage area. Figure 10 is a comparative diagram of a blocked uninstall entry, provided by one embodiment of the present application.
[0129] In addition, in the embodiment of the present application, an inter-process communication interface is added between the gallery and the newly added system application.
[0130] The following describes the image storage method provided in the embodiment of the present application in conjunction with Figures 6 to 10.
[0131] FIG11 is a flowchart of a method for storing pictures provided in one embodiment of the present application. As shown in FIG11 , the method for storing pictures may include:
[0132] Step 1101: Detecting a first triggering operation of a user adding an album lock to a target album.
[0133] The target album is stored in the first internal storage area corresponding to the gallery.
[0134] Specifically, the above-mentioned first trigger operation can be an operation such as the user clicking, long pressing or double-clicking the "Add Album Lock" icon. This embodiment does not limit the operation form of the above-mentioned first trigger operation. For example, referring to Figure 6, when the user browses the target album in the gallery, he can add an album lock to the target album by clicking the "Add Album Lock" icon in the menu.
[0135] Step 1102: In response to the first trigger operation, an album lock is added to the target album, and a system application corresponding to the album lock is started.
[0136] Step 1103: Send the names of the pictures in the target album to the system application through the file opening interface between the gallery and the system application.
[0137] Step 1104: If the second internal storage area corresponding to the above-mentioned system application does not include the image file corresponding to the above-mentioned image name, then create the above-mentioned image file in the second internal storage area, obtain the first file descriptor of the above-mentioned image file, and return the first file descriptor of the above-mentioned image file to the gallery.
[0138] Step 1105: Obtain the image content written by the image library to the second internal storage area according to the first file descriptor.
[0139] Specifically, after obtaining the first file descriptor, the image library can write the image content into the second internal storage area through the first file descriptor.
[0140] Step 1106: close the file opening interface and save the image content in the second internal storage area.
[0141] Specifically, after each picture is written, the file opening interface needs to be closed once, and then the picture content is saved. Then, steps 1103 to 1106 can be re-executed to continue saving the picture.
[0142] In the above-mentioned picture storage method, the terminal device 100 detects the first trigger operation of the user to add an album lock to the target album. In response to the first trigger operation, the terminal device 100 adds an album lock to the target album and starts the system application corresponding to the album lock. Then, through the file opening interface between the gallery and the system application, the name of the picture in the target 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 above-mentioned picture name, the picture file is created in the second internal storage area, the first file descriptor of the picture file is obtained, and the first file descriptor of the picture file is returned to the gallery. Finally, the picture content written by the gallery to the second internal storage area according to the first file descriptor is obtained, the file opening interface is closed, and the picture content is saved in the second internal storage area. In this way, the terminal device 100 can realize locked storage of the picture without the need for encryption and decryption, and without the need for additional calculation. Even if the user clears the gallery data, only the first internal storage area corresponding to the gallery is cleared. Since the picture content is also saved in the second internal storage area corresponding to the system application, the locked and stored pictures are still retained in the terminal device 100.
[0143] In the terminal device 100, the operating system provides a storage area clearing operation entry for each application. The user uses this operation entry to clear all data stored in the application's external and internal storage areas. In the embodiment of the present application, the storage area clearing entry of the system application corresponding to the album lock is invisible to the user. Specifically, the system application corresponding to the album lock can prevent the user from clearing its storage area data in two ways, thereby ensuring the data security of the locked album.
[0144] Method 1: The system application can apply for system permissions to block the operation entry for cleaning the storage area, and the user cannot click it, just like the system settings application, as shown in Figure 12. Figure 12 is a schematic diagram of the interface in which the operation entry for cleaning the storage area is blocked provided by an embodiment of the present application. It can be seen from Figure 12 that the operation entry for cleaning the storage area of the settings application is blocked, and the user cannot click it. Therefore, the system application of the album lock can use the same method as the settings application to block the operation entry for cleaning the storage area.
[0145] Method 2: The system application can use the configuration entry provided by the system to change the above deletion data entry into a prompt interface. As shown in Figure 13, the system's original "Delete Data" text is replaced with "Manage Space" or other prompt text. If the user clicks this button, a pop-up window can be displayed to remind the user that the data cannot be deleted. Figure 13 is a schematic diagram of changing the deletion data entry into a prompt interface provided by an embodiment of the present application.
[0146] FIG14 is a flow chart of a method for storing pictures according to another embodiment of the present application. As shown in FIG14 , in the embodiment shown in FIG11 of the present application, after step 1106, the following steps may also be included:
[0147] Step 1401: Detecting a second triggering operation in which the user unlocks the target album.
[0148] Step 1402: In response to the second triggering operation, obtain unlocking information input by the user.
[0149] Among them, the above unlocking information can be the password set by the user when adding an album lock to the target album, or it can be the biometric information associated when the user adds an album lock to the target album, such as: face recognition or fingerprint recognition, etc. This embodiment does not limit the specific form of the above unlocking information.
[0150] Specifically, taking the target album as a hidden album as an example, when the user accesses the locked target album, the terminal device 100 first displays the interface shown in Figure 15(a). The interface shown in Figure 15(a) displays the prompt message "Hidden album is locked". At this time, the user can click the "Unlock" icon in the interface shown in Figure 15(a). The user's operation of clicking the "Unlock" icon is the second trigger operation. After detecting the second trigger operation of the user unlocking the target album, the terminal device 100 can display the interface shown in Figure 15(b). The user can then enter the unlock information in the interface shown in Figure 15(b). The terminal device 100 obtains the unlock information entered by the user. In Figure 15(b), the unlock information is a password. Figures 15(a) to 15(b) are schematic diagrams of the interface for unlocking the target album provided in an embodiment of the present application.
[0151] Step 1403: After determining that the unlocking information passes the security check, obtain the names of the pictures included in the target album according to the identifier of the target album.
[0152] Step 1404: pass the name of the picture to be viewed to the system application through the file opening interface.
[0153] Step 1405 : After the system application opens the image file to be viewed according to the name of the image to be viewed, a second file descriptor of the image file to be viewed returned by the system application is obtained.
[0154] Specifically, after receiving the name of the picture to be viewed, the system application can find the corresponding picture file according to the name of the picture to be viewed, and then open the picture file to be viewed, and return the second file descriptor of the picture file to be viewed to the gallery.
[0155] Step 1406: Read and display the above-mentioned picture content to be viewed through the picture library according to the second file descriptor.
[0156] Specifically, after the image library obtains the second file descriptor, it can read the image content according to the second file descriptor and display it.
[0157] There are two ways to modify pictures in the target album:
[0158] 1) Modify the image content, such as entering editing mode, adding graffiti or watermarking;
[0159] 2) Modify the image file information, such as changing the file name.
[0160] Among them, the modification of the image content is the same as accessing the image. The image library can modify the image content of the system application according to the received second file descriptor. As shown in Figure 16, Figure 16 is a flowchart of the image storage method provided by another embodiment of the present application. In the embodiment shown in Figure 14 of the present application, after step 1403, the following may also be included:
[0161] Step 1601: pass the picture name of the picture content to be modified to the system application through the file opening interface.
[0162] Step 1602: 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 third file descriptor of the image file of the image content to be modified returned by the system application is obtained.
[0163] Step 1603: Read and display the image content to be modified through the image library according to the third file descriptor.
[0164] Step 1604: Modify the image content to be modified through the image library.
[0165] Step 1605: Save the modified image content to the second internal storage area through the image library according to the third file descriptor.
[0166] Modifications to image information, such as changing the file name, do not require file descriptors. An inter-process communication interface can be added to the system application side corresponding to the album lock to modify image file information. The gallery calls this interface and sends the modified image information to the system application side. The system application finds the image based on the image name and replaces the information to complete the file information modification, as shown in Figure 17. Figure 17 is a flowchart of a method for storing images provided in another embodiment of the present application. In the embodiment shown in Figure 14 of the present application, after step 1403, the following steps may also be included:
[0167] Step 1701: Obtain the picture name of the picture file information to be modified through the picture library.
[0168] Step 1702: Modify the above-mentioned image file information to be modified through the image library.
[0169] Step 1703: The picture name of the picture file information to be modified and the modified picture file information are passed to the system application through the picture information modification interface between the picture library and the above-mentioned system application, so that the system application can find the picture file corresponding to the picture name of the above-mentioned picture file information to be modified, and then replace the file information of the found picture file with the above-mentioned modified picture file information.
[0170] In an embodiment of the present application, the user can delete pictures in the locked album in the album browsing interface. The terminal device 100 provides a multi-select interactive interface on the album browsing interface of the gallery. The user 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 flowchart of the 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, it can also include:
[0171] Step 1801: Obtain the name of the picture to be deleted from the picture library.
[0172] Step 1802: The name of the picture to be deleted is passed to the system application through the picture deletion interface between the picture library and the system application, so that the system application can delete the picture file corresponding to the picture name to be deleted.
[0173] In an embodiment of the present application, referring to FIG19 , a user accesses a locked album and, after completing operations such as browsing, saving, and / or modifying an image, can click the return button 1901 to exit the locked album. Alternatively, the user can click the lock button 1902 to return to the locked interface. FIG19 is a schematic diagram of the interface for closing and opening the album lock, provided in one embodiment of the present application.
[0174] In an embodiment of the present application, the user can remove the album lock after the locked album is opened, and restore the album to a normal album. When removing, a small pop-up window will be displayed. After the album lock is removed, all navigation bar lock-related menus disappear and become invisible. That is to say, as shown in Figure 20, in the embodiment shown in Figure 11 of the present application, after step 1102, the terminal device 100 can also detect the third trigger operation of the user removing the album lock of the above-mentioned target album, respond to the above-mentioned third trigger operation, obtain the unlocking information input by the user, and remove the album lock for the above-mentioned target album after determining that the above-mentioned unlocking information passes the security check. Figure 20 is a schematic diagram of the interface for removing the album lock provided in an embodiment of the present application.
[0175] The embodiment of the present application provides a lock menu in the album interface of the gallery. After the user clicks the lock menu, the terminal device 100 performs a lock operation on the current album.
[0176] First, the user is prompted to enter a password and complete two input verifications. At the same time, depending on the hardware conditions of the terminal device 100, the user can be prompted to associate fingerprint recognition or facial recognition.
[0177] The gallery then transfers the photos in the current album to the internal storage area of the system app corresponding to the album lock. Because this system app cannot be uninstalled, users cannot clear the data in its internal storage area by clicking the uninstall button. Furthermore, the system app blocks the system storage cleanup entry, preventing users from clearing the data of the system app by clicking the cleanup button.
[0178] Through the above operations, the terminal device 100 can transfer the pictures in the locked album to a safe location through the gallery. The user can and can only access, modify and / or delete the pictures in the locked album through the locked album entrance of the gallery.
[0179] In addition, the image storage method provided by the embodiment of the present application can lock any album. At the same time, the embodiment of the present application does not use encryption and decryption algorithms, and does not require encryption and decryption of images to ensure the information security of the images. In this way, the device does not need to perform a large amount of calculations to encrypt and decrypt images, which reduces the cost of the terminal device 100 and also reduces the time required for users to access images. For images, there is no need to worry about the encryption and decryption algorithm being cracked, resulting in information leakage. At the same time, there is no need to worry about the user not being able to see the image but being able to delete the image, resulting in information loss.
[0180] At the same time, the embodiment of the present application can block users from clearing data by uninstalling updates, and also blocks users from directly clearing the entrance to the storage area, ensuring that users can and can only access pictures through the locked album entrance.
[0181] In addition, the method provided in the embodiment of the present application can also be used in any other application. In addition to being used to store locked photo albums, it can also be used to store safe data or store private data of any application.
[0182] It is understood that some or all of the steps or operations in the above embodiments are merely examples, and the present application embodiments may also perform other operations or variations of various operations. In addition, the various steps may be performed in a different order than those presented in the above embodiments, and it is possible that not all of the operations in the above embodiments need to be performed.
[0183] It is understandable that, in order to implement the above functions, the terminal device includes hardware and / or software modules that perform the corresponding functions. In combination with the algorithm steps of each example described in the embodiments disclosed in this application, this application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving 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 for each specific application in combination with the embodiments, but such implementation should not be considered to be beyond the scope of this application.
[0184] This embodiment can divide the terminal device into functional modules based on the above method embodiment. For example, each functional module can be divided according to its function, or two or more functions can be integrated into a single module. The above integrated modules can be implemented in the form of hardware. It should be noted that the module division in this embodiment is illustrative and only represents a logical functional division. In actual implementation, other division methods may be used.
[0185] FIG21 is a schematic diagram of the structure of a terminal device provided in another embodiment of the present application. In the case where each functional module is divided according to each function, FIG21 shows a possible schematic diagram of the composition of a terminal device 2100 involved in the above embodiment. As shown in FIG21 , the terminal device 2100 may include: a detection module 2101, an adding module 2102, a starting module 2103, a transmission module 2104, an acquisition module 2105, and a storage module 2106.
[0186] The detection module 2101 is configured to detect 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;
[0187] Adding module 2102, configured to add an album lock to the target album in response to the first triggering operation;
[0188] The startup module 2103 is used to start the system application corresponding to the album lock;
[0189] The transmission module 2104 is used to send the names of the pictures in the target album to the system application through the file opening interface between the gallery and the system application;
[0190] An acquisition module 2105 is configured to create the 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 acquire a first file descriptor of the image file;
[0191] The transmission module 2104 is further configured to return the first file descriptor of the image file to the image library;
[0192] The acquisition module 2105 is further configured to acquire the image content written by the image library to the second internal storage area according to the first file descriptor;
[0193] The saving module 2106 is used to close the above file opening interface and save the image content in the second internal storage area.
[0194] It should be noted that all relevant contents of each step involved in the method embodiment shown in Figure 11 of this application can be referred to the functional description of the corresponding functional module and will not be repeated here.
[0195] The terminal device 2100 provided in this embodiment is used to execute the image storage method provided in the embodiment shown in Figure 11 of this application, and thus can achieve the same effect as the above method.
[0196] FIG22 is a schematic diagram of the structure of a terminal device provided in yet another embodiment of the present application. Compared with the terminal device shown in FIG21 , the difference is that, in this embodiment, the terminal device 2100 may further include: a display module 2107;
[0197] The detection module 2101 is further configured to detect a second triggering operation of the user unlocking the target album after the saving module 2106 saves the image content in the second internal storage area;
[0198] The acquisition module 2105 is further configured to, in response to the second trigger operation, acquire the unlock information input by the user; and after determining that the unlock information passes the security check, acquire the names of the pictures included in the target album according to the identifier of the target album;
[0199] The transmission module 2104 is used to transmit the name of the picture to be viewed to the system application through the above file opening interface;
[0200] The acquisition module 2105 is further configured to acquire a 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;
[0201] The display module 2107 is configured to read and display the above-mentioned picture content to be viewed through the picture library according to the second file descriptor.
[0202] In addition, the terminal device 2100 may further include: a modification module 2108;
[0203] The transmission module 2104 is further configured to transmit the name of the picture to be modified to the system application through the file opening interface after the acquisition module 2105 acquires the name of the picture included in the target album;
[0204] The acquisition module 2105 is further configured to acquire a 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;
[0205] Display module 2107, configured to read and display the image content to be modified through the image library according to the third file descriptor;
[0206] Modification module 2108, used to modify the content of the picture to be modified through the picture library;
[0207] The saving module 2106 is used to save the modified image content to the second internal storage area according to the third file descriptor.
[0208] Furthermore, the acquisition module 2105 is further configured to acquire the name of the picture file to be modified through the picture library after acquiring the name of the picture included in the target album;
[0209] A modification module 2108 is used to modify the image file information to be modified through the image library;
[0210] The transmission module 2104 is used to pass the picture name of the picture file information to be modified and the modified picture file information to the system application through the picture information modification interface between the picture library and the system application, so that the system application can find the picture file corresponding to the picture name of the above-mentioned picture file information to be modified, and then replace the file information of the found picture file with the modified picture file information.
[0211] In addition, the acquisition module 2105 is further configured to acquire the names of the pictures to be deleted from the gallery after acquiring the names of the pictures included in the target album;
[0212] The transmission module 2104 is further configured to transmit the name of the image to be deleted to the system application via the image deletion interface between the image library and the system application, so that the system application can delete the image file corresponding to the image name to be deleted.
[0213] Furthermore, the terminal device 2100 may further include: a removal module 2109;
[0214] The detection module 2101 is further configured to detect a third triggering operation of a user removing the album lock of a target album after the adding module 2102 adds an album lock to the target album;
[0215] The acquisition module 2105 is further configured to acquire unlocking information input by the user in response to a third trigger operation;
[0216] The removal module 2109 is configured to remove the album lock for the target album after determining that the unlocking information has passed the security check.
[0217] In this embodiment, the entry to the cleanup storage area of the system application is in a state that is invisible to the user.
[0218] It should be noted that all relevant contents of each step involved in the method embodiments shown in Figures 11 to 20 of the present application can be referred to the functional description of the corresponding functional modules and will not be repeated here.
[0219] The terminal device 2100 provided in this embodiment is used to execute the image storage method provided in the embodiments shown in Figures 11 to 20 of this application, and thus can achieve the same effect as the above method.
[0220] It should be understood that the terminal device 2100 may correspond to the terminal device 100 shown in FIG5 . The functions of the detection module 2101 to the saving module 2106 and the modification module 2108 to the removal module 2109 may be implemented by the processor 110 in the terminal device 100 shown in FIG5 ; the function of the display module 2107 may be implemented by the processor 110 and the display screen 194 in the terminal device 100 shown in FIG5 .
[0221] In the case of adopting an integrated unit, the terminal device 2100 may include a processing module, a storage module, and a communication module.
[0222] The processing module can be used to control and manage the actions of the terminal device 2100. For example, it can be used to support the terminal device 2100 in executing 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 code and data. The communication module can be used to support communication between the terminal device 2100 and other devices.
[0223] Among them, the processing module can be a processor or a controller, which can implement or execute the various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. The 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, and so on. The storage module can be a memory. The communication module can specifically be a device that interacts with other electronic devices, such as a radio frequency circuit, a Bluetooth chip and / or a Wi-Fi chip.
[0224] In one embodiment, when the processing module is a processor and the storage module is a memory, the terminal device 2100 involved in this embodiment may be a device having the structure shown in FIG. 5 .
[0225] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer-readable storage medium is run on a computer, it enables the computer to execute the method provided in the embodiments shown in Figures 11 to 20 of the present application.
[0226] An embodiment of the present application also provides a computer program product, which includes a computer program. When the computer program is run on a computer, it enables the computer to execute the method provided in the embodiments shown in Figures 11 to 20 of the present application.
[0227] In the embodiments of the present application, "at least one" refers to one or more, and "more" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. Among them, A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can represent: 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 or multiple.
[0228] Those skilled in the art will appreciate that the various units and algorithm steps described in the embodiments disclosed herein can be implemented using a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0229] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0230] In the several embodiments provided in this application, if 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. Based on this understanding, the technical solution of this application, or the part that contributes to the prior art, 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 and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of this application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0231] The above description is merely a specific embodiment of the present application. Any person skilled in the art may easily conceive of variations or substitutions within the technical scope disclosed in this application, and such variations or substitutions shall be within the scope of protection of this application. The scope of protection of this application shall be subject to the scope of protection of the claims.
Claims
1. A method for storing pictures, characterized in that: include: Detecting a first trigger 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 trigger operation, adding an album lock to the target album, and starting a system application corresponding to the album lock; Sending the names of the pictures in the target album to the system application through a file opening interface between the gallery and 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, creating the picture file in the second internal storage area, obtaining the first file descriptor of the picture file, and returning the first file descriptor of the picture file to the picture library; Obtaining the picture content written by the picture library to the second internal storage area according to the first file descriptor; The file opening interface is closed, and the picture content is saved in the second internal storage area.
2. The method according to claim 1, characterized in that After closing the file opening interface and saving the picture content in the second internal storage area, the method further includes: Detecting a second trigger operation of the user unlocking the target album; In response to the second trigger operation, acquiring unlocking information input by the user; After determining that the unlocking information passes the security check, obtaining the names of the pictures included in the target album according to the identifier of the target album; Passing 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, obtaining a second file descriptor of the picture file to be viewed returned by the system application; According to the second file descriptor, the image content to be viewed is read and displayed through the image library.
3. The method according to claim 2, characterized in that After obtaining the names of the pictures included in the target album, the method further includes: Passing the name of the picture whose content is to be modified 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, obtaining a third file descriptor of the picture file of the picture 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 image library; Modify the content of the picture to be modified through the picture library; The modified image content is saved to the second internal storage area through the image library according to the third file descriptor.
4. The method according to claim 2, characterized in that: After obtaining the names of the pictures included in the target album, the method further includes: Get the name of the picture to be modified through the picture library; Modify the image file information to be modified through the image library; Through the picture information modification interface between the picture library and the system application, the picture name of the picture file information to be modified and the modified picture file information are 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, the file information of the found picture file is replaced with the modified picture file information.
5. The method according to claim 2, characterized in that: After obtaining the names of the pictures included in the target album, the method further includes: Get the name of the picture to be deleted from the gallery; The name of the picture to be deleted is passed to the system application through the picture deletion interface between the picture library and the system application, so that the system application deletes the picture file corresponding to the name of the picture to be deleted.
6. The method according to claim 1, characterized in that After adding an album lock to the target album, the method further includes: Detecting a third trigger operation in which the user removes the album lock of the target album; In response to the third trigger operation, acquiring unlocking information input by the user; After determining that the unlock information passes the security check, the album lock is removed for the target album.
7. The method according to any one of claims 1 to 6, characterized in that: The cleanup storage area entry of the system application is in a user-invisible state.
8. A storage device for pictures, characterized in that: include: A detection module, used to detect 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; An adding module, configured to add an album lock to the target album in response to the first triggering operation; A startup module, used to start the system application corresponding to the album lock; A transmission module, used to send the names of the pictures in the target album to the system application through a file opening interface between the gallery and the system application; an acquisition module, configured to create the image file in the second internal storage area and acquire a first file descriptor of the image file when the second internal storage area corresponding to the system application does not include the image file corresponding to the image name; The transmission module is further used to return the first file descriptor of the picture file to the picture library; The acquisition module is further used to acquire the picture content written by the picture library to the second internal storage area according to the first file descriptor; A saving module is used to close the file opening interface and save the image content in the second internal storage area.
9. A terminal device, characterized in that: include: one or more processors; Memory; Multiple applications; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, and when the instructions are executed by the terminal device, the terminal device performs the following steps: Detecting a first trigger 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 trigger operation, adding an album lock to the target album, and starting a system application corresponding to the album lock; Sending the names of the pictures in the target album to the system application through a file opening interface between the gallery and 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, creating the picture file in the second internal storage area, obtaining the first file descriptor of the picture file, and returning the first file descriptor of the picture file to the picture library; Obtaining the picture content written by the picture library to the second internal storage area according to the first file descriptor; The file opening interface is closed, and the picture content is saved in the second internal storage area.
10. The terminal device according to claim 9, characterized in that: When the instruction is executed by the terminal device, after the terminal device executes the steps of closing the file opening interface and saving the picture content in the second internal storage area, the terminal device further executes the following steps: Detecting a second trigger operation of the user unlocking the target album; In response to the second trigger operation, acquiring unlocking information input by the user; After determining that the unlocking information passes the security check, obtaining the names of the pictures included in the target album according to the identifier of the target album; Passing 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, obtaining a second file descriptor of the picture file to be viewed returned by the system application; According to the second file descriptor, the image content to be viewed is read and displayed through the image library.
11. The terminal device according to claim 10, characterized in that: When the instruction is executed by the terminal device, after the terminal device executes the step of obtaining the names of the pictures included in the target album, it further executes the following steps: Passing the name of the picture whose content is to be modified 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, obtaining a third file descriptor of the picture file of the picture 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 image library; Modify the content of the picture to be modified through the picture library; The modified image content is saved to the second internal storage area through the image library according to the third file descriptor.
12. The terminal device according to claim 10, characterized in that: When the instruction is executed by the terminal device, after the terminal device executes the step of obtaining the names of the pictures included in the target album, it further executes the following steps: Get the name of the image file to be modified through the image library; Modify the image file information to be modified through the image library; Through the picture information modification interface between the picture library and the system application, the picture name of the picture file information to be modified and the modified picture file information are 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, the file information of the found picture file is replaced with the modified picture file information.
13. The terminal device according to claim 10, characterized in that: When the instruction is executed by the terminal device, after the terminal device executes the step of obtaining the names of the pictures included in the target album, it further executes the following steps: Get the name of the picture to be deleted from the gallery; The name of the picture to be deleted is passed to the system application through the picture deletion interface between the picture library and the system application, so that the system application deletes the picture file corresponding to the name of the picture to be deleted.
14. The terminal device according to claim 9, characterized in that: When the instruction is executed by the terminal device, after the terminal device executes the step of adding an album lock to the target album, it further executes the following steps: Detecting a third trigger operation in which the user removes the album lock of the target album; In response to the third trigger operation, acquiring unlocking information input by the user; After determining that the unlock information passes the security check, the album lock is removed for the target album.
15. The terminal device according to any one of claims 9 to 14, characterized in that: The cleanup storage area entry of the system application is in a user-invisible state.
16. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed on a computer, enables the computer to execute the method according to any one of claims 1 to 7.
