Data masking method, device and computer readable storage medium
By mounting a blank folder to block corrupted folders when data partitioning is abnormal, the problem of devices failing to boot and function properly due to abnormal data partitioning is solved, enabling normal device startup and data backup.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2023-03-21
- Publication Date
- 2026-05-19
AI Technical Summary
Abnormal data partitioning of electronic devices can cause the operating system to fail to start or function properly. For example, corrupted files stored in the data partition or abnormal data from third-party applications can cause the device to repeatedly restart, display a black screen, or crash, making it impossible to boot up normally.
When an abnormal data partition is detected, a blank folder corresponding to the abnormal folder is mounted to a preset directory. The blank folder is used to shield potentially damaged folders, ensuring that the operating system can start normally and backing up user data after startup.
This avoids operating system startup or usability issues caused by abnormal user data, ensures normal device startup and data backup, and prevents permanent loss of user data.
Smart Images

Figure CN118690399B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal technology, and in particular to a data shielding method, apparatus and computer-readable storage medium. Background Technology
[0002] Operating systems for electronic devices, such as Android, perform extensive read and write operations on user data stored in designated data partitions during startup and operation. If these data partitions are faulty—for example, if files stored in the partition are corrupted or third-party application data is corrupted—the operating system may fail to boot properly, causing the electronic device to repeatedly restart and fail to power on. It may also lead to repeated crashes and black screens after the device successfully powers on, rendering it unusable. Summary of the Invention
[0003] In view of this, this application provides a data masking method, apparatus and computer-readable storage medium, which to a certain extent solves the problem of devices becoming unusable due to abnormal data partitioning.
[0004] To achieve the above objectives, in a first aspect, embodiments of this application provide a data masking method applied to an electronic device, the method comprising:
[0005] Upon detecting an anomaly in the first data partition mounted in the first directory, at least one blank folder corresponding to at least one first folder in the first data partition is mounted to at least one second directory. The first data partition supports the electronic device in booting the operating system. The blank folder is created in the second data partition. The at least one second directory is a subdirectory of the first directory that has at least one first folder mounted. The operating system is then booted using the first directory.
[0006] The first directory can be related to user data in the file system, such as the / data directory. The first folder is a folder in the first data partition that is prone to corruption, such as application-related folders like / data / app, / data / app-asec, / data / app-ephemeral, / data / app-lib, / data / app-private, / data / app-staging, and / data / app_acc, and cache-related folders like / data / cache and / data / dalvik-cache. The number and selection of the first folder can be set based on experience.
[0007] Based on the data masking method provided in this application, in the event of an anomaly in the first data partition, a blank folder is mounted in a second directory (i.e., a subdirectory of the first directory) that is mounted on at least one preset first folder. This masks the potentially corrupted first folder mounted in the second directory, thereby ensuring that the electronic device cannot read user data in the first folder during the process of booting the operating system through the first directory. This avoids the problem of the operating system failing to boot or the electronic device failing to function properly after booting due to abnormal user data in the first folder.
[0008] In some embodiments, after detecting that the first data partition mounted in the first directory is in an abnormal state, the method further includes: creating a second data partition, wherein the second data partition is a blank data partition; and creating a folder on the second data partition with the same name as each of the first folders, thereby obtaining at least one blank folder.
[0009] In some embodiments, at least one of the first folders does not include folders related to file encryption and file decryption in the first data partition.
[0010] For example, in an Android system, folders related to file encryption and decryption might include: ` / data / misc` (containing Wi-Fi usernames and passwords), ` / data / system_de` (containing system keys), and ` / data / user_de` (containing user accounts). Typically, data in these folders is unlikely to experience anomalies. Since the first directory only masks data within the first file where anomalies might occur, and no other operations are performed on system configuration folders, including those related to file encryption and decryption, the data masking operation is completely decoupled from the file system's encryption and decryption operations, ensuring they do not interfere with each other. This means that after the operating system successfully boots, regardless of whether the file system's encryption and decryption process is updated, the first directory can access the folders related to file encryption and decryption in the first data partition, thus completing file system encryption and decryption operations, such as supporting authentication during data backup.
[0011] In some embodiments, after the operating system starts successfully, the method further includes: displaying a data backup interface; and backing up user data mounted on the first directory in response to a first operation by the user on the data backup interface.
[0012] In some embodiments, after the operating system has successfully started, the method further includes: displaying a lock screen or a main screen.
[0013] In some embodiments, detecting an anomaly in the first data partition includes determining that the first data partition is anomaly when the number of restarts of the electronic device is greater than a preset number of restarts.
[0014] In some embodiments, detecting anomalies in the first data partition includes:
[0015] When a user-inputted data masking command is detected, the first data partition is determined to be abnormal.
[0016] This addresses scenarios where electronic devices experience a black screen or freeze after startup.
[0017] In a second aspect, embodiments of this application provide an electronic device, including: a memory and a processor, wherein the memory is used to store a computer program; and the processor is used to execute the method described in the first aspect or any embodiment of the first aspect when the computer program is invoked.
[0018] Thirdly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect or any embodiment of the first aspect.
[0019] Fourthly, embodiments of this application provide a computer program product that, when run on an electronic device, causes the electronic device to perform the method described in the first aspect or any embodiment of the first aspect.
[0020] Fifthly, embodiments of this application provide a chip system including a processor coupled to a memory. The processor executes a computer program stored in the memory to implement the method described in the first aspect or any embodiment thereof. The chip system may be a single chip or a chip module consisting of at least one chip.
[0021] It is understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here. Attached Figure Description
[0022] Figure 1 A flowchart illustrating a data masking method provided in an embodiment of this application;
[0023] Figure 2 A schematic diagram of a data backup interface provided in an embodiment of this application;
[0024] Figure 3 This is a schematic diagram of the structure of a data shielding device provided in an embodiment of this application;
[0025] Figure 4This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0026] The embodiments of this application are described below with reference to the accompanying drawings. The terminology used in the implementation section of this application is only for explaining specific embodiments and is not intended to limit the application. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0027] To facilitate understanding of the technical solutions in the embodiments of this application, some terms involved in the embodiments of this application will be explained below:
[0028] Data partition: This refers to a storage area within an electronic device's memory used to store user data. It can be driven and accessed as a block device. User data refers to data created during the use of the electronic device, such as data related to settings, contacts, messages, and third-party applications.
[0029] During the boot process of an electronic device, the data partition can be mounted in a specified directory of the system kernel during the kernel startup phase, based on the mount mechanism. For example, in the Android system, the data partition is mounted in the / data directory, so that the system kernel can access the data partition of the storage through the / data directory and perform read and write operations on the data partition.
[0030] Mounting refers to recognizing a storage partition as a block device and associating it with an existing directory (or folder) in the system kernel, allowing the kernel to access the storage partition through that directory. This directory is the mount point for the storage partition. Based on the mount mechanism, when partition A is mounted on a mount point, the data stored in partition A can be read and written through the mount point. If partition B is subsequently mounted on the same mount point, partition B can be accessed through the mount point, but partition A cannot. This can be understood as the later-mounted partition B overwriting the earlier-mounted partition A on the mount point.
[0031] Data partition anomalies refer to abnormalities in the user data stored in the data partition. For example, an electronic device might experience abnormal power loss or reset during startup, leading to corruption of some files in the data partition; user data might be incompatible with system software; or data from third-party applications installed by the user might be corrupted. Data partition anomalies often cause electronic devices to malfunction. For instance, the operating system might fail to boot properly, resulting in a black screen or the device remaining in a boot state (i.e., continuously displaying the boot animation), or repeatedly restarting but failing to boot. Alternatively, the operating system might boot normally, allowing the electronic device to power on successfully, but the device remains on a lock screen, unable to accept user input to unlock, and thus unable to display the main interface; or the electronic device might unlock normally and display the main interface, but experience black screens, crashes, or frequent restarts during use.
[0032] For data partitioning issues, the problem can usually be resolved by restoring the electronic device to factory settings, formatting it, or updating the operating system. However, this will result in the permanent loss of user data.
[0033] Some proposed solutions involve mounting a blank virtual data partition on the original data partition's mount point during the kernel boot phase, and then mounting the original data partition on a new mount point. After successfully booting the operating system using the virtual data partition, the data in the original data partition is backed up before a factory reset. This supposedly ensures successful operating system boot without data loss. However, this solution is flawed when the system's encryption / decryption process changes. Even if the key is synchronized from the original data partition to the virtual data partition, the electronic device cannot use the key to perform file system encryption / decryption operations, resulting in the device failing to boot and preventing users from backing up their data.
[0034] To address this issue, this application provides a data masking method. This method uses a blank folder to mask a potentially corrupted first folder within a first data partition, and then uses the remaining unmasked folders and the blank folder within the first data partition to boot the operating system. This avoids the problem of electronic devices malfunctioning due to abnormal user data in the first folder.
[0035] The data masking method provided in this application will be described exemplarily below with reference to specific embodiments.
[0036] Figure 1 A flowchart of a data masking method provided in an embodiment of this application is shown below. Figure 1 As shown, the method may include:
[0037] S101, after detecting an anomaly in the first data partition mounted in the first directory, at least one blank folder corresponding to at least one first folder in the first data partition is mounted to at least one second directory. The blank folder is an empty folder created in the second data partition, and the second directory is a subdirectory of the first folder mounted in the first directory.
[0038] The first data partition is the partition that supports the electronic device in booting up and running the operating system, and stores user data. For example, in the Android system, the first data partition can be the data partition, which is the internal storage of the electronic device, such as a partition in random access memory (RAM).
[0039] The first folder is a pre-defined folder in the first data partition. For example, the first folder may be a folder that is easily damaged, determined based on big data statistics.
[0040] In Android systems, statistics show that folders related to third-party applications in the data partition, such as / data / app, / data / app-asec, / data / app-ephemeral, / data / app-lib, / data / app-private, / data / app-staging, and / data / app_acc, as well as folders related to caching in the data partition, such as / data / cache and / data / dalvik-cache, are more likely to experience file corruption and data anomalies. Conversely, folders related to system configuration, such as / data / unencrypted, / data / misc, / data / system, / data / system_de, / data / vendor, / data / media, / data / data, and / data / user_de, have a very low probability of experiencing file corruption and data anomalies. Therefore, in this embodiment, the first folder can be either a folder related to third-party applications or a folder related to caching in the data partition.
[0041] The first directory is the directory accessed by the system kernel during the startup and operation of the operating system, and it is used to mount the first data partition. For example, the first data partition can be a data partition, and the first directory can be the / data directory in the Android system. Once the first data partition is mounted to the first directory, the electronic device can access the user data stored in the first data partition by accessing the first directory.
[0042] Correspondingly, the subdirectories in the first directory used to mount the first folder can be designated as the second directory.
[0043] In some embodiments, the electronic device can determine whether the first data partition is abnormal based on the number of restarts. For example, in scenarios where the electronic device repeatedly restarts during startup or during use, the electronic device can count the number of consecutive automatic restarts. When the number of consecutive automatic restarts exceeds a preset number, the electronic device can determine that the first data partition is abnormal.
[0044] For example, assuming the preset number of restarts is 2, when the electronic device detects the third restart, it can determine that the first data partition is abnormal. That is, during the third restart, the electronic device can perform the first folder blocking operation, that is, after mounting the first data partition to the first directory, the blank folder is mounted to the second directory.
[0045] In some embodiments, for scenarios where an electronic device experiences a black screen, freezes, or crashes, the electronic device can also determine that the first data partition is abnormal based on the data masking command input by the user.
[0046] For example, the data blocking command can be input by the user via a physical button on the electronic device. The physical button can be a combination of one or more of the "Volume +", "Volume -", and "Power" buttons on the electronic device. For instance, taking the "Volume +" button as an example, the operation that triggers the data blocking command could be pressing the "Volume +" button for a preset duration, pressing the "Volume +" button a preset number of times, pressing the "Volume +" and "Volume -" buttons according to a preset alternating pressing rule, pressing the "Volume +" and "Power" buttons according to a preset alternating pressing rule, or pressing the "Volume +", "Power", and "Volume -" buttons according to a preset alternating pressing rule, etc. The specific operation can be set according to actual needs, and this application does not impose any restrictions on it.
[0047] When the electronic device detects a user input command to block, it can restart and perform the blocking operation on the first folder during the restart process.
[0048] In some embodiments, the second data partition can be a pre-created blank data partition, and correspondingly, the blank folder can be a pre-created blank folder within the second data partition. The second data partition can be another partition of RAM. Alternatively, since no data needs to be stored within the second data partition, it can also be a partition on read-only memory (ROM). Of course, if the electronic device also includes an external storage card (e.g., a Micro SD card), the second data partition can also be a partition on the external storage card.
[0049] For example, after an electronic device is powered on, during the system kernel startup phase, the system kernel starts the block device driver to drive the preset partitions in the internal memory. For example, the first data partition corresponds to block device 43, defined by / dev / block / sda43, and the second data partition corresponds to block device 45, defined by / dev / block / sda45.
[0050] After the block device drivers for the first and second data partitions are completed, the file system formats block device 43 corresponding to the first data partition and block device 45 corresponding to the second data partition by calling the format function, obtaining a format corresponding to the file system. The file system first mounts the formatted first data partition to the first directory, and correspondingly, each folder in the first data partition is mounted to a directory with the same name in the first directory.
[0051] Taking the first folder / data / app in the first data partition as an example, the corresponding second directory is the / data / app directory. The mount path associated with the / data / app directory can then be represented as / dev / block / sda43 on / data / app. Electronic devices can access the first data partition defined by block device 43 by accessing the / data / app directory, and read the application data stored in the first folder / data / app.
[0052] Once the electronic device determines that the first data partition is abnormal and completes the mounting of the first data partition, the file system can mount the blank folder with the same name as the first folder in the second data partition to the second directory where the first folder is mounted.
[0053] For example, the second data partition includes an empty folder named / data / app with the same name as the first folder / data / app. The file system mounts the empty folder / data / app to the / data / app directory. At this time, the mount path associated with the / data / app directory changes to / dev / block / sda45 on / data / app. The electronic device can access the second data partition defined by block device 45 by accessing the / data / app directory and read the application data stored in the empty folder / data / app. Since the empty folder / data / app is empty, the electronic device reads empty data from the empty folder / data / app.
[0054] Optionally, the second data partition can also be a virtual data partition temporarily created by the electronic device after determining that the first data partition is abnormal. For example, after the electronic device is powered on, during the system kernel startup phase, the system kernel starts the block device driver to drive the preset partitions in the internal memory. For example, the first data partition is defined as / dev / block / sda43. Then, by calling the formatting function, the block device corresponding to the first data partition is formatted to obtain a format corresponding to the file system. The file system first mounts the formatted first data partition to the first directory, and correspondingly, the various folders in the first data partition are mounted to directories with the same name in the first directory.
[0055] The file system then creates the second data partition by invoking a block device creation operation. For example, a blank second data partition can be created on RAM, on ROM, or, if the electronic device is further expanded with an external storage card, on that card. For instance, the second data partition is defined using / dev / block / sda45.
[0056] After the second data partition is created, the system files format the block device corresponding to the second data partition to obtain a format corresponding to the file system. Then, an empty folder with the same name as each of the first folders is created within the second data partition, resulting in an empty folder corresponding to each of the first folders. Finally, the file system can mount the empty folders created in the second data partition to a second directory with the same name as the empty folder in the first directory.
[0057] Taking the first folder / data / app in the first data partition as an example, the corresponding second directory is the / data / app directory, and the name of the empty folder is / data / app. Before mounting the empty folder / data / app onto the / data / app directory, the mount path associated with the / data / app directory can be represented as / dev / block / sda43 on / data / app. Electronic devices can access the first data partition defined by block device 43 by accessing the / data / app directory and read the application data stored in the first folder / data / app.
[0058] When the empty folder / data / app is mounted to the directory / data / app, the mount path associated with the / data / app directory changes to / dev / block / sda45 on / data / app. The electronic device can then access the second data partition defined by block device 45 by accessing the / data / app directory and read the application data stored in the empty folder / data / app. Because the empty folder / data / app is empty, the electronic device reads empty data from it.
[0059] S102, use the first directory to start the operating system.
[0060] Understandably, if the anomaly in the first data partition is caused by data corruption within one or more of the first folders, mounting an empty folder to the corresponding second directory will mask the corrupted data mounted in the first directory, preventing it from being read. In this case, the user data accessible through the first directory is the unmasked data from the first data partition.
[0061] Since an empty first data partition does not affect the startup and operation of the operating system, by disabling the first folder within the first data partition that might contain abnormal data, the electronic device can successfully boot the operating system based on the remaining folders and the empty folder within the first data partition. In this way, the electronic device can power on and be used normally while retaining the user data in the first data partition.
[0062] In some embodiments, at least one first folder does not include folders related to file encryption and decryption. For example, in an Android system, the / data / misc folder stores Wi-Fi usernames and passwords, the / data / system_de folder stores system keys, and the / data / user_de folder stores user accounts. Typically, data in folders related to file encryption and decryption is unlikely to experience data corruption issues.
[0063] In this example, only the data within the first file, which might be corrupted, is masked in the first directory. No other operations are performed on system configuration folders, including those related to file encryption and decryption. This completely decouples the data masking operation from the file system's encryption and decryption operations, ensuring they do not interfere with each other. That is, after the operating system successfully boots, regardless of whether the file system's encryption and decryption process is updated, the folders related to file encryption and decryption in the first data partition can be accessed through the first directory, thus completing the file system's encryption and decryption operations.
[0064] In some embodiments, after the operating system boots successfully, the electronic device can raise the lock screen interface according to the normal process. After unlocking, the user can manually launch the data backup application to back up the user data mounted in the first directory. For example, clicking the data backup application icon on the desktop of the electronic device will launch the data backup function.
[0065] In some embodiments, users can select the user data to be backed up through the interface provided by the data backup application, or directly back up all user data mounted on the first directory by default. It is understood that since the application data in the first folder mounted on the first directory has been hidden, the data backup application cannot read the application data in the first folder, thus preventing potentially abnormal application data from being backed up.
[0066] The data backup application can back up application data to the electronic device's storage, such as an external memory card. Alternatively, the application data can be backed up to other electronic devices (e.g., a computer) after the electronic device has established a communication connection; this application does not impose any limitations on this.
[0067] After the data backup is complete, the user can choose to format the first data partition to restore it to factory settings, thereby deleting all data stored in the first data partition. Then, the backed-up user data can be restored, allowing the first data partition to store data from all folders except the first folder.
[0068] Optionally, after unlocking the device on the lock screen, users can also directly delete potentially corrupted application data in the first directory through applications such as Phone Manager, File Manager, and Settings.
[0069] In some embodiments, once the operating system has successfully booted, the electronic device can directly enter emergency backup mode. That is, the operating system first launches the data backup application and displays the data backup interface.
[0070] For example, the data backup interface can be as follows: Figure 2 As shown, it includes an "Emergency Backup" button. If the user enters a first operation on the data backup interface, such as clicking the "Emergency Backup" button, the electronic device can respond to the user's first operation on the data backup interface and back up the user data mounted on the first directory.
[0071] Optionally, the data backup interface may also include a "Factory Reset" button. If the user enters a second operation on the data backup interface, such as clicking the "Factory Reset" button, the electronic device can respond to the user's second operation on the data backup interface and directly format the first data partition.
[0072] Optionally, the data backup interface may also include a "Skip" button, etc. If the user enters a third operation on the data backup interface, such as clicking the "Skip" button, the electronic device can respond to the user's third operation on the data backup interface, exit the emergency backup mode, and display the lock screen interface.
[0073] It should be noted that when an electronic device is performing data backup or factory reset, if user authentication is required, the folders related to file encryption and decryption in the first data partition can still be accessed normally through the first directory. Therefore, the electronic device can perform data backup or factory reset normally.
[0074] It is understood that the user interface described in the embodiments of this application is only an example and is not intended to limit this application. In some embodiments, the user interface displayed by the electronic device may include more or fewer interface elements than illustrated to achieve more or fewer functions; each function may also be implemented using other interface elements, or may also be implemented in other user interfaces. This embodiment does not make any special limitations on this.
[0075] Those skilled in the art will understand that the above embodiments are exemplary and not intended to limit this application. Where possible, the execution order of one or more of the above steps can be adjusted, or they can be selectively combined to obtain one or more other embodiments. Those skilled in the art can arbitrarily select and combine the above steps as needed, and all those that do not depart from the essence of this application fall within the protection scope of this application.
[0076] Based on the same concept, as an implementation of the above method, this application provides a data shielding device. This device embodiment corresponds to the aforementioned method embodiment. For ease of reading, this device embodiment will not repeat the details of the aforementioned method embodiment one by one, but it should be clear that the device in this embodiment can correspondingly implement all the contents of the aforementioned method embodiment.
[0077] Figure 3 This is a schematic diagram of the data shielding device provided in the embodiments of this application, such as... Figure 3 As shown, the apparatus provided in this embodiment includes:
[0078] The system comprises a display module 310, an input module 320, a processing module 330, and a communication module 340.
[0079] The display module 310 is used to support the electronic device in performing the interface display operations in the above embodiments and / or other processes used in the technology described herein. The display module may be a touch screen or other hardware or a combination of hardware and software.
[0080] The input module 320 is used to receive user input on the electronic device, such as touch input, voice input, gesture input, key input, etc. The input module is used to support the electronic device in performing the steps of receiving user operations in the above embodiments and / or other processes used in the technology described herein. The input module may be a touch screen or other hardware or a combination of hardware and software.
[0081] The processing module 330 is used to support the electronic device in performing the processing operations in the method steps of the above embodiments and / or other processes used in the technology described herein.
[0082] The communication module 340 is used to support the electronic device in performing operations related to communication processes with other electronic devices as described in the above embodiments and / or other processes for the techniques described herein.
[0083] The device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, so it will not be described again here.
[0084] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0085] Based on the same concept, this application also provides an electronic device, please refer to... Figure 4 , Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0086] Electronic device 100 may include processor 110, external memory interface 120, internal memory 121, universal serial bus (USB) interface 130, charging management module 140, power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity 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.
[0087] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0088] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0089] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.
[0090] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0091] In some embodiments, the processor 110 may include one or more interfaces. 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, etc.
[0092] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). The I2S interface can be used for audio communication. The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. The UART interface is a universal serial data bus used for asynchronous communication; this bus can be a bidirectional communication bus, converting the data to be transmitted between serial and parallel communication. The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display 194 and camera 193; MIPI interfaces include camera serial interface (CSI) and display serial interface (DSI). The GPIO interface can be configured via software; it can be configured as a control signal or a data signal. The USB interface 130 is a USB standard compliant interface, specifically a Mini USB interface, MicroUSB interface, or USB Type-C interface. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used for data transfer between the electronic device 100 and peripheral devices. It can also be used to connect headphones for audio playback. This interface can also be used to connect other electronic devices, such as AR devices.
[0093] It is understood that the interface connection relationships between the modules illustrated in the embodiments of this application are merely illustrative and do not constitute a structural limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0094] The charging management module 140 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 receives charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 receives wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also supply power to the electronic device via the power management module 141.
[0095] The power management module 141 connects 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, providing power to the processor 110, internal memory 121, external memory, display screen 194, camera 193, and wireless communication module 160, etc. The power management module 141 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 141 may also be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be located in the same device.
[0096] The wireless communication function of electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.
[0097] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.
[0098] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.
[0099] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates 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 processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs sound signals through an audio device (not limited to speaker 170A, receiver 170B, etc.) or displays images or videos through the display screen 194. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 110 and may be housed in the same device as the mobile communication module 150 or other functional modules.
[0100] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.
[0101] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling electronic device 100 to communicate with networks and other devices via 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-Synchronous Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technologies, etc. The GNSS may include the Global Positioning System (GPS), the Global Navigation Satellite System (GNSS), the BeiDou Navigation Satellite System (BDS), the Quasi-Zenith Satellite System (QZSS), and / or satellite-based augmentation systems (SBAS).
[0102] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0103] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Mini LED, a Micro LED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include one or N display screens 194, where N is a positive integer greater than 1.
[0104] Electronic device 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.
[0105] The ISP is used to process data fed back from camera 193. Camera 193 is used to capture still images or video. The digital signal processor is used to process digital signals; in addition to digital image signals, it can also process other digital signals. The video codec is used to compress or decompress digital video.
[0106] An NPU (Neural Processing Unit) is a computational processor for neural networks (NNs). By borrowing the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it can rapidly process input information and continuously learn on its own. NPUs enable intelligent cognitive applications in electronic devices, such as image recognition, facial recognition, speech recognition, and text understanding.
[0107] Internal memory 121 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of electronic device 100 by running the instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a function (such as sound playback, image playback, etc.). The data storage area may store data created during the use of electronic device 100 (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
[0108] The external storage interface 120 can be used to connect external storage devices, such as Micro SD cards, to expand the storage capacity of the electronic device 100. The external storage card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external storage card.
[0109] Electronic device 100 can implement audio functions, such as music playback and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.
[0110] Audio module 170 is used to convert digital audio information into analog audio signal output, and also to convert analog audio input into digital audio signal. Audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, audio module 170 can be located in processor 110, or some functional modules of audio module 170 can be located in processor 110. Speaker 170A, also called a "loudspeaker," is used to convert audio electrical signals into sound signals. Receiver 170B, also called a "handpiece," is used to convert audio electrical signals into sound signals. Microphone 170C, also called a "microphone" or "microphone," is used to convert sound signals into electrical signals. Headphone jack 170D is used to connect wired headphones. Headphone jack 170D can be a 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.
[0111] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch buttons. Electronic device 100 can receive button input and generate key signal inputs related to user settings and function control. Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback. Indicator 192 can be an indicator light, used to indicate charging status, battery level changes, messages, missed calls, notifications, etc. SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to achieve contact and separation with electronic device 100. Electronic device 100 can support one or N SIM card interfaces, where N is a positive integer greater than 1. SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc.
[0112] The electronic device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, so they will not be described again here.
[0113] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the methods described in the above-described method embodiments.
[0114] This application also provides a computer program product that, when run on an electronic device, causes the electronic device to implement the method described in the above-described method embodiments.
[0115] This application also provides a chip system including a processor coupled to a memory. The processor executes a computer program stored in the memory to implement the method described in the above-described method embodiments. The chip system may be a single chip or a chip module composed of multiple chips.
[0116] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, or magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).
[0117] Those skilled in the art will understand that implementing all or part of the processes in the above embodiments can be accomplished by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium can include various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.
[0118] The naming or numbering of steps in this application does not mean that the steps in the method flow must be executed in the time / logical order indicated by the naming or numbering. The execution order of the named or numbered process steps can be changed according to the technical purpose to be achieved, as long as the same or similar technical effect can be achieved.
[0119] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0120] In the embodiments provided in this application, it should be understood that the disclosed apparatus / devices and methods can be implemented in other ways. For example, the apparatus / device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0121] It should be understood that in the description of this application and the appended claims, the terms "comprising," "including," "having," and any variations thereof are intended to cover a non-exclusive inclusion and mean "including but not limited to," unless otherwise specifically emphasized. For example, a process, method, system, product, or apparatus that includes a series of steps or modules is not necessarily limited to those steps or modules that are explicitly listed, but may include other steps or modules that are not explicitly listed or that are inherent to such process, method, product, or apparatus.
[0122] In the description of this application, unless otherwise stated, " / " indicates that the objects before and after it are in an "or" relationship. For example, A / B can mean A or B. "And / or" in this application describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone, where A and B can be singular or plural. Unless otherwise stated, "multiple" means two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of singular or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0123] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."
[0124] Furthermore, in the description of this application and the appended claims, the terms "first," "second," etc., are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence, nor should they be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein; features defined as "first" or "second" may explicitly or implicitly include at least one of those features.
[0125] In the embodiments of this application, the words "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of the words "exemplarily" or "for example" is intended to present the relevant concepts in a specific manner.
[0126] References to "one embodiment" or "some embodiments" in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized.
[0127] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A data masking method applied to electronic devices, characterized in that, The method includes: After detecting an anomaly in the first data partition mounted in the first directory, at least one blank folder corresponding to at least one first folder in the first data partition is mounted to at least one second directory. The first data partition supports the electronic device to boot the operating system. The blank folder is created in the second data partition. The at least one second directory is a subdirectory of the first directory that has at least one first folder mounted. Start the operating system using the first directory; After detecting that the first data partition mounted in the first directory is abnormal, the method further includes: Create the second data partition, which is a blank data partition; Create folders with the same name as each of the first folders on the second data partition to obtain at least one blank folder; wherein, the blank folders created in the second data partition are mounted to a second directory with the same name as the blank folders in the first directory.
2. The data masking method according to claim 1, characterized in that, At least one of the first folders does not include folders related to file encryption and file decryption in the first data partition.
3. The data masking method according to claim 1, characterized in that, After the operating system boots successfully, the method further includes: Displays the data backup interface; In response to the user's first operation on the data backup interface, the user data mounted on the first directory is backed up.
4. The data masking method according to any one of claims 1-3, characterized in that, The methods for detecting anomalies in the first data partition include: When the number of restarts of the electronic device is detected to be greater than the preset number of restarts, the first data partition is determined to be abnormal.
5. The data masking method according to any one of claims 1-3, characterized in that, The methods for detecting anomalies in the first data partition include: When a user-inputted data masking command is detected, the first data partition is determined to be abnormal.
6. An electronic device, characterized in that, include: A memory and a processor, the memory being used to store a computer program; the processor being used to execute the data masking method as described in any one of claims 1-5 when the computer program is invoked.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the data masking method as described in any one of claims 1-5.
8. A computer program product, characterized in that, When the computer program product is run on the electronic device, it causes the electronic device to perform the data masking method as described in any one of claims 1-5.
9. A chip system, characterized in that, The chip system includes a processor coupled to a memory, the processor executing a computer program stored in the memory to implement the data masking method as described in any one of claims 1-5.