Data clearing method, mobile terminal and storage medium

By setting different partition mounting parameters in the mobile terminal, setting the data partition to an unmounted state, generating a mapping table and formatting the unmounted partition, the problems of low data clearing efficiency and incomplete deletion in the existing technology are solved. Enables fast and secure data erasure.

CN112306374BActive Publication Date: 2024-09-17SHENZHEN TCL NEW-TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910704082.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-07-31
Publication Date
2024-09-17
Estimated Expiration
2039-07-31

AI Technical Summary

Technical Problem

The existing technology has low efficiency, complex operations and incomplete deletion during the mobile terminal data clearing process, resulting in low production efficiency and data omission or deletion failure.

Method used

By setting partition mounting parameters that are different from those in regular mode, set the physical partition of the data partition to an unmounted state, generate a mapping mount relationship table, and find and format unmounted partitions to achieve fast data clearing.

Benefits of technology

It improves the efficiency of data clearing, reduces the time-consuming reset during production, avoids data deletion failure, and ensures the integrity and security of data clearing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112306374B
    Figure CN112306374B
Patent Text Reader

Abstract

The present invention discloses a data clearing method, a mobile terminal and a storage medium, wherein the data clearing method comprises: when the mobile terminal is started, selecting to enter the production mode according to the startup parameters in the system file of the mobile terminal; when entering the production mode, mapping and mounting the system file in the mobile terminal with the physical partition according to the production mode partition mounting parameters in the system file; generating a corresponding mapping and mounting relationship table according to the mapping and mounting of the system file and the physical partition, wherein the mapping and mounting relationship table records the mounting status corresponding to each physical partition; and formatting the unmounted physical partition according to the mapping and mounting relationship table. The present invention sets the physical partition corresponding to the data partition in the normal mode to the unmounted state, and can directly format the unmounted physical partition in the production mode, thereby reducing the time consumption of resetting the user data link during production and improving the production line efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of mobile terminal applications, and in particular to a data clearing method, a mobile terminal and a storage medium. Background Art

[0002] When mass-producing devices using the Android system, they usually need to be produced in the form of pre-written software patches. In order to meet production needs, some data and information required for production line testing will be included in the pre-written software. Therefore, before the device leaves the factory, this data and information needs to be cleared to ensure that the device purchased by the user is in a clean state.

[0003] Currently, there are several ways for manufacturers to clear user data and information during production. One is to use the factory settings function of the device to reset the data, but this method takes a lot of time and leads to low production efficiency; the second is to use application-level data recovery, that is, during the reset operation, the application clears the data to be restored one by one, but this method is complicated to operate and is prone to omissions when clearing data; another is to directly delete the relevant database, which is simple and crude, has low deletion reliability, and is prone to deletion failure.

[0004] Therefore, the prior art still needs to be improved and developed. Summary of the invention

[0005] The technical problem to be solved by the present invention is that, in view of the defects of the prior art, the present invention provides a data clearing method, a mobile terminal and a storage medium. By setting partition mounting parameters different from those in the normal mode, the physical partition belonging to the data partition in the normal mode is set to an unmounted state, so that the mobile terminal can directly format the unmounted physical partition in the production mode, thereby improving the efficiency of data clearing in the production mode.

[0006] The technical solution adopted by the present invention to solve the technical problem is as follows:

[0007] The present invention provides a data clearing method, wherein the data clearing method comprises the following steps:

[0008] When the mobile terminal is started, the startup parameters in the system file of the mobile terminal are obtained, and the production mode is selected according to the startup parameters;

[0009] When entering the production mode, obtaining the production mode partition mounting parameters in the system file, and mapping and mounting the system file and the physical partition in the mobile terminal according to the production mode partition mounting parameters;

[0010] Generate a corresponding mapping and mounting relationship table according to the mapping and mounting of the system file and the physical partition, wherein the mapping and mounting relationship table records the mounting status corresponding to each physical partition;

[0011] The physical partition in the unmounted state is searched according to the mapping mount relationship table, and the physical partition in the unmounted state is formatted.

[0012] Furthermore, when the mobile terminal is started, the startup parameters in the system file of the mobile terminal are obtained, and before the selection to enter the production mode according to the startup parameters, the following steps are also included:

