Method for checking partition mounting, partition mounting method, equipment and medium

By checking and formatting the file system type of the data partition, the problem of partition mount failure is solved, the mount success rate and data security are improved, and the normal operation of the operating system is ensured.

CN118916083APending Publication Date: 2024-11-08ZTE CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310515141.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-08
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

In actual work, the partition mount fails to cause the operating system to fail to use the data partition normally, resulting in user data security and system stability problems.

Method used

By checking the file system type of the pending data partition, check the mount status based on the preset file system type and actual type. If the mount fails, the mount operation will be cancelled and the partition will be formatted to ensure the correct mount of the data partition. .

Benefits of technology

This reduces the proportion of partition mount failures, increases the mount success rate of data partitions, and ensures the normal operation of the operating system and the security of user data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118916083A_ABST
    Figure CN118916083A_ABST
Patent Text Reader

Abstract

The invention provides a method for checking partition mounting, a partition mounting method, equipment and a medium, and relates to the technical field of detection. The method comprises the steps of determining a file system type of a to-be-processed data partition under the condition that the to-be-processed data partition is determined to execute mounting operation; and checking the mounting state of the to-be-processed data partition according to a preset file system type and the file system type of the to-be-processed data partition. Whether the mounting operation executed on the to-be-processed data partition is successful or not is determined by determining whether the file system type of the to-be-processed data partition is the same as the preset file system type or not, so that the mounting state of the to-be-processed data partition is accurately measured, the successful mounting proportion of the to-be-processed data partition is increased, and the mounting efficiency of the to-be-processed data partition is improved. An operating system can normally use the to-be-processed data partition to work, so that the safety of user data is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of detection technology, and in particular to a method for checking partition mounting, a partition mounting method, an electronic device and a storage medium. Background Art

[0002] Mounting refers to the process by which the operating system manages computer files and directories on storage devices (such as hard disks) so that users can access them through the computer's file system. Partition mounting is a common application in operating systems. Using partition mounting can ensure that the partition can run normally according to the rules set by the administrator.

[0003] However, in actual work, the operating system often cannot use the partition to work normally due to failure to mount the partition. Summary of the invention

[0004] The present application provides a method for checking partition mounting, a partition mounting method, an electronic device and a storage medium.

[0005] An embodiment of the present application provides a method for checking partition mounting, the method comprising: determining the file system type of the data partition to be processed when it is determined that the mount operation has been performed on the data partition to be processed; and checking the mounting status of the data partition to be processed based on a preset file system type and the file system type of the data partition to be processed.

[0006] An embodiment of the present application provides a partition mounting method, which includes: adopting any one of the methods for checking partition mounting in the embodiments of the present application to obtain the mounting status of the data partition to be processed; when it is determined that the mounting status of the data partition to be processed is a mounting failure, canceling the mounting operation of the data partition to be processed and formatting the data partition to be processed; and re-executing the mounting operation on the formatted data partition to be processed.

[0007] An embodiment of the present application provides an electronic device, comprising: one or more processors; a memory, on which one or more programs are stored. When the one or more programs are executed by one or more processors, the one or more processors implement any method for checking partition mounting in the embodiment of the present application, or any partition mounting method in the embodiment of the present application.

[0008] An embodiment of the present application provides a readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements any method for checking partition mounting in the embodiments of the present application, or any partition mounting method in the embodiments of the present application.

[0009] According to the method, electronic device and storage medium for checking partition mounting according to the embodiments of the present application, by determining the file system type of the data partition to be processed when it is determined that the mount operation has been performed on the data partition to be processed, the proportion of file system type matching errors is reduced; based on the preset file system type and the file system type of the data partition to be processed, the mounting status of the data partition to be processed is checked. In other words, by determining whether the file system type of the data partition to be processed is the same as the preset file system type, it is determined whether the mount operation performed on the data partition to be processed is successful, thereby accurately measuring the mounting status of the data partition to be processed, and improving the proportion of successful mounting of the data partition to be processed, so that the operating system can use the data partition to be processed normally to work, so as to ensure the security of user data.

[0010] According to the partition mounting method, electronic device and storage medium of the embodiments of the present application, any one of the methods for checking partition mounting in the embodiments of the present application is adopted to obtain the mounting status of the data partition to be processed, so as to timely understand the mounting status of the data partition to be processed; when it is determined that the mounting status of the data partition to be processed is a mounting failure, the mounting operation of the data partition to be processed is released, and the data partition to be processed is formatted, thereby reducing the proportion of partition mounting failures.

