File system guest control method, apparatus, and computer readable storage medium

By generating a remount command and simultaneously closing checkpoints when a smart terminal device switches to guest mode, the problem of complex switching and poor accuracy in existing technologies is solved, achieving a simplified process and improved efficiency in guest mode switching, thus enhancing the user experience.

CN113987579BActive Publication Date: 2026-04-24NUBIA TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NUBIA TECHNOLOGY CO LTD
Filing Date
2021-10-29
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

In existing technologies, the switching schemes for smart terminal devices when switching between user mode and guest mode are complex, the recovery accuracy is poor, and the time consumption is long, resulting in a poor user experience.

Method used

When the device switches to guest mode, a remount command is generated for the data partition, a checkpoint synchronization shutdown command is issued, parameters are updated and the file system is remounted, metadata that has not been written to disk is written to disk, and the newly generated metadata is kept in memory in checkpoint shutdown mode. When switching back to user mode, the metadata is reloaded.

Benefits of technology

The process of switching between guest modes has been simplified, improving the efficiency and accuracy of mode switching and enhancing the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113987579B_ABST
    Figure CN113987579B_ABST
Patent Text Reader

Abstract

The application discloses a file system visitor control method and device and a computer readable storage medium, wherein the method comprises the following steps: generating a remount instruction corresponding to a preset data partition, and issuing a synchronous closing instruction of a checkpoint to a preset file system according to the remount instruction; acquiring an update parameter corresponding to the remount instruction, and remounting the file system according to the update parameter and the synchronous closing instruction; writing all the metadata which is not written into a disk into the disk, and setting an attribute bit of the file system to a checkpoint closing mode; keeping newly generated metadata in the memory in the checkpoint closing mode, and reloading the metadata in the file system when the device is switched from the visitor mode to the user mode. A humanized file system visitor control scheme is realized, the mode switching efficiency and accuracy are improved, and the use experience of the mode switching function is enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of mobile communications, and more particularly to a file system visitor control method, device, and computer-readable storage medium. Background Technology

[0002] In the existing technology, with the continuous development of smart terminal devices, smart terminal devices are becoming more and more popular, and the various applications running on the devices are becoming more and more widespread and numerous. The systems are also becoming more and more large and complex. Each application can perform any operation, such as taking pictures, recording videos, downloading various applications, updating old applications, deleting unnecessary files and data, etc.

[0003] However, sometimes it is necessary to lend your phone to others for temporary use, or if unnecessary data or settings are accidentally deleted or changed by other applications or people, it can cause great trouble or even irreparable damage to the real user of the phone or other devices.

[0004] However, existing mode switching solutions are relatively complex to implement, have poor recovery accuracy, and take a long time to switch modes, so the user experience of mode switching needs to be improved. Summary of the Invention

[0005] To address the aforementioned technical deficiencies in the prior art, this invention proposes a file system visitor control method, which includes:

[0006] When the device switches from user mode to guest mode, a remount command corresponding to the preset data partition is generated, and a checkpoint synchronization shutdown command is sent to the preset file system according to the remount command.

[0007] Obtain the update parameters corresponding to the remount command, and remount the file system according to the update parameters and the synchronization shutdown command.

[0008] Write all metadata that is not currently written to disk to disk, and set the attribute bits of the file system to checkpoint off mode.

[0009] In the checkpoint-off mode, newly generated metadata is persisted to memory, and when the device switches from guest mode to user mode, the metadata in the file system is reloaded.

[0010] Optionally, the step of generating a remount instruction corresponding to a preset data partition when the device switches from user mode to guest mode, and issuing a checkpoint synchronization shutdown instruction to a preset file system according to the remount instruction, includes:

[0011] The device's interactive interface displays the current mode and / or the mode to be switched, wherein if the current mode is the user mode, then the mode to be switched is the guest mode.

[0012] When the selected mode is received, a mode switching instruction is generated to switch from the user mode to the guest mode.

[0013] Optionally, the step of generating a remount instruction corresponding to a preset data partition when the device switches from user mode to guest mode, and issuing a checkpoint synchronization shutdown instruction to a preset file system according to the remount instruction, further includes:

[0014] A mode switching authentication interface is generated based on the mode switching command.

[0015] The current identity information is obtained within the authentication interface, wherein the identity information includes one or more of the following: password, pattern, fingerprint, and face.