[0013] The startup parameters for starting the production mode are set, and the production mode partition mounting parameters for mapping and mounting the system files and the physical partition in the production mode are set.

[0014] Furthermore, when the mobile terminal is started, obtaining the startup parameters in the system file of the mobile terminal, and selecting to enter the production mode according to the startup parameters specifically includes the following steps:

[0015] When the mobile terminal is started, obtaining startup parameters in the system file of the mobile terminal;

[0016] Determining whether the start mark in the start parameter is a start mark for starting the production mode;

[0017] When the startup mark in the startup parameter is a startup mark for starting the production mode, the production mode is entered.

[0018] Further, the determining whether the startup mark in the startup parameter is a startup mark for starting the production mode specifically comprises the following steps:

[0019] Determining whether the startup mark in the startup parameter is a preset mark;

[0020] When the start mark in the start parameter is a preset mark, it is determined that the start mark in the start parameter is a start mark for starting the production mode.

[0021] Furthermore, when entering the production mode, obtaining the production mode partition mounting parameters in the system file, and mapping and mounting the system file in the mobile terminal with the physical partition according to the production mode partition mounting parameters specifically includes the following steps:

[0022] When entering the production mode, passing the startup parameters to the startup process through the kernel command line in the system file;

[0023] When the startup process receives the startup parameter, obtaining the production mode partition mounting parameter in the system file;

[0024] The system files are mapped and mounted with the physical partition according to the production mode partition mounting parameters.

[0025] Further, the system files include a boot partition, a system partition, a repair partition, a data partition and a system cache partition, and the physical partitions include a first partition, a second partition, a third partition, a fourth partition and a fifth partition;

[0026] The mapping and mounting of the system file and the physical partition according to the production mode partition mounting parameters specifically comprises the following steps:

[0027] Mounting the boot partition in the system file to the first partition of the physical partition;

[0028] Mounting the system partition in the system file to the second partition of the physical partition;

[0029] Mounting the repair partition in the system file to the third partition of the physical partition;

[0030] Mounting the data partition in the system file to the fifth partition of the physical partition;

[0031] The fourth partition of the physical partition is set to an unmounted state.

[0032] Further, the generating of a corresponding mapping and mounting relationship table according to the mapping and mounting of the system file and the physical partition, wherein the mapping and mounting relationship table records the mounting status corresponding to each physical partition, specifically comprises the following steps:

[0033] Generate a corresponding mapping and mounting relationship table by mapping and mounting the system files and the physical partitions; the mapping and mounting relationship table records the mounting status corresponding to each physical partition;

[0034] Marking the physical partitions in the unmounted state in the mapping mount relationship table;

[0035] The mapping mount relationship table is stored.

[0036] Further, searching the unmounted physical partition according to the mapping mount relationship table and formatting the unmounted physical partition specifically includes the following steps:

[0037] Searching for the unmounted physical partition according to the mark in the mapping mount relationship table;

[0038] The unmounted physical partition is formatted using a format command.

[0039] Furthermore, the step of searching the unmounted physical partition according to the mapping mount relationship table and formatting the unmounted physical partition further includes the following steps:

[0040] Restarting the mobile terminal and entering the normal mode according to the startup parameters of the normal mode;

[0041] When entering the normal mode, the system files and physical partitions of the mobile terminal are partition mounted according to the normal mode partition mounting parameters in the normal mode.

[0042] The present invention also provides a mobile terminal, which includes a processor and a memory connected to the processor, wherein the memory stores a data clearing program, and when the data clearing program is executed by the processor, it is used to implement the data clearing method.

[0043] The present invention also provides a storage medium, wherein the storage medium stores a data clearing program, and the data clearing program is used to implement the data clearing method when executed by a processor.

[0044] The present invention provides a data clearing method, a mobile terminal and a storage medium. By setting partition mounting parameters different from those in a normal mode, a physical partition belonging to a data partition in a normal mode is set to an unmounted state. The physical partition in the unmounted state can be directly formatted to achieve the purpose of quickly clearing user data. By setting the unmounted physical partition, the time consumption of resetting user data during production is reduced, the production line efficiency is improved, and the phenomenon of failure in deleting user data is also avoided. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 It is a flow chart of a preferred embodiment of the data clearing method of the present invention.