[0011] With regard to the above embodiments and other aspects of the present application and their implementation methods, more explanation is provided in the accompanying drawings and detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 A flow chart of a method for checking partition mounting provided in an embodiment of the present application is shown.

[0013] Figure 2 A flow chart of a partition mounting method provided in an embodiment of the present application is shown.

[0014] Figure 3 A block diagram showing the composition of a partition inspection mounting device provided in an embodiment of the present application is shown.

[0015] Figure 4 A block diagram showing the composition of a partition mounting device provided in an embodiment of the present application is shown.

[0016] Figure 5 A block diagram showing the composition of a partition mounting system provided in an embodiment of the present application is shown.

[0017] Figure 6 A flow chart showing a working method of a partition mounting system provided in an embodiment of the present application is shown.

[0018] Figure 7A structural diagram showing an exemplary hardware architecture of a computing device capable of implementing the method for checking partition mounting or the method for mounting partitions according to an embodiment of the present application. DETAILED DESCRIPTION

[0019] In order to make the purpose, technical solution and advantages of the present application more clear, the embodiments of the present application will be described in detail below with reference to the accompanying drawings. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other arbitrarily without conflict.

[0020] Currently, when data products or large operating systems are in use, their storage space needs to be partitioned and mounted to ensure that different data partitions can store and process data according to preset rules.

[0021] However, in actual use, each data partition is usually mounted based on a preset mounting process, and after the mounting operation is completed, the mounting operation process is directly ended to enter the next data processing stage. When a data partition fails to be mounted, the operating system will be unable to use the data partition for normal operation.

[0022] The present application provides a method for checking partition mounting, a partition mounting method, an electronic device and a storage medium to solve the above-mentioned problems.

[0023] Figure 1 The flowchart of the method for checking partition mounting provided by the embodiment of the present application is shown. The method for checking partition mounting can be applied to checking partition mounting device. Figure 1 As shown, the method for checking partition mounting in the embodiment of the present application includes but is not limited to the following steps.

[0024] Step S101, when it is determined that the data partition to be processed has been mounted, determine the file system type of the data partition to be processed.

[0025] A file system is a system that can organize and allocate storage space on a storage device and is responsible for file storage and protection and retrieval of stored files. The file system type is used to characterize the type of storage device (for example, a disk or solid-state drive, etc.).

[0026] The file system type of the data partition to be processed may be a read-only partition or a read-write partition.

[0027] Step S102: Check the mounting status of the data partition to be processed according to the preset file system type and the file system type of the data partition to be processed.

[0028] The preset file system type is a type that the operating system can support, and the preset file system type is a type determined based on the user's usage requirements.

[0029] For example, the preset file system types include: any one of the File Allocation Table (FAT) type, the New Technology File System (NTFS) type, the Extended File Allocation Table (exFAT) type, and the Virtual File Allocation Table (VFAT) type.

[0030] When the preset file system type and the file system type of the data partition to be processed are the same, it can be determined that the mount status of the data partition to be processed is successfully mounted; when the preset file system type and the file system type of the data partition to be processed are different, it can be determined that the mount status of the data partition to be processed is failed to mount, that is, the data partition to be processed is not mounted to the preset mount point, which is a pre-set file directory (or partition drive letter, etc.) corresponding to the user's usage requirements.

[0031] In this embodiment, by determining the file system type of the data partition to be processed when it is determined that the mount operation has been performed on the data partition to be processed, the proportion of file system type matching errors is reduced; based on the preset file system type and the file system type of the data partition to be processed, the mount status of the data partition to be processed is checked. In other words, by determining whether the file system type of the data partition to be processed is the same as the preset file system type, it is determined whether the mount operation performed on the data partition to be processed is successful, thereby accurately measuring the mount status of the data partition to be processed, and improving the proportion of successful mounting of the data partition to be processed, so that the operating system can use the data partition to be processed normally to work, so as to ensure the security of user data.

[0032] In some specific implementations, the readable partition is used to store the firmware, for example, the readable partition stores instruction codes and some fixed values, and the data in the readable partition cannot be modified after the operating system is started.