[0016] Optionally, obtaining the update parameters corresponding to the remount command, and remounting the file system according to the update parameters and the synchronization shutdown command, includes:

[0017] When remounting the file system according to the update parameters and the synchronization shutdown command, the storage space of the disk is detected.

[0018] If the storage space meets the current mode switching conditions, then the operation of synchronously writing memory data back to the disk is performed.

[0019] Optionally, writing all currently unwritten metadata to the disk and setting the file system attribute bits to checkpoint-off mode includes:

[0020] After setting the file system attribute bits to checkpoint off mode, the new write content of the disk is written to the data partition.

[0021] In the system file, the synchronization operation of the metadata corresponding to the newly written content in the file system is disabled.

[0022] Optionally, the step of persisting the newly generated metadata to memory in the checkpoint-off mode and reloading the metadata in the file system when the device switches from the guest mode to the user mode includes:

[0023] When a restart or power failure signal is detected in the device, the metadata in the file system is reloaded.

[0024] The display interface shows the mode switching information from the guest mode to the user mode.

[0025] Optionally, the step of persisting the newly generated metadata to memory in the checkpoint-off mode and reloading the metadata in the file system when the device switches from the guest mode to the user mode further includes:

[0026] The current save command is triggered before the device switches from guest mode to user mode.

[0027] The authentication interface is generated by the retention instruction, and the current identity information is obtained within the authentication interface.

[0028] Optionally, the step of persisting the newly generated metadata to memory in the checkpoint-off mode and reloading the metadata in the file system when the device switches from the guest mode to the user mode further includes:

[0029] Once the identity information is verified, the interval for the device to switch from user mode to guest mode is determined.

[0030] Save the metadata generated within the interval.

[0031] The present invention also proposes a file system visitor control device, the device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the file system visitor control method as described in any of the preceding claims.

[0032] The present invention also proposes a computer-readable storage medium storing a file system visitor control program, which, when executed by a processor, implements the steps of the file system visitor control method as described in any of the preceding claims.

[0033] The file system visitor control method, device, and computer-readable storage medium of the present invention generate a remount instruction corresponding to a preset data partition when the device switches from user mode to visitor mode, and issue a checkpoint synchronization shutdown instruction to a preset file system according to the remount instruction; obtain update parameters corresponding to the remount instruction, and remount the file system according to the update parameters and the synchronization shutdown instruction; write all metadata not currently written to disk to disk, and set the attribute bits of the file system to checkpoint shutdown mode; retain the newly generated metadata in memory in checkpoint shutdown mode, and reload the metadata in the file system when the device switches from visitor mode to user mode. This provides a user-friendly file system visitor control scheme, simplifies the visitor mode switching process, improves mode switching efficiency and accuracy, and enhances the user experience of the mode switching function. Attached Figure Description

[0034] The present invention will be further described below with reference to the accompanying drawings and embodiments. In the accompanying drawings:

[0035] Figure 1 This is a schematic diagram of the hardware structure of a mobile terminal according to the present invention;

[0036] Figure 2 This is a communication network system architecture diagram provided in an embodiment of the present invention;

[0037] Figure 3 This is a flowchart of the first embodiment of the file system visitor control method of the present invention;

[0038] Figure 4 This is a flowchart of the second embodiment of the file system visitor control method of the present invention;

[0039] Figure 5 This is a flowchart of the third embodiment of the file system visitor control method of the present invention;

[0040] Figure 6 This is a flowchart of the fourth embodiment of the file system visitor control method of the present invention;

[0041] Figure 7 This is a flowchart of the fifth embodiment of the file system visitor control method of the present invention;

[0042] Figure 8 This is a flowchart of the sixth embodiment of the file system visitor control method of the present invention;

[0043] Figure 9 This is a flowchart of the seventh embodiment of the file system visitor control method of the present invention;

[0044] Figure 10This is a flowchart of the eighth embodiment of the file system visitor control method of the present invention. Detailed Implementation

[0045] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.

[0046] In the following description, the use of suffixes such as "module," "part," or "unit" to denote elements is solely for the purpose of illustrative purposes and has no specific meaning in itself. Therefore, "module," "part," or "unit" may be used interchangeably.