[0046] Figure 2 This is a mapping diagram of partition mounting in normal mode.

[0047] Figure 3 It is a mapping relationship diagram of partition mounting in the production mode of the present invention.

[0048] Figure 4 It is a functional principle diagram of the mobile terminal of the present invention. DETAILED DESCRIPTION

[0049] In order to make the purpose, technical solution and advantages of the present invention clearer and more specific, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0050] Embodiment 1

[0051] During the production stage of Android devices, pre-written software patches are usually used for production. In order to meet production needs, the pre-written software will contain some necessary data and information required for production line testing. Therefore, at the last link of the production stage, the user data and information generated by the production line testing needs to be cleared to ensure that the device received by the user is in a clean state.

[0052] The data clearing method described in the preferred embodiment of the present invention is as follows: Figure 1 As shown, Figure 1 It is a flow chart of a preferred embodiment of the data clearing method of the present invention.

[0053] The data clearing method comprises the following steps:

[0054] Step S100, when the mobile terminal is started, the startup parameters in the system file of the mobile terminal are obtained, and the production mode is selected according to the startup parameters.

[0055] In the Android system, the system files mainly include the Boot partition, System partition, Recovery partition, Data partition and Cache partition; wherein, each partition in the system file has its own corresponding physical partition, and at the same time, each partition in the system file has its own implemented function; the physical partition can be understood as dividing the memory of the mobile terminal into multiple partitions, such as: the first partition, the second partition, the third partition, the fourth partition and the fifth partition; each physical partition corresponds to a file partition in the Android system file, such as: the first partition corresponds to the Boot partition in the system file; therefore, the correspondence between the system files and the physical partitions in the Android system is similar to the correspondence between the system and the system disk in the computer; the corresponding system files can be searched through the physical partitions, such as: the startup files in the Boot partition can be searched in the first partition; that is, when the mobile terminal starts, it only needs to read the first partition.

[0056] In the Android system, the partitions and corresponding functions in the system file are:

[0057]

[0058] It can be seen that the Cache partition (system cache area) is only used for caching and does not store important data. Deleting the data in the partition or removing the data in the partition will not affect the normal operation of the Android system. In this embodiment, the characteristics of the partition are used to implement a partition mounting method different from the conventional one.

[0059] In this embodiment, when the mobile terminal is started, the mobile terminal will obtain the startup parameters of the Boot partition in the system file, and choose to enter different modes according to the startup parameters, such as: normal mode, repair mode and production mode, etc.; among them, the normal mode is mainly used for daily use by users, the repair mode is mainly used for maintenance personnel to repair the system, and the production mode is used to detect the mobile terminal and clear data during the production stage; therefore, before the mobile terminal is started, the corresponding startup parameters are set according to the use requirements of the production mode, so that the mobile terminal can enter the production mode when it starts.

[0060] After entering different modes, the mobile terminal will mount the physical partitions on the storage and the partitions in the system files through the init process in the startup partition (the init process is the first process of the Android system startup, used to initialize the driver and data structure of the Android device, etc.); for example: Figure 2 As shown, in the normal mode, the physical partition mounted by the Data partition is Partition 3 (i.e., the fourth partition in the physical partition), that is, the user data is stored in this partition Partition 3; in this embodiment, in order to adopt partition mounting parameters different from those in the normal mode, it is necessary to pre-set the production mode partition mounting parameters for the production mode; the production mode partition mounting parameters can be used in the production mode, when the mobile terminal is started, to map and mount the system files with the physical partition according to the production mode partition mounting parameters, for example: mounting the Boot partition to the first partition of the physical partition.

[0061] That is, before step S100, the following steps are also included:

[0062] Step S001, setting startup parameters for starting the production mode, and setting production mode partition mounting parameters for mapping and mounting the system files and the physical partition in the production mode.

[0063] The startup parameters and the partition mounting parameters may be set directly in the mobile terminal, or may be set through a pre-written software patch used in the production stage.