[0033] The read-write partition includes: a read-write power-off save partition or a read-write power-off non-save partition. The read-write power-off save partition is used to store user programs and data that needs to be permanently saved. In the event of a power failure on the device, the data in the read-write power-off save partition will not disappear, which can ensure the safe storage of data.

[0034] The read-write partition that does not save after power failure is used to store data that needs to be randomly accessed during program operation. In the event of a power failure on the device, the data in the read-write partition that does not save after power failure will be erased so that sufficient storage space can be obtained the next time the read-write partition is used.

[0035] For example, in a certain single-chip computer, the global variables, local variables, stack segments and other information used in it need to be frequently rewritten during use and can be stored in a readable and writable partition that is not saved when power is off, so as to store data of different periods in different startup stages.

[0036] For another example, when the electricity meter is working, it is necessary to collect voltage data and current data, and calculate the electricity value based on the voltage data and current data; after a calculation is completed, only the final electricity value needs to be obtained, and the voltage data and current data are not data that the user cares about, and the voltage data and current data collected each time are different. Therefore, the collected voltage data and current data can be stored in a readable and writable power-off non-saving partition; and the final calculated electricity value is saved in a readable and writable power-off saving partition, which can ensure that the accurate electricity value is still saved at the moment the electricity meter is powered off.

[0037] In some optional embodiments, before determining the file system type of the data partition to be processed in executing step S101, the method for checking partition mounting also includes: obtaining the mount point corresponding to the data partition to be processed; and determining that the data partition to be processed has performed the mount operation when it is determined that the data partition to be processed is mounted to its corresponding mount point.

[0038] The mount point corresponding to the data partition to be processed is the location of the file volume corresponding to the data partition to be processed in the directory hierarchy. For example, the mount point is the entry directory of the disk file system in a certain operating system, or the mount point is the drive letter used to access different partitions in a certain operating system.

[0039] By judging whether the data partition to be processed is mounted to its corresponding mount point, it is determined whether the data partition to be processed has performed the mount operation. When the mount point corresponding to the data partition to be processed exists, it can be determined that the data partition to be processed has performed the mount operation; when the mount point corresponding to the data partition to be processed does not exist, it can be determined that the mount point corresponding to the data partition to be processed is in an abnormal working state. For example, the mount point corresponding to the data partition to be processed has an abnormality such as a damaged storage unit. It is possible to quickly and accurately determine whether the data partition to be processed has performed the mount operation, which facilitates the subsequent evaluation of the mount status of the data partition to be processed and improves processing efficiency.

[0040] In some optional implementations, the step S102 of checking the mount status of the data partition to be processed according to the preset file system type and the file system type of the data partition to be processed may be implemented in the following manner:

[0041] When it is determined that the file system type of the data partition to be processed is the same as the preset file system type, create a preset file on the mount point corresponding to the data partition to be processed; when it is determined that the preset file is created successfully, determine that the file system type of the data partition to be processed is a read-write partition and the mount status of the data partition to be processed is successfully mounted; or, when it is determined that the preset file fails to be created, determine that the file system type of the data partition to be processed is a read-only partition and the mount status of the data partition to be processed is successfully mounted.

[0042] The preset file may be at least one of a text file, an image file, a table file and an audio file.

[0043] When the preset file is successfully created on the mount point corresponding to the data partition to be processed, it can be determined that the file system type of the data partition to be processed is a readable and writable partition, that is, write operations and read operations can be performed on the mount point corresponding to the data partition to be processed; further, it can be determined that the data partition to be processed has been successfully mounted on the mount point.

[0044] When the creation of the preset file on the mount point corresponding to the partition for the data to be processed fails, it can be determined that the file system type of the partition for the data to be processed is a read-only partition, that is, the write operation cannot be performed on the mount point corresponding to the partition for the data to be processed. However, the file stored in the mount point corresponding to the partition for the data to be processed can be read, thereby determining that the mount status of the partition for the data to be processed is successfully mounted.

[0045] Based on the different operation modes of the mount point corresponding to the data partition to be processed, it is possible to accurately determine whether the file system type of the data partition to be processed is a read-only partition or a read-write partition, thereby clarifying that the mount status of the data partition to be processed is successfully mounted, which facilitates subsequent operations on the data partition to be processed.

[0046] In some optional implementations, the step S102 of checking the mount status of the data partition to be processed according to the preset file system type and the file system type of the data partition to be processed may also be implemented in the following manner:

[0047] When it is determined that the file system type of the data partition to be processed is different from the preset file system type, or the mount point corresponding to the data partition to be processed is in an abnormal working state, the mount state of the data partition to be processed is determined to be mount failure.

[0048] By comparing the file system type of the data partition to be processed with the preset file system type, or judging the working status of the mount point corresponding to the data partition to be processed, when the file system type of the data partition to be processed is different from the preset file system type, or the mount point corresponding to the data partition to be processed is in an abnormal working state, it can be clearly seen that the status of the data partition to be processed is a mount failure, and the data partition to be processed needs to be further processed.

[0049] The mount point corresponding to the data partition to be processed is in an abnormal working state, including: the mount point corresponding to the data partition to be processed does not exist, or the mount point corresponding to the data partition to be processed is a memory file system. For example, a specific identifier is used to represent the memory file system. When it is detected that the identifier corresponding to the mount point is the specific identifier, it can be determined that the mount point corresponding to the data partition to be processed is a memory file system.

[0050] It should be noted that the memory file system (for example, the temporary file system (tmpfs)) generally has a very fast storage speed. Since the typical tmpfs file system will completely reside in the read-write power-off non-save partition, it cannot guarantee that the data stored therein will still be securely protected in the scenario of device power off. Therefore, when the mount point corresponding to the partition of the data to be processed is a memory file system, it can be determined that the mount point corresponding to the partition of the data to be processed is in an abnormal working state. At this time, it is determined that the mount state of the partition of the data to be processed is a mount failure, and the partition of the data to be processed needs to be reprocessed to ensure that the mount point corresponding to the partition of the data to be processed obtained in the end can store data safely.

[0051] In some optional embodiments, a method for checking whether a mount point corresponding to a data partition to be processed is in an abnormal working state includes: checking the traffic status of a terminal in an access terminal list at intervals of a preset duration; and determining that the mount point corresponding to the data partition to be processed is in an abnormal working state when it is determined that the data traffic of the terminal has not changed within the preset duration and that the terminal uses the data on the data partition to be processed.

[0052] The preset duration may be half an hour, one hour, etc., which is used to characterize the duration of the service operation cycle. The above preset duration is only an example, and can be specifically set according to actual needs. Other preset durations not described are also within the scope of protection of this application and will not be repeated here.

[0053] The access terminal list includes the identifiers of multiple terminals connected to the communication network. If the data traffic of the terminal does not change within the preset time (that is, the terminal has not performed any business within the preset time), but the terminal on the network usually interacts with the network-side devices such as routers to monitor the network status (for example, reporting a heartbeat message once every one second, etc.), and the data corresponding to the terminal needs to be stored in the partition for data to be processed, the data captured by the packet capture tool can confirm that the terminal is a terminal that is normally on the network and communicating. Therefore, it can be determined that the mount point corresponding to the partition for data to be processed is in an abnormal working state.

[0054] The communication network may be a mobile communication network or a network based on short-range communication, etc., and this application does not impose any limitation thereto.

[0055] Figure 2 FIG. 1 is a flow chart of a partition mounting method provided in an embodiment of the present application. The partition mounting method can be applied to a partition mounting device. Figure 2 As shown, the partition mounting method in the embodiment of the present application includes but is not limited to the following steps.

[0056] Step S201, using any of the methods for checking partition mounting in the embodiments of the present application to obtain the mounting status of the data partition to be processed.

[0057] The mount status includes mount success or mount failure.

[0058] In some optional implementations, before obtaining the mount status of the to-be-processed data partition in step S201, the partition mounting method further includes: performing partition processing on a storage area of ​​a preset device to obtain a plurality of to-be-processed data partitions with different file system types;

[0059] The file system type corresponding to the partition for processing data includes a read-only partition or a read-write partition, and the read-write partition includes a read-write power-off save partition or a read-write power-off non-save partition.