[0047] Terminals can be implemented in various forms. For example, the terminals described in this invention may include mobile terminals such as mobile phones, tablets, laptops, handheld computers, personal digital assistants (PDAs), portable media players (PMPs), navigation devices, wearable devices, smart bracelets, pedometers, etc., as well as fixed terminals such as digital TVs and desktop computers.

[0048] The following description will use a mobile terminal as an example. Those skilled in the art will understand that, apart from elements specifically designed for mobile purposes, the construction according to embodiments of the present invention can also be applied to fixed-type terminals.

[0049] Please see Figure 1 This is a schematic diagram of the hardware structure of a mobile terminal implementing various embodiments of the present invention. The mobile terminal 100 may include: an RF (Radio Frequency) unit 101, a WiFi module 102, an audio output unit 103, an A / V (Audio / Video) input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, a processor 110, and a power supply 111, etc. Those skilled in the art will understand that... Figure 1 The mobile terminal structure shown does not constitute a limitation on the mobile terminal. The mobile terminal may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0050] The following is combined with Figure 1 A detailed introduction to each component of the mobile terminal:

[0051] The radio frequency unit 101 can be used for receiving and transmitting signals during information transmission or calls. Specifically, it receives downlink information from the base station and processes it with the processor 110; additionally, it transmits uplink data to the base station. Typically, the radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier, and a duplexer. Furthermore, the radio frequency unit 101 can also communicate wirelessly with networks and other devices. The aforementioned wireless communications may use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication), GPRS (General Packet Radio Service), CDMA2000 (Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division Duplexing-Long Term Evolution), and TDD-LTE (Time Division Duplexing-Long Term Evolution).

[0052] WiFi is a short-range wireless transmission technology. Mobile terminals using the WiFi module 102 can help users send and receive emails, browse web pages, and access streaming media, providing users with wireless broadband internet access. Although Figure 1 WiFi module 102 is shown, but it is understood that it is not a necessary component of a mobile terminal and can be omitted as needed without changing the nature of the invention.

[0053] The audio output unit 103 can convert audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into audio signals and output them as sound when the mobile terminal 100 is in call signal receiving mode, call mode, recording mode, voice recognition mode, broadcast receiving mode, etc. Furthermore, the audio output unit 103 can also provide audio output related to specific functions performed by the mobile terminal 100 (e.g., call signal receiving sound, message receiving sound, etc.). The audio output unit 103 may include a speaker, a buzzer, etc.

[0054] The A / V input unit 104 is used to receive audio or video signals. The A / V input unit 104 may include a graphics processing unit (GPU) 1041 and a microphone 1042. The GPU 1041 processes image data of still images or videos acquired by an image capture device (such as a camera) in video capture mode or image capture mode. The processed image frames can be displayed on the display unit 106. The image frames processed by the GPU 1041 can be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 can receive sound (audio data) in operating modes such as telephone call mode, recording mode, and voice recognition mode, and can process such sound into audio data. The processed audio (voice) data can be converted into a format that can be transmitted to a mobile communication base station via the radio frequency unit 101 in telephone call mode. The microphone 1042 can implement various types of noise cancellation (or suppression) algorithms to eliminate (or suppress) noise or interference generated during the reception and transmission of audio signals.

[0055] The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor. The ambient light sensor can adjust the brightness of the display panel 1061 according to the ambient light level, and the proximity sensor can turn off the display panel 1061 and / or backlight when the mobile terminal 100 is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes). When stationary, it can detect the magnitude and direction of gravity and can be used for applications that recognize the phone's posture (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition-related functions (such as pedometer, tapping), etc. Other sensors that may be configured in the phone, such as fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, and infrared sensors, will not be described in detail here.

[0056] The display unit 106 is used to display information input by the user or information provided to the user. The display unit 106 may include a display panel 1061, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.

[0057] User input unit 107 can be used to receive input numerical or character information, and generate key signal inputs related to user settings and function control of the mobile terminal. Specifically, user input unit 107 may include touch panel 1071 and other input devices 1072. Touch panel 1071, also known as touch screen, can collect touch operations on or near the user (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near touch panel 1071), and drive corresponding connection devices according to a pre-set program. Touch panel 1071 may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch position and the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, sends it to processor 110, and can receive and execute commands from processor 110. In addition, touch panel 1071 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may also include other input devices 1072. Specifically, other input devices 1072 may include, but are not limited to, one or more of the following: physical keyboard, function keys (such as volume control buttons, power buttons, etc.), trackball, mouse, joystick, etc., without being limited here.