[0064] In this embodiment, when the mobile terminal starts, the mobile terminal obtains the pre-set startup parameters for starting the production mode from the system file, that is, the mobile terminal reads the first partition in the physical partition when starting, and reads the startup parameters in the Boot partition from the first partition; then, the production mode is selected according to the startup parameters; specifically, a startup mark is set in the startup parameters, and the startup mark represents a preset value, for example: in normal mode, the value of the startup mark is 0; in production mode, the value of the startup mark is 1; in repair mode, the value of the startup mark is 2.

[0065] When the mobile terminal obtains the startup parameter, the mobile terminal will determine whether it is the startup mark for starting the production mode based on the startup mark in the startup parameter, for example: determine whether the startup mark in the startup parameter is a value 1. When the startup mark in the startup parameter is a value 1, determine that the startup mark in the startup parameter is the startup mark for starting the production mode; at this time, the mobile terminal can enter the production mode according to the startup mark, so that in the production mode, the mapping and mounting of the system files and the physical partition can be completed according to the production mode partition mount parameters.

[0066] That is, the step S100 specifically includes the following steps:

[0067] Step S110, when the mobile terminal is started, obtaining startup parameters in the system file of the mobile terminal;

[0068] Step S120, determining whether the start mark in the start parameter is a start mark for starting the production mode;

[0069] Step S130: When the start mark in the start parameter is a start mark for starting the production mode, enter the production mode.

[0070] Wherein, in the step S120, the following steps are specifically included:

[0071] Step S121, determining whether the startup mark in the startup parameter is a preset mark;

[0072] Step S122: when the start mark in the start parameter is a preset mark, determining that the start mark in the start parameter is a start mark for starting the production mode.

[0073] In this embodiment, by pre-setting the startup parameters and partition mount parameters for the production mode, the mobile terminal can choose to enter the required production mode according to the startup parameters when starting up, so that the mapping and mounting of the system files and the physical partitions can be completed subsequently according to the production mode partition mount parameters.

[0074] Step S200, when entering the production mode, obtaining the production mode partition mounting parameters in the system file, and mapping and mounting the system file and the physical partition in the mobile terminal according to the production mode partition mounting parameters.

[0075] When the mobile terminal enters the production mode, the mobile terminal passes the startup parameters to the startup process through the kernel command line in the system file; the kernel command line is the Linux Kernel Command Line, which refers to the input parameters of the Linux kernel; the kernel command line is usually written in the menu.lst of grub, and then various boot loaders (grub, lilo, pxeloader, etc.) are responsible for copying it to the specified location in the memory. At this specified location, the Linux kernel can use a pointer (cmdline pointer) passed by the boot loader to obtain the kernel input parameters.

[0076] The startup process, namely the init process, is the first process run by the Android basic system; after receiving the startup parameters, the init process will use partition mounting parameters different from the normal mode according to the startup mark in the startup parameters.

[0077] In this embodiment, since the pre-set parameters are for the production mode partition mount parameters in the production mode, the init process will use the production mode partition mount parameters to complete the mapping mount between the system files and the physical partition.

[0078] In normal mode, the init process maps and mounts according to the normal mode partition mount parameters, such as Figure 2 As shown, the specific performance is:

[0079] The boot partition in the system file ( Figure 2 boot) is mounted to the first partition of the physical partition ( Figure 2 Partition 0 shown in the system file); the system partition ( Figure 2 System) is mounted to the second partition of the physical partition ( Figure 2 Partition 1 shown in the system file); the repair partition ( Figure 2 Recovery) is mounted to the third partition of the physical partition ( Figure 2 Partition 2 shown in ); partition the data in the system file ( Figure 2 Data) is mounted to the fourth partition of the physical partition ( Figure 2 Partition 3 shown in ); the system cache partition in the system file ( Figure 2 Cache shown in ) is mounted to the fifth partition of the physical partition ( Figure 2 Therefore, in the normal mode of mounting, the system files correspond to the physical partitions one by one, and all physical partitions are in a mounted state; in the normal mode, the fourth partition needs to be cleared ( Figure 2 The user data in Partition 3) shown in the figure needs to be in recovery mode.

[0080] In this embodiment, in production mode, the init process performs mapping and mounting according to the production mode partition mounting parameters, such as Figure 3 As shown, the specific performance is:

[0081] The boot partition in the system file ( Figure 3 boot) is mounted to the first partition of the physical partition ( Figure 3 Partition 0 shown in the system file); the system partition ( Figure 3 System) is mounted to the second partition of the physical partition ( Figure 3 Partition 1 shown in the system file); the repair partition ( Figure 3 Recovery) is mounted to the third partition of the physical partition ( Figure 3 Partition 2 shown in ); partition the data in the system file ( Figure 3 Data) is mounted to the fifth partition of the physical partition ( Figure 3 Partition 4 shown in ).

[0082] In the production mode, after mapping and mounting, the difference from the normal mode is that: the mounting mapping relationship between the Data partition and the Cache partition is different from that in the normal mode, that is, the mounting mapping relationship between the Data partition and the Cache partition is adjusted; that is, in the production mode, the physical partition Partition 4 that belongs to the Cache partition in the normal mode is mounted as the Data partition, while the physical partition Partition 3 is not mounted; at this time, since the physical partition Partition 3 is in an unmounted idle state, that is, the fourth partition of the physical partition is in an unmounted state, at this time, the user data in the fourth partition can be cleared by the clear command, thereby avoiding the use of the recovery mode and improving the efficiency of clearing user data while ensuring system security.

[0083] That is, the step S200 specifically includes the following steps:

[0084] Step S210, when entering the production mode, passing the startup parameters to the startup process through the kernel command line in the system file;

[0085] Step S220, when the startup process receives the startup parameter, obtaining the production mode partition mounting parameter in the system file;

[0086] Step S230, mapping and mounting the system files and the physical partition according to the production mode partition mounting parameters.

[0087] In this embodiment, the pre-set startup parameters are passed through the kernel command line in the system file, so that the startup process can call the pre-set production mode partition mount parameters according to the startup process, so that during the startup phase of the mobile terminal, the system file and the physical partition are mapped and mounted, so as to facilitate the subsequent search for the fourth partition in the physical partition and clear the user data on the unmounted fourth partition.

[0088] Step S300: Generate a corresponding mapping and mounting relationship table according to the mapping and mounting between the system file and the physical partition, wherein the mapping and mounting relationship table records the mounting status corresponding to each physical partition.

[0089] In this embodiment, after the startup process maps and mounts the system file and the physical partition, the mobile terminal generates a corresponding mapping and mounting relationship table according to the mapping and mounting of the system file and the physical partition, for example: in the mapping and mounting relationship table, Boot corresponds to Partition 0, System corresponds to Partition 1, Recovery corresponds to Partition 2, and Data corresponds to Partition 4; while generating the corresponding mapping and mounting relationship table, the physical partitions in the unmounted state are identified, for example: a specific value is used to identify the unmounted physical partition Partition 3; when the marking is completed, the mapping and mounting relationship table is stored so that the mobile terminal can query the unmounted physical partition from the mapping and mounting relationship table when clearing user data.

[0090] That is, the step S300 specifically includes the following steps:

[0091] Step S310, mapping and mounting the system files and the physical partitions to generate a corresponding mapping and mounting relationship table, wherein the mapping and mounting relationship table records the mounting status corresponding to each physical partition;

[0092] Step S320, marking the physical partition in the unmounted state in the mapping mount relationship table;

[0093] Step S330, storing the mapping mount relationship table.

[0094] In this embodiment, by generating a corresponding mapping and mounting relationship table by mapping and mounting the system file and the physical partition, the mobile terminal can accurately find the unmounted physical partition when clearing user data later, and can avoid clearing other mounted physical partitions, thereby ensuring the security of the mobile terminal; at the same time, by marking the unmounted physical partition in the mapping and mounting relationship table, it is convenient to quickly find the unmounted physical partition when clearing user data later, which can improve the efficiency of searching.

[0095] Step S400: searching the unmounted physical partition according to the mapping mount relationship table, and formatting the unmounted physical partition.

[0096] In this embodiment, after the mobile terminal generates the mapping mount relationship table, the mobile terminal will search for the unmounted physical partition, that is, the physical partition Partition 3, according to the mark in the mapping mount relationship table; then, the unmounted physical partition is formatted through the formatting command, for example: the Linux mkfs command (that is, mkfs.ext3, a formatting command) can be directly used to format the Partition 3 physical partition; when the formatting operation is completed, it indicates that the user data on the Partition 3 physical partition has been cleared; when the mobile terminal restarts again, the Partition 3 physical partition is in a clean state.

[0097] That is, the step S400 specifically includes the following steps:

[0098] Step S410, searching for the unmounted physical partition according to the mark in the mapping mount relationship table;

[0099] Step S420: formatting the unmounted physical partition using a format command.

[0100] In this embodiment, after the unmounted physical partition is formatted, in order to ensure normal use by the user, the mobile terminal will restart once and enter the normal mode according to the startup parameters of the normal mode; when entering the normal mode, the system files and the physical partitions of the mobile terminal are partition-mounted according to the normal mode partition mounting parameters in the normal mode; that is, the data partition (Data partition) in the system files is remounted to the fourth partition (Partition 3) of the physical partition.

[0101] That is, the step S400 includes the following steps:

[0102] Step S430, restarting the mobile terminal and entering the normal mode according to the startup parameters of the normal mode;

[0103] Step S440, when entering the normal mode, partition mounting is performed on the system files and physical partitions of the mobile terminal according to the normal mode partition mounting parameters in the normal mode.

[0104] In this embodiment, by searching the mark in the mapping mount relationship table, the unmounted physical partition is obtained, and the unmounted physical partition is cleared by using the formatting operation, so that the user data on the mobile terminal is completely cleared. Compared with the traditional clearing method, the operation is convenient and fast, which is conducive to clearing a large number of mobile terminals in the production mode, thereby improving the clearing efficiency of the production line.

[0105] In summary, in this embodiment, by setting a partition mounting mode different from the normal mode, the physical partition originally belonging to the data partition is placed in an idle state, so that the physical partition can be completely formatted. This method of clearing user data is simple to operate, safe and reliable.

[0106] Embodiment 2

[0107] See also Figure 4 , Figure 4 It is a functional principle block diagram of a mobile terminal in a preferred embodiment of the present invention.

[0108] like Figure 4 As shown, an embodiment of the present invention provides a mobile terminal, which may be a mobile phone (or a tablet computer), wherein the mobile terminal of this embodiment includes a processor 10 and a memory 20 connected to the processor 10;

[0109] The memory 20 stores a data clearing program, which is used to implement the above-mentioned data clearing method when executed by the processor 10; the details are as described above.

[0110] Embodiment 3

[0111] An embodiment of the present invention provides a storage medium, wherein the storage medium stores a data clearing program, and the data clearing program is used to implement the above-mentioned data clearing method when executed by a processor; the details are as described above.

[0112] In summary, the present invention provides a data clearing method, a mobile terminal and a storage medium. By setting a production mode startup mark in the pre-copying software in advance, when entering the production mode, a partition mounting parameter different from that of the normal mode is set according to the preset production mode startup mark, and the physical partition belonging to the system cache area in the normal mode is mounted on the data partition, so that the physical partition corresponding to the data partition is in an unmounted state; in this way, the physical partition in the unmounted state can be directly formatted to achieve the purpose of quickly clearing user data; by setting the unmounted physical partition, the time consumption of resetting user data during production is reduced, the production line efficiency is improved, and the phenomenon of failure to delete user data is also avoided.

[0113] Of course, those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware (such as a processor, a controller, etc.) through a computer program, and the program can be stored in a computer-readable storage medium, and the program can include the processes of the above-mentioned method embodiments when executed. The storage medium can be a memory, a disk, an optical disk, etc.

[0114] It should be understood that the application of the present invention is not limited to the above examples. For ordinary technicians in this field, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.

Claims

1. A data clearing method, characterized in that: The data clearing method comprises the following steps: When the mobile terminal is started, the startup parameters in the system file of the mobile terminal are obtained, and the production mode is selected according to the startup parameters; When entering the production mode, obtaining the production mode partition mounting parameters in the system file, and mapping and mounting the system file and the physical partition in the mobile terminal according to the production mode partition mounting parameters; Generate a corresponding mapping and mounting relationship table according to the mapping and mounting between the system file and the physical partition, wherein the mapping and mounting relationship table records the mounting status corresponding to each physical partition; Searching for a physical partition in an unmounted state according to the mapping mount relationship table, and formatting the physical partition in the unmounted state; The system files include a boot partition, a system partition, a repair partition, a data partition, and a system cache partition, and the physical partitions include a first partition, a second partition, a third partition, a fourth partition, and a fifth partition; The mapping and mounting of the system file and the physical partition according to the production mode partition mounting parameters specifically comprises the following steps: Mounting the boot partition in the system file to the first partition of the physical partition; Mounting the system partition in the system file to the second partition of the physical partition; Mounting the repair partition in the system file to the third partition of the physical partition; Mounting the data partition in the system file to the fifth partition of the physical partition; Setting the fourth partition of the physical partition to an unmounted state; In the production mode, the physical partition and the partition in the system file are partition mounted through the init process in the boot partition.

2. The data clearing method according to claim 1, characterized in that: When the mobile terminal is started, the startup parameters in the system file of the mobile terminal are obtained, and before the selection to enter the production mode according to the startup parameters, the following steps are also included: The startup parameters for starting the production mode are set, and the production mode partition mounting parameters for mapping and mounting the system files and the physical partition in the production mode are set.

3. The data clearing method according to claim 2, characterized in that: When the mobile terminal is started, obtaining the startup parameters in the system file of the mobile terminal, and selecting to enter the production mode according to the startup parameters specifically includes the following steps: When the mobile terminal is started, obtaining startup parameters in the system file of the mobile terminal; Determining whether the start mark in the start parameter is a start mark for starting the production mode; When the startup mark in the startup parameter is a startup mark for starting the production mode, the production mode is entered.

4. The data clearing method according to claim 3, characterized in that: Determining whether the startup mark in the startup parameter is a startup mark for starting the production mode specifically includes the following steps: Determining whether the startup mark in the startup parameter is a preset mark; When the start mark in the start parameter is a preset mark, it is determined that the start mark in the start parameter is a start mark for starting the production mode.

5. The data clearing method according to claim 1, characterized in that: When entering the production mode, obtaining the production mode partition mounting parameters in the system file, and mapping and mounting the system file in the mobile terminal with the physical partition according to the production mode partition mounting parameters specifically comprises the following steps: When entering the production mode, passing the startup parameters to the startup process through the kernel command line in the system file; When the startup process receives the startup parameter, obtaining the production mode partition mounting parameter in the system file; The system files are mapped and mounted with the physical partition according to the production mode partition mounting parameters.

6. The data clearing method according to any one of claims 1 to 5, characterized in that: The step of generating a corresponding mapping and mounting relationship table according to the mapping and mounting of the system file and the physical partition specifically comprises the following steps: Generate a corresponding mapping and mounting relationship table by mapping and mounting the system files and the physical partitions; Marking the physical partitions in the unmounted state in the mapping mount relationship table; The mapping mount relationship table is stored.

7. The data clearing method according to claim 6, characterized in that: The step of searching the unmounted physical partition according to the mapping mount relationship table and formatting the unmounted physical partition specifically comprises the following steps: Searching for the unmounted physical partition according to the mark in the mapping mount relationship table; The unmounted physical partition is formatted using a format command.

8. The data clearing method according to any one of claims 1 to 5, characterized in that: The step of searching the unmounted physical partition according to the mapping mount relationship table and formatting the unmounted physical partition further includes the following steps: Restarting the mobile terminal and entering the normal mode according to the startup parameters of the normal mode; When entering the normal mode, the system files and physical partitions of the mobile terminal are partition mounted according to the normal mode partition mounting parameters in the normal mode.

9. A mobile terminal, characterized in that: It comprises a processor and a memory connected to the processor, wherein the memory stores a data clearing program, and when the data clearing program is executed by the processor, it is used to implement the data clearing method according to any one of claims 1 to 8.

10. A storage medium, characterized in that: The storage medium stores a data clearing program, and when the data clearing program is executed by the processor, it is used to implement the data clearing method according to any one of claims 1 to 8.