[0060] It should be noted that when a preset device (e.g., a router, a device with a large storage space (e.g., a smart phone, a server, etc.) is powered on, in order to meet different application requirements, the storage space needs to be divided into multiple data partitions, and different data partitions need to be mounted on different mount points. Among them, some data partitions are read-only partitions, some data partitions are read-write power-off preservation partitions, and some data partitions are read-write power-off non-save partitions (that is, the data partition can be read and written, but when the device is powered off, the data stored therein will be erased for next use).

[0061] In some specific implementations, if a preset file is created in the data partition to be processed, when it is determined that the preset file is created successfully, the file system type of the data partition to be processed is determined to be a read-write partition and the mount status of the data partition to be processed is successfully mounted. When it is determined that the preset file fails to be created, the file system type of the data partition to be processed is determined to be a read-only partition and the mount status of the data partition to be processed is successfully mounted.

[0062] Further, if it is determined that the file system type of the data partition to be processed is different from the preset file system type, or the mount point corresponding to the data partition to be processed is in an abnormal working state, it can be determined that the mount state of the data partition to be processed is mount failure.

[0063] Step S202: when it is determined that the mount status of the data partition to be processed is mount failure, the mount operation of the data partition to be processed is canceled, and the data partition to be processed is formatted.

[0064] The information in the data partition to be processed after formatting will be completely erased. Formatting the data partition to be processed is a process of registering, indexing and establishing a corresponding management table for the space of the data partition to be processed by using a specified file system type.

[0065] In some specific implementations, after the formatting of the data partition to be processed is completed, the formatted data partition to be processed can be remounted. The data partition to be processed is remounted based on the actual usage demand information of the user to ensure that the data stored in the data partition to be processed can be safely saved and used when the next mounting is successful.

[0066] In this embodiment, any one of the methods for checking partition mounting in the embodiments of the present application is used to obtain the mounting status of the data partition to be processed, so as to timely understand the mounting status of the data partition to be processed; when it is determined that the mounting status of the data partition to be processed is a mounting failure, the mounting operation of the data partition to be processed is released, and the data partition to be processed is formatted, thereby reducing the proportion of partition mounting failures.

[0067] The following is a detailed description of the device according to the embodiment of the present application in conjunction with the accompanying drawings. Figure 3 FIG. 1 is a block diagram showing a component of a partition inspection mounting device provided in an embodiment of the present application. Figure 3 As shown, the inspection partition mounting device 300 includes but is not limited to the following modules.

[0068] The checking module 301 is configured to determine the file system type of the data partition to be processed when it is determined that the data partition to be processed has been mounted.

[0069] The determination module 302 is configured to check the mounting status of the data partition to be processed according to the preset file system type and the file system type of the data partition to be processed.

[0070] It should be noted that the partition mounting checking device 300 in this embodiment can implement any of the partition mounting checking methods in the embodiments of the present application.

[0071] According to the partition mounting inspection device of the embodiment of the present application, the inspection module determines the file system type of the data partition to be processed when it is determined that the mount operation has been performed on the data partition to be processed, so as to reduce the proportion of file system type matching errors; the determination module is used to check the mount status of the data partition to be processed based on the preset file system type and the file system type of the data partition to be processed. In other words, by determining whether the file system type of the data partition to be processed is the same as the preset file system type, it is determined whether the mount operation performed on the data partition to be processed is successful, thereby accurately measuring the mount status of the data partition to be processed, and improving the proportion of successful mounting of the data partition to be processed, so that the operating system can use the data partition to be processed normally to work, so as to ensure the security of user data.

[0072] Figure 4 FIG. 1 is a block diagram showing the composition of a partition mounting device provided in an embodiment of the present application. Figure 4 As shown, the partition mount 400 includes but is not limited to the following modules.

[0073] The acquisition module 401 is configured to adopt any one of the methods for checking partition mounting in the embodiments of the present application to obtain the mounting status of the data partition to be processed.

[0074] The formatting module 402 is configured to cancel the mounting operation of the data partition to be processed and format the data partition to be processed when it is determined that the mounting status of the data partition to be processed is mounting failure.

[0075] It should be noted that the partition mounting device 400 in this embodiment can implement any partition mounting method in the embodiments of the present application.

[0076] According to the partition mounting device of the embodiment of the present application, the mounting status of the data partition to be processed is obtained by adopting any one of the methods for checking partition mounting in the embodiment of the present application through the acquisition module, so as to timely understand the mounting status of the data partition to be processed; when the formatting module is used to determine that the mounting status of the data partition to be processed is a mounting failure, the mounting operation of the data partition to be processed is released, and the data partition to be processed is formatted; and the formatting module is used to re-execute the mounting operation on the formatted data partition to be processed, thereby reducing the proportion of partition mounting failures.

[0077] Figure 5 FIG. 1 shows a block diagram of a partition mounting system provided by an embodiment of the present application. Figure 5 As shown, the partition mounting system 500 includes but is not limited to the following modules.

[0078] The partition mounting module 501 is used to mount different data partitions to corresponding mounting points.

[0079] The mount point is the location where the file volume exists in the directory hierarchy.

[0080] For example, the mount point is an entry directory of a disk file system in a certain operating system (eg, a Linux operating system), or the mount point is a drive letter used to access different partitions in other operating systems.

[0081] The mount status checking module 502 is used to check whether each data partition is successfully mounted to the corresponding mount point.

[0082] The data partition includes: a read-only partition or a read-write partition, and the read-write partition includes a read-write power-off save partition or a read-write power-off non-save partition.

[0083] It should be noted that for the mount operation of a read-write partition, it is necessary to ensure that data can be written to the mounted data partition; at the same time, the file system type of the mounted data partition must be checked to ensure that the file system type of the mounted data partition is the same as the preset file system type.

[0084] The partition formatting module 503 is used to unmount a data partition and format the data partition when it is determined that the mounting state of a data partition is mount failure; then, after completing the formatting operation of the data partition, it is necessary to re-perform the mounting operation on the data partition.

[0085] If the file system type of a data partition is different from the preset file system type, or the mount point corresponding to the data partition is in an abnormal working state, the mount state of the data partition is determined to be mount failure.

[0086] In some specific implementations, the partition mounting system can be applied to the Linux operating system and data products (for example, smart phones, customer premise equipment (CPE), data cards, etc.), and the data products can be applied to data communication application scenarios.

[0087] Figure 6 The following is a flow chart showing the working method of the partition mounting system provided by the embodiment of the present application. Figure 6 As shown, the working method of the partition mounting system includes but is not limited to the following steps.

[0088] Step S601, after the device is powered on, partition processing is performed on the storage area of ​​the device to obtain a plurality of to-be-processed data partitions with different file system types.

[0089] The file system type corresponding to the partition for processing data includes: a read-only partition or a read-write partition, and the read-write partition includes a read-write power-off save partition or a read-write power-off non-save partition.

[0090] For example, the device may be a router with multiple partitions. According to the use requirements of the user, the router is partitioned to obtain multiple data partitions to be processed with different file system types.

[0091] Step S602: performing mounting operations on multiple data partitions to be processed respectively.

[0092] Step S603, determining whether the mounting operation of each data partition to be processed has been completed.

[0093] If it is determined that the mount operation has been performed on the data partition to be processed, step S604 is executed; otherwise, the process returns to step S602.

[0094] The data partition to be processed may be mounted to a corresponding mount point to determine whether the data partition to be processed has been mounted. The mount point may be a file or a directory including a file path.

[0095] If it is determined that the data partition to be processed has been mounted to the mount point corresponding to it, it is determined that the data partition to be processed has performed the mount operation; if it is determined that the data partition to be processed has not been mounted to the mount point corresponding to it, it is determined that the mount point corresponding to the data partition to be processed is in an abnormal working state. For example, there is an abnormality such as a damaged storage unit in the mount point corresponding to the data partition to be processed.

[0096] Step S604: Detect whether the file system type of the data partition to be processed is the same as the preset file system type.

[0097] If it is determined that the file system type of the data partition to be processed is the same as the preset file system type, step S605 is executed; if it is determined that the file system type of the data partition to be processed is different from the preset file system type, step S606 is executed.

[0098] Step S605: Create a preset file on the mount point corresponding to the data partition to be processed, and determine the mount status of the data partition to be processed as successful mount based on the creation result of the preset file.

[0099] When it is determined that the preset file is created successfully, it is determined that the file system type of the data partition to be processed is a read-write partition and the mount status of the data partition to be processed is successfully mounted.

[0100] Alternatively, when it is determined that the preset file fails to be created, it is determined that the file system type of the to-be-processed data partition is a read-only partition and the mounting state of the to-be-processed data partition is successfully mounted.

[0101] Step S606: determine that the mount status of the data partition to be processed is mount failure.

[0102] It should be noted that, when it is determined that the file system type of the data partition to be processed is different from the preset file system type, or the mount point corresponding to the data partition to be processed is in an abnormal working state, the mount state of the data partition to be processed can be determined as mount failure.

[0103] Among them, if the mount point corresponding to the data partition to be processed does not exist, or the mount point corresponding to the data partition to be processed is a memory file system (for example, Tempff is used as the identifier of the memory file system, when the identifier corresponding to the mount point is detected as Tempff, it can be determined that the mount point corresponding to the data partition to be processed is a memory file system), then it can be determined that the mount point corresponding to the data partition to be processed is in an abnormal working state.

[0104] It should be noted that if the readable and writable power-off save partition in the readable and writable partition is mounted to the memory file system, when the device is powered off, the data written by the user to the readable and writable power-off save partition will be lost. Therefore, when the mount point corresponding to the partition of data to be processed is the memory file system, the mount status corresponding to the partition of data to be processed needs to be determined as mount failure, so as to remount the partition of data to be processed and ensure the security of the data input by the user.

[0105] Step S607, cancel the mounting operation of the data partition to be processed, and format the data partition to be processed to obtain the formatted data partition to be processed.

[0106] Among them, all the information in the data partition to be processed after formatting will be erased. At this time, the data partition to be processed can be remounted according to the user's usage requirements to ensure that the data stored in the data partition to be processed can be safely saved and used when the data partition to be processed is successfully mounted next time.

[0107] After executing step S607, the process returns to executing step S602, and the formatted data partition to be processed is remounted until the mount status corresponding to the formatted data partition to be processed is successfully mounted.

[0108] According to the partition mounting system of the embodiment of the present application, by determining the file system type of the data partition to be processed when determining that the data partition to be processed has executed the mounting operation, the proportion of file system type matching errors is reduced; further, by determining whether the file system type of the data partition to be processed is the same as the preset file system type, it is determined whether the mounting operation performed on the data partition to be processed is successful, thereby accurately measuring the mounting status of the data partition to be processed, and improving the proportion of successful mounting of the data partition to be processed, so that the operating system can normally use the data partition to be processed to work. When it is determined that the mounting status of the data partition to be processed is a mounting failure, the data partition to be processed is formatted; and the mounting of the data partition to be processed is released, and then the mounting operation is re-executed on the formatted data partition to be processed, thereby reducing the proportion of partition mounting failures.

[0109] It should be clear that the present application is not limited to the specific configurations and processes described in the above embodiments and shown in the figures. For the convenience and brevity of description, a detailed description of the known methods is omitted here, and the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, which will not be repeated here.

[0110] Figure 7 A structural diagram showing an exemplary hardware architecture of a computing device capable of implementing the method for checking partition mounting or the method for mounting partitions according to an embodiment of the present application.

[0111] like Figure 7 As shown, the computing device 700 includes an input device 701, an input interface 702, a central processing unit 703, a memory 704, an output interface 705, and an output device 706. The input interface 702, the central processing unit 703, the memory 704, and the output interface 705 are connected to each other via a bus 707, and the input device 701 and the output device 706 are connected to the bus 707 via the input interface 702 and the output interface 705, respectively, and are further connected to other components of the computing device 700.

[0112] Specifically, the input device 701 receives input information from the outside and transmits the input information to the central processing unit 703 through the input interface 702; the central processing unit 703 processes the input information based on the computer executable instructions stored in the memory 704 to generate output information, temporarily or permanently stores the output information in the memory 704, and then transmits the output information to the output device 706 through the output interface 705; the output device 706 outputs the output information to the outside of the computing device 700 for user use.

[0113] In one embodiment, Figure 7The computing device shown can be implemented as an electronic device, which may include: a memory configured to store a program; a processor configured to run the program stored in the memory to execute the method for checking partition mounting or the partition mounting method described in the above embodiment.

[0114] In one embodiment, Figure 7 The computing device shown may be implemented as a partition mounting system, which may include: a memory configured to store a program; and a processor configured to run the program stored in the memory to execute the partition mounting method described in the above embodiment.

[0115] The above is only an exemplary embodiment of the present application and is not intended to limit the scope of protection of the present application. In general, various embodiments of the present application can be implemented in hardware or special circuits, software, logic or any combination thereof. For example, some aspects can be implemented in hardware, while other aspects can be implemented in firmware or software that can be executed by a controller, a microprocessor or other computing device, although the present application is not limited thereto.

[0116] Embodiments of the present application may be implemented by a processor executing computer program instructions, such as in a processor entity, or by hardware, or by a combination of software and hardware. The computer program instructions may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages.

[0117] The block diagram of any logic flow in the accompanying drawings of the present application can represent program steps, or can represent interconnected logic circuits, modules and functions, or can represent a combination of program steps and logic circuits, modules and functions. The computer program can be stored on a memory. The memory can have any type suitable for the local technical environment and can be implemented using any suitable data storage technology, such as but not limited to read-only memory (ROM), random access memory (RAM), optical memory device and system (digital versatile disc DVD or CD disc), etc. Computer-readable media may include non-transient storage media. The processor can be any type suitable for the local technical environment, such as but not limited to a general-purpose computer, a special-purpose computer, a microprocessor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a programmable logic device (FGPA) and a processor based on a multi-core processor architecture.

[0118] By way of exemplary and non-limiting examples, a detailed description of exemplary embodiments of the present application has been provided above. However, various modifications and adjustments to the above embodiments will be apparent to those skilled in the art when considered in conjunction with the accompanying drawings and claims, but will not depart from the scope of the present application. Therefore, the proper scope of the present application will be determined according to the claims.

Claims

1. A method for checking partition mounting, characterized in that: The method comprises: In the case where it is determined that the mount operation has been performed on the data partition to be processed, determining the file system type of the data partition to be processed; According to the preset file system type and the file system type of the data partition to be processed, the mounting status of the data partition to be processed is checked.

2. The method according to claim 1, characterized in that In the case where it is determined that the data partition to be processed has been mounted, before determining the file system type of the data partition to be processed, the method for checking partition mounting further includes: Obtaining the mount point corresponding to the data partition to be processed; In the case where it is determined that the data partition to be processed is mounted to its corresponding mount point, it is determined that the mount operation has been performed on the data partition to be processed.

3. The method according to claim 2, characterized in that The step of checking the mounting status of the data partition to be processed according to the preset file system type and the file system type of the data partition to be processed includes: When it is determined that the file system type of the to-be-processed data partition is the same as the preset file system type, creating a preset file on the mount point corresponding to the to-be-processed data partition; In the case of determining that the preset file is created successfully, determining that the file system type of the to-be-processed data partition is a readable and writable partition and the mount status of the to-be-processed data partition is successfully mounted; or In the case where it is determined that the preset file fails to be created, it is determined that the file system type of the to-be-processed data partition is a read-only partition and the mounting state of the to-be-processed data partition is successfully mounted.

4. The method according to claim 2, characterized in that: The step of checking the mounting status of the data partition to be processed according to the preset file system type and the file system type of the data partition to be processed includes: When it is determined that the file system type of the data partition to be processed is different from the preset file system type, or the mount point corresponding to the data partition to be processed is in an abnormal working state, the mount state of the data partition to be processed is determined to be mount failure.

5. The method according to claim 4, characterized in that The method for checking whether the mount point corresponding to the to-be-processed data partition is in an abnormal working state comprises: At each preset time interval, the flow status of the terminals in the access terminal list is checked; When it is determined that the data flow of the terminal has not changed within the preset time period and the terminal uses the data on the data partition to be processed, it is determined that the mount point corresponding to the data partition to be processed is in the abnormal working state.

6. The method according to claim 4 or 5, characterized in that: The mount point corresponding to the data partition to be processed is in an abnormal working state, including: The mount point corresponding to the data partition to be processed does not exist, or the mount point corresponding to the data partition to be processed is a memory file system.

7. A partition mounting method, characterized in that: The method comprises: Adopting the method for checking partition mounting according to any one of claims 1 to 6, obtaining the mounting status of the data partition to be processed; When it is determined that the mount status of the data partition to be processed is mount failure, the mount operation of the data partition to be processed is released, and the data partition to be processed is formatted.

8. The partition mounting method according to claim 7, characterized in that: Before obtaining the mounting status of the data partition to be processed, the partition mounting method further includes: Partitioning a storage area of ​​a preset device to obtain a plurality of to-be-processed data partitions with different file system types; The file system type corresponding to the to-be-processed data partition includes a read-only partition or a read-write partition, and the read-write partition includes a read-write power-off save partition or a read-write power-off non-save partition.

9. An electronic device, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method for checking partition mounting as described in any one of claims 1 to 6, or the partition mounting method as described in any one of claims 7 to 8.

10. A readable storage medium, characterized in that: The readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for checking partition mounting according to any one of claims 1 to 6, or the partition mounting method according to any one of claims 7 to 8 is implemented.