[0058] Furthermore, the touch panel 1071 may cover the display panel 1061. When the touch panel 1071 detects a touch operation on or near it, it transmits the information to the processor 110 to determine the type of touch event. Subsequently, the processor 110 provides corresponding visual output on the display panel 1061 based on the type of touch event. Although in Figure 1 In this embodiment, the touch panel 1071 and the display panel 1061 are two independent components to realize the input and output functions of the mobile terminal. However, in some embodiments, the touch panel 1071 and the display panel 1061 can be integrated to realize the input and output functions of the mobile terminal. The specific implementation is not limited here.

[0059] Interface unit 108 serves as an interface through which at least one external device can connect to mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, and so on. Interface unit 108 may be used to receive input (e.g., data, power, etc.) from the external device and transmit the received input to one or more elements within mobile terminal 100, or it may be used to transmit data between mobile terminal 100 and the external device.

[0060] The memory 109 can be used to store software programs and various data. The memory 109 may primarily include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function (such as sound playback, image playback, etc.), etc.; the data storage area may store data created based on the use of the mobile phone (such as audio data, phonebook, etc.). Furthermore, the memory 109 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, or other volatile solid-state storage device.

[0061] The processor 110 is the control center of the mobile terminal. It connects various parts of the mobile terminal via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 109, and by calling data stored in the memory 109, it performs various functions and processes data of the mobile terminal, thereby providing overall monitoring of the mobile terminal. The processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor and a modem processor. The application processor mainly handles the operating system, user interface, and applications, while the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 110.

[0062] The mobile terminal 100 may also include a power supply 111 (such as a battery) that supplies power to various components. Preferably, the power supply 111 can be logically connected to the processor 110 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system.

[0063] although Figure 1 As not shown, the mobile terminal 100 may also include a Bluetooth module, etc., which will not be described in detail here.

[0064] To facilitate understanding of the embodiments of the present invention, the communication network system on which the mobile terminal of the present invention is based is described below.

[0065] Please see Figure 2 , Figure 2 This invention provides a communication network system architecture diagram. The communication network system is an LTE system based on the universal mobile communication technology. The LTE system includes a UE (User Equipment) 201, an E-UTRAN (Evolved UMTS Terrestrial Radio Access Network) 202, an EPC (Evolved Packet Core) 203, and the operator's IP services 204, which are connected in sequence.

[0066] Specifically, UE201 can be the aforementioned terminal 100, which will not be elaborated here.

[0067] E-UTRAN202 includes eNodeB2021 and other eNodeB2022s. Among them, eNodeB2021 can connect to other eNodeB2022s via backhaul (e.g., X2 interface), and eNodeB2021 connects to EPC203. eNodeB2021 can provide UE201 with access to EPC203.

[0068] EPC203 may include MME (Mobility Management Entity) 2031, HSS (Home Subscriber Server) 2032, other MMEs 2033, SGW (Serving Gateway) 2034, PGW (Packet Data Network Gateway) 2035, and PCRF (Policy and Charging Rules Function) 2036, etc. Among them, MME2031 is the control node that handles signaling between UE201 and EPC203, providing bearer and connection management. HSS2032 provides registers to manage functions such as the Home Location Register (not shown in the diagram) and stores user-specific information such as service characteristics and data rates. All user data can be sent through SGW2034. PGW2035 can provide UE 201 IP address allocation and other functions. PCRF2036 is the policy and charging control decision point for service data flow and IP bearer resources. It selects and provides available policy and charging control decisions for the policy and charging enforcement function unit (not shown in the figure).

[0069] IP services 204 may include the Internet, intranet, IMS (IP Multimedia Subsystem), or other IP services.

[0070] Although the above description uses the LTE system as an example, those skilled in the art should understand that the present invention is not only applicable to the LTE system, but also to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, and future new network systems, etc., which are not limited here.

[0071] Based on the aforementioned mobile terminal hardware structure and communication network system, various embodiments of the method of the present invention are proposed.

[0072] Example 1

[0073] Figure 3 This is a flowchart of the first embodiment of the file system visitor control method of the present invention. A file system visitor control method, the method comprising:

[0074] S1. When the device switches from user mode to guest mode, a remount command corresponding to the preset data partition is generated, and a checkpoint synchronization shutdown command is sent to the preset file system according to the remount command.

[0075] S2. Obtain the update parameters corresponding to the remount command, and remount the file system according to the update parameters and the synchronization shutdown command.

[0076] S3. Write all metadata that has not yet been written to the disk to the disk, and set the attribute bits of the file system to checkpoint off mode.

[0077] S4. In the checkpoint off mode, the newly generated metadata is kept in memory, and when the device switches from the guest mode to the user mode, the metadata in the file system is reloaded.

[0078] Optionally, in this embodiment, a guest mode is designed, in which a new function, guest mode or temporary mode, is designed. If this switch is turned on, the current user enters the password, fingerprint or facial information, etc. After the authentication is successful, the system is locked and the user is prompted by the corresponding user interface that the mode is being switched. After the switch is successful, the user can enter the guest mode.

[0079] Optionally, in this embodiment, in guest mode, the user can perform any data operation on the phone, such as deleting existing image / video resources, uninstalling installed applications, downloading other applications, or turning on / off configuration switches for certain applications.

[0080] Optionally, in this embodiment, when returning to normal mode after performing a series of operations in guest mode, the guest mode function switch is turned off. Then, the user re-enters the password, fingerprint, or facial recognition information used in normal mode. Once authentication is successful, the system is locked, and the user is prompted via the corresponding user interface that a mode switch is in progress. After a successful switch, the user can enter normal mode.

[0081] Optionally, in this embodiment, if it is necessary to save the information of the guest mode, it can be synchronized to the disk after authentication is passed.

[0082] Optionally, in this embodiment, the F2FS file system (a novel open-source flash file system) is used as an example for explanation. Specifically, firstly, by pulling down the status bar or switching on the guest mode function, the system prompts for authentication via password / pattern / fingerprint / face recognition, etc. After the user enters the correct password and the security verification passes, the system performs a locking operation and displays an interface indicating that a mode switch is in progress. Simultaneously, relevant system modules perform a series of operations for switching modes. Then, during the system switching action, the phone's data partition, such as the preset data partition (DATA partition), is remounted, and the checkpoint synchronization function of the F2FS file system is explicitly disabled during remounting. When the kernel file system receives the remount instruction, it parses the new parameters and remounts the file system. When it determines that the parameters include disabling checkpoint mode, it needs to perform a series of disk storage space checks, memory data synchronization and disk write-back operations, etc., write all metadata (meta data) and content data that have not yet been written to the disk to the disk for storage, and set the relevant attribute bits of the file system to indicate that checkpoint mode has been disabled. In this embodiment, when a new write operation is performed on the disk in the new mode, the file content can be written normally to the aforementioned DATA partition. However, the kernel's file system no longer synchronizes the meta portion of the file system to the checkpoint area. In this embodiment, meta information that changes during the writing of new data is temporarily stored in memory by the file system, and the relevant content is lost when power is lost. That is, it is not saved to the disk. In this embodiment, when the above guest mode is successfully switched, any operation can be performed in guest mode. In this embodiment, to exit the above functions, it is necessary to restart or turn off the guest mode function switch. In this embodiment, when choosing to exit, authentication is performed using password / pattern / fingerprint / face recognition, etc. In this embodiment, after successful authentication, the system UI prompts that it is exiting guest mode and switching back to normal mode. At this time, the system performs a series of switching operations. For example, the meta data of the F2FS file system is reloaded, and the data of normal mode is reloaded into memory. At the same time, the system re-enables a series of abnormal functions that were disabled in guest mode. In this embodiment, after the above switching operations are completed, the device returns to normal mode. In this embodiment, if it is necessary to save the data or operation scene in the guest mode, authentication is required. After successful authentication, the data in the guest mode is synchronized to the disk and the guest mode is automatically exited. At this time, the data and all operations in the guest mode will be persistently stored on the storage device and will not be lost.

[0083] As can be seen, in this embodiment, by designing a file system-based guest mode method, the system can freely switch between guest mode and normal mode, creating a temporary restore point. This protects the data in normal mode from being tampered with, allowing it to revert to its state before the restore point. Thus, when the smart device switches to normal mode, all user data is preserved, and all data created by the guest is automatically deleted. This protects the security of existing data without generating complex and useless data.

[0084] The beneficial effects of this embodiment are as follows: when the device switches from user mode to guest mode, a remount instruction corresponding to a preset data partition is generated, and a checkpoint synchronization shutdown instruction is sent to a preset file system according to the remount instruction; update parameters corresponding to the remount instruction are obtained, and the file system is remounted according to the update parameters and the synchronization shutdown instruction; all metadata not currently written to disk is written to disk, and the attribute bits of the file system are set to checkpoint shutdown mode; in checkpoint shutdown mode, the newly generated metadata is kept in memory, and when the device switches from guest mode to user mode, the metadata in the file system is reloaded. This implements a user-friendly file system guest control scheme, simplifies the guest mode switching process, improves mode switching efficiency and accuracy, and enhances the user experience of the mode switching function.

[0085] Example 2

[0086] Figure 4 This is a flowchart of the second embodiment of the file system visitor control method of the present invention. Based on the above embodiment, the step of generating a remount instruction corresponding to a preset data partition when the device switches from user mode to visitor mode, and issuing a checkpoint synchronization shutdown instruction to the preset file system according to the remount instruction, includes:

[0087] S11. Display the current mode and / or the mode to be switched in the interactive interface of the device, wherein if the current mode is the user mode, then the mode to be switched is the guest mode.

[0088] S12. When the selection instruction for the mode to be switched is received, a mode switching instruction is generated to switch from the user mode to the guest mode.

[0089] Optionally, in this embodiment, when the operating frequency and sliding speed of the current device are detected to be different from the historical typical values, a switching prompt for the current mode and / or the mode to be switched is displayed in the interactive interface of the device.

[0090] The beneficial effect of this embodiment is that by displaying the current mode and / or the mode to be switched within the device's interactive interface, wherein if the current mode is the user mode, then the mode to be switched is the guest mode; when a selection instruction for the mode to be switched is received, a mode switching instruction to switch from the user mode to the guest mode is generated. This implements a user-friendly file system guest control scheme, simplifies the guest mode switching process, improves mode switching efficiency and accuracy, and enhances the user experience of the mode switching function.

[0091] Example 3

[0092] Figure 5 This is a flowchart of the third embodiment of the file system visitor control method of the present invention. Based on the above embodiment, the step of generating a remount instruction corresponding to a preset data partition when the device switches from user mode to visitor mode, and issuing a checkpoint synchronization shutdown instruction to the preset file system according to the remount instruction, further includes:

[0093] S13. Generate a mode switching authentication interface according to the mode switching instruction.

[0094] S14. Obtain the current identity information within the authentication interface, wherein the identity information includes one or more of the following: password, pattern, fingerprint, and face.

[0095] Optionally, in this embodiment, different levels of authentication information are obtained, for example, authentication methods for asking questions, and different visitor modes are determined accordingly.

[0096] Optionally, in this embodiment, questions related to the office, such as the name of a colleague or department, determine the corresponding office visitor mode; similarly, questions about the name of a home determine the corresponding home visitor mode.

[0097] The beneficial effect of this embodiment is that it generates a mode switching authentication interface through the mode switching command; and obtains the current identity information within the authentication interface, wherein the identity information includes one or more of the following: password, pattern, fingerprint, and facial recognition. This implements a user-friendly file system visitor control scheme, simplifies the visitor mode switching process, improves mode switching efficiency and accuracy, and enhances the user experience of the mode switching function.

[0098] Example 4

[0099] Figure 6 This is a flowchart of the fourth embodiment of the file system visitor control method of the present invention. Based on the above embodiment, the step of obtaining the update parameters corresponding to the remount instruction and remounting the file system according to the update parameters and the synchronization shutdown instruction includes:

[0100] S21. When remounting the file system according to the update parameters and the synchronization shutdown command, the storage space of the disk is detected.

[0101] S22. If the storage space meets the current mode switching conditions, then perform the operation of synchronously writing memory data back to the disk.

[0102] Optionally, in this embodiment, the current mode switching condition is related to the type of the aforementioned guest mode.

[0103] Optionally, in this embodiment, access to applications such as games will not be restricted in the office visitor mode, while access to applications such as games will be restricted in the home visitor mode.

[0104] The beneficial effect of this embodiment is that when the file system is remounted using the update parameters and the synchronization shutdown command, the storage space of the disk is detected; if the storage space meets the current mode switching conditions, the operation of synchronously writing memory data back to the disk is performed. This implements a user-friendly file system visitor control scheme, simplifies the visitor mode switching process, improves the efficiency and accuracy of mode switching, and enhances the user experience of the mode switching function.

[0105] Example 5

[0106] Figure 7 This is a flowchart of the fifth embodiment of the file system visitor control method of the present invention. Based on the above embodiment, the step of writing all metadata that has not yet been written to the disk to the disk and setting the attribute bits of the file system to checkpoint off mode includes:

[0107] S31. After setting the attribute bits of the file system to checkpoint off mode, write the new content to the data partition.

[0108] S32. In the system file, the synchronization operation of the metadata corresponding to the newly written content in the file system is blocked.

[0109] Optionally, in this embodiment, depending on different guest modes, it is determined that the synchronization operation of the file system's metadata corresponding to the newly written content is blocked in the system file.

[0110] Optionally, in this embodiment, for example, in office visitor mode, the synchronization operation of the file system with the metadata corresponding to the newly written content is not blocked for modifications to documents, and in home visitor mode, the synchronization operation of the file system with the metadata corresponding to the newly written content is not blocked for images taken by family members.

[0111] The beneficial effect of this embodiment is that, by setting the attribute bits of the file system to checkpoint-off mode, newly written content on the disk is written to the data partition; and the synchronization operation of the file system's metadata corresponding to the newly written content is blocked in the system file. This achieves a user-friendly file system guest control scheme, simplifies the guest mode switching process, improves mode switching efficiency and accuracy, and enhances the user experience of the mode switching function.

[0112] Example 6

[0113] Figure 8 This is a flowchart of the sixth embodiment of the file system visitor control method of the present invention. Based on the above embodiment, the step of persisting newly generated metadata to memory in the checkpoint-off mode and reloading the metadata in the file system when the device switches from the visitor mode to the user mode includes:

[0114] S41. When a restart or power failure signal of the device is detected, the metadata in the file system is reloaded.

[0115] S42. Display mode switching information from the guest mode to the user mode in the display interface.

[0116] Optionally, in this embodiment, the display interface shows mode switching information from the guest mode to the user mode, wherein the mode switching information includes the duration of this switch, the content items restored, and the file size of the content items.

[0117] Optionally, in this embodiment, a prompt may be displayed asking whether to save the above-mentioned content items.

[0118] The beneficial effects of this embodiment are that, by reloading the metadata in the file system when a restart or power failure signal is detected, and displaying the mode switching information from the guest mode to the user mode in the display interface, a user-friendly file system guest control scheme is implemented, simplifying the guest mode switching process, improving the efficiency and accuracy of mode switching, and enhancing the user experience of the mode switching function.

[0119] Example 7

[0120] Figure 9 This is a flowchart of the seventh embodiment of the file system visitor control method of the present invention. Based on the above embodiment, the step of persisting the newly generated metadata to memory in the checkpoint-off mode and reloading the metadata in the file system when the device switches from the visitor mode to the user mode further includes:

[0121] S43. Before the device switches from the guest mode to the user mode, the current save command is triggered.

[0122] S44. Generate the authentication interface through the retention instruction, and obtain the current identity information within the authentication interface.

[0123] Optionally, in this embodiment, at any point in time before the device switches from guest mode to user mode, the current save command can be triggered according to the actual retention requirements.

[0124] Optionally, in this embodiment, the authentication interface is generated by the retention instruction, and the current identity information is obtained within the authentication interface. The type of content to be saved is determined according to different types of identity information. For example, for fingerprint authentication information, data related to the application is saved, and for face authentication information, data related to the image is saved.

[0125] The beneficial effect of this embodiment is that by triggering a save command before the device switches from guest mode to user mode, and generating the authentication interface through the save command, the current identity information is obtained within the authentication interface. This implements a user-friendly file system guest control scheme, simplifies the guest mode switching process, improves the efficiency and accuracy of mode switching, and enhances the user experience of the mode switching function.

[0126] Example 8

[0127] Figure 10 This is a flowchart of the eighth embodiment of the file system visitor control method of the present invention. Based on the above embodiment, the step of persisting the newly generated metadata to memory in the checkpoint-off mode and reloading the metadata in the file system when the device switches from the visitor mode to the user mode further includes:

[0128] S45. After the identity information is verified, determine the interval period for the device to switch from the user mode to the guest mode.

[0129] S46. Save the metadata generated within the interval.

[0130] Optionally, in this embodiment, after authentication is successful, the metadata generated during the interval between switching from the user mode to the guest mode is saved, and the data generated subsequently will not be saved to the disk.

[0131] The beneficial effect of this embodiment is that, after the identity information is verified, the interval between the device switching from user mode to guest mode is determined; and the metadata generated during the interval is saved. This implements a user-friendly file system guest control scheme, simplifies the guest mode switching process, improves mode switching efficiency and accuracy, and enhances the user experience of the mode switching function.

[0132] Example 9

[0133] Based on the above embodiments, the present invention also proposes a file system visitor control device, the device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the file system visitor control method as described in any of the above embodiments.

[0134] It should be noted that the above-described device embodiments and method embodiments belong to the same concept. The specific implementation process can be found in the method embodiments, and the technical features in the method embodiments are also applicable to the device embodiments, which will not be repeated here.

[0135] Example 10

[0136] Based on the above embodiments, the present invention also proposes a computer-readable storage medium storing a file system visitor control program, which, when executed by a processor, implements the steps of the file system visitor control method as described in any of the above embodiments.

[0137] It should be noted that the above-described medium embodiments and method embodiments belong to the same concept. The specific implementation process can be found in the method embodiments, and the technical features in the method embodiments are also applicable to the medium embodiments, which will not be repeated here.

[0138] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0139] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0140] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0141] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims. All of these forms are within the protection scope of the present invention.

Claims

1. A method for controlling visitor access in a file system, characterized in that, The method includes: When the device switches from user mode to guest mode, a remount command corresponding to the preset data partition is generated, and a checkpoint synchronization shutdown command is sent to the preset file system according to the remount command. Obtain the update parameters corresponding to the remount command, and remount the file system according to the update parameters and the synchronization shutdown command; Write all metadata that is not currently written to disk to disk, and set the attribute bits of the file system to checkpoint off mode; In the checkpoint-off mode, newly generated metadata is persisted to memory, and when the device switches from guest mode to user mode, the metadata in the file system is reloaded. When the device switches from user mode to guest mode, the process of generating a remount command corresponding to a preset data partition and issuing a checkpoint synchronization shutdown command to a preset file system based on the remount command includes: The device displays the current mode and / or the mode to be switched within its interactive interface, wherein if the current mode is the user mode, then the mode to be switched is the guest mode; When the selection instruction for the mode to be switched is received, a mode switching instruction is generated to switch from the user mode to the guest mode; Generate a mode switching authentication interface based on the mode switching command; The current identity information is obtained within the authentication interface, wherein the identity information includes one or more of the following: password, pattern, fingerprint, and face. The step of obtaining the update parameters corresponding to the remount command and remounting the file system according to the update parameters and the synchronization shutdown command includes: When remounting the file system according to the update parameters and the synchronization shutdown command, the storage space of the disk is detected; If the storage space meets the current mode switching conditions, then the operation of synchronously writing back the memory data to the disk is performed; The step of writing all currently unwritten metadata to the disk and setting the file system attribute bits to checkpoint-off mode includes: After setting the file system's attribute bits to checkpoint off mode, the newly written content of the disk is written to the data partition; In the system files, the synchronization operation of the metadata corresponding to the newly written content in the file system is disabled; The step of persisting newly generated metadata to memory in the checkpoint-off mode and reloading the metadata in the file system when the device switches from guest mode to user mode includes: When a restart or power failure signal is detected in the device, the metadata in the file system is reloaded; The display interface shows the mode switching information from the guest mode to the user mode; The current save command is triggered before the device switches from guest mode to user mode; The authentication interface is generated by the save command, and the current identity information is obtained within the authentication interface. Once the identity information is verified, the interval for the device to switch from the user mode to the guest mode is determined. Save the metadata generated during the interval.

2. A file system visitor control device, characterized in that, The device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the file system visitor control method as described in claim 1.

3. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a file system visitor control program, which, when executed by a processor, implements the steps of the file system visitor control method as described in claim 1.

Citation Information

Patent Citations

  • Startup method of smart terminal system, device and smart terminal

    CN107710211A