WO2020223862A1 - Mounting processing method and apparatus, electronic device, and computer readable storage medium - Google Patents

Mounting processing method and apparatus, electronic device, and computer readable storage medium Download PDF

Info

Publication number
WO2020223862A1
WO2020223862A1 PCT/CN2019/085568 CN2019085568W WO2020223862A1 WO 2020223862 A1 WO2020223862 A1 WO 2020223862A1 CN 2019085568 W CN2019085568 W CN 2019085568W WO 2020223862 A1 WO2020223862 A1 WO 2020223862A1
Authority
WO
WIPO (PCT)
Prior art keywords
storage device
external storage
detection
mounting
management module
Prior art date
Application number
PCT/CN2019/085568
Other languages
French (fr)
Chinese (zh)
Inventor
彭学锋
Original Assignee
深圳市欢太科技有限公司
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市欢太科技有限公司, Oppo广东移动通信有限公司 filed Critical 深圳市欢太科技有限公司
Priority to CN201980091202.2A priority Critical patent/CN113412480B/en
Priority to PCT/CN2019/085568 priority patent/WO2020223862A1/en
Publication of WO2020223862A1 publication Critical patent/WO2020223862A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/10Program control for peripheral devices

Definitions

  • This application relates to the field of storage technology, and more specifically, to a mounting processing method, device, electronic equipment, and computer readable storage medium.
  • External storage devices such as SD cards or U disks can be inserted into terminal devices via card slots or OTG, such as mobile phones, digital cameras, portable computers and other terminal devices, to provide users with additional storage services.
  • the terminal device When an external storage device is inserted into a terminal device, the terminal device will mount the external storage device based on the interaction between the external storage device management module (Volume Daemon, Vold) and the storage management service module (Storage Manager Service). In the process of interaction, if a link is stuck, it will cause the subsequent commands to be unable to process, making the interaction time-consuming, and it is easy to cause system abnormalities such as unresponsive system or stuck screen for a long time.
  • the external storage device management module Volumemon, Vold
  • Storage Manager Service Storage Manager Service
  • This application proposes a mounting processing method, device, electronic equipment, and computer readable storage medium to improve the above-mentioned defects.
  • an embodiment of the present application provides a mounting processing method, the method includes: a storage management service module sends a first call instruction to an external storage device management module; the external storage device management module responds to the first call instruction, Perform the detection operation, and set the detection status flag of the external storage device as the detection status flag, and return the detection status flag, where the detection operation is to detect whether the file system of the external storage device is abnormal, and the detection flag is used to indicate the external storage of the storage management module
  • the device management module is performing the detection operation and the detection is not completed; when the detection operation is completed, the external storage device management module sends a detection completion instruction to the storage management service module; the storage management service module informs the external storage device management module of the external storage device management module based on the detection completion instruction
  • the storage device is mounted.
  • an embodiment of the present application also provides a mount processing device, the device includes: a first calling module, configured to send a first calling instruction to an external storage device management module by a storage management service module; a first return module , Used for the external storage device management module to execute the detection operation in response to the first call instruction, and set the detection status flag of the external storage device as the detection flag, and return the detection status flag, where the detection operation is to detect the file of the external storage device Whether the system is abnormal, the detection mark is used to indicate that the storage management module is performing the detection operation and the detection is not completed by the external storage device management module; the detection completion module is used for the external storage device management module to report to the storage management service module when the detection operation is completed Send a detection completion instruction; the mounting notification module is used for the storage management service module to notify the external storage device management module to mount the external storage device based on the detection completion instruction.
  • an embodiment of the present application also provides an electronic device, including: one or more processors; a memory; one or more application programs, wherein the one or more application programs are stored in the memory And is configured to be executed by the one or more processors, and the one or more programs are configured to execute the foregoing method.
  • the embodiments of the present application also provide a computer-readable storage medium, and the computer-readable storage medium stores program code, and the program code can be invoked by a processor to execute the foregoing method.
  • the mounting processing method, device, electronic equipment, and computer readable storage medium provided by this application send the first call instruction to the external storage device management module through the storage management service module, and then the external storage device management module responds to the first call instruction , Execute the detection operation, and set the detection status flag of the external storage device as the detection status flag, and return the detection status flag, where the detection operation is to detect whether the file system of the external storage device is abnormal, and the detection flag is used to indicate the external storage management module
  • the storage device management module is performing the detection operation and the detection is not completed.
  • the external storage device management module sends a detection completion instruction to the storage management service module, and finally the storage management service module notifies the external storage device based on the detection completion instruction
  • the management module mounts the external storage device. Therefore, when an external storage device needs to be mounted, the external storage device management module will return the detection status indicator before the detection operation is completed, and mount it after the detection operation is completed, so that the system will not be abnormal due to the file system of the external storage device It causes the system to become unresponsive, and prevents the system from being stuck or freezes due to the insertion of external storage devices, thereby improving system stability.
  • FIG. 1 shows a method flowchart of a mounting processing method provided by an embodiment of the present application
  • FIG. 2 shows a method flowchart of a mounting processing method provided by another embodiment of the present application
  • FIG. 3 shows a method flowchart of a mounting processing method provided by still another embodiment of the present application
  • FIG. 4 shows a method flowchart of a mounting processing method provided by another embodiment of the present application.
  • FIG. 5 shows a method flowchart of a mounting processing method provided by still another embodiment of the present application.
  • FIG. 6 shows a method flowchart of a mounting processing method provided by still another embodiment of the present application.
  • FIG. 7 shows a method flowchart of a mounting processing method provided by still another embodiment of the present application.
  • FIG. 8 shows a method flowchart of a mount processing method provided by still another embodiment of the present application.
  • FIG. 9 shows a method flowchart of a mounting processing method provided by yet another embodiment of the present application.
  • Fig. 10 shows a flowchart of a method for triggering a first call instruction provided by an embodiment of the present application.
  • FIG. 11 shows a block diagram of a module of a mounting processing apparatus provided by an embodiment of the present application.
  • Figure 12 shows a structural block diagram of an electronic device provided by an embodiment of the present application.
  • FIG. 13 shows a storage unit for storing or carrying program code for implementing the mounting processing method according to the embodiment of the present application.
  • Socket (Socket) communication is an Inter-Process Communication (IPC) mechanism.
  • IPC Inter-Process Communication
  • Socket API Application Programming Interface
  • the application program can use the network socket through the socket interface for data exchange. Based on the socket address, the operating system can decide that the data should be delivered to a specific process or thread.
  • HTTP provides a specific form of encapsulating or displaying data
  • Socket provides the capability of network communication.
  • Binder communication is similar to Socket communication. It is an efficient inter-process communication mechanism that can send data from process A to process B.
  • terminal devices include external storage device management modules (Volume Daemon, Vold) and storage management service modules (Storage Manager Service).
  • Storage Manager Service Storage Manager Service
  • terminal equipment includes but is not limited to mobile phones, digital cameras, portable computers and other terminal equipment.
  • the inventor found in the research that the external storage device management module and the storage management service module based on the Binder communication in the process of mounting the external storage device, if they get stuck during the Binder call, it may trigger the watchdog in the system
  • the program causes the system to become unresponsive, and abnormal situations such as system stuck or fixed screen appear.
  • an embodiment of the present application provides a mounting processing method, as shown in FIG. 1, specifically, the method includes: S101 to S104.
  • the storage management service module sends a first call instruction to the external storage device management module.
  • the terminal device includes an external storage device module and a storage management service module.
  • the external storage device management module is the management and control center of the external storage system in the operating system platform, and is the backend that manages and controls the external storage device of the operating system platform. process. Its functions mainly include: external storage device plug-in event detection, external storage device mounting, unmounting, formatting, etc.
  • the storage management service module is a module that communicates between the system framework layer of the operating system and the external storage device management module. At the same time, the storage management service module is also a module that provides application programs with storage device access interfaces and storage device mounting message broadcasting. It should be noted that the external storage device management module and the storage management service module are based on inter-process communication. If the communication process between the two is stuck, the system may become unresponsive.
  • the terminal device needs to mount the external storage device, and after the mounting is successful, the application on the terminal device can access the external storage device.
  • the storage management service module when the terminal device needs to mount the external storage device, the storage management service module sends the first call instruction to the external storage device management module.
  • the external storage device management module executes a detection operation, and sets the detection status flag of the external storage device as the detection status flag, and returns the detection status flag.
  • the detection operation is to detect whether the file system of the external storage device is abnormal.
  • the detection flag is used to indicate that the storage management module external storage device management module is performing a detection operation and the detection is not completed, so that when the external storage device management module returns the detection status flag, the storage management module is the detection flag based on the detection status flag , You can know that the external storage device is being detected and not completed. Specifically, after the terminal device detects the insertion event of the external storage device, the external storage device management module creates the external storage device and correspondingly stores the device information of the external storage device, where the device information includes the detection status identifier.
  • the detection time length includes the time consumed for detecting whether the file system is abnormal and the time consumed by the external storage device management module to repair when the file system is abnormal. For example, the file system of the external storage device is damaged too much, which may cause the external storage device management module to try to repair the file system of the external storage device for a long time, and the long repair time will cause the system to get stuck.
  • the external storage device management module in response to the first call instruction, performs detection operations respectively, and sets the detection status flag of the external storage device as the detection status flag, and returns the detection status flag, so that the external storage device management module and The interaction process based on the first call instruction of the storage management service module can end without waiting for the detection operation to complete, which avoids the interaction process based on the first call instruction being stuck due to the detection time being too long, causing the system to become unresponsive.
  • the system Unresponsiveness includes system abnormalities such as system stuck or fixed screen (the screen is stuck for a long time, also called frozen screen or hang), which can prevent abnormal external storage devices from being inserted and cause the system to become unresponsive and improve system stability .
  • the external storage device management module may set the detection status flag of the external storage device to the detection flag such as "checking”. After the external storage device management module returns "checking", the storage management The service module can know that the external storage device is being checked according to the storage status of the external storage device as "checking".
  • the external storage device management module sends a detection completion instruction to the storage management service module when the detection operation is completed.
  • the external storage device management module when the detection operation is completed, sends a detection completion instruction to the storage management service module to notify the storage management service module that the detection operation of the external storage device has been completed, so that the storage management service module can perform Next step.
  • the detection operation is ended. At this time, the detection operation is completed, and the external storage device management module sends a detection completion instruction to the storage management service module.
  • the external storage device management module attempts to repair the file system. If the repair time is too long and the detection time before the repair is successful has exceeded the specified time, Then, when the detection operation is completed, the file system of the external storage device is still abnormal. That is, when the detection operation is completed, the file system of the external storage device may be abnormal or non-abnormal.
  • the non-abnormal situation includes a situation where the file system was normal before detection, and a situation where the external storage device was abnormal when it was first inserted, but was restored to normal after the external storage device management module was repaired within a specified time.
  • the detection operation if the detection time of the detection operation exceeds the specified time, the detection operation is not considered to be completed, that is, if the detection time is too long and the detection operation is not completed within the specified time, the detection operation is considered to be incomplete, and the storage is not
  • the management service module sends a detection completion instruction, so that the storage management service module cannot perform the next operation on the external storage device. Specifically, because the file system of the external storage device is damaged too much, the external storage device management module cannot complete the repair of the damaged file system within the specified time.
  • the external storage device management module has completed a return in response to the first call instruction, that is, the current calling thread has ended, and the detection operation performed by the external storage device management module on the external storage device is not based on The thread of cross-process communication between storage management service modules is based on the internal process of the external storage device management module. Therefore, even if the detection time is too long, the system process will not be stuck, and the system will not be unresponsive. Thereby, it can prevent the system from jamming or freezing the screen caused by the abnormal external storage device inserted into the terminal device, and improve the system stability.
  • the storage management service module notifies the external storage device management module to mount the external storage device based on the detection completion instruction.
  • the storage management service module can learn that the detection operation has been completed based on the detection completion instruction, and at this time notify the external storage device management module to mount the external storage device.
  • this embodiment separates the execution of the detection operation from the mounting operation, so that the external storage device management module Before the detection operation is completed, return the detection status flag to end the cross-process communication thread with the storage management service module, and mount it after the detection operation is completed. Therefore, it can prevent the detection time of the external storage device from being long If it is too long, the thread will get stuck and the system will become unresponsive, which can prevent abnormal situations such as system stuck or fixed screen caused by abnormal external storage device insertion, and improve system stability.
  • FIG. 2 shows a mounting processing method provided by an embodiment of the present application. Specifically, the method includes: S201 to S207.
  • the storage management service module sends a first calling instruction to the external storage device management module.
  • the first call instruction includes a detection instruction.
  • the detection instruction may be a function Check used to detect whether the file system is abnormal and whether there is an error, or may be another interface used to detect whether the file system is abnormal. Function, this embodiment does not limit this. Based on the detection instruction, operations such as setting or updating the detection status flag can also be performed.
  • the storage management service module sends the detection instruction to the external storage device management module through the Binder call. Specifically, the storage management service module calls the function Check to the external storage device management module based on Binder communication, so that the external storage device management module can execute the function Check.
  • Binder communication cross-process calling functions can be easily realized.
  • the detection instruction may be pre-loaded, that is, the first call instruction does not include the detection instruction.
  • the storage management service module sends the first call instruction to the external storage device management module to enable the external storage device management
  • the module can execute pre-loaded detection instructions, reduce the amount of communication data between processes, reduce function loading time, improve communication efficiency, improve detection efficiency, and thus help improve the efficiency of mounting external storage devices.
  • the external storage device management module In response to the first calling instruction, the external storage device management module performs a detection operation, and sets the detection status flag of the external storage device as the detection status flag, and returns the detection status flag.
  • the detection status flag can be a flag bit corresponding to the external storage device used to reflect the current detection status.
  • the current detection status can be known. For example, if the flag bit is a flag during detection such as "Checking", you can Indicates that the external storage device management module is performing a detection operation on the external storage device and the detection is not completed.
  • the storage management service module can learn that the current detection status is the detection operation being performed and the detection is not completed by receiving the detection status identifier returned by the external storage device management module carry out.
  • the external storage device management module may perform the detection operation and set the detection status flag of the external storage device based on two different threads, and return the detection status flag. Specifically, in response to the first call instruction, the external storage device management module sets the detection status flag of the external storage device as the detecting flag based on the first thread, and returns the detection status flag, so that the first thread will receive the first call instruction The execution is returned immediately, and the external storage device management module responds to the first call instruction to execute the detection operation based on the second thread.
  • the first thread is a cross-process thread based on the Binder call, that is, the main thread, and the second thread is a thread within the process of the external storage device management module. Therefore, in this embodiment, the first thread is used to receive the first call.
  • the first process is performed before the second process.
  • the external storage device management module first sets the detection status flag as the detection status flag based on the first thread, and returns the detection status flag At this time, the second thread is started, and the detection operation is performed based on the second thread.
  • the first process and the second process are performed at the same time.
  • the external storage device management module responds to the first call instruction to simultaneously set the detection status flag and start the second thread and perform the detection operation based on the second thread ,
  • the detection status identification can be returned immediately before the detection operation is completed, and because the second thread and the first thread are performed at the same time, the external storage device management module responds to the first call instruction, and on the basis of ending the Binder call in time,
  • the detection operation can be performed faster and the detection efficiency can be improved.
  • the higher detection efficiency is also conducive to improving the mounting efficiency of the external storage device.
  • the detection operation is to detect whether the file system of the external storage device is abnormal, and to repair the abnormal file system. It should be noted that the detection operation includes the operation of repairing the abnormal file system when an abnormality is detected. Therefore, in this embodiment, the detection duration includes the repair duration. Specifically, if the file system is damaged, it is abnormal, and if there is no damage, it is normal, and the external storage device management module will try to repair the abnormal file system when it is abnormal. Further, if the repair is completed, the file system is not damaged at this time, and it can be considered that it is normal without exception.
  • the external storage device management module determines that the detection operation is completed, and if the file system is abnormal and the repair is not completed, the file system is still in an abnormal state, and the external storage The device management module determines that the detection operation is not completed. among them:
  • the external storage device management module determines that the detection operation is completed; if the file system is abnormal and cannot be repaired, the external storage device management module determines that the detection operation is not completed. Therefore, there is no time limit for the detection operation, and when the file system is abnormal, it is determined that the detection operation is not completed. Therefore, when the repair is completed, it can be determined in time that the detection operation has been completed for the next step.
  • the detection operation of the external storage device management module is correspondingly set with a preset duration, and when the file system is abnormal and the repair is not completed within the preset duration, that is, when the detection duration exceeds the preset duration, it is determined that the detection operation is not successful. carry out.
  • the external storage device management module determines that the detection operation has been completed; if the file system is detected to be abnormal but the repair is completed within the preset time period, the external storage device management module determines the detection operation Completed; if the detection time exceeds the preset time but the repair is still not completed, the external storage device management module detects an abnormal file system at this time, but the file system damaged within the preset time has not been repaired, it is determined that the detection operation is not completed . In this way, the execution time of the detection operation can be controlled, and a response can be made in time for the next operation, so as to ensure the detection efficiency while avoiding the detection timeout and no response, and improving the system availability.
  • the detection operation of the external storage device management module is correspondingly set with a preset duration, and when the file system is abnormal and the repair is not completed within the preset duration, that is, when the detection duration exceeds the preset duration, the detection is still determined
  • the operation is complete. Specifically, if the file system is normal or the file system is abnormal and the repair is completed, the external storage device management module determines that the detection operation has been completed, and if the file system is abnormal and the repair is not completed within the preset time period, the file system is still in an abnormal state, At this time, the external storage device management module still determines that the detection operation is complete.
  • the detection operation can be performed for a preset duration at most, and when the preset duration is reached, it is determined that the detection operation has been completed.
  • the file system may be normal or abnormal.
  • the execution time of the detection operation can be controlled, and the detection operation is determined to be completed when the file system is not repaired, and a timely response can be made to proceed with the next operation, thereby ensuring the detection efficiency while avoiding detection timeout and unresponsiveness, improving System availability.
  • the external storage device management module may terminate the detection operation or not.
  • the specific implementation manner is as follows:
  • the external storage device management module can terminate the detection operation, save resources, and improve system availability.
  • the external storage device management module may not terminate the detection operation, so that the detection operation can continue.
  • the external storage device management module requires It takes a long time to complete the repair of all abnormal file systems, and the required time may exceed the preset time.
  • the external storage device management module is enabled by not interrupting the detection operation when the detection time exceeds the preset time. The repair can be continued. Therefore, there is a possibility of completing the repair before the mounting operation is performed. At this time, the external storage device whose detection operation is not completed still has the possibility of being successfully mounted.
  • S204 when the detection duration exceeds the preset duration, S204 may be executed; when the detection duration does not exceed the preset duration, S203 may be executed.
  • the detection status identifier also includes a detection abnormality identifier, which can be used to indicate that the storage management service module currently detects an abnormality, that is, the detection time exceeds a preset time and the repair is not completed, and the file system of the external storage device is still abnormal.
  • the external storage device management module sets the detection status flag as the detection abnormality flag.
  • the detection abnormality identifier may be a string of numbers, letters, words, etc., such as "0", "uncheckable”, etc., used to indicate that the file system is still abnormal after the detection operation, and may be preset by the system. Yes, it can also be customized, so that the abnormality of the file system can be learned through the abnormality detection identifier. In addition, this embodiment does not make other restrictions on the naming form of the abnormality detection identifier.
  • the external storage device is difficult to mount successfully when the file system is abnormal, when the file system is abnormal and the repair is not completed within the preset time, by setting the abnormal detection flag, the external storage device can be ignored when the abnormal detection flag is detected. Mount it to reduce unnecessary resource consumption and improve response efficiency. Specific implementation manners can be seen in the following embodiments, which are not repeated here.
  • the external storage device management module sends a detection completion instruction to the storage management service module when the detection operation is completed.
  • the file system of the external storage device may be normal or abnormal, and the normal includes the normal condition itself and the abnormal but the repair completed condition.
  • the external storage device management module sends to the storage management service module
  • the detection completion instruction allows the storage management service module to learn that the current external storage device has completed the detection operation by receiving the detection completion instruction and can be mounted.
  • the file system of the external storage device may be abnormal or non-abnormal.
  • the external storage device management module sends to the storage management service module
  • the detection completion instruction enables the storage management service module to learn that the current external storage device is normal and can be mounted by receiving the detection completion instruction.
  • the file system of the external storage device is non-abnormal, that is, when the file system of the external storage device is still abnormal, the detection completion command is not sent.
  • the storage management service module notifies the external storage device management module to mount the external storage device based on the detection completion instruction.
  • the storage management service module can determine that the current external storage device has completed the detection operation and can be mounted, and then notifies the external storage device management module to mount the external storage device. Therefore, the detection operation and the mounting operation are performed in different threads separately, and the file system of the external storage device is determined to be normal through the detection operation, and the mounting is performed, which can improve the success rate and efficiency of the mounting.
  • the external storage device management device management module mounts the external storage device
  • determining whether the detection abnormality flag can be found specifically, for example, based on the flag bit that characterizes the detection state, it is determined whether the detection status flag on the flag bit is the detection abnormality flag; for example, it can directly search for the corresponding external storage device Whether to store the detection abnormality identifier.
  • the file system is abnormal and the repair is not completed within the preset time, that is, when the detection time exceeds the preset time, it is determined that the detection operation is not completed, and S206 to S207 are not executed after S205. At this time, the external The file system of the storage device is non-abnormal, so there is no need to find and detect the abnormal identifier.
  • S207 can be executed; if not, the mounting operation can be continued.
  • the external storage device management module determines that the file system of the external storage device is abnormal. By stopping the mounting of the external storage device, the consumption of operating resources can be reduced, the efficiency of system operation can be improved, and it is beneficial. Improve mounting efficiency.
  • the mounting processing method provided in this embodiment separates the detection operation and the mounting operation in different threads for execution, and the external storage device management module returns immediately after receiving the first call instruction so that the thread called by the Binder can be End in time, and start the second thread to perform the actual detection operation, so that the actual detection time, and the repair time included therein does not affect the main thread, that is, the detection operation that may cause the Binder call to be stuck based on the second thread execution, avoids
  • the system does not respond due to the long detection time, which prevents abnormal situations such as system jam or fixed screen caused by abnormal external storage device insertion, and greatly improves the stability of the system.
  • the external storage device management device can continue to mount when the file system of the external storage device is non-abnormal, which can also improve the success rate and efficiency of the mount.
  • the management module does not mount when the file system is abnormal, which can also reduce unnecessary resource consumption and improve system operating efficiency.
  • the method includes: S301 to S303.
  • the storage management service module sends a first call instruction to the external storage device management module.
  • the external storage device management module executes a detection operation, and sets the detection status flag of the external storage device as the detection status flag, and returns the detection status flag.
  • the external storage device management module sets the detection status flag as a detection abnormality flag.
  • the method ends, so that when the file system is abnormal and the repair is not completed within the preset time, the storage management service module is not notified to end the method, which can greatly Reduce the consumption of operating resources and improve system operating efficiency.
  • S303 may be executed first, and then this method is ended.
  • the external storage device management module sets the detection status flag as the abnormal detection flag, so that when the storage management service module obtains the detection status flag of the external storage device, it can learn that the file system of the external storage device is in an abnormal state, so that the user can timely Try to mount again.
  • S303 may not be executed, and this method is ended.
  • the storage management service module considers that the external storage device is always being detected and is still performing a detection operation. Specifically, the corresponding detection status of the external storage device is always "Checking".
  • the storage management service module notifies the external storage device management module to mount the external storage device based on the detection completion instruction.
  • the mounting processing method provided in this embodiment terminates this method when the detection time exceeds the preset time, which can greatly reduce the consumption of operating resources, improve operating efficiency, and allow users to pass Re-insert the external storage device or other measures and try to mount again to improve the user's mounting experience.
  • FIG. 4 shows a mounting processing method provided by an embodiment of the present application. Specifically, the method includes: S401 to S404.
  • the storage management service module sends a first calling instruction to the external storage device management module.
  • the external storage device management module executes a detection operation, and sets the detection status flag of the external storage device as the detection status flag, and returns the detection status flag.
  • the external storage device management module sends a detection completion instruction to the storage management service module when the detection operation is completed.
  • the storage management service module sends a second call instruction to the external storage device management module in response to the detection completion instruction.
  • the second calling instruction is used to notify the external storage device management module to mount the external storage device.
  • the storage management service module sends the mount instruction to the external storage device management module via the Binder call in response to the detection completion instruction, where the second call instruction includes the mount instruction, for example, the mount instruction may be used
  • the function Mount for mounting an external storage device can also be other interface functions for mounting an external storage device, which is not limited in this embodiment.
  • the storage management service module calls the function Mount to the external storage device management module based on Binder communication, so that the external storage device management module can execute the function Mount and perform the mounting operation.
  • the mount instruction may be pre-loaded, that is, the second call instruction does not include the mount instruction.
  • the storage management service module sends the second call instruction to the external storage device management module to enable the external storage
  • the device management module can execute the pre-loaded mount instruction, reduce the amount of communication data between processes, reduce the function loading time, and improve the communication efficiency while improving the mounting efficiency.
  • FIG. 5 shows a mounting processing method provided by an embodiment of the present application. Specifically, the method includes: S501 to S507.
  • the storage management service module sends a first call instruction to the external storage device management module.
  • the external storage device management module In response to the first call instruction, the external storage device management module performs a detection operation, and sets the detection status flag of the external storage device as the detection status flag, and returns the detection status flag.
  • the external storage device management module sends a detection completion instruction to the storage management service module when the detection operation is completed.
  • the storage management service module In response to the detection completion instruction, the storage management service module sends a second call instruction to the external storage device management module.
  • the external storage device management module determines whether the file system of the external storage device is abnormal according to the detection status identifier.
  • the external storage device management module determines whether the file system of the external storage device is abnormal according to the detection status identifier corresponding to the external storage device in response to the second call instruction. Specifically, if the current detection status identifier is a detection abnormality identifier, the file system of the external storage device is abnormal, otherwise it is not abnormal, that is, the file system is normal.
  • S506 can be executed; if it is abnormal, S508 can be executed.
  • the external storage device management module detects that the file system of the external storage device is not abnormal at this time, and the external storage device management module performs a mounting operation on the external storage device and obtains the mounting result.
  • the external storage device management module is based on a mounting instruction, such as a function Mount for mounting, and by executing the function Mount, a mounting operation is performed on the external storage device to obtain a mounting result.
  • the mounting result includes mounting success and mounting failure.
  • the external storage device management module sets a mounting status flag according to the mounting result.
  • the mounting status flag may be a flag bit used to characterize the mounting status. For example, if the mounting status flag is "unmountable”, it means that the external storage device cannot be mounted; if the mounting status flag is "mounted”, Indicates that the external storage device has been mounted. It should be noted that, as long as the mounting state identifier can be used to represent the mounting state, this embodiment does not make other restrictions on the naming form of the mounting state identifier.
  • the storage management service module can obtain the corresponding mounting result by obtaining the mounting status identifier.
  • the external storage device management module detects that the file system of the external storage device is abnormal. At this time, the mounting status flag of the external storage device is set as the unmountable flag, so that the external storage device management module cannot mount the external storage device. Load.
  • the file system is abnormal, the possibility of successfully mounting the external storage device is low. Therefore, by judging whether the file system of the external storage device is abnormal, the possibility of the successful mounting can be judged, so as to make a prediction before the actual mounting operation. , And stop mounting when the file system is abnormal, which can save resources and improve mounting efficiency.
  • this method can be ended after S508, that is, the method can be ended after setting the mounting status flag, so that the storage management service module can obtain the mounting status flag, thereby knowing that the currently inserted external storage device cannot be mounted This allows the user to take measures to remount the external storage device, such as reinserting it, to improve the user experience of mounting the external storage device.
  • this method can be ended before S508, that is, if the external storage device management module determines that the file system of the external storage device is abnormal, S508 is not executed, and this method is ended. It further saves the running resources required for mounting. Since it is difficult to successfully mount the external storage device when the file system is abnormal, this embodiment does not perform the actual mounting operation, such as not performing the function, when the file system is abnormal. Operations such as Mount, and ending this method can reduce unnecessary operating resources.
  • the unmountable indicator may be sent to the storage management service module, so that the storage management service module can learn the current mounting status of the external storage device.
  • the storage management service module can learn the current mounting status of the external storage device.
  • this embodiment determines whether the file system of the external storage device is abnormal. , Can judge the possibility of successful mounting, so as to make a pre-judgment before actually performing the mounting operation, and do not perform the mounting operation when the file system is abnormal, which can save resources and improve the mounting efficiency.
  • the external storage device management module determines that the file system of the external storage device is abnormal and sets the mounting status flag of the external storage device as the unmountable flag, the mounting operation may not be performed, but the unmountable flag is sent to the storage
  • the management service module allows the storage management service module to broadcast the corresponding mounting results.
  • FIG. 6, shows a mounting processing method provided by an embodiment of the present application. Specifically, the method includes: S601 to S610.
  • the storage management service module sends a first call instruction to the external storage device management module.
  • the external storage device management module In response to the first calling instruction, the external storage device management module performs a detection operation, and sets the detection status flag of the external storage device as the detection status flag, and returns the detection status flag.
  • the external storage device management module sends a detection completion instruction to the storage management service module when the detection operation is completed.
  • the storage management service module In response to the detection completion instruction, the storage management service module sends a second call instruction to the external storage device management module.
  • the external storage device management module determines whether the file system of the external storage device is abnormal according to the detection status identifier.
  • S606 can be executed; if it is abnormal, S608 can be executed.
  • the external storage device management module sets a mounting state flag according to the mounting result.
  • the external storage device management module determines that the file system of the external storage device is abnormal, it sets the mounting status flag of the external storage device as the unmountable flag.
  • the external storage device management module sends a mounting completion instruction to the storage management service module when the current mounting is completed.
  • the mounting completion instruction when the current mounting is completed, the mounting completion instruction is sent to the storage management service module, where the mounting completion instruction includes the mounting status identifier, so that when the storage management service module receives the mounting completion instruction, You can get the mount status identifier of the external storage device.
  • the mounting result can be obtained.
  • the external storage device management module determines that the file system of the external storage device is abnormal, set the external storage The mounting status flag of the device is the unmountable flag, and the current mounting has been completed at this time; if it is not abnormal, the mounting result is obtained, and the mounting status flag is set according to the mounting result. At this time, the current mounting is also completed.
  • the external storage device management module still sends the unmountable flag to the storage management service module, so that the storage management service module can broadcast the corresponding mounting result every time the external storage device is mounted. Even when the file system is abnormal and the mounting operation is not performed, the corresponding mounting failure will be broadcast, so that other applications can learn the mounting status of the inserted external storage device in time.
  • the storage management service module broadcasts the mounting result corresponding to the mounting status identifier according to the mounting status identifier.
  • the storage management service module broadcasts the mount failure; if the mount status identifier is the mounted identifier, the storage management service module broadcasts the mount successfully, so that the The application can access the successfully mounted external storage device.
  • the storage management service module broadcasts the mounting result to the system, and the application can perform corresponding operations after listening to the broadcast.
  • an application for file management can monitor the successful mounting broadcast in the application’s The interface displays the external storage device, and when the broadcast of the mounting failure is monitored, the external storage device is abnormal in the interface of the application.
  • the mounting processing method provided in this embodiment is based on the foregoing embodiments.
  • the external storage device management module detects an abnormality in the file system of the external storage device, it does not perform the mounting operation, reducing unnecessary resource consumption, and passing Send the unmountable flag to the storage management service module, so that the storage management service module still broadcasts the mounting result corresponding to the detected abnormal flag, so that other applications can learn the current mounting result in time, improve response efficiency, and facilitate users in the failure of the mount Take timely measures to improve user experience.
  • the external storage device management module determines that the file system of the external storage device is abnormal and sets the mounting status flag of the external storage device as the unmountable flag, the mounting operation can still be performed.
  • the mounting processing method provided by an embodiment of the present application is presented. Specifically, the method includes: S701 to S710.
  • the storage management service module sends a first call instruction to the external storage device management module.
  • the external storage device management module In response to the first call instruction, the external storage device management module performs a detection operation, and sets the detection status flag of the external storage device as the detection status flag, and returns the detection status flag.
  • the external storage device management module may also not interrupt the detection operation, so that the detection operation continues, and continues to repair the damaged file system. Specifically, when the file system is damaged too much, the external storage device management module needs to complete the repair of all abnormal file systems. The required time is longer, and the required time may exceed the preset time. At this time, the detection time When the preset time is exceeded, the detection operation is still not interrupted, so that the external storage device management module can continue to repair the damaged file system in the external storage device. Therefore, there is a possibility of completing the repair before the mounting operation is performed. The external storage device whose detection operation is not completed still has the possibility of being successfully mounted.
  • the external storage device management module sends a detection completion instruction to the storage management service module when the detection operation is completed.
  • the storage management service module sends a second call instruction to the external storage device management module in response to the detection completion instruction
  • the external storage device management module determines whether the file system of the external storage device is abnormal according to the detection status identifier.
  • the external storage device management module determines that the file system of the external storage device is abnormal, and sets the mounting status flag of the external storage device as an unmountable flag, the mounting operation can still be performed, and S707 is continued.
  • the external storage device management module completes the repair of the file system of the external storage device, so that the file system is restored to normal.
  • the repair is not completed within the preset time.
  • the detection status flag is set to the external storage device with the abnormal detection flag.
  • the external storage device management module updates the mounting status identifier according to the mounting result.
  • the external storage device management module sends a mounting completion instruction to the storage management service module when the current mounting is completed.
  • the storage management service module broadcasts the mounting result corresponding to the mounting status identifier according to the mounting status identifier.
  • the mount processing method provided in this embodiment continues to repair the damaged file system by not interrupting the detection operation when the detection duration exceeds the preset duration, and the time before the mount operation is executed and the mount result is obtained The repair is completed, so that the file system of the external storage device is restored to normal. Therefore, the external storage device management module uses the external storage device management module to set the mounting status flag as unmountable according to the detected abnormality flag, and the mounting operation can still be performed, so that the external storage device The device can be mounted in time when the file system returns to normal, improving mounting efficiency.
  • FIG. 8 shows a mounting processing method provided by an embodiment of the present application. Specifically, the method includes: S801 to S810.
  • the storage management service module sends a first calling instruction to the external storage device management module.
  • the external storage device management module In response to the first calling instruction, the external storage device management module performs a detection operation, and sets the detection status flag of the external storage device as the detection status flag, and returns the detection status flag.
  • the external storage device management module sends a detection completion instruction to the storage management service module when the detection operation is completed.
  • the storage management service module In response to the detection completion instruction, the storage management service module sends a second call instruction to the external storage device management module.
  • the external storage device management module determines whether the file system of the external storage device is abnormal according to the detection status identifier.
  • the method ends, so that the external storage device management module detects the file system of the external storage device When the system is abnormal, the mount operation is not performed, and the mount result is not broadcast, which saves resources.
  • the external storage device management module updates the mounting status identifier according to the mounting result.
  • the external storage device management module sends a mounting completion instruction to the storage management service module when the current mounting is completed.
  • the storage management service module broadcasts the mounting result corresponding to the mounting status identifier according to the mounting status identifier.
  • the external storage device management module determines that the file system of the external storage device is abnormal, and after setting the mounting status flag of the external storage device as the unmountable flag, the method ends, so that the external storage
  • the device management module detects that the file system of the external storage device is abnormal, it does not perform the mounting operation and does not broadcast the mounting result, thereby saving resources and improving system operation efficiency on the basis of the foregoing embodiment.
  • the mounting status flag may not be set, and the external storage device is mounted in response to the second call instruction.
  • Figure 9 Shows a mounting processing method provided by an embodiment of the present application. Specifically, the method includes: S901 to S908.
  • the storage management service module sends a first call instruction to the external storage device management module.
  • the external storage device management module executes a detection operation, and sets the detection status flag of the external storage device as the detection status flag, and returns the detection status flag.
  • the external storage device management module sends a detection completion instruction to the storage management service module when the detection operation is completed.
  • the storage management service module sends a second call instruction to the external storage device management module in response to the detection completion instruction.
  • the external storage device management module responds to the second call instruction to mount the external storage device, which may specifically include S905 to S906.
  • the external storage device management module sets the mounting status flag according to the mounting result
  • the external storage device management module sends a mounting completion instruction to the storage management service module when the current mounting is completed.
  • the mounting completion instruction includes the mounting status identifier of the external storage device.
  • the storage management service module broadcasts the mounting result corresponding to the mounting status identifier according to the mounting status identifier.
  • the hanging processing method provided in this embodiment implements the detection operation and the mounting operation based on different call instructions respectively, to prevent the time-consuming detection operation from jamming the main process during the execution process, making the system unresponsive, stuck or stuck System abnormalities such as fixed screens have improved system stability.
  • After performing the mounting operation on the external storage device it broadcasts the mounting result, so that the application on the system can learn the mounting result of the external storage device, and access the external storage device when the mounting is successful, which improves the response efficiency of the system. And it improves the user experience.
  • FIG. 10 shows a flowchart of a method for triggering a first call instruction provided by an embodiment of the present application.
  • the method describes that a terminal device is inserted into an external storage device, and the storage management service module sends the external storage device to the external storage device.
  • the process before the management module sends the first call instruction, specifically, the method includes: S1001 to S1003.
  • the system bottom layer driver reports the insertion time of the external storage device to the external storage device management module, so that the external storage device management module learns the insertion event of the external storage device and creates an external The storage path and device information of the storage device, and the device information of the inserted external storage device is forwarded to the storage management service module.
  • the device information may include information such as device ID, storage capacity, and file system type.
  • the external storage device management module may send device information to the storage management service module based on the Binder call.
  • the storage management service module creates a storage access interface of the external storage device according to the device information, so that the external storage device can be accessed.
  • the storage management service module creates a storage access interface of the external storage device according to the received device information of the external storage device, so that upper-layer applications can access the corresponding external storage device through the storage access interface.
  • the storage management service module adds an external storage device to the current storage device list, and sends a first call instruction to the external storage device management module.
  • the storage management service module creates the storage access interface of the external storage device
  • the external storage device is added to the pre-configured current storage device list.
  • the storage management service module sends the first call instruction to the external storage device management module based on the Binder call.
  • the mounting processing apparatus 1100 may include: a first calling module 1110, a first return module 1120, and a detection completion module 1130 And mount notification module 1140.
  • the first calling module 1110 is used for the storage management service module to send the first calling instruction to the external storage device management module.
  • the first return module 1120 is used for the external storage device management module to perform a detection operation in response to the first call instruction, and set the detection status flag of the external storage device as the detection status flag, and return the detection status flag.
  • the detection completion module 1130 is used for the external storage device management module to send a detection completion instruction to the storage management service module when the detection operation is completed.
  • the mounting notification module 1140 is used for the storage management service module to notify the external storage device management module to mount the external storage device based on the detection completion instruction.
  • the first return module 1120 includes: a first thread unit and a second thread unit, where:
  • the first thread unit is used for the external storage device management module to set the detection status flag of the external storage device as the detection status flag based on the first thread in response to the first call instruction, and return the detection status flag;
  • the second thread unit is used for the external storage device management module to perform a detection operation based on the second thread in response to the first call instruction.
  • the first thread and the second thread are performed simultaneously.
  • the detection operation is to detect whether the file system of the external storage device is abnormal, and repair the abnormal file system. If the file system is normal or the file system is abnormal and the repair is completed, the external storage device management module determines the detection operation completed.
  • the mounting processing device 1100 further includes: a detection timeout abnormality module, a detection abnormality determination module, a detection timeout end module, and a mounting stop module, wherein:
  • the detection timeout abnormality module is used to set the detection status flag to the detection abnormality flag by the external storage device management module when the detection time period exceeds the preset time period.
  • the detection abnormality determination module is used for determining whether the detection abnormality identification can be found when the external storage device management module mounts the external storage device.
  • the mount stop module is used to stop mounting the external storage device if it can.
  • the external storage device management module responds to the first call instruction and after performing the detection operation, further includes: a detection timeout end unit, wherein:
  • the detection timeout end unit is used to end this method when the detection time length exceeds the preset time length.
  • the first calling instruction is a detection instruction.
  • the first calling module 1110 includes: a first calling unit, wherein:
  • the first calling unit is used for the storage management service module to send the detection instruction to the external storage device management module through Binder calling.
  • the mount notification module 1140 includes: a mount notification unit for the storage management service module to send a second call instruction to the external storage device management module in response to the detection completion instruction, and the second call instruction is used to notify the external storage device management The module mounts external storage devices.
  • the mounting processing device 1100 further includes: an abnormality judgment module and an abnormal mounting identification setting module.
  • the abnormality determination unit is used for the external storage device management module to determine whether the file system of the external storage device is abnormal in response to the second call instruction and according to the detection status identifier.
  • the abnormal mounting flag setting module is used to set the mounting status flag of the external storage device as an unmountable flag if abnormal, so that the storage management service module cannot mount the external storage device.
  • the mounting processing apparatus 1100 further includes: an abnormal end module, wherein:
  • Abnormal end module used to end this method if abnormal.
  • the mounting processing apparatus 1100 further includes: a mounting result acquisition module and a mounting identification setting module ,among them:
  • the mounting result obtaining module is used to obtain the mounting result by the external storage device management module if it is not abnormal.
  • the mounting flag setting module is used for the external storage device management module to set the mounting status flag according to the mounting result.
  • the mounting identification setting module includes: a success setting unit and a failure setting unit, wherein:
  • the successful setting unit is used to set the mounting status flag as the mounted flag if the mounting is successful.
  • the failure setting unit is used to set the mounting status flag to the flag that cannot be mounted if the mounting fails.
  • the mounting processing apparatus 1100 further includes: a second calling module, a mounting completion module, and a mounting broadcast module, where :
  • the second calling module is used for the external storage device management module to mount the external storage device in response to the second calling instruction.
  • the mounting completion module is used for the external storage device management module to send a mounting completion instruction to the storage management service module when the current mounting is completed, and the mounting completion instruction includes the mounting status identifier of the external storage device.
  • the mounting broadcast module is used for the storage management service module to broadcast the mounting result corresponding to the mounting status identifier according to the mounting status identifier.
  • the second calling module includes: a mounting result obtaining unit and a mounting flag setting unit, wherein:
  • the mounting result obtaining unit is used for the external storage device management module to obtain the mounting result.
  • the mounting identifier setting unit is used for the external storage device management module to set the mounting status identifier of the external storage device according to the mounting result.
  • the mounting flag setting unit includes a successful setting subunit and a failed setting subunit, wherein:
  • the subunit is successfully set, which is used to set the mounting status flag as the mounted flag if the mounting is successful.
  • the failure setting subunit is used to set the mounting status flag to the flag unable to be mounted if the mounting fails.
  • the mounting broadcast module includes: a mounting failure broadcast unit and a mounting success broadcast unit.
  • the mounting failure broadcasting unit is used to broadcast the mounting failure of the storage management service module if the mounting status is marked as unmountable;
  • the successful mounting broadcast unit is used for broadcasting the successful mounting of the storage management service module if the mounting status identifier is the mounted identifier.
  • the mounting processing apparatus 1100 further includes: a device information sending module, an access interface creation module, and a storage device adding module, where:
  • the device information sending module is used to send the device information of the external storage device to the storage management service module when the external storage device management module detects the insertion event of the external storage device.
  • the access interface creation module is used for the storage management service module to create a storage access interface of the external storage device according to the device information, so that the external storage device can be accessed.
  • the storage device adding module is used for the storage management service module to add an external storage device to the current storage device list and send the first call instruction to the external storage device management module.
  • the mounting processing apparatus provided in the embodiment of the present application is used to implement the corresponding mounting processing method in the foregoing method embodiment, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.
  • the coupling between the modules may be electrical, mechanical or other forms of coupling.
  • each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or software functional modules.
  • the electronic device 1200 may be an electronic device capable of running application programs, such as a smart phone, a tablet computer, or an e-book.
  • the electronic device 1200 in this application may include one or more of the following components: a processor 1210, a memory 1220, and one or more application programs, where one or more application programs may be stored in the memory 1220 and configured to One or more processors 1210 execute, and one or more programs are configured to execute the methods described in the foregoing method embodiments.
  • the processor 1210 may include one or more processing cores.
  • the processor 1210 uses various interfaces and lines to connect various parts of the entire electronic device 1200, and executes by running or executing instructions, programs, code sets, or instruction sets stored in the memory 1220, and calling data stored in the memory 1220.
  • the processor 1210 may adopt at least one of digital signal processing (Digital Signal Processing, DSP), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and Programmable Logic Array (Programmable Logic Array, PLA).
  • DSP Digital Signal Processing
  • FPGA Field-Programmable Gate Array
  • PLA Programmable Logic Array
  • the processor 1210 can be integrated with one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), a modem, and the like.
  • the CPU mainly processes the operating system, user interface, and application programs;
  • the GPU is used for rendering and drawing of display content;
  • the modem is used for processing wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor 1210, but may be implemented by a communication chip alone.
  • the processor 1210 further includes: an external storage device management module 1211 and a storage management service module 1212.
  • the external storage device management module 1211 may be the management and control center of the external storage system in the Android platform, and is a background process for managing and controlling the external storage device of the Android platform. Its functions mainly include: external storage device plug-in event detection, external storage device mounting, unloading, formatting, etc.; storage management service module 1212 is a module for the Android system framework layer to communicate with the external storage device management module 1211.
  • the storage management service module 1212 is also a module that provides storage access interfaces and storage mounting message broadcasting to applications. Further, in one embodiment, the external storage device management module 1211 and the storage management service module 1212 may communicate based on the Binder communication mechanism.
  • the memory 1220 may include random access memory (RAM) or read-only memory (Read-Only Memory).
  • the memory 1220 may be used to store instructions, programs, codes, code sets or instruction sets.
  • the memory 1220 may include a program storage area and a data storage area, where the program storage area may store instructions for implementing the operating system and instructions for implementing at least one function (such as touch function, sound playback function, image playback function, etc.) , Instructions for implementing the following method embodiments, etc.
  • the storage data area can also store data (such as phone book, audio and video data, chat record data) created by the electronic device 1200 during use.
  • each unit in the mount processing device shown in FIG. 11 is used as a function module such as a program package, each unit in the mount processing device is stored in the memory 1220 and can be called by the processor and execute the corresponding function. .
  • FIG. 13 shows a structural block diagram of a computer readable storage medium provided by an embodiment of the present application.
  • the computer readable storage medium 1300 stores program code, and the program code can be invoked by a processor to execute the method described in the foregoing method embodiment.
  • the computer readable storage medium 1300 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM.
  • the computer-readable storage medium 1300 includes a non-transitory computer-readable storage medium.
  • the computer readable storage medium 1300 has storage space for the program code 1310 for executing any method steps in the above-mentioned methods. These program codes can be read out from or written into one or more computer program products.
  • the program code 1310 may be compressed in an appropriate form, for example.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Studio Devices (AREA)

Abstract

Disclosed are a mounting processing method and apparatus, an electronic device, and a computer readable storage medium, relating to the technical field of video processing. The method comprises: a storage management service module transmits a first invoking instruction to an external storage device management module; in response to the first invoking instruction, the external storage device management module performs a detection operation, sets the detection state identifier of an external storage device as an in-detection identifier, and returns the detection state identifier; when the detection operation is completed, the external storage device management module transmits a detection complete instruction to the storage management service module; based on the detection complete instruction, the storage management service module notifies the external storage device management module to perform mounting on the external storage device. The present application returns the detection state identifier before the detection operation is completed, and performs mounting after the detection operation is completed, thereby preventing system from being stuck or a screen from being fixed caused by the insertion of an abnormal external storage device, and further improving the stability of the system.

Description

挂载处理方法、装置、电子设备及计算机可读取存储介质Mounting processing method, device, electronic equipment and computer readable storage medium 技术领域Technical field
本申请涉及存储技术领域,更具体地,涉及一种挂载处理方法、装置、电子设备及计算机可读取存储介质。This application relates to the field of storage technology, and more specifically, to a mounting processing method, device, electronic equipment, and computer readable storage medium.
背景技术Background technique
SD卡或U盘等外部存储设备可以通过卡槽或OTG方式插入终端设备,例如插入手机、数码相机、便携式电脑和其他终端设备上,给用户提供额外的存储服务。External storage devices such as SD cards or U disks can be inserted into terminal devices via card slots or OTG, such as mobile phones, digital cameras, portable computers and other terminal devices, to provide users with additional storage services.
在外部存储设备插入终端设备时,终端设备会基于外部存储设备管理模块(Volume Daemon,Vold)和存储管理服务模块(Storage Manager Service)的交互来实现外部存储设备的挂载。在交互过程中,如果有一个环节卡住,就会导致后面的命令无法处理,使得交互耗时过久,容易导致系统无响应或屏幕长时间卡住不动等系统异常情况出现。When an external storage device is inserted into a terminal device, the terminal device will mount the external storage device based on the interaction between the external storage device management module (Volume Daemon, Vold) and the storage management service module (Storage Manager Service). In the process of interaction, if a link is stuck, it will cause the subsequent commands to be unable to process, making the interaction time-consuming, and it is easy to cause system abnormalities such as unresponsive system or stuck screen for a long time.
发明内容Summary of the invention
本申请提出了一种挂载处理方法、装置、电子设备及计算机可读取存储介质,以改善上述缺陷。This application proposes a mounting processing method, device, electronic equipment, and computer readable storage medium to improve the above-mentioned defects.
第一方面,本申请实施例提供了一种挂载处理方法,所述方法包括:存储管理服务模块向外部存储设备管理模块发送第一调用指令;外部存储设备管理模块响应于第一调用指令,执行检测操作,且设置外部存储设备的检测状态标识为检测中标识,并返回检测状态标识,其中,检测操作为检测外部存储设备的文件系统是否异常,检测中标识用于指示存储管理模块外部存储设备管理模块正在执行检测操作且未检测完成;外部存储设备管理模块在检测操作已完成时,向存储管理服务模块发送检测完成指令;存储管理服务模块基于检测完成指令通知外部存储设备管理模块对外部存储设备进行挂载。In the first aspect, an embodiment of the present application provides a mounting processing method, the method includes: a storage management service module sends a first call instruction to an external storage device management module; the external storage device management module responds to the first call instruction, Perform the detection operation, and set the detection status flag of the external storage device as the detection status flag, and return the detection status flag, where the detection operation is to detect whether the file system of the external storage device is abnormal, and the detection flag is used to indicate the external storage of the storage management module The device management module is performing the detection operation and the detection is not completed; when the detection operation is completed, the external storage device management module sends a detection completion instruction to the storage management service module; the storage management service module informs the external storage device management module of the external storage device management module based on the detection completion instruction The storage device is mounted.
第二方面,本申请实施例还提供了一种挂载处理装置,所述装置包括:第一调用模块,用于存储管理服务模块向外部存储设备管理模块发送第一调用指令;第一返回模块,用于外部存储设备管理模块响应于第一调用指令,执行检测操作,且设置外部存储设备的检测状态标识为检测中标识,并返回检测状态标识,其中,检测操作为检测外部存储设备的文件系统是否异常,检测中标识用于指示存储管理模块外部存储设备管理模块正在执行检测操作且未检测完成;检测完成模块,用于外部存储设备管理模块在检测操作已完成时,向存储管理服务模块发送检测完成指令;挂载通知模块,用于存储管理服务模块基于检测完成指令通知外部存储设备管理模块对外部存储设备进行挂载。In a second aspect, an embodiment of the present application also provides a mount processing device, the device includes: a first calling module, configured to send a first calling instruction to an external storage device management module by a storage management service module; a first return module , Used for the external storage device management module to execute the detection operation in response to the first call instruction, and set the detection status flag of the external storage device as the detection flag, and return the detection status flag, where the detection operation is to detect the file of the external storage device Whether the system is abnormal, the detection mark is used to indicate that the storage management module is performing the detection operation and the detection is not completed by the external storage device management module; the detection completion module is used for the external storage device management module to report to the storage management service module when the detection operation is completed Send a detection completion instruction; the mounting notification module is used for the storage management service module to notify the external storage device management module to mount the external storage device based on the detection completion instruction.
第三方面,本申请实施例还提供了一种电子设备,包括:一个或多个处理器;存储器;一个或多个应用程序,其中所述一个或多个应用程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行,所述一个或多个程序配置用于执行上述方法。In a third aspect, an embodiment of the present application also provides an electronic device, including: one or more processors; a memory; one or more application programs, wherein the one or more application programs are stored in the memory And is configured to be executed by the one or more processors, and the one or more programs are configured to execute the foregoing method.
第四方面,本申请实施例还提供了一种计算机可读取存储介质,计算机可读取存储介质中存储有程序代码,所述程序代码可被处理器调用执行上述方法。In a fourth aspect, the embodiments of the present application also provide a computer-readable storage medium, and the computer-readable storage medium stores program code, and the program code can be invoked by a processor to execute the foregoing method.
本申请提供的挂载处理方法、装置、电子设备及计算机可读取存储介质,通过存储管理服务模块向外部存储设备管理模块发送第一调用指令,接着外部存储设备管理模块响应于第一调用指令,执行检测操作,且设置外部存储设备的检测状态标识为检测中标识,并返回检测状态标识,其中,检测操作为检测外部存储设备的文件系统是否异常,检测中标识用于指示存储管理模块外部存储设备管理模块正在执行检测操作且未检测完成,然后,外部存储设备管理模块在检测操作已完成时,向存储管理服务模块发送检测完成指令,最后存储管理服务模块基于检测完成指令通知外部存储设备管理模块对外部存储设备进行挂载。因此,在需要挂载外部存储设备时,外部存储设备管理模块将在检测操作完成前先返回检测状态标识,并在检测操作完成后进行挂载,使得系统不会因为外部存储设备的文件系统异常导致系统无响应,防止外部存储设备插入导致系统卡死或定屏,从而提升 系统稳定性。The mounting processing method, device, electronic equipment, and computer readable storage medium provided by this application send the first call instruction to the external storage device management module through the storage management service module, and then the external storage device management module responds to the first call instruction , Execute the detection operation, and set the detection status flag of the external storage device as the detection status flag, and return the detection status flag, where the detection operation is to detect whether the file system of the external storage device is abnormal, and the detection flag is used to indicate the external storage management module The storage device management module is performing the detection operation and the detection is not completed. Then, when the detection operation is completed, the external storage device management module sends a detection completion instruction to the storage management service module, and finally the storage management service module notifies the external storage device based on the detection completion instruction The management module mounts the external storage device. Therefore, when an external storage device needs to be mounted, the external storage device management module will return the detection status indicator before the detection operation is completed, and mount it after the detection operation is completed, so that the system will not be abnormal due to the file system of the external storage device It causes the system to become unresponsive, and prevents the system from being stuck or freezes due to the insertion of external storage devices, thereby improving system stability.
附图说明Description of the drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly describe the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
图1示出了本申请一实施例提供的挂载处理方法的方法流程图;FIG. 1 shows a method flowchart of a mounting processing method provided by an embodiment of the present application;
图2示出了本申请另一实施例提供的挂载处理方法的方法流程图;FIG. 2 shows a method flowchart of a mounting processing method provided by another embodiment of the present application;
图3示出了本申请再一实施例提供的提供的挂载处理方法的方法流程图;FIG. 3 shows a method flowchart of a mounting processing method provided by still another embodiment of the present application;
图4示出了本申请又一实施例提供的提供的挂载处理方法的方法流程图;FIG. 4 shows a method flowchart of a mounting processing method provided by another embodiment of the present application;
图5示出了本申请还一实施例提供的提供的挂载处理方法的方法流程图;FIG. 5 shows a method flowchart of a mounting processing method provided by still another embodiment of the present application;
图6示出了本申请再另一实施例提供的挂载处理方法的方法流程图;FIG. 6 shows a method flowchart of a mounting processing method provided by still another embodiment of the present application;
图7示出了本申请再又一实施例提供的挂载处理方法的方法流程图;FIG. 7 shows a method flowchart of a mounting processing method provided by still another embodiment of the present application;
图8示出了本申请再还一实施例提供的挂载处理方法的方法流程图;FIG. 8 shows a method flowchart of a mount processing method provided by still another embodiment of the present application;
图9示出了本申请又另一实施例提供的挂载处理方法的方法流程图;FIG. 9 shows a method flowchart of a mounting processing method provided by yet another embodiment of the present application;
图10示出了本申请一实施例提供的触发第一调用指令的方法流程图。Fig. 10 shows a flowchart of a method for triggering a first call instruction provided by an embodiment of the present application.
图11示出了本申请实施例提供的挂载处理装置的模块框图;FIG. 11 shows a block diagram of a module of a mounting processing apparatus provided by an embodiment of the present application;
图12示出了本申请实施例提供的电子设备的结构框图;Figure 12 shows a structural block diagram of an electronic device provided by an embodiment of the present application;
图13示出了本申请实施例的用于保存或者携带实现根据本申请实施例的挂载处理方法的程序代码的存储单元。FIG. 13 shows a storage unit for storing or carrying program code for implementing the mounting processing method according to the embodiment of the present application.
具体实施方式Detailed ways
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。In order to enable those skilled in the art to better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
套接字(Socket)通信是一种进程间通信(Inter-Process Communication,IPC)机制,在操作系统中,通常会为应用程序提供一组应用程序接口(Application Programming Interface,API),称为套接字接口(Socket API)。应用程序可以通过套接字接口,来使用网络套接字,以进行数据交换。操作系统根据套接字地址,可以决定应该将数据送达特定的行程或线程。Socket通信中,HTTP提供了封装或者显示数据的具体形式,Socket提供了网络通信的能力。Socket (Socket) communication is an Inter-Process Communication (IPC) mechanism. In the operating system, a set of Application Programming Interface (API) is usually provided for applications, called sockets. Socket API. The application program can use the network socket through the socket interface for data exchange. Based on the socket address, the operating system can decide that the data should be delivered to a specific process or thread. In Socket communication, HTTP provides a specific form of encapsulating or displaying data, and Socket provides the capability of network communication.
Binder通信类似于Socket通信,是一种高效的进程间通信机制,可以实现将进程A的数据发送到进程B。目前,越来越多的终端设备也基于Binder通信机制进行通信,例如,终端设备包含外部存储设备管理模块(Volume Daemon,Vold)以及存储管理服务模块(Storage Manager Service),在对外部存储设备如存储卡、U盘等进行挂载时,需要外部存储设备管理模块与存储管理服务模块之间的交互,其中,该交互则可以基于Binder通信。其中,终端设备包括但不限于手机、数码相机、便携式电脑和其他终端设备。Binder communication is similar to Socket communication. It is an efficient inter-process communication mechanism that can send data from process A to process B. At present, more and more terminal devices also communicate based on the Binder communication mechanism. For example, terminal devices include external storage device management modules (Volume Daemon, Vold) and storage management service modules (Storage Manager Service). When a memory card, U disk, etc. are mounted, an interaction between an external storage device management module and a storage management service module is required, and the interaction may be based on Binder communication. Among them, terminal equipment includes but is not limited to mobile phones, digital cameras, portable computers and other terminal equipment.
但是,发明人在研究中发现,外部存储设备管理模块与存储管理服务模块基于Binder通信挂载外部存储设备的过程中,如果在Binder调用的过程中被卡住可能会触发系统中的看门狗程序,导致系统无响应,出现如系统卡死或定屏等异常情况。However, the inventor found in the research that the external storage device management module and the storage management service module based on the Binder communication in the process of mounting the external storage device, if they get stuck during the Binder call, it may trigger the watchdog in the system The program causes the system to become unresponsive, and abnormal situations such as system stuck or fixed screen appear.
因此,为了解决上述缺陷,本申请实施例提供了一种挂载处理方法,如图1所示,具体地,该方法包括:S101至S104。Therefore, in order to solve the foregoing defects, an embodiment of the present application provides a mounting processing method, as shown in FIG. 1, specifically, the method includes: S101 to S104.
S101:存储管理服务模块向外部存储设备管理模块发送第一调用指令。S101: The storage management service module sends a first call instruction to the external storage device management module.
于本实施例中,终端设备包括外部存储设备模块与存储管理服务模块,其中,外部存储设备管理模块是操作系统平台中外部存储系统的管控中心,是管理和控制操作系统平台外部存储设备的后台进程。其功能主要包括:外部存储设备的插拔事件检测、外部存储设备的挂载、卸载、格式化等。存储管理服务模块为操作系统的系统框架层与外部存储设备管理模块进行通信的模块,同时存储管理服务模块也是向应用程序提供存储设备的访问接口及存储设备的挂载消息广播的模块。需要说明的是,外部存储设备管理模块与存储管理服务模块之间基于进程间通信,若二者之间的通信进程卡住,可能导致系统无响应。In this embodiment, the terminal device includes an external storage device module and a storage management service module. The external storage device management module is the management and control center of the external storage system in the operating system platform, and is the backend that manages and controls the external storage device of the operating system platform. process. Its functions mainly include: external storage device plug-in event detection, external storage device mounting, unmounting, formatting, etc. The storage management service module is a module that communicates between the system framework layer of the operating system and the external storage device management module. At the same time, the storage management service module is also a module that provides application programs with storage device access interfaces and storage device mounting message broadcasting. It should be noted that the external storage device management module and the storage management service module are based on inter-process communication. If the communication process between the two is stuck, the system may become unresponsive.
其中,外部存储设备插入终端设备后,终端设备需对该外部存储设备进行挂载,并在挂载成功 后,终端设备上的应用程序可以访问该外部存储设备。Among them, after the external storage device is inserted into the terminal device, the terminal device needs to mount the external storage device, and after the mounting is successful, the application on the terminal device can access the external storage device.
在一种实施方式中,在终端设备需对外部存储设备进行挂载时,存储管理服务模块向外部存储设备管理模块发送第一调用指令。In an implementation manner, when the terminal device needs to mount the external storage device, the storage management service module sends the first call instruction to the external storage device management module.
S102:外部存储设备管理模块响应于第一调用指令,执行检测操作,且设置外部存储设备的检测状态标识为检测中标识,并返回检测状态标识。S102: In response to the first calling instruction, the external storage device management module executes a detection operation, and sets the detection status flag of the external storage device as the detection status flag, and returns the detection status flag.
其中,检测操作为检测外部存储设备的文件系统是否异常。Among them, the detection operation is to detect whether the file system of the external storage device is abnormal.
其中,检测中标识用于指示存储管理模块外部存储设备管理模块正在执行检测操作且未检测完成,使得在外部存储设备管理模块返回检测状态标识时,存储管理模块基于该检测状态标识为检测中标识,可以获知外部存储设备正在检测中且未检测完成。具体地,终端设备在检测到外部存储设备的插入事件后,外部存储设备管理模块会创建该外部存储设备,并对应存储有该外部存储设备的设备信息,其中设备信息包括检测状态标识。Wherein, the detection flag is used to indicate that the storage management module external storage device management module is performing a detection operation and the detection is not completed, so that when the external storage device management module returns the detection status flag, the storage management module is the detection flag based on the detection status flag , You can know that the external storage device is being detected and not completed. Specifically, after the terminal device detects the insertion event of the external storage device, the external storage device management module creates the external storage device and correspondingly stores the device information of the external storage device, where the device information includes the detection status identifier.
在一些实施方式中,检测时长包括检测文件系统是否异常的耗时以及外部存储设备管理模块在文件系统异常时进行修复的耗时。例如外部存储设备的文件系统损坏过多,可能引发外部存储设备管理模块对外部存储设备的文件系统尝试修复的耗时过长,而过长的修复时长将导致系统卡住。In some embodiments, the detection time length includes the time consumed for detecting whether the file system is abnormal and the time consumed by the external storage device management module to repair when the file system is abnormal. For example, the file system of the external storage device is damaged too much, which may cause the external storage device management module to try to repair the file system of the external storage device for a long time, and the long repair time will cause the system to get stuck.
于本实施例中,响应于第一调用指令,外部存储设备管理模块分别执行检测操作,以及设置外部存储设备的检测状态标识为检测中标识,并返回检测状态标识,使得外部存储设备管理模块与存储管理服务模块基于第一调用指令的交互进程无需等待检测操作完成,即可结束,避免了由于检测时长过长导致基于第一调用指令的交互进程卡住,导致系统无响应,具体地,系统无响应包括系统卡死或定屏(屏幕长时间卡住不动,也可称为冻屏或hang机)等系统异常情况,从而可以防止异常外部存储设备插入导致系统不响应,提升系统稳定性。In this embodiment, in response to the first call instruction, the external storage device management module performs detection operations respectively, and sets the detection status flag of the external storage device as the detection status flag, and returns the detection status flag, so that the external storage device management module and The interaction process based on the first call instruction of the storage management service module can end without waiting for the detection operation to complete, which avoids the interaction process based on the first call instruction being stuck due to the detection time being too long, causing the system to become unresponsive. Specifically, the system Unresponsiveness includes system abnormalities such as system stuck or fixed screen (the screen is stuck for a long time, also called frozen screen or hang), which can prevent abnormal external storage devices from being inserted and cause the system to become unresponsive and improve system stability .
具体地,例如,外部存储设备管理模块响应于第一调用指令,可以将外部存储设备的检测状态标识设置为检测中标识如“checking”,在外部存储设备管理模块返回“checking”后,存储管理服务模块可以根据外部存储设备的存储状态标识为“checking”,获知外部存储设备正在检测中。Specifically, for example, in response to the first call instruction, the external storage device management module may set the detection status flag of the external storage device to the detection flag such as "checking". After the external storage device management module returns "checking", the storage management The service module can know that the external storage device is being checked according to the storage status of the external storage device as "checking".
S103:外部存储设备管理模块在检测操作已完成时,向存储管理服务模块发送检测完成指令。S103: The external storage device management module sends a detection completion instruction to the storage management service module when the detection operation is completed.
于本实施例中,外部存储设备管理模块在检测操作已完成时,向存储管理服务模块发送检测完成指令,通知存储管理服务模块对外部存储设备的检测操作已完成,使得存储管理服务模块可以进行下一步操作。In this embodiment, when the detection operation is completed, the external storage device management module sends a detection completion instruction to the storage management service module to notify the storage management service module that the detection operation of the external storage device has been completed, so that the storage management service module can perform Next step.
作为一种实施方式,若检测操作的检测时长超过指定时间,结束检测操作,此时检测操作已完成,外部存储设备管理模块向存储管理服务模块发送检测完成指令。需要说明的是,由于在外部存储设备的文件系统是异常时,外部存储设备管理模块尝试对该文件系统进行修复,若修复时间过长且在修复成功之前所耗的检测时长已超过指定时间,则存在当检测操作已完成时,外部存储设备的文件系统仍是异常的情况。即在检测操作已完成时,外部存储设备的文件系统可以是异常的,也可以是非异常的。其中,非异常的情况包括文件系统在检测前即是正常的情况,还可以包括外部存储设备在刚插入时是异常的,但在指定时间内经外部存储设备管理模块修复完成从而恢复正常的情况。As an implementation manner, if the detection duration of the detection operation exceeds the specified time, the detection operation is ended. At this time, the detection operation is completed, and the external storage device management module sends a detection completion instruction to the storage management service module. It should be noted that when the file system of the external storage device is abnormal, the external storage device management module attempts to repair the file system. If the repair time is too long and the detection time before the repair is successful has exceeded the specified time, Then, when the detection operation is completed, the file system of the external storage device is still abnormal. That is, when the detection operation is completed, the file system of the external storage device may be abnormal or non-abnormal. Among them, the non-abnormal situation includes a situation where the file system was normal before detection, and a situation where the external storage device was abnormal when it was first inserted, but was restored to normal after the external storage device management module was repaired within a specified time.
作为另一种实施方式,若检测操作的检测时长超过指定时间,不认为检测操作已完成,即若检测时长过长,在指定时间内未完成检测操作,则认为检测操作未完成,不向存储管理服务模块发送检测完成指令,由此,使得存储管理服务模块无法对外部存储设备进行下一步操作。具体地,由于外部存储设备的文件系统损坏过多,外部存储设备管理模块无法在指定时间内完成对损坏的文件系统的修复。As another embodiment, if the detection time of the detection operation exceeds the specified time, the detection operation is not considered to be completed, that is, if the detection time is too long and the detection operation is not completed within the specified time, the detection operation is considered to be incomplete, and the storage is not The management service module sends a detection completion instruction, so that the storage management service module cannot perform the next operation on the external storage device. Specifically, because the file system of the external storage device is damaged too much, the external storage device management module cannot complete the repair of the damaged file system within the specified time.
需要说明的是,由于外部存储设备管理模块响应于第一调用指令,已完成一次返回,即当次调用线程已结束,而外部存储设备管理模块对外部存储设备执行的检测操作,并不基于与存储管理服务模块之间跨进程通信的线程,而是基于外部存储设备管理模块内部进程内的线程,因此,即便检测时长过长也不会卡住系统进程,也就不会导致系统无响应,从而可以防止由于异常外部存储设备插入终端设备导致的系统卡死或定屏,提升系统稳定性。It should be noted that because the external storage device management module has completed a return in response to the first call instruction, that is, the current calling thread has ended, and the detection operation performed by the external storage device management module on the external storage device is not based on The thread of cross-process communication between storage management service modules is based on the internal process of the external storage device management module. Therefore, even if the detection time is too long, the system process will not be stuck, and the system will not be unresponsive. Thereby, it can prevent the system from jamming or freezing the screen caused by the abnormal external storage device inserted into the terminal device, and improve the system stability.
S104:存储管理服务模块基于检测完成指令通知外部存储设备管理模块对外部存储设备进行挂载。S104: The storage management service module notifies the external storage device management module to mount the external storage device based on the detection completion instruction.
其中,存储管理服务模块基于检测完成指令,可以获知检测操作已完成,此时通知外部存储设备管理模块对外部存储设备进行挂载。Among them, the storage management service module can learn that the detection operation has been completed based on the detection completion instruction, and at this time notify the external storage device management module to mount the external storage device.
由此,相较于现有技术中外部存储设备管理模块需在完成检测操作与挂载操作之后才作返回,本实施例通过将检测操作与挂载操作的执行分开,使得外部存储设备管理模块在检测操作完成前,先返回检测状态标识,以结束与存储管理服务模块之间跨进程通信的线程,并在检测操作完成后再 进行挂载,因此,可以防止由于对外部存储设备的检测时长过长,导致线程卡住,使得系统无响应,从而可以防止异常外部存储设备插入导致系统卡死或定屏等异常情况,提升系统稳定性。Therefore, compared with the prior art that the external storage device management module needs to complete the detection operation and the mounting operation before returning, this embodiment separates the execution of the detection operation from the mounting operation, so that the external storage device management module Before the detection operation is completed, return the detection status flag to end the cross-process communication thread with the storage management service module, and mount it after the detection operation is completed. Therefore, it can prevent the detection time of the external storage device from being long If it is too long, the thread will get stuck and the system will become unresponsive, which can prevent abnormal situations such as system stuck or fixed screen caused by abnormal external storage device insertion, and improve system stability.
请参阅图2,示出了本申请实施例提供的一种挂载处理方法,具体地,该方法包括:S201至S207。Please refer to FIG. 2, which shows a mounting processing method provided by an embodiment of the present application. Specifically, the method includes: S201 to S207.
S201:存储管理服务模块向外部存储设备管理模块发送第一调用指令。S201: The storage management service module sends a first calling instruction to the external storage device management module.
作为一种实施方式,第一调用指令包括检测指令,具体地,检测指令可以是用于检测文件系统是否异常、是否有错误的函数Check,也可以是其他在用于检测文件系统是否异常的接口函数,本实施例对此不做限定。基于检测指令,还可以对检测状态标识进行设置或更新等操作。在此实施方式中,存储管理服务模块通过Binder调用将检测指令发送至外部存储设备管理模块。具体地,存储管理服务模块基于Binder通信调用函数Check至外部存储设备管理模块,使得外部存储设备管理模块可以执行函数Check。由此,基于Binder通信可以方便地实现跨进程调用函数。As an implementation manner, the first call instruction includes a detection instruction. Specifically, the detection instruction may be a function Check used to detect whether the file system is abnormal and whether there is an error, or may be another interface used to detect whether the file system is abnormal. Function, this embodiment does not limit this. Based on the detection instruction, operations such as setting or updating the detection status flag can also be performed. In this embodiment, the storage management service module sends the detection instruction to the external storage device management module through the Binder call. Specifically, the storage management service module calls the function Check to the external storage device management module based on Binder communication, so that the external storage device management module can execute the function Check. Thus, based on Binder communication, cross-process calling functions can be easily realized.
作为另一种实施方式,检测指令可以是预先加载的,即第一调用指令不包含检测指令,此时,存储管理服务模块向外部存储设备管理模块发送第一调用指令,可以使得外部存储设备管理模块响应于第一调用指令,可以执行预先加载的检测指令,减少进程间的通信数据量,降低函数加载时间,提高通信效率,提高检测效率,进而有利于提高对外部存储设备的挂载效率。As another implementation manner, the detection instruction may be pre-loaded, that is, the first call instruction does not include the detection instruction. At this time, the storage management service module sends the first call instruction to the external storage device management module to enable the external storage device management In response to the first call instruction, the module can execute pre-loaded detection instructions, reduce the amount of communication data between processes, reduce function loading time, improve communication efficiency, improve detection efficiency, and thus help improve the efficiency of mounting external storage devices.
S202:外部存储设备管理模块响应于第一调用指令,执行检测操作,且设置外部存储设备的检测状态标识为检测中标识,并返回检测状态标识。S202: In response to the first calling instruction, the external storage device management module performs a detection operation, and sets the detection status flag of the external storage device as the detection status flag, and returns the detection status flag.
其中,检测状态标识可以是对应外部存储设备的用于反映当前检测状态的标志位,通过该标识位,可以获知当前检测的状态,例如,若该标志位为检测中标识如“Checking”,可以表示外部存储设备管理模块正在对外部存储设备执行检测操作且未检测完成,存储管理服务模块通过接收外部存储设备管理模块返回的检测状态标识,可以获知当前检测的状态为正在执行检测操作且未检测完成。Wherein, the detection status flag can be a flag bit corresponding to the external storage device used to reflect the current detection status. Through the flag bit, the current detection status can be known. For example, if the flag bit is a flag during detection such as "Checking", you can Indicates that the external storage device management module is performing a detection operation on the external storage device and the detection is not completed. The storage management service module can learn that the current detection status is the detection operation being performed and the detection is not completed by receiving the detection status identifier returned by the external storage device management module carry out.
于本实施例中,外部存储设备管理模块响应于第一调用指令,可以基于两个不同的线程分别执行检测操作和设置外部存储设备的检测状态标识并返回检测状态标识。具体地,外部存储设备管理模块响应于第一调用指令,基于第一线程设置外部存储设备的检测状态标识为检测中标识,并返回检测状态标识,使得第一线程在接收到第一调用指令后立刻返回执行结束了,并且外部存储设备管理模块响应于第一调用指令,基于第二线程执行检测操作。In this embodiment, in response to the first call instruction, the external storage device management module may perform the detection operation and set the detection status flag of the external storage device based on two different threads, and return the detection status flag. Specifically, in response to the first call instruction, the external storage device management module sets the detection status flag of the external storage device as the detecting flag based on the first thread, and returns the detection status flag, so that the first thread will receive the first call instruction The execution is returned immediately, and the external storage device management module responds to the first call instruction to execute the detection operation based on the second thread.
其中,第一线程是基于Binder调用的跨进程的线程,即主线程,而第二线程是外部存储设备管理模块进程内的线程,由此,本实施例通过第一线程在接收到第一调用指令之后,立刻返回执行结束了,使得本次Binder调用的线程可以及时结束,并且开启第二线程执行实际的检测操作,使得实际的检测时长,并且其中还包含的修复时长不影响主线程,即基于第二线程执行可能导致Binder调用卡住的检测操作,使得基于Binder调用的第一线程可以得到及时甚至快速的响应,很好地避免了由于检测时长过长导致的系统无响应,防止了异常外部存储设备插入导致的系统卡死或定屏等异常情况发生,大大提升了系统的稳定性。Among them, the first thread is a cross-process thread based on the Binder call, that is, the main thread, and the second thread is a thread within the process of the external storage device management module. Therefore, in this embodiment, the first thread is used to receive the first call. After the instruction, immediately return to the end of execution, so that the thread called by the Binder can end in time, and start the second thread to perform the actual detection operation, so that the actual detection time, and the repair time included therein does not affect the main thread, that is Performing detection operations based on the second thread that may cause the Binder call to be stuck, so that the first thread based on the Binder call can get a timely or even quick response, which can well avoid the system unresponsive due to the long detection time and prevent abnormalities Abnormal situations such as system stuck or fixed screen caused by the insertion of external storage devices have greatly improved the stability of the system.
作为一种实施方式,第一进程先于第二进程进行,具体地,外部存储设备管理模块响应于第一调用指令,先基于第一线程设置检测状态标识为检测中标识,并返回检测状态标识,此时再开启第二线程,基于第二线程执行检测操作。As an implementation manner, the first process is performed before the second process. Specifically, in response to the first call instruction, the external storage device management module first sets the detection status flag as the detection status flag based on the first thread, and returns the detection status flag At this time, the second thread is started, and the detection operation is performed based on the second thread.
作为另一种实施方式,第一进程与第二进程同时进行,具体地,外部存储设备管理模块响应于第一调用指令,同时设置检测状态标识以及开启第二线程并基于第二线程执行检测操作,在检测操作完成前即可立刻返回检测状态标识,并且由于第二线程与第一线程同时进行,使得外部存储设备管理模块响应于第一调用指令,在可以及时结束Binder调用的基础上,还可以更快执行检测操作,提高检测效率,同时更高的检测效率还有利于提高对外部存储设备的挂载效率。As another implementation manner, the first process and the second process are performed at the same time. Specifically, the external storage device management module responds to the first call instruction to simultaneously set the detection status flag and start the second thread and perform the detection operation based on the second thread , The detection status identification can be returned immediately before the detection operation is completed, and because the second thread and the first thread are performed at the same time, the external storage device management module responds to the first call instruction, and on the basis of ending the Binder call in time, The detection operation can be performed faster and the detection efficiency can be improved. At the same time, the higher detection efficiency is also conducive to improving the mounting efficiency of the external storage device.
其中,检测操作为检测外部存储设备的文件系统是否异常,并针对异常的文件系统进行修复。需要说明的是,检测操作包括在检测到异常时,对异常的文件系统进行修复的操作,故本实施例中,检测时长包括修复时长。具体地,若文件系统存在损坏,则异常,无损坏则正常,并在异常时外部存储设备管理模块将尝试修复异常的文件系统。进一步地,若修复完成,此时文件系统无损坏,可以认为是无异常即正常的。Among them, the detection operation is to detect whether the file system of the external storage device is abnormal, and to repair the abnormal file system. It should be noted that the detection operation includes the operation of repairing the abnormal file system when an abnormality is detected. Therefore, in this embodiment, the detection duration includes the repair duration. Specifically, if the file system is damaged, it is abnormal, and if there is no damage, it is normal, and the external storage device management module will try to repair the abnormal file system when it is abnormal. Further, if the repair is completed, the file system is not damaged at this time, and it can be considered that it is normal without exception.
在一些实施方式中,若文件系统正常或者文件系统异常且修复完成,则外部存储设备管理模块判定检测操作已完成,并且若文件系统异常且未修复完成,则文件系统仍处于异常状态,外部存储设备管理模块判定检测操作未完成。其中:In some embodiments, if the file system is normal or the file system is abnormal and the repair is completed, the external storage device management module determines that the detection operation is completed, and if the file system is abnormal and the repair is not completed, the file system is still in an abnormal state, and the external storage The device management module determines that the detection operation is not completed. among them:
作为一种方式,若文件系统正常或者文件系统异常且修复完成,则外部存储设备管理模块判定检测操作已完成;若文件系统异常且无法修复,则外部存储设备管理模块判定检测操作未完成。由此,对于检测操作不限时长,并当文件系统异常时,判定检测操作未完成。从而在修复完成时,可 以及时判定检测操作已完成,以便进行下一步操作。As a way, if the file system is normal or the file system is abnormal and the repair is completed, the external storage device management module determines that the detection operation is completed; if the file system is abnormal and cannot be repaired, the external storage device management module determines that the detection operation is not completed. Therefore, there is no time limit for the detection operation, and when the file system is abnormal, it is determined that the detection operation is not completed. Therefore, when the repair is completed, it can be determined in time that the detection operation has been completed for the next step.
作为另一种方式,外部存储设备管理模块的检测操作对应设置有预设时长,并在文件系统异常且在预设时长内未修复完成时,即检测时长超过预设时长时,判定检测操作未完成。具体地,若检测到文件系统正常,此时无需修复,外部存储设备管理模块判定检测操作已完成;若检测到文件系统异常但在预设时长内修复完成,则外部存储设备管理模块判定检测操作已完成;若检测时长超过预设时长但仍未修复完成,此时外部存储设备管理模块检测到文件系统异常,但在预设时长内损坏的文件系统未被修复完成,则判定检测操作未完成。由此,可以控制检测操作的执行时间,可以及时作出响应以便进行下一步操作,从而保证检测效率的同时,避免检测超时无响应,提高系统可用性。As another way, the detection operation of the external storage device management module is correspondingly set with a preset duration, and when the file system is abnormal and the repair is not completed within the preset duration, that is, when the detection duration exceeds the preset duration, it is determined that the detection operation is not successful. carry out. Specifically, if it is detected that the file system is normal and no repair is required at this time, the external storage device management module determines that the detection operation has been completed; if the file system is detected to be abnormal but the repair is completed within the preset time period, the external storage device management module determines the detection operation Completed; if the detection time exceeds the preset time but the repair is still not completed, the external storage device management module detects an abnormal file system at this time, but the file system damaged within the preset time has not been repaired, it is determined that the detection operation is not completed . In this way, the execution time of the detection operation can be controlled, and a response can be made in time for the next operation, so as to ensure the detection efficiency while avoiding the detection timeout and no response, and improving the system availability.
在另一些实施方式中,外部存储设备管理模块的检测操作对应设置有预设时长,并在文件系统异常且在预设时长内未修复完成时,即检测时长超过预设时长时,仍判定检测操作已完成。具体地,若文件系统正常或者文件系统异常且修复完成,则外部存储设备管理模块判定检测操作已完成,并且若文件系统异常且在预设时长内未修复完成,则文件系统仍处于异常状态,此时外部存储设备管理模块仍判定检测操作完成。也就是,检测操作最多可以执行预设时长,并且达到预设时长时,判定检测操作已完成,此时包括文件系统可以是正常的,也可以是异常的。由此,可以控制检测操作的执行时间,并在文件系统未修复完成时仍判定检测操作已完成,可以及时作出响应以便进行下一步操作,从而保证检测效率的同时,避免检测超时无响应,提高系统可用性。In other embodiments, the detection operation of the external storage device management module is correspondingly set with a preset duration, and when the file system is abnormal and the repair is not completed within the preset duration, that is, when the detection duration exceeds the preset duration, the detection is still determined The operation is complete. Specifically, if the file system is normal or the file system is abnormal and the repair is completed, the external storage device management module determines that the detection operation has been completed, and if the file system is abnormal and the repair is not completed within the preset time period, the file system is still in an abnormal state, At this time, the external storage device management module still determines that the detection operation is complete. That is, the detection operation can be performed for a preset duration at most, and when the preset duration is reached, it is determined that the detection operation has been completed. At this time, the file system may be normal or abnormal. As a result, the execution time of the detection operation can be controlled, and the detection operation is determined to be completed when the file system is not repaired, and a timely response can be made to proceed with the next operation, thereby ensuring the detection efficiency while avoiding detection timeout and unresponsiveness, improving System availability.
进一步地,在检测时长超过预设时长时,外部存储设备管理模块可以终止检测操作,也可以不终止,具体的实施方式如下:Further, when the detection duration exceeds the preset duration, the external storage device management module may terminate the detection operation or not. The specific implementation manner is as follows:
在一种实施方式中,在检测时长超过预设时长时,外部存储设备管理模块可以终止检测操作,节省资源,提高系统可用性。In an implementation manner, when the detection duration exceeds the preset duration, the external storage device management module can terminate the detection operation, save resources, and improve system availability.
在另一种实施方式中,在检测时长超过预设时长时,外部存储设备管理模块也可以不终止检测操作,使得检测操作继续,具体地,在文件系统损坏过多时,外部存储设备管理模块要完成对所有异常的文件系统的修复,所需时长较长,并且所需时长可能超过预设时长,此时通过在检测时长超过预设时长时,仍不中断检测操作,使得外部存储设备管理模块可以继续修复,由此,存在在挂载操作执行前,完成修复的可能,此时检测操作未完成的外部存储设备仍具有可被成功挂载的可能。具体的实施方式,可以参见后述实施例,本实施例不再赘述。In another embodiment, when the detection duration exceeds the preset duration, the external storage device management module may not terminate the detection operation, so that the detection operation can continue. Specifically, when the file system is damaged too much, the external storage device management module requires It takes a long time to complete the repair of all abnormal file systems, and the required time may exceed the preset time. At this time, the external storage device management module is enabled by not interrupting the detection operation when the detection time exceeds the preset time. The repair can be continued. Therefore, there is a possibility of completing the repair before the mounting operation is performed. At this time, the external storage device whose detection operation is not completed still has the possibility of being successfully mounted. For specific implementation manners, reference may be made to the following embodiments, and details are not described in this embodiment.
进一步地,于本实施例中,在检测时长超过预设时长时,可以执行S204;在检测时长未超过预设时长时,可以执行S203。Further, in this embodiment, when the detection duration exceeds the preset duration, S204 may be executed; when the detection duration does not exceed the preset duration, S203 may be executed.
S203:当检测时长超过预设时长时,外部存储设备管理模块设置检测状态标识为检测异常标识。S203: When the detection time period exceeds the preset time period, the external storage device management module sets the detection status flag as a detection abnormality flag.
其中,检测状态标识还包括检测异常标识,该检测异常标识可以用于指示存储管理服务模块当前检测异常,即检测时长超过预设时长仍未修复完成,此时外部存储设备的文件系统仍异常。Wherein, the detection status identifier also includes a detection abnormality identifier, which can be used to indicate that the storage management service module currently detects an abnormality, that is, the detection time exceeds a preset time and the repair is not completed, and the file system of the external storage device is still abnormal.
于本实施例中,当检测时长超过预设时长时,外部存储设备管理模块设置检测状态标识为检测异常标识。具体地,在一种实施方式中,检测异常标识可以是数字、字母、单词等字符串,如“0”、“uncheckable”等用于表征经检测操作后文件系统仍异常,可以是系统预设的,也可以是自定义的,从而通过该检测异常标识,可以获知文件系统异常,另外,本实施例对检测异常标识的命名形式不做其他限定。In this embodiment, when the detection duration exceeds the preset duration, the external storage device management module sets the detection status flag as the detection abnormality flag. Specifically, in one embodiment, the detection abnormality identifier may be a string of numbers, letters, words, etc., such as "0", "uncheckable", etc., used to indicate that the file system is still abnormal after the detection operation, and may be preset by the system. Yes, it can also be customized, so that the abnormality of the file system can be learned through the abnormality detection identifier. In addition, this embodiment does not make other restrictions on the naming form of the abnormality detection identifier.
由于文件系统异常时,外部存储设备难以挂载成功,故当文件系统异常且在预设时长内未修复完成时,通过设置检测异常标识,可以在检测到检测异常标识时,不对该外部存储设备进行挂载,从而减少不必要的资源消耗,提高响应效率。具体的实施方式,可见后述实施例,在此不作赘述。Because the external storage device is difficult to mount successfully when the file system is abnormal, when the file system is abnormal and the repair is not completed within the preset time, by setting the abnormal detection flag, the external storage device can be ignored when the abnormal detection flag is detected. Mount it to reduce unnecessary resource consumption and improve response efficiency. Specific implementation manners can be seen in the following embodiments, which are not repeated here.
S204:外部存储设备管理模块在检测操作已完成时,向存储管理服务模块发送检测完成指令。S204: The external storage device management module sends a detection completion instruction to the storage management service module when the detection operation is completed.
于本实施例中,在检测操作已完成时,外部存储设备的文件系统可以是正常的,也可以是异常的,其中正常的包括本身即正常的情况,以及异常但修复完成的情况。In this embodiment, when the detection operation is completed, the file system of the external storage device may be normal or abnormal, and the normal includes the normal condition itself and the abnormal but the repair completed condition.
作为一种实施方式,若文件系统异常且在预设时长内未修复完成,即检测时长超过预设时长时,仍判定检测操作已完成,此时通过外部存储设备管理模块向存储管理服务模块发送检测完成指令,使得存储管理服务模块通过接收到该检测完成指令,可以获知当前外部存储设备已完成检测操作,可以进行挂载。此时,外部存储设备的文件系统可以异常的,也可以是非异常的。As an implementation manner, if the file system is abnormal and the repair is not completed within the preset time, that is, when the detection time exceeds the preset time, it is still determined that the detection operation has been completed, and at this time, the external storage device management module sends to the storage management service module The detection completion instruction allows the storage management service module to learn that the current external storage device has completed the detection operation by receiving the detection completion instruction and can be mounted. At this time, the file system of the external storage device may be abnormal or non-abnormal.
作为另一种实施方式,若文件系统异常且在预设时长内未修复完成,即检测时长超过预设时长时,判定检测操作未完成,此时通过外部存储设备管理模块向存储管理服务模块发送检测完成指令,使得存储管理服务模块通过接收到该检测完成指令,可以获知当前外部存储设备是正常的,可以进行挂载。此时,外部存储设备的文件系统是非异常的,即在外部存储设备的文件系统仍异常时,不 发送检测完成指令。As another embodiment, if the file system is abnormal and the repair is not completed within the preset time, that is, when the detection time exceeds the preset time, it is determined that the detection operation is not completed, and at this time, the external storage device management module sends to the storage management service module The detection completion instruction enables the storage management service module to learn that the current external storage device is normal and can be mounted by receiving the detection completion instruction. At this time, the file system of the external storage device is non-abnormal, that is, when the file system of the external storage device is still abnormal, the detection completion command is not sent.
S205:存储管理服务模块基于检测完成指令通知外部存储设备管理模块对外部存储设备进行挂载。S205: The storage management service module notifies the external storage device management module to mount the external storage device based on the detection completion instruction.
于本实施例中,存储管理服务模块基于检测完成指令,可以判定当前外部存储设备已完成检测操作,可以进行挂载,此时通知外部存储设备管理模块对该外部存储设备进行挂载。由此,将检测操作和挂载操作分开在不同的线程执行,并在通过检测操作判定外部存储设备的文件系统是正常的情况时,才进行挂载,可以提高挂载成功率以及效率。In this embodiment, based on the detection completion instruction, the storage management service module can determine that the current external storage device has completed the detection operation and can be mounted, and then notifies the external storage device management module to mount the external storage device. Therefore, the detection operation and the mounting operation are performed in different threads separately, and the file system of the external storage device is determined to be normal through the detection operation, and the mounting is performed, which can improve the success rate and efficiency of the mounting.
S206:外部存储设备管理模块对外部存储设备进行挂载时,确定是否能够查找到检测异常标识。S206: When the external storage device management module mounts the external storage device, it is determined whether the detection abnormality identifier can be found.
在一些实施方式中,若文件系统异常且在预设时长内未修复完成,即检测时长超过预设时长时,仍判定检测操作已完成,外部存储设备管理设备管理模块对外部存储设备进行挂载时,确定是否能够查找到检测异常标识,具体地,例如,基于表征检测状态的标志位,判断该标志位上的检测状态标识是否位检测异常标识;再如,可以直接查找对应该外部存储设备是否存储检测异常标识。In some embodiments, if the file system is abnormal and the repair is not completed within the preset time, that is, when the detection time exceeds the preset time, it is still determined that the detection operation has been completed, and the external storage device management device management module mounts the external storage device When determining whether the detection abnormality flag can be found, specifically, for example, based on the flag bit that characterizes the detection state, it is determined whether the detection status flag on the flag bit is the detection abnormality flag; for example, it can directly search for the corresponding external storage device Whether to store the detection abnormality identifier.
在另一些实施方式中,若文件系统异常且在预设时长内未修复完成,即检测时长超过预设时长时,判定检测操作未完成,则在S205之后不执行S206至S207,此时,外部存储设备的文件系统是非异常的,也就无需查找检测异常标识。In other implementations, if the file system is abnormal and the repair is not completed within the preset time, that is, when the detection time exceeds the preset time, it is determined that the detection operation is not completed, and S206 to S207 are not executed after S205. At this time, the external The file system of the storage device is non-abnormal, so there is no need to find and detect the abnormal identifier.
进一步地,若能够查找到检测异常标识,可以执行S207;若不能够,可以继续执行挂载操作。Further, if the detection abnormality identifier can be found, S207 can be executed; if not, the mounting operation can be continued.
S207:若能够,则停止对外部存储设备进行挂载。S207: If yes, stop mounting the external storage device.
若能够查找到检测异常标识,此时外部存储设备管理模块判定外部存储设备的文件系统为异常,通过停止对外部存储设备进行挂载,可以降低运行资源的消耗,提高系统运行效率,并有利于提高挂载效率。If the detection abnormality identification can be found, the external storage device management module determines that the file system of the external storage device is abnormal. By stopping the mounting of the external storage device, the consumption of operating resources can be reduced, the efficiency of system operation can be improved, and it is beneficial. Improve mounting efficiency.
需要说明的是,上述步骤中未详细描述的部分,可参考前述实施例,在此不再赘述。It should be noted that, for the parts that are not described in detail in the foregoing steps, reference may be made to the foregoing embodiments, and details are not described herein again.
本实施例提供的挂载处理方法,通过将检测操作和挂载操作分开在不同的线程执行,通过外部存储设备管理模块在接收到第一调用指令之后,立刻返回使得本次Binder调用的线程可以及时结束,并开启第二线程执行实际的检测操作,使得实际的检测时长,并且其中还包含的修复时长不影响主线程,即基于第二线程执行可能导致Binder调用卡住的检测操作,避免了由于检测时长过长导致的系统无响应,防止了异常外部存储设备插入导致的系统卡死或定屏等异常情况发生,大大提升了系统的稳定性。并且,通过确定是否能够找到检测异常标识,使得外部存储设备管理设备在外部存储设备的文件系统是非异常时,才继续进行挂载,还可以提高挂载成功率以及效率,另外,由于外部存储设备管理模块在文件系统异常时不进行挂载,还可以减少不必要的资源消耗,提高系统运行效率。The mounting processing method provided in this embodiment separates the detection operation and the mounting operation in different threads for execution, and the external storage device management module returns immediately after receiving the first call instruction so that the thread called by the Binder can be End in time, and start the second thread to perform the actual detection operation, so that the actual detection time, and the repair time included therein does not affect the main thread, that is, the detection operation that may cause the Binder call to be stuck based on the second thread execution, avoids The system does not respond due to the long detection time, which prevents abnormal situations such as system jam or fixed screen caused by abnormal external storage device insertion, and greatly improves the stability of the system. Moreover, by determining whether the detection abnormality identification can be found, the external storage device management device can continue to mount when the file system of the external storage device is non-abnormal, which can also improve the success rate and efficiency of the mount. In addition, due to the external storage device The management module does not mount when the file system is abnormal, which can also reduce unnecessary resource consumption and improve system operating efficiency.
另外,在检测时长超过预设时长时,也可以结束本次方法,不进行下一步操作。具体地,请参阅图3,该方法包括:S301至S303。In addition, when the detection duration exceeds the preset duration, this method can also be ended without performing the next step. Specifically, referring to FIG. 3, the method includes: S301 to S303.
S301:存储管理服务模块向外部存储设备管理模块发送第一调用指令。S301: The storage management service module sends a first call instruction to the external storage device management module.
S302:外部存储设备管理模块响应于第一调用指令,执行检测操作,且设置外部存储设备的检测状态标识为检测中标识,并返回检测状态标识。S302: In response to the first calling instruction, the external storage device management module executes a detection operation, and sets the detection status flag of the external storage device as the detection status flag, and returns the detection status flag.
S303:当检测时长超过预设时长时,外部存储设备管理模块设置检测状态标识为检测异常标识。S303: When the detection time length exceeds the preset time length, the external storage device management module sets the detection status flag as a detection abnormality flag.
于本实施例中,当检测时长超过预设时长时,结束本次方法,使得在文件系统异常且在预设时长内未修复完成时,不通知存储管理服务模块而结束本次方法,可以大大减少运行资源的消耗,提高系统运行效率。In this embodiment, when the detection time exceeds the preset time, the method ends, so that when the file system is abnormal and the repair is not completed within the preset time, the storage management service module is not notified to end the method, which can greatly Reduce the consumption of operating resources and improve system operating efficiency.
进一步地,作为一种方式,当检测时长超过预设时长时,可以先执行S303,再结束本次方法。此时外部存储设备管理模块设置检测状态标识为检测异常标识,使得在存储管理服务模块获取到外部存储设备的检测状态标识时,可以获知外部存储设备的文件系统处于异常状态,从而使得用户可以及时尝试重新挂载。Further, as a way, when the detection duration exceeds the preset duration, S303 may be executed first, and then this method is ended. At this time, the external storage device management module sets the detection status flag as the abnormal detection flag, so that when the storage management service module obtains the detection status flag of the external storage device, it can learn that the file system of the external storage device is in an abnormal state, so that the user can timely Try to mount again.
作为另一种方式,当检测时长超过预设时长时,可以不执行S303,而结束本次方法。此时存储管理服务模块认为外部存储设备一直处于检测中,仍在执行检测操作,具体地,外部存储设备对应地检测状态一直为“Checking”。As another way, when the detection duration exceeds the preset duration, S303 may not be executed, and this method is ended. At this time, the storage management service module considers that the external storage device is always being detected and is still performing a detection operation. Specifically, the corresponding detection status of the external storage device is always "Checking".
S304:外部存储设备管理模块在检测操作已完成时,向存储管理服务模块发送检测完成指令。S304: When the detection operation is completed, the external storage device management module sends a detection completion instruction to the storage management service module.
S305:存储管理服务模块基于检测完成指令通知外部存储设备管理模块对外部存储设备进行挂载。S305: The storage management service module notifies the external storage device management module to mount the external storage device based on the detection completion instruction.
需要说明的是,上述步骤中为详细描述的部分,可参考前述实施例,在此不再赘述。It should be noted that the above steps are detailed descriptions, and reference may be made to the foregoing embodiments, which will not be repeated here.
本实施例提供的挂载处理方法,在前述实施例的基础上,通过在检测时长超过预设时长时,结 束本次方法,可以大大减少运行资源的消耗,提高运行效率,并且可以使得用户通过重新插入外部存储设备或其他措施,重新尝试挂载,提高用户挂载体验。The mounting processing method provided in this embodiment, on the basis of the foregoing embodiment, terminates this method when the detection time exceeds the preset time, which can greatly reduce the consumption of operating resources, improve operating efficiency, and allow users to pass Re-insert the external storage device or other measures and try to mount again to improve the user's mounting experience.
请参阅图4,示出了本申请实施例提供的一种挂载处理方法,具体地,该方法包括:S401至S404。Please refer to FIG. 4, which shows a mounting processing method provided by an embodiment of the present application. Specifically, the method includes: S401 to S404.
S401:存储管理服务模块向外部存储设备管理模块发送第一调用指令。S401: The storage management service module sends a first calling instruction to the external storage device management module.
S402:外部存储设备管理模块响应于第一调用指令,执行检测操作,且设置外部存储设备的检测状态标识为检测中标识,并返回检测状态标识。S402: In response to the first call instruction, the external storage device management module executes a detection operation, and sets the detection status flag of the external storage device as the detection status flag, and returns the detection status flag.
S403:外部存储设备管理模块在检测操作已完成时,向存储管理服务模块发送检测完成指令。S403: The external storage device management module sends a detection completion instruction to the storage management service module when the detection operation is completed.
上述S401至S403的具体实施方式可参考前述实施例,在此不再赘述。For the specific implementation manners of S401 to S403 described above, reference may be made to the foregoing embodiment, which will not be repeated here.
S404:存储管理服务模块响应于检测完成指令,向外部存储设备管理模块发送第二调用指令。S404: The storage management service module sends a second call instruction to the external storage device management module in response to the detection completion instruction.
其中,第二调用指令用于通知外部存储设备管理模块对外部存储设备进行挂载。The second calling instruction is used to notify the external storage device management module to mount the external storage device.
作为一种实施方式,存储管理服务模块响应于检测完成指令,通过Binder调用将挂载指令发送至外部存储设备管理模块,其中,第二调用指令包括挂载指令,例如,挂载指令可以是用于挂载外部存储设备的函数Mount,也可以是其他用于挂载外部存储设备的接口函数,本实施例对此不作限定。具体地,存储管理服务模块基于Binder通信调用函数Mount至外部存储设备管理模块,使得外部存储设备管理模块可以执行函数Mount,执行挂载操作。As an implementation manner, the storage management service module sends the mount instruction to the external storage device management module via the Binder call in response to the detection completion instruction, where the second call instruction includes the mount instruction, for example, the mount instruction may be used The function Mount for mounting an external storage device can also be other interface functions for mounting an external storage device, which is not limited in this embodiment. Specifically, the storage management service module calls the function Mount to the external storage device management module based on Binder communication, so that the external storage device management module can execute the function Mount and perform the mounting operation.
作为另一种实施方式,挂载指令可以是预先加载的,即第二调用指令不包括挂载指令,此时,存储管理服务模块向外部存储设备管理模块发送第二调用指令,可以使得外部存储设备管理模块响应于第二调用指令,可以执行预先加载的挂载指令,减少进程间的通信数据量,降低函数加载时间,提高通信效率的同时提高挂载效率。As another implementation manner, the mount instruction may be pre-loaded, that is, the second call instruction does not include the mount instruction. At this time, the storage management service module sends the second call instruction to the external storage device management module to enable the external storage In response to the second call instruction, the device management module can execute the pre-loaded mount instruction, reduce the amount of communication data between processes, reduce the function loading time, and improve the communication efficiency while improving the mounting efficiency.
请参阅图5,示出了本申请实施例提供的一种挂载处理方法,具体地,该方法包括:S501至S507。Please refer to FIG. 5, which shows a mounting processing method provided by an embodiment of the present application. Specifically, the method includes: S501 to S507.
S501:存储管理服务模块向外部存储设备管理模块发送第一调用指令。S501: The storage management service module sends a first call instruction to the external storage device management module.
S502:外部存储设备管理模块响应于第一调用指令,执行检测操作,且设置外部存储设备的检测状态标识为检测中标识,并返回检测状态标识。S502: In response to the first call instruction, the external storage device management module performs a detection operation, and sets the detection status flag of the external storage device as the detection status flag, and returns the detection status flag.
S503:外部存储设备管理模块在检测操作已完成时,向存储管理服务模块发送检测完成指令。S503: The external storage device management module sends a detection completion instruction to the storage management service module when the detection operation is completed.
S504:存储管理服务模块响应于检测完成指令,向外部存储设备管理模块发送第二调用指令。S504: In response to the detection completion instruction, the storage management service module sends a second call instruction to the external storage device management module.
S505:外部存储设备管理模块响应于第二调用指令,根据检测状态标识,判断外部存储设备的文件系统是否异常。S505: In response to the second call instruction, the external storage device management module determines whether the file system of the external storage device is abnormal according to the detection status identifier.
于本实施例中,外部存储设备管理模块响应于第二调用指令,根据外部存储设备对应的检测状态标识,判断外部存储设备的文件系统是否异常。具体地,若当前的检测状态标识为检测异常标识,外部存储设备的文件系统异常,否则非异常,即文件系统正常。In this embodiment, the external storage device management module determines whether the file system of the external storage device is abnormal according to the detection status identifier corresponding to the external storage device in response to the second call instruction. Specifically, if the current detection status identifier is a detection abnormality identifier, the file system of the external storage device is abnormal, otherwise it is not abnormal, that is, the file system is normal.
本实施例中,S505之后,若非异常,可以执行S506;若异常,可以执行S508。In this embodiment, after S505, if it is not abnormal, S506 can be executed; if it is abnormal, S508 can be executed.
S506:外部存储设备管理模块获取挂载结果。S506: The external storage device management module obtains the mounting result.
若非异常,此时外部存储设备管理模块检测到外部存储设备的文件系统非异常,外部存储设备管理模块对外部存储设备执行挂载操作,获取挂载结果。具体地,外部存储设备管理模块基于挂载指令,如用于挂载的函数Mount,通过执行该函数Mount,对外部存储设备执行挂载操作,获取挂载结果。其中,挂载结果包括挂载成功和挂载失败。If it is not abnormal, the external storage device management module detects that the file system of the external storage device is not abnormal at this time, and the external storage device management module performs a mounting operation on the external storage device and obtains the mounting result. Specifically, the external storage device management module is based on a mounting instruction, such as a function Mount for mounting, and by executing the function Mount, a mounting operation is performed on the external storage device to obtain a mounting result. Among them, the mounting result includes mounting success and mounting failure.
S507:外部存储设备管理模块根据挂载结果,设置挂载状态标识。S507: The external storage device management module sets a mounting status flag according to the mounting result.
具体地,挂载状态标识可以是一个用于表征挂载状态的标志位,例如,若挂载状态标识为“unmountable”,表征外部存储设备无法挂载,若挂载状态标识为“mounted”,表征外部存储设备已挂载。需要说明的是,只要挂载状态标识可以用于表征挂载状态,本实施例对挂载状态标识的命名形式不作其他限定。Specifically, the mounting status flag may be a flag bit used to characterize the mounting status. For example, if the mounting status flag is "unmountable", it means that the external storage device cannot be mounted; if the mounting status flag is "mounted", Indicates that the external storage device has been mounted. It should be noted that, as long as the mounting state identifier can be used to represent the mounting state, this embodiment does not make other restrictions on the naming form of the mounting state identifier.
作为一种实施方式,若挂载成功,设置挂载状态标识为已挂载标识,如“mounted”;若挂载失败,设置挂载状态标识为无法挂载标识,如“unmountable”,或设置为未挂载标识,如“unmounted”。从而使得存储管理服务模块通过获取挂载状态标识可以获知对应的挂载结果。As an implementation manner, if the mount is successful, set the mount status flag to the mounted flag, such as "mounted"; if the mount fails, set the mount status flag to the unmountable flag, such as "unmountable", or set It is an unmounted flag, such as "unmounted". Therefore, the storage management service module can obtain the corresponding mounting result by obtaining the mounting status identifier.
S508:设置外部存储设备的挂载状态标识为无法挂载标识。S508: Set the mounting status flag of the external storage device as a flag that cannot be mounted.
若异常,此时外部存储设备管理模块检测到外部存储设备的文件系统异常,此时设置外部存储设备的挂载状态标识为无法挂载标识,使得外部存储设备管理模块无法对外部存储设备进行挂载。由于文件系统异常时,对外部存储设备挂载成功的可能性低,因此通过判断外部存储设备的文件系统是否异常,可以判断挂载成功的可能性,从而在实际执行挂载操作前作出预判,并在文件系统异常时,停止挂载,可以节省资源,提高挂载效率。If it is abnormal, the external storage device management module detects that the file system of the external storage device is abnormal. At this time, the mounting status flag of the external storage device is set as the unmountable flag, so that the external storage device management module cannot mount the external storage device. Load. When the file system is abnormal, the possibility of successfully mounting the external storage device is low. Therefore, by judging whether the file system of the external storage device is abnormal, the possibility of the successful mounting can be judged, so as to make a prediction before the actual mounting operation. , And stop mounting when the file system is abnormal, which can save resources and improve mounting efficiency.
作为一种实施方式,S508之后可以结束本次方法,即设置挂载状态标识后再结束本次方法,使 得存储管理服务模块可以获取该挂载状态标识,从而获知当前插入的外部存储设备无法挂载,使得用户可以采取措施重新挂载该外部存储设备,如重新插入等,提升用户挂载外部存储设备的用户体验。As an implementation manner, this method can be ended after S508, that is, the method can be ended after setting the mounting status flag, so that the storage management service module can obtain the mounting status flag, thereby knowing that the currently inserted external storage device cannot be mounted This allows the user to take measures to remount the external storage device, such as reinserting it, to improve the user experience of mounting the external storage device.
作为另一种实施方式,S508之前可以结束本次方法,即若外部存储设备管理模块判断外部存储设备的文件系统异常,不执行S508,而结束本次方法。进一步节省挂载所需的运行资源,由于在文件系统异常时,难以对外部存储设备挂载成功,因此,本实施方式通过在文件系统异常时,不执行实际的挂载操作,例如不执行函数Mount等操作,而结束本次方法,可以减少不必要的运行资源。As another implementation manner, this method can be ended before S508, that is, if the external storage device management module determines that the file system of the external storage device is abnormal, S508 is not executed, and this method is ended. It further saves the running resources required for mounting. Since it is difficult to successfully mount the external storage device when the file system is abnormal, this embodiment does not perform the actual mounting operation, such as not performing the function, when the file system is abnormal. Operations such as Mount, and ending this method can reduce unnecessary operating resources.
作为又一种实施方式,S508之后可以将无法挂载标识发送至存储管理服务模块,使得存储管理服务模块可以获知外部存储设备的当前挂载状态。具体的实施方式,可以参考后述实施例,在此不再赘述。As yet another implementation manner, after S508, the unmountable indicator may be sent to the storage management service module, so that the storage management service module can learn the current mounting status of the external storage device. For specific implementation manners, reference may be made to the following embodiments, which will not be repeated here.
需要说明的是,上述步骤中未详细描述的部分,可参考前述实施例,在此不再赘述。It should be noted that, for the parts that are not described in detail in the foregoing steps, reference may be made to the foregoing embodiments, and details are not described herein again.
本实施例提供的挂载处理方法,由于文件系统异常时,对外部存储设备挂载成功的可能性低,因此在前述实施例的基础上,本实施例通过判断外部存储设备的文件系统是否异常,可以判断挂载成功的可能性,从而在实际执行挂载操作前作出预判,并在文件系统异常时不进行挂载操作,可以节省资源,提高挂载效率。In the mounting processing method provided in this embodiment, when the file system is abnormal, the possibility of successfully mounting the external storage device is low. Therefore, based on the foregoing embodiment, this embodiment determines whether the file system of the external storage device is abnormal. , Can judge the possibility of successful mounting, so as to make a pre-judgment before actually performing the mounting operation, and do not perform the mounting operation when the file system is abnormal, which can save resources and improve the mounting efficiency.
另外,外部存储设备管理模块在判定外部存储设备的文件系统异常,并设置外部存储设备的挂载状态标识为无法挂载标识时,可以不执行挂载操作,但将无法挂载标识发送至存储管理服务模块,使得存储管理服务模块可以广播对应的挂载结果。具体地,请参阅图6,示出了本申请实施例提供的一种挂载处理方法,具体地,该方法包括:S601至S610。In addition, when the external storage device management module determines that the file system of the external storage device is abnormal and sets the mounting status flag of the external storage device as the unmountable flag, the mounting operation may not be performed, but the unmountable flag is sent to the storage The management service module allows the storage management service module to broadcast the corresponding mounting results. Specifically, please refer to FIG. 6, which shows a mounting processing method provided by an embodiment of the present application. Specifically, the method includes: S601 to S610.
S601:存储管理服务模块向外部存储设备管理模块发送第一调用指令。S601: The storage management service module sends a first call instruction to the external storage device management module.
S602:外部存储设备管理模块响应于第一调用指令,执行检测操作,且设置外部存储设备的检测状态标识为检测中标识,并返回检测状态标识。S602: In response to the first calling instruction, the external storage device management module performs a detection operation, and sets the detection status flag of the external storage device as the detection status flag, and returns the detection status flag.
S603:外部存储设备管理模块在检测操作已完成时,向存储管理服务模块发送检测完成指令。S603: The external storage device management module sends a detection completion instruction to the storage management service module when the detection operation is completed.
S604:存储管理服务模块响应于检测完成指令,向外部存储设备管理模块发送第二调用指令。S604: In response to the detection completion instruction, the storage management service module sends a second call instruction to the external storage device management module.
S605:外部存储设备管理模块响应于第二调用指令,根据检测状态标识,判断外部存储设备的文件系统是否异常。S605: In response to the second calling instruction, the external storage device management module determines whether the file system of the external storage device is abnormal according to the detection status identifier.
于本实施例中,若非异常,可以执行S606;若异常,可以执行S608。In this embodiment, if it is not abnormal, S606 can be executed; if it is abnormal, S608 can be executed.
S606:外部存储设备管理模块获取挂载结果。S606: The external storage device management module obtains the mounting result.
S607:外部存储设备管理模块根据挂载结果,设置挂载状态标识。S607: The external storage device management module sets a mounting state flag according to the mounting result.
S608:设置外部存储设备的挂载状态标识为无法挂载标识。S608: Set the mounting status flag of the external storage device as a flag that cannot be mounted.
于本实施例中,若外部存储设备管理模块判定外部存储设备的文件系统异常,设置外部存储设备的挂载状态标识为无法挂载标识。In this embodiment, if the external storage device management module determines that the file system of the external storage device is abnormal, it sets the mounting status flag of the external storage device as the unmountable flag.
S609:外部存储设备管理模块在当前挂载已完成时,向存储管理服务模块发送挂载完成指令。S609: The external storage device management module sends a mounting completion instruction to the storage management service module when the current mounting is completed.
于本实施例中,在当前挂载已完成时,向存储管理服务模块发送挂载完成指令,其中挂载完成指令包括挂载状态标识,使得存储管理服务模块在接收到挂载完成指令时,可以获取外部存储设备的挂载状态标识。In this embodiment, when the current mounting is completed, the mounting completion instruction is sent to the storage management service module, where the mounting completion instruction includes the mounting status identifier, so that when the storage management service module receives the mounting completion instruction, You can get the mount status identifier of the external storage device.
其中,外部存储设备管理模块执行挂载操作对外部存储设备进行挂载后,可以获取挂载结果,于本实施例中,若外部存储设备管理模块判定外部存储设备的文件系统异常,设置外部存储设备的挂载状态标识为无法挂载标识,此时当前挂载已完成;若非异常,获取挂载结果,并根据挂载结果设置挂载状态标识,此时当前挂载也已完成。由于在文件系统异常时,外部存储设备管理模块仍将无法挂载标识发送至存储管理服务模块,使得存储管理服务模块对可以广播每次挂载外部存储设备时对应的挂载结果都可以广播,即便在文件系统异常时,未执行挂载操作,也将对应的挂载失败进行广播,使得其他应用程序可以及时获知所插入的外部存储设备的挂载状态。Among them, after the external storage device management module executes the mounting operation to mount the external storage device, the mounting result can be obtained. In this embodiment, if the external storage device management module determines that the file system of the external storage device is abnormal, set the external storage The mounting status flag of the device is the unmountable flag, and the current mounting has been completed at this time; if it is not abnormal, the mounting result is obtained, and the mounting status flag is set according to the mounting result. At this time, the current mounting is also completed. When the file system is abnormal, the external storage device management module still sends the unmountable flag to the storage management service module, so that the storage management service module can broadcast the corresponding mounting result every time the external storage device is mounted. Even when the file system is abnormal and the mounting operation is not performed, the corresponding mounting failure will be broadcast, so that other applications can learn the mounting status of the inserted external storage device in time.
S610:存储管理服务模块根据挂载状态标识,广播与挂载状态标识对应的挂载结果。S610: The storage management service module broadcasts the mounting result corresponding to the mounting status identifier according to the mounting status identifier.
作为一种实施方式,若挂载状态标识为无法挂载标识,存储管理服务模块广播挂载失败;若挂载状态标识为已挂载标识,存储管理服务模块广播挂载成功,使得系统上的应用程序可以访问挂载成功的外部存储设备。具体地,存储管理服务模块向系统广播挂载结果,应用程序监听到广播后可以作对应操作,例如,用于文件管理的应用程序可以在监听到挂载成功的广播时,在该应用程序的界面显示出该外部存储设备,并在监听到挂载失败的广播时,在该应用程序的界面显示该外部存储设备异常。As an implementation manner, if the mount status identifier is the unmountable identifier, the storage management service module broadcasts the mount failure; if the mount status identifier is the mounted identifier, the storage management service module broadcasts the mount successfully, so that the The application can access the successfully mounted external storage device. Specifically, the storage management service module broadcasts the mounting result to the system, and the application can perform corresponding operations after listening to the broadcast. For example, an application for file management can monitor the successful mounting broadcast in the application’s The interface displays the external storage device, and when the broadcast of the mounting failure is monitored, the external storage device is abnormal in the interface of the application.
需要说明的是,上述步骤中未详细描述的部分,可参考前述实施例,在此不再赘述。It should be noted that, for the parts that are not described in detail in the foregoing steps, reference may be made to the foregoing embodiments, and details are not described herein again.
本实施例提供的挂载处理方法,在前述实施例的基础上,在外部存储设备管理模块检测到外部存储设备的文件系统异常后,不执行挂载操作,降低不必要的资源消耗,同时通过将无法挂载标识发送至存储管理服务模块,使得存储管理服务模块仍广播检测异常标识对应的挂载结果,使得其他应用程序可以及时获知当前挂载结果,提高响应效率,便于用户在挂载失败时及时采取措施,提升用户体验。The mounting processing method provided in this embodiment is based on the foregoing embodiments. After the external storage device management module detects an abnormality in the file system of the external storage device, it does not perform the mounting operation, reducing unnecessary resource consumption, and passing Send the unmountable flag to the storage management service module, so that the storage management service module still broadcasts the mounting result corresponding to the detected abnormal flag, so that other applications can learn the current mounting result in time, improve response efficiency, and facilitate users in the failure of the mount Take timely measures to improve user experience.
另外,外部存储设备管理模块在判定外部存储设备的文件系统异常,并设置外部存储设备的挂载状态标识为无法挂载标识时,仍可以进行挂载操作,具体地,请参阅图7,示出了本申请实施例提供的一种挂载处理方法,具体地,该方法包括:S701至S710。In addition, when the external storage device management module determines that the file system of the external storage device is abnormal and sets the mounting status flag of the external storage device as the unmountable flag, the mounting operation can still be performed. For details, please refer to Figure 7 for details. A mounting processing method provided by an embodiment of the present application is presented. Specifically, the method includes: S701 to S710.
S701:存储管理服务模块向外部存储设备管理模块发送第一调用指令。S701: The storage management service module sends a first call instruction to the external storage device management module.
S702:外部存储设备管理模块响应于第一调用指令,执行检测操作,且设置外部存储设备的检测状态标识为检测中标识,并返回检测状态标识。S702: In response to the first call instruction, the external storage device management module performs a detection operation, and sets the detection status flag of the external storage device as the detection status flag, and returns the detection status flag.
作为一种实施方式,在检测时长超过预设时长时,外部存储设备管理模块也可以不中断检测操作,使得检测操作继续,继续对损坏的文件系统进行修复。具体地,在文件系统损坏过多时,外部存储设备管理模块要完成对所有异常的文件系统的修复,所需的时长较长,并且所需的时长可能超过预设时长,此时通过在检测时长超过预设时长时,仍不中断检测操作,使得外部存储设备管理模块可以对外部存储设备中损坏的文件系统继续进行修复,由此,存在在挂载操作执行前,完成修复的可能,此时检测操作未完成的外部存储设备仍具有可被成功挂载的可能。As an implementation manner, when the detection time length exceeds the preset time length, the external storage device management module may also not interrupt the detection operation, so that the detection operation continues, and continues to repair the damaged file system. Specifically, when the file system is damaged too much, the external storage device management module needs to complete the repair of all abnormal file systems. The required time is longer, and the required time may exceed the preset time. At this time, the detection time When the preset time is exceeded, the detection operation is still not interrupted, so that the external storage device management module can continue to repair the damaged file system in the external storage device. Therefore, there is a possibility of completing the repair before the mounting operation is performed. The external storage device whose detection operation is not completed still has the possibility of being successfully mounted.
S703:外部存储设备管理模块在检测操作已完成时,向存储管理服务模块发送检测完成指令。S703: The external storage device management module sends a detection completion instruction to the storage management service module when the detection operation is completed.
S704:存储管理服务模块响应于检测完成指令,向外部存储设备管理模块发送第二调用指令S704: The storage management service module sends a second call instruction to the external storage device management module in response to the detection completion instruction
S705:外部存储设备管理模块响应于第二调用指令,根据检测状态标识,判断外部存储设备的文件系统是否异常。S705: In response to the second calling instruction, the external storage device management module determines whether the file system of the external storage device is abnormal according to the detection status identifier.
S706:设置外部存储设备的挂载状态标识为无法挂载标识。S706: Set the mounting status flag of the external storage device as a flag that cannot be mounted.
若外部存储设备管理模块判定外部存储设备的文件系统异常,设置外部存储设备的挂载状态标识为无法挂载标识,仍可以进行挂载操作,继续执行S707。If the external storage device management module determines that the file system of the external storage device is abnormal, and sets the mounting status flag of the external storage device as an unmountable flag, the mounting operation can still be performed, and S707 is continued.
作为一种实施方式,在S707之前,外部存储设备管理模块将外部存储设备的文件系统修复完成,使得该文件系统恢复正常,此时,通过执行S707,可以使得由于在预设时长内未修复完成导致检测状态标识设置为检测异常标识的外部存储设备,在文件系统恢复正常时,可以及时进行挂载,而不需要重新插入、重新执行检测、挂载操作,因此提高了外部存储设备的挂载效率。As an implementation manner, before S707, the external storage device management module completes the repair of the file system of the external storage device, so that the file system is restored to normal. At this time, by executing S707, the repair is not completed within the preset time. As a result, the detection status flag is set to the external storage device with the abnormal detection flag. When the file system returns to normal, it can be mounted in time, without the need to re-insert, re-execute detection, and mount operations, thus improving the mounting of external storage devices effectiveness.
S707:外部存储设备管理模块获取挂载结果。S707: The external storage device management module obtains the mounting result.
S708:外部存储设备管理模块根据挂载结果,更新挂载状态标识。S708: The external storage device management module updates the mounting status identifier according to the mounting result.
S709:外部存储设备管理模块在当前挂载已完成时,向存储管理服务模块发送挂载完成指令。S709: The external storage device management module sends a mounting completion instruction to the storage management service module when the current mounting is completed.
S710:存储管理服务模块根据挂载状态标识,广播与挂载状态标识对应的挂载结果。S710: The storage management service module broadcasts the mounting result corresponding to the mounting status identifier according to the mounting status identifier.
需要说明的是,上述步骤中未详细描述的部分,可参考前述实施例,在此不再赘述。It should be noted that, for the parts that are not described in detail in the foregoing steps, reference may be made to the foregoing embodiments, and details are not described herein again.
本实施例提供的挂载处理方法,通过在检测时长超过预设时长时,仍未中断检测操作,继续对损坏的文件系统进行修复,并在执行挂载操作,获取挂载结果前这段时间完成了修复,使得外部存储设备的文件系统恢复正常,从而本实施例通过外部存储设备管理模块在根据检测异常标识设置挂载状态标识为无法挂载后,仍可执行挂载操作,使得外部存储设备可以在文件系统恢复正常时及时被挂载,提高挂载效率。The mount processing method provided in this embodiment continues to repair the damaged file system by not interrupting the detection operation when the detection duration exceeds the preset duration, and the time before the mount operation is executed and the mount result is obtained The repair is completed, so that the file system of the external storage device is restored to normal. Therefore, the external storage device management module uses the external storage device management module to set the mounting status flag as unmountable according to the detected abnormality flag, and the mounting operation can still be performed, so that the external storage device The device can be mounted in time when the file system returns to normal, improving mounting efficiency.
另外,外部存储设备管理模块在判定外部存储设备的文件系统异常,并设置外部存储设备的挂载状态标识为无法挂载标识时,也可以不进行挂载操作,而结束本次方法,请参阅图8,示出了本申请实施例提供的一种挂载处理方法,具体地,该方法包括:S801至S810。In addition, when the external storage device management module determines that the file system of the external storage device is abnormal and sets the mounting status flag of the external storage device as the unmountable flag, it can also end this method without performing the mounting operation. Please refer to FIG. 8 shows a mounting processing method provided by an embodiment of the present application. Specifically, the method includes: S801 to S810.
S801:存储管理服务模块向外部存储设备管理模块发送第一调用指令。S801: The storage management service module sends a first calling instruction to the external storage device management module.
S802:外部存储设备管理模块响应于第一调用指令,执行检测操作,且设置外部存储设备的检测状态标识为检测中标识,并返回检测状态标识。S802: In response to the first calling instruction, the external storage device management module performs a detection operation, and sets the detection status flag of the external storage device as the detection status flag, and returns the detection status flag.
S803:外部存储设备管理模块在检测操作已完成时,向存储管理服务模块发送检测完成指令。S803: The external storage device management module sends a detection completion instruction to the storage management service module when the detection operation is completed.
S804:存储管理服务模块响应于检测完成指令,向外部存储设备管理模块发送第二调用指令。S804: In response to the detection completion instruction, the storage management service module sends a second call instruction to the external storage device management module.
S805:外部存储设备管理模块响应于第二调用指令,根据检测状态标识,判断外部存储设备的文件系统是否异常。S805: In response to the second call instruction, the external storage device management module determines whether the file system of the external storage device is abnormal according to the detection status identifier.
S806:设置外部存储设备的挂载状态标识为无法挂载标识。S806: Set the mounting status flag of the external storage device as a flag that cannot be mounted.
若外部存储设备管理模块判定外部存储设备的文件系统异常,设置外部存储设备的挂载状态标识为无法挂载标识后,结束本次方法,使得外部存储设备管理模块在检测到外部存储设备的文件系 统异常时,不执行挂载操作,也不广播挂载结果,节省了资源。If the external storage device management module determines that the file system of the external storage device is abnormal, after setting the mounting status flag of the external storage device to the unmountable flag, the method ends, so that the external storage device management module detects the file system of the external storage device When the system is abnormal, the mount operation is not performed, and the mount result is not broadcast, which saves resources.
S807:外部存储设备管理模块获取挂载结果。S807: The external storage device management module obtains the mounting result.
S808:外部存储设备管理模块根据挂载结果,更新挂载状态标识。S808: The external storage device management module updates the mounting status identifier according to the mounting result.
S809:外部存储设备管理模块在当前挂载已完成时,向存储管理服务模块发送挂载完成指令。S809: The external storage device management module sends a mounting completion instruction to the storage management service module when the current mounting is completed.
S810:存储管理服务模块根据挂载状态标识,广播与挂载状态标识对应的挂载结果。S810: The storage management service module broadcasts the mounting result corresponding to the mounting status identifier according to the mounting status identifier.
需要说明的是,上述步骤中未详细描述的部分,可参考前述实施例,在此不再赘述。It should be noted that, for the parts that are not described in detail in the foregoing steps, reference may be made to the foregoing embodiments, and details are not described herein again.
本实施例提供的挂载处理方法,通过在外部存储设备管理模块判定外部存储设备的文件系统异常,设置外部存储设备的挂载状态标识为无法挂载标识后,结束本次方法,使得外部存储设备管理模块在检测到外部存储设备的文件系统异常时,不执行挂载操作,也不广播挂载结果,从而在前述实施例的基础上,节省了资源,提高了系统运行效率。In the mounting processing method provided in this embodiment, the external storage device management module determines that the file system of the external storage device is abnormal, and after setting the mounting status flag of the external storage device as the unmountable flag, the method ends, so that the external storage When the device management module detects that the file system of the external storage device is abnormal, it does not perform the mounting operation and does not broadcast the mounting result, thereby saving resources and improving system operation efficiency on the basis of the foregoing embodiment.
另外,在外部存储设备管理模块判定外部存储设备的文件系统异常时,也可以不设置挂载状态标识,并响应于第二调用指令,对外部存储设备进行挂载,具体地,请参阅图9,示出了本申请实施例提供的一种挂载处理方法,具体地,该方法包括:S901至S908。In addition, when the external storage device management module determines that the file system of the external storage device is abnormal, the mounting status flag may not be set, and the external storage device is mounted in response to the second call instruction. For details, refer to Figure 9 , Shows a mounting processing method provided by an embodiment of the present application. Specifically, the method includes: S901 to S908.
S901:存储管理服务模块向外部存储设备管理模块发送第一调用指令。S901: The storage management service module sends a first call instruction to the external storage device management module.
S902:外部存储设备管理模块响应于第一调用指令,执行检测操作,且设置外部存储设备的检测状态标识为检测中标识,并返回检测状态标识。S902: In response to the first calling instruction, the external storage device management module executes a detection operation, and sets the detection status flag of the external storage device as the detection status flag, and returns the detection status flag.
S903:外部存储设备管理模块在检测操作已完成时,向存储管理服务模块发送检测完成指令。S903: The external storage device management module sends a detection completion instruction to the storage management service module when the detection operation is completed.
S904:存储管理服务模块响应于检测完成指令,向外部存储设备管理模块发送第二调用指令。S904: The storage management service module sends a second call instruction to the external storage device management module in response to the detection completion instruction.
于本实施例中,外部存储设备管理模块响应于第二调用指令,对外部存储设备进行挂载,具体地,可以包括S905至S906。In this embodiment, the external storage device management module responds to the second call instruction to mount the external storage device, which may specifically include S905 to S906.
S905:外部存储设备管理模块获取挂载结果。S905: The external storage device management module obtains the mounting result.
S906:外部存储设备管理模块根据挂载结果,设置挂载状态标识S906: The external storage device management module sets the mounting status flag according to the mounting result
S907:外部存储设备管理模块在当前挂载已完成时,向存储管理服务模块发送挂载完成指令。S907: The external storage device management module sends a mounting completion instruction to the storage management service module when the current mounting is completed.
其中,挂载完成指令包括外部存储设备的挂载状态标识。Wherein, the mounting completion instruction includes the mounting status identifier of the external storage device.
S908:存储管理服务模块根据挂载状态标识,广播与挂载状态标识对应的挂载结果。S908: The storage management service module broadcasts the mounting result corresponding to the mounting status identifier according to the mounting status identifier.
需要说明的是,上述步骤中未详细描述的部分,可参考前述实施例,在此不再赘述。It should be noted that, for the parts that are not described in detail in the foregoing steps, reference may be made to the foregoing embodiments, and details are not described herein again.
本实施例提供的挂在处理方法,通过将检测操作与挂载操作分别基于不同的调用指令执行,防止耗时长的检测操作在执行过程中卡住主进程,使得系统无响应,出现卡死或定屏等系统异常情况,提升了系统稳定性。并在对外部存储设备执行挂载操作后,广播挂载结果,使得系统上的应用程序可以获知外部存储设备的挂载结果,并在挂载成功时访问外部存储设备,提高了系统响应效率,并且提升了用户体验。The hanging processing method provided in this embodiment implements the detection operation and the mounting operation based on different call instructions respectively, to prevent the time-consuming detection operation from jamming the main process during the execution process, making the system unresponsive, stuck or stuck System abnormalities such as fixed screens have improved system stability. After performing the mounting operation on the external storage device, it broadcasts the mounting result, so that the application on the system can learn the mounting result of the external storage device, and access the external storage device when the mounting is successful, which improves the response efficiency of the system. And it improves the user experience.
进一步地,请参阅图10,示出了本申请实施例提供的一种触发第一调用指令的方法流程图,该方法描述了在外部存储设备插入终端设备,且存储管理服务模块向外部存储设备管理模块发送第一调用指令之前的过程,具体地,该方法包括:S1001至S1003。Further, please refer to FIG. 10, which shows a flowchart of a method for triggering a first call instruction provided by an embodiment of the present application. The method describes that a terminal device is inserted into an external storage device, and the storage management service module sends the external storage device to the external storage device. The process before the management module sends the first call instruction, specifically, the method includes: S1001 to S1003.
S1001:外部存储设备管理模块在检测到外部存储设备的插入事件时,向存储管理服务模块发送外部存储设备的设备信息。S1001: When the external storage device management module detects the insertion event of the external storage device, it sends the device information of the external storage device to the storage management service module.
作为一种实施方式,在外部存储设备插入终端设备时,系统底层驱动将外部存储设备的插入时间上报到外部存储设备管理模块,使得外部存储设备管理模块获知外部存储设备的插入事件,并创建外部存储设备的存储路径以及设备信息,将插入的外部存储设备的设备信息转发至存储管理服务模块。其中,设备信息可以包括设备ID、存储容量大小、文件系统类型等信息。具体地,在一些实施方式中,外部存储设备管理模块可以基于Binder调用将设备信息发送至存储管理服务模块。As an implementation manner, when the external storage device is inserted into the terminal device, the system bottom layer driver reports the insertion time of the external storage device to the external storage device management module, so that the external storage device management module learns the insertion event of the external storage device and creates an external The storage path and device information of the storage device, and the device information of the inserted external storage device is forwarded to the storage management service module. Among them, the device information may include information such as device ID, storage capacity, and file system type. Specifically, in some embodiments, the external storage device management module may send device information to the storage management service module based on the Binder call.
S1002:存储管理服务模块根据设备信息,创建外部存储设备的存储访问接口,以使外部存储设备被访问。S1002: The storage management service module creates a storage access interface of the external storage device according to the device information, so that the external storage device can be accessed.
作为一种实施方式,存储管理服务模块根据接收的外部存储设备的设备信息,创建外部存储设备的存储访问接口,使得上层应用程序可以通过存储访问接口访问对应的外部存储设备。As an implementation manner, the storage management service module creates a storage access interface of the external storage device according to the received device information of the external storage device, so that upper-layer applications can access the corresponding external storage device through the storage access interface.
S1003:存储管理服务模块在当前存储设备列表上添加外部存储设备,并向外部存储设备管理模块发送第一调用指令。S1003: The storage management service module adds an external storage device to the current storage device list, and sends a first call instruction to the external storage device management module.
作为一种实施方式,存储管理服务模块在创建外部存储设备的存储访问接口后,在预先配置的当前存储设备列表上添加该外部存储设备。此时存储管理服务模块基于Binder调用向外部存储设备管理模块发送第一调用指令。As an implementation manner, after the storage management service module creates the storage access interface of the external storage device, the external storage device is added to the pre-configured current storage device list. At this time, the storage management service module sends the first call instruction to the external storage device management module based on the Binder call.
请参阅图11,其示出了本申请实施例提供的一种挂载处理装置的结构框图,该挂载处理装置 1100可以包括:第一调用模块1110、第一返回模块1120、检测完成模块1130和挂载通知模块1140。Please refer to FIG. 11, which shows a structural block diagram of a mounting processing apparatus provided by an embodiment of the present application. The mounting processing apparatus 1100 may include: a first calling module 1110, a first return module 1120, and a detection completion module 1130 And mount notification module 1140.
第一调用模块1110,用于存储管理服务模块向外部存储设备管理模块发送第一调用指令。The first calling module 1110 is used for the storage management service module to send the first calling instruction to the external storage device management module.
第一返回模块1120,用于外部存储设备管理模块响应于第一调用指令,执行检测操作,且设置外部存储设备的检测状态标识为检测中标识,并返回检测状态标识。The first return module 1120 is used for the external storage device management module to perform a detection operation in response to the first call instruction, and set the detection status flag of the external storage device as the detection status flag, and return the detection status flag.
检测完成模块1130,用于外部存储设备管理模块在检测操作已完成时,向存储管理服务模块发送检测完成指令。The detection completion module 1130 is used for the external storage device management module to send a detection completion instruction to the storage management service module when the detection operation is completed.
挂载通知模块1140,用于存储管理服务模块基于检测完成指令通知外部存储设备管理模块对外部存储设备进行挂载。The mounting notification module 1140 is used for the storage management service module to notify the external storage device management module to mount the external storage device based on the detection completion instruction.
进一步地,第一返回模块1120包括:第一线程单元以及第二线程单元,其中:Further, the first return module 1120 includes: a first thread unit and a second thread unit, where:
第一线程单元,用于外部存储设备管理模块响应于第一调用指令,基于第一线程设置外部存储设备的检测状态标识为检测中标识,并返回检测状态标识;The first thread unit is used for the external storage device management module to set the detection status flag of the external storage device as the detection status flag based on the first thread in response to the first call instruction, and return the detection status flag;
第二线程单元,用于外部存储设备管理模块响应于第一调用指令,基于第二线程执行检测操作。The second thread unit is used for the external storage device management module to perform a detection operation based on the second thread in response to the first call instruction.
在一种实施方式中,第一线程与第二线程同时进行。In one embodiment, the first thread and the second thread are performed simultaneously.
在一种实施方式中,检测操作为检测外部存储设备的文件系统是否异常,并针对异常的文件系统进行修复,若文件系统正常或者文件系统异常且修复完成,则外部存储设备管理模块判定检测操作已完成。In one embodiment, the detection operation is to detect whether the file system of the external storage device is abnormal, and repair the abnormal file system. If the file system is normal or the file system is abnormal and the repair is completed, the external storage device management module determines the detection operation completed.
进一步地,外部存储设备管理模块响应于第一调用指令,执行检测操作之后,挂载处理装置1100还包括:检测超时异常模块、检测异常确定模块、检测超时结束模块以及挂载停止模块,其中:Further, after the external storage device management module performs the detection operation in response to the first call instruction, the mounting processing device 1100 further includes: a detection timeout abnormality module, a detection abnormality determination module, a detection timeout end module, and a mounting stop module, wherein:
检测超时异常模块,用于当检测时长超过预设时长时,外部存储设备管理模块设置检测状态标识为检测异常标识。The detection timeout abnormality module is used to set the detection status flag to the detection abnormality flag by the external storage device management module when the detection time period exceeds the preset time period.
检测异常确定模块,用于外部存储设备管理模块对外部存储设备进行挂载时,确定是否能够查找到检测异常标识。The detection abnormality determination module is used for determining whether the detection abnormality identification can be found when the external storage device management module mounts the external storage device.
挂载停止模块,用于若能够,则停止对外部存储设备进行挂载。The mount stop module is used to stop mounting the external storage device if it can.
进一步地,外部存储设备管理模块响应于第一调用指令,执行检测操作之后,还包括:检测超时结束单元,其中:Further, the external storage device management module responds to the first call instruction and after performing the detection operation, further includes: a detection timeout end unit, wherein:
检测超时结束单元,用于当检测时长超过预设时长时,结束本次方法。The detection timeout end unit is used to end this method when the detection time length exceeds the preset time length.
进一步地,在一些实施方式中,第一调用指令为检测指令,此时第一调用模块1110包括:第一调用单元,其中:Further, in some embodiments, the first calling instruction is a detection instruction. At this time, the first calling module 1110 includes: a first calling unit, wherein:
第一调用单元,用于存储管理服务模块通过Binder调用将检测指令发送至外部存储设备管理模块。The first calling unit is used for the storage management service module to send the detection instruction to the external storage device management module through Binder calling.
进一步地,挂载通知模块1140包括:挂载通知单元,用于存储管理服务模块响应于检测完成指令,向外部存储设备管理模块发送第二调用指令,第二调用指令用于通知外部存储设备管理模块对外部存储设备进行挂载。Further, the mount notification module 1140 includes: a mount notification unit for the storage management service module to send a second call instruction to the external storage device management module in response to the detection completion instruction, and the second call instruction is used to notify the external storage device management The module mounts external storage devices.
进一步地,存储管理服务模块响应于检测完成指令,向外部存储设备管理模块发送第二调用指令之后,挂载处理装置1100还包括:异常判断模块以及异常挂载标识设置模块。Further, after the storage management service module sends the second call instruction to the external storage device management module in response to the detection completion instruction, the mounting processing device 1100 further includes: an abnormality judgment module and an abnormal mounting identification setting module.
异常判断单元,用于外部存储设备管理模块响应于第二调用指令,根据检测状态标识,判断外部存储设备的文件系统是否异常。The abnormality determination unit is used for the external storage device management module to determine whether the file system of the external storage device is abnormal in response to the second call instruction and according to the detection status identifier.
异常挂载标识设置模块,用于若异常,设置外部存储设备的挂载状态标识为无法挂载标识,以使存储管理服务模块无法对外部存储设备进行挂载。The abnormal mounting flag setting module is used to set the mounting status flag of the external storage device as an unmountable flag if abnormal, so that the storage management service module cannot mount the external storage device.
在一些实施方式中,外部存储设备管理模块响应于第二调用指令,根据检测状态标识,判断外部存储设备的文件系统是否异常之后,挂载处理装置1100还包括:异常结束模块,其中:In some embodiments, after the external storage device management module determines whether the file system of the external storage device is abnormal according to the detection status indicator in response to the second call instruction, the mounting processing apparatus 1100 further includes: an abnormal end module, wherein:
异常结束模块,用于若异常,结束本次方法。Abnormal end module, used to end this method if abnormal.
进一步地,外部存储设备管理模块响应于第二调用指令,根据检测状态标识,判断外部存储设备的文件系统是否异常之后,挂载处理装置1100还包括:挂载结果获取模块以及挂载标识设置模块,其中:Further, after the external storage device management module determines whether the file system of the external storage device is abnormal according to the detection status indicator in response to the second call instruction, the mounting processing apparatus 1100 further includes: a mounting result acquisition module and a mounting identification setting module ,among them:
挂载结果获取模块,用于若非异常,外部存储设备管理模块获取挂载结果。The mounting result obtaining module is used to obtain the mounting result by the external storage device management module if it is not abnormal.
挂载标识设置模块,用于外部存储设备管理模块根据挂载结果,设置挂载状态标识。The mounting flag setting module is used for the external storage device management module to set the mounting status flag according to the mounting result.
进一步地,挂载标识设置模块,包括:成功设置单元以及失败设置单元,其中:Further, the mounting identification setting module includes: a success setting unit and a failure setting unit, wherein:
成功设置单元,用于若挂载成功,设置挂载状态标识为已挂载标识。The successful setting unit is used to set the mounting status flag as the mounted flag if the mounting is successful.
失败设置单元,用于若挂载失败,设置挂载状态标识为无法挂载标识。The failure setting unit is used to set the mounting status flag to the flag that cannot be mounted if the mounting fails.
进一步地,存储管理服务模块响应于检测完成指令,向外部存储设备管理模块发送第二调用指 令之后,挂载处理装置1100还包括:第二调用模块、挂载完成模块以及挂载广播模块,其中:Further, after the storage management service module sends the second calling instruction to the external storage device management module in response to the detection completion instruction, the mounting processing apparatus 1100 further includes: a second calling module, a mounting completion module, and a mounting broadcast module, where :
第二调用模块,用于外部存储设备管理模块响应于第二调用指令,对外部存储设备进行挂载。The second calling module is used for the external storage device management module to mount the external storage device in response to the second calling instruction.
挂载完成模块,用于外部存储设备管理模块在当前挂载已完成时,向存储管理服务模块发送挂载完成指令,挂载完成指令包括外部存储设备的挂载状态标识。The mounting completion module is used for the external storage device management module to send a mounting completion instruction to the storage management service module when the current mounting is completed, and the mounting completion instruction includes the mounting status identifier of the external storage device.
挂载广播模块,用于存储管理服务模块根据挂载状态标识,广播与挂载状态标识对应的挂载结果。The mounting broadcast module is used for the storage management service module to broadcast the mounting result corresponding to the mounting status identifier according to the mounting status identifier.
进一步地,第二调用模块包括:挂载结果获取单元以及挂载标识设置单元,其中:Further, the second calling module includes: a mounting result obtaining unit and a mounting flag setting unit, wherein:
挂载结果获取单元,用于外部存储设备管理模块获取挂载结果。The mounting result obtaining unit is used for the external storage device management module to obtain the mounting result.
挂载标识设置单元,用于外部存储设备管理模块根据挂载结果,设置外部存储设备的挂载状态标识。The mounting identifier setting unit is used for the external storage device management module to set the mounting status identifier of the external storage device according to the mounting result.
进一步地,挂载标识设置单元包括成功设置子单元以及失败设置子单元,其中:Further, the mounting flag setting unit includes a successful setting subunit and a failed setting subunit, wherein:
成功设置子单元,用于若挂载成功,设置挂载状态标识为已挂载标识。The subunit is successfully set, which is used to set the mounting status flag as the mounted flag if the mounting is successful.
失败设置子单元,用于若挂载失败,设置挂载状态标识为无法挂载标识。The failure setting subunit is used to set the mounting status flag to the flag unable to be mounted if the mounting fails.
进一步地,挂载广播模块包括:挂载失败广播单元以及挂载成功广播单元。Further, the mounting broadcast module includes: a mounting failure broadcast unit and a mounting success broadcast unit.
挂载失败广播单元,用于若挂载状态标识为无法挂载标识,存储管理服务模块广播挂载失败;The mounting failure broadcasting unit is used to broadcast the mounting failure of the storage management service module if the mounting status is marked as unmountable;
挂载成功广播单元,用于若挂载状态标识为已挂载标识,存储管理服务模块广播挂载成功。The successful mounting broadcast unit is used for broadcasting the successful mounting of the storage management service module if the mounting status identifier is the mounted identifier.
进一步地,挂载处理装置1100还包括:设备信息发送模块、访问接口创建模块以及存储设备添加模块,其中:Further, the mounting processing apparatus 1100 further includes: a device information sending module, an access interface creation module, and a storage device adding module, where:
设备信息发送模块,用于外部存储设备管理模块在检测到外部存储设备的插入事件时,向存储管理服务模块发送外部存储设备的设备信息。The device information sending module is used to send the device information of the external storage device to the storage management service module when the external storage device management module detects the insertion event of the external storage device.
访问接口创建模块,用于存储管理服务模块根据设备信息,创建外部存储设备的存储访问接口,以使外部存储设备被访问。The access interface creation module is used for the storage management service module to create a storage access interface of the external storage device according to the device information, so that the external storage device can be accessed.
存储设备添加模块,用于存储管理服务模块在当前存储设备列表上添加外部存储设备,并向外部存储设备管理模块发送第一调用指令。The storage device adding module is used for the storage management service module to add an external storage device to the current storage device list and send the first call instruction to the external storage device management module.
本申请实施例提供的挂载处理装置用于实现前述方法实施例中相应的挂载处理方法,并具有相应的方法实施例的有益效果,在此不再赘述。The mounting processing apparatus provided in the embodiment of the present application is used to implement the corresponding mounting processing method in the foregoing method embodiment, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述装置和模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and conciseness of the description, the specific working process of the device and module described above can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.
在本申请所提供的几个实施例中,模块相互之间的耦合可以是电性,机械或其它形式的耦合。In the several embodiments provided in this application, the coupling between the modules may be electrical, mechanical or other forms of coupling.
另外,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or software functional modules.
请参考图12,其示出了本申请实施例提供的一种电子设备的结构框图。该电子设备1200可以是智能手机、平板电脑、电子书等能够运行应用程序的电子设备。本申请中的电子设备1200可以包括一个或多个如下部件:处理器1210、存储器1220、以及一个或多个应用程序,其中一个或多个应用程序可以被存储在存储器1220中并被配置为由一个或多个处理器1210执行,一个或多个程序配置用于执行如前述方法实施例所描述的方法。Please refer to FIG. 12, which shows a structural block diagram of an electronic device provided by an embodiment of the present application. The electronic device 1200 may be an electronic device capable of running application programs, such as a smart phone, a tablet computer, or an e-book. The electronic device 1200 in this application may include one or more of the following components: a processor 1210, a memory 1220, and one or more application programs, where one or more application programs may be stored in the memory 1220 and configured to One or more processors 1210 execute, and one or more programs are configured to execute the methods described in the foregoing method embodiments.
处理器1210可以包括一个或者多个处理核。处理器1210利用各种接口和线路连接整个电子设备1200内的各个部分,通过运行或执行存储在存储器1220内的指令、程序、代码集或指令集,以及调用存储在存储器1220内的数据,执行电子设备1200的各种功能和处理数据。可选地,处理器1210可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器1210可集成中央处理器(Central Processing Unit,CPU)、图像处理器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器1210中,单独通过一块通信芯片进行实现。The processor 1210 may include one or more processing cores. The processor 1210 uses various interfaces and lines to connect various parts of the entire electronic device 1200, and executes by running or executing instructions, programs, code sets, or instruction sets stored in the memory 1220, and calling data stored in the memory 1220. Various functions and processing data of the electronic device 1200. Optionally, the processor 1210 may adopt at least one of digital signal processing (Digital Signal Processing, DSP), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and Programmable Logic Array (Programmable Logic Array, PLA). A kind of hardware form to realize. The processor 1210 can be integrated with one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), a modem, and the like. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is used for rendering and drawing of display content; the modem is used for processing wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor 1210, but may be implemented by a communication chip alone.
进一步地,处理器1210还包括:外部存储设备管理模块1211以及存储管理服务模块1212。其中,外部存储设备管理模块1211可以是安卓(Android)平台中外部存储系统的管控中心,是管理和控制Android平台外部存储设备的后台进程。其功能主要包括:外部存储设备的插拔事件检测、外部存储设备的挂载、卸载、格式化等;存储管理服务模块1212为Android系统框架层与外部存储设备管理模块 1211进行通信的模块,同时存储管理服务模块1212也是向应用提供存储访问接口及存储挂载消息广播的模块。进一步地,在一种实施方式中,外部存储设备管理模块1211与存储管理服务模块1212可以基于Binder通信机制进行通信。Further, the processor 1210 further includes: an external storage device management module 1211 and a storage management service module 1212. Wherein, the external storage device management module 1211 may be the management and control center of the external storage system in the Android platform, and is a background process for managing and controlling the external storage device of the Android platform. Its functions mainly include: external storage device plug-in event detection, external storage device mounting, unloading, formatting, etc.; storage management service module 1212 is a module for the Android system framework layer to communicate with the external storage device management module 1211. The storage management service module 1212 is also a module that provides storage access interfaces and storage mounting message broadcasting to applications. Further, in one embodiment, the external storage device management module 1211 and the storage management service module 1212 may communicate based on the Binder communication mechanism.
存储器1220可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory)。存储器1220可用于存储指令、程序、代码、代码集或指令集。存储器1220可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于实现至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现下述各个方法实施例的指令等。存储数据区还可以存储电子设备1200在使用中所创建的数据(比如电话本、音视频数据、聊天记录数据)等。The memory 1220 may include random access memory (RAM) or read-only memory (Read-Only Memory). The memory 1220 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 1220 may include a program storage area and a data storage area, where the program storage area may store instructions for implementing the operating system and instructions for implementing at least one function (such as touch function, sound playback function, image playback function, etc.) , Instructions for implementing the following method embodiments, etc. The storage data area can also store data (such as phone book, audio and video data, chat record data) created by the electronic device 1200 during use.
则如果上述图11所示的挂载处理装置中的各个单元作为程序包等函数模块的话,该挂载处理装置内的各个单元存储在存储器1220内,能够被处理器调用,并执行对应的功能。If each unit in the mount processing device shown in FIG. 11 is used as a function module such as a program package, each unit in the mount processing device is stored in the memory 1220 and can be called by the processor and execute the corresponding function. .
请参考图13,其示出了本申请实施例提供的一种计算机可读取存储介质的结构框图。该计算机可读取存储介质1300中存储有程序代码,所述程序代码可被处理器调用执行上述方法实施例中所描述的方法。Please refer to FIG. 13, which shows a structural block diagram of a computer readable storage medium provided by an embodiment of the present application. The computer readable storage medium 1300 stores program code, and the program code can be invoked by a processor to execute the method described in the foregoing method embodiment.
计算机可读取存储介质1300可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。可选地,计算机可读取存储介质1300包括非易失性计算机可读介质(non-transitory computer-readable storage medium)。计算机可读取存储介质1300具有执行上述方法中的任何方法步骤的程序代码1310的存储空间。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。程序代码1310可以例如以适当形式进行压缩。The computer readable storage medium 1300 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 1300 includes a non-transitory computer-readable storage medium. The computer readable storage medium 1300 has storage space for the program code 1310 for executing any method steps in the above-mentioned methods. These program codes can be read out from or written into one or more computer program products. The program code 1310 may be compressed in an appropriate form, for example.
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不驱使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the application, not to limit them; although the application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: The technical solutions recorded in the foregoing embodiments are modified, or some of the technical features are equivalently replaced; these modifications or replacements do not drive the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (20)

  1. 一种挂载处理方法,其特征在于,所述方法包括:A mounting processing method, characterized in that the method includes:
    存储管理服务模块向外部存储设备管理模块发送第一调用指令;The storage management service module sends the first call instruction to the external storage device management module;
    所述外部存储设备管理模块响应于所述第一调用指令,执行检测操作,且设置外部存储设备的检测状态标识为检测中标识,并返回所述检测状态标识,其中,所述检测操作为检测所述外部存储设备的文件系统是否异常,所述检测中标识用于指示所述存储管理模块所述外部存储设备管理模块正在执行所述检测操作且未检测完成;In response to the first call instruction, the external storage device management module performs a detection operation, and sets the detection status flag of the external storage device as the detection status flag, and returns the detection status flag, wherein the detection operation is detection Whether the file system of the external storage device is abnormal, and the detection identifier is used to indicate that the storage management module and the external storage device management module are performing the detection operation and the detection is not completed;
    所述外部存储设备管理模块在所述检测操作已完成时,向所述存储管理服务模块发送检测完成指令;The external storage device management module sends a detection completion instruction to the storage management service module when the detection operation is completed;
    所述存储管理服务模块基于所述检测完成指令通知所述外部存储设备管理模块对所述外部存储设备进行挂载。The storage management service module notifies the external storage device management module to mount the external storage device based on the detection completion instruction.
  2. 根据权利要求1所述的方法,其特征在于,所述外部存储设备管理模块响应于所述第一调用指令,执行检测操作,且设置外部存储设备的检测状态标识为检测中标识,并返回所述检测状态标识,包括:The method according to claim 1, wherein the external storage device management module performs a detection operation in response to the first call instruction, and sets the detection status flag of the external storage device as the detection flag, and returns the The detection status identification includes:
    所述外部存储设备管理模块响应于所述第一调用指令,基于第一线程设置所述外部存储设备的检测状态标识为检测中标识,并返回所述检测状态标识;In response to the first call instruction, the external storage device management module sets the detection status flag of the external storage device as the detection status flag based on the first thread, and returns the detection status flag;
    所述外部存储设备管理模块响应于所述第一调用指令,基于第二线程执行检测操作。In response to the first call instruction, the external storage device management module performs a detection operation based on the second thread.
  3. 根据权利要求2所述的方法,其特征在于,所述第一线程与所述第二线程同时进行。The method of claim 2, wherein the first thread and the second thread are performed simultaneously.
  4. 根据权利要求1-3任一所述的方法,其特征在于,所述检测操作为检测所述外部存储设备的文件系统是否异常,并针对异常的文件系统进行修复,若所述文件系统正常或者所述文件系统异常且修复完成,则所述外部存储设备管理模块判定所述检测操作已完成。The method according to any one of claims 1-3, wherein the detection operation is to detect whether the file system of the external storage device is abnormal, and repair the abnormal file system, if the file system is normal or If the file system is abnormal and the repair is completed, the external storage device management module determines that the detection operation is completed.
  5. 根据权利要求2-4任一所述的方法,其特征在于,所述外部存储设备管理模块响应于所述第一调用指令,执行检测操作之后,还包括:The method according to any one of claims 2-4, wherein after the external storage device management module responds to the first call instruction, after performing a detection operation, the method further comprises:
    当检测时长超过预设时长时,所述外部存储设备管理模块设置所述检测状态标识为检测异常标识;When the detection time length exceeds the preset time length, the external storage device management module sets the detection status flag as a detection abnormality flag;
    所述外部存储设备管理模块对所述外部存储设备进行挂载时,确定是否能够查找到检测异常标识;When the external storage device management module mounts the external storage device, it determines whether the detection abnormality identifier can be found;
    若能够,则停止对所述外部存储设备进行挂载。If so, stop mounting the external storage device.
  6. 根据权利要求2-4任一所述的方法,其特征在于,所述外部存储设备管理模块响应于所述第一调用指令,执行检测操作之后,还包括:The method according to any one of claims 2-4, wherein after the external storage device management module responds to the first call instruction, after performing a detection operation, the method further comprises:
    当检测时长超过预设时长时,结束本次方法。When the detection time exceeds the preset time, the method ends.
  7. 根据权利要求1-4任一所述的方法,其特征在于,所述第一调用指令包括检测指令,所述存储管理服务模块向外部存储设备管理模块发送第一调用指令,包括:The method according to any one of claims 1 to 4, wherein the first call instruction includes a detection instruction, and the storage management service module sends the first call instruction to an external storage device management module, including:
    所述存储管理服务模块通过Binder调用将所述检测指令发送至所述外部存储设备管理模块。The storage management service module sends the detection instruction to the external storage device management module through Binder call.
  8. 根据权利要求1所述的方法,其特征在于,所述存储管理服务模块基于所述检测完成指令通知所述外部存储设备管理模块对所述外部存储设备进行挂载,包括:The method according to claim 1, wherein the storage management service module notifies the external storage device management module to mount the external storage device based on the detection completion instruction, comprising:
    所述存储管理服务模块响应于所述检测完成指令,向所述外部存储设备管理模块发送第二调用指令,所述第二调用指令用于通知所述外部存储设备管理模块对所述外部存储设备进行挂载。In response to the detection completion instruction, the storage management service module sends a second call instruction to the external storage device management module, where the second call instruction is used to notify the external storage device management module of the external storage device Mount it.
  9. 根据权利要求8所述的方法,其特征在于,所述存储管理服务模块响应于所述检测完成指令,向所述外部存储设备管理模块发送第二调用指令之后,还包括:The method according to claim 8, wherein after the storage management service module sends a second call instruction to the external storage device management module in response to the detection completion instruction, the method further comprises:
    所述外部存储设备管理模块响应于所述第二调用指令,根据所述检测状态标识,判断所述外部存储设备的文件系统是否异常;In response to the second call instruction, the external storage device management module determines whether the file system of the external storage device is abnormal according to the detection status identifier;
    若异常,设置所述外部存储设备的挂载状态标识为无法挂载标识,以使所述外部存储设备管理模块无法对所述外部存储设备进行挂载。If it is abnormal, the mounting status flag of the external storage device is set as an unmountable flag, so that the external storage device management module cannot mount the external storage device.
  10. 根据权利要求9所述的方法,其特征在于,所述外部存储设备管理模块响应于所述第二调用指令,根据所述检测状态标识,判断所述外部存储设备的文件系统是否异常之后,还包括:The method according to claim 9, wherein the external storage device management module determines whether the file system of the external storage device is abnormal based on the detection status identifier in response to the second call instruction, and then include:
    若异常,结束本次方法。If abnormal, end this method.
  11. 根据权利要求9所述的方法,其特征在于,所述若非异常,所述外部存储设备管理模块响应于所述第二调用指令,根据所述检测状态标识,判断所述外部存储设备的文件系统是否异常之后,还包括:The method according to claim 9, wherein, if it is not abnormal, the external storage device management module determines the file system of the external storage device in response to the second call instruction according to the detection status identifier After whether it is abnormal, it also includes:
    若非异常,所述外部存储设备管理模块获取挂载结果;If it is not abnormal, the external storage device management module obtains the mounting result;
    所述外部存储设备管理模块根据所述挂载结果,设置所述挂载状态标识。The external storage device management module sets the mounting state flag according to the mounting result.
  12. 根据权利要求11所述的方法,其特征在于,所述外部存储设备管理模块根据所述挂载结果,设置所述挂载状态标识,包括:The method according to claim 11, wherein the external storage device management module setting the mounting status flag according to the mounting result comprises:
    若挂载成功,设置所述挂载状态标识为已挂载标识;If the mounting is successful, set the mounting status flag as the mounted flag;
    若挂载失败,设置所述挂载状态标识为无法挂载标识。If the mounting fails, the mounting status flag is set as an unmountable flag.
  13. 根据权利要求8-12所述的方法,其特征在于,所述存储管理服务模块响应于所述检测完成指令,向所述外部存储设备管理模块发送第二调用指令之后,还包括:The method according to claims 8-12, wherein after the storage management service module sends a second call instruction to the external storage device management module in response to the detection completion instruction, the method further comprises:
    所述外部存储设备管理模块响应于所述第二调用指令,对所述外部存储设备进行挂载;The external storage device management module responds to the second call instruction to mount the external storage device;
    所述外部存储设备管理模块在当前挂载已完成时,向所述存储管理服务模块发送挂载完成指令,所述挂载完成指令包括所述外部存储设备的挂载状态标识;The external storage device management module sends a mounting completion instruction to the storage management service module when the current mounting is completed, where the mounting completion instruction includes the mounting status identifier of the external storage device;
    所述存储管理服务模块根据所述挂载状态标识,广播与所述挂载状态标识对应的挂载结果。The storage management service module broadcasts the mounting result corresponding to the mounting state identifier according to the mounting state identifier.
  14. 根据权利要求13所述的方法,其特征在于,所述外部存储设备管理模块响应于所述第二调用指令,对所述外部存储设备进行挂载,包括:The method according to claim 13, wherein the external storage device management module responds to the second call instruction to mount the external storage device, comprising:
    所述外部存储设备管理模块获取挂载结果;The external storage device management module obtains the mounting result;
    所述外部存储设备管理模块根据所述挂载结果,设置所述外部存储设备的挂载状态标识。The external storage device management module sets the mounting status flag of the external storage device according to the mounting result.
  15. 根据权利要求14所述的方法,其特征在于,所述外部存储设备管理模块根据所述挂载结果,设置挂载状态标识,包括:The method according to claim 14, wherein the external storage device management module sets a mounting status flag according to the mounting result, comprising:
    若挂载成功,设置所述挂载状态标识为已挂载标识;If the mounting is successful, set the mounting status flag as the mounted flag;
    若挂载失败,设置所述挂载状态标识为无法挂载标识。If the mounting fails, the mounting status flag is set as an unmountable flag.
  16. 根据权利要求13-15任一所述的方法,其特征在于,所述存储管理服务模块根据所述挂载状态标识,广播与所述挂载状态标识对应的挂载结果,包括:The method according to any one of claims 13-15, wherein the storage management service module broadcasts the mounting result corresponding to the mounting status identifier according to the mounting status identifier, comprising:
    若所述挂载状态标识为无法挂载标识,所述存储管理服务模块广播挂载失败;If the mount status identifier is an unmountable identifier, the storage management service module broadcasts that the mount fails;
    若所述挂载状态标识为已挂载标识,所述存储管理服务模块广播挂载成功。If the mounting status identifier is a mounted identifier, the storage management service module broadcasts that the mounting is successful.
  17. 根据权利要求1-16任一所述的方法,其特征在于,还包括:The method according to any one of claims 1-16, further comprising:
    所述外部存储设备管理模块在检测到所述外部存储设备的插入事件时,向所述存储管理服务模块发送所述外部存储设备的设备信息;When the external storage device management module detects the insertion event of the external storage device, sending the device information of the external storage device to the storage management service module;
    所述存储管理服务模块根据所述设备信息,创建所述外部存储设备的存储访问接口,以使所述外部存储设备被访问;The storage management service module creates a storage access interface of the external storage device according to the device information, so that the external storage device can be accessed;
    所述存储管理服务模块在当前存储设备列表上添加所述外部存储设备,并向所述外部存储设备管理模块发送所述第一调用指令。The storage management service module adds the external storage device to the current storage device list, and sends the first call instruction to the external storage device management module.
  18. 一种挂载处理装置,其特征在于,所述装置包括:A mounting processing device, characterized in that the device includes:
    第一调用模块,用于存储管理服务模块向外部存储设备管理模块发送第一调用指令;The first calling module is used for the storage management service module to send the first calling instruction to the external storage device management module;
    第一返回模块,用于所述外部存储设备管理模块响应于所述第一调用指令,执行检测操作,且设置外部存储设备的检测状态标识为检测中标识,并返回所述检测状态标识,其中,所述检测操作为检测所述外部存储设备的文件系统是否异常,所述检测中标识用于指示所述存储管理模块所述外部存储设备管理模块正在执行所述检测操作且未检测完成;The first return module is used for the external storage device management module to perform a detection operation in response to the first call instruction, and set the detection status flag of the external storage device as the detection status flag, and return the detection status flag, where The detection operation is to detect whether the file system of the external storage device is abnormal, and the detection identifier is used to indicate that the storage management module and the external storage device management module are performing the detection operation and the detection is not completed;
    检测完成模块,用于所述外部存储设备管理模块在所述检测操作已完成时,向所述存储管理服务模块发送检测完成指令;The detection completion module is used for the external storage device management module to send a detection completion instruction to the storage management service module when the detection operation is completed;
    挂载通知模块,用于所述存储管理服务模块基于所述检测完成指令通知所述外部存储设备管理模块对所述外部存储设备进行挂载。The mounting notification module is used for the storage management service module to notify the external storage device management module to mount the external storage device based on the detection completion instruction.
  19. 一种电子设备,其特征在于,包括:An electronic device, characterized in that it comprises:
    一个或多个处理器;One or more processors;
    存储器;Memory
    一个或多个应用程序,其中所述一个或多个应用程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行,所述一个或多个程序配置用于执行如权利要求1-17任一项所述的方法。One or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute such as The method of any one of claims 1-17.
  20. 一种计算机可读取存储介质,其特征在于,所述计算机可读取存储介质中存储有程序代码,所述程序代码可被处理器调用执行如权利要求1-17任一项所述的方法。A computer readable storage medium, wherein the computer readable storage medium stores program code, and the program code can be called by a processor to execute the method according to any one of claims 1-17 .
PCT/CN2019/085568 2019-05-05 2019-05-05 Mounting processing method and apparatus, electronic device, and computer readable storage medium WO2020223862A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201980091202.2A CN113412480B (en) 2019-05-05 2019-05-05 Mounting processing method, mounting processing device, electronic equipment and computer readable storage medium
PCT/CN2019/085568 WO2020223862A1 (en) 2019-05-05 2019-05-05 Mounting processing method and apparatus, electronic device, and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/085568 WO2020223862A1 (en) 2019-05-05 2019-05-05 Mounting processing method and apparatus, electronic device, and computer readable storage medium

Publications (1)

Publication Number Publication Date
WO2020223862A1 true WO2020223862A1 (en) 2020-11-12

Family

ID=73050671

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/085568 WO2020223862A1 (en) 2019-05-05 2019-05-05 Mounting processing method and apparatus, electronic device, and computer readable storage medium

Country Status (2)

Country Link
CN (1) CN113412480B (en)
WO (1) WO2020223862A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113377627A (en) * 2021-06-10 2021-09-10 广州朗国电子科技有限公司 Method, system, equipment and storage medium for detecting abnormity of service server
CN115086828A (en) * 2022-08-23 2022-09-20 荣耀终端有限公司 Earphone control method and related device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001232069A (en) * 2000-02-21 2001-08-28 Namco Ltd Game device, data communication method and computer readable recording medium having program for game recorded thereon
CN107423157A (en) * 2017-07-31 2017-12-01 北京雷石天地电子技术有限公司 A kind of hard disk hanging method, module and operating system
CN109086079A (en) * 2018-06-11 2018-12-25 青岛海信移动通信技术股份有限公司 A kind of storage equipment carry management method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7743283B1 (en) * 2007-04-27 2010-06-22 Netapp, Inc. Dynamically modifying parameters for servicing of storage devices
CN102664929A (en) * 2012-04-05 2012-09-12 福兴达科技实业(深圳)有限公司 Mobile terminal and method for managing mass storage device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001232069A (en) * 2000-02-21 2001-08-28 Namco Ltd Game device, data communication method and computer readable recording medium having program for game recorded thereon
CN107423157A (en) * 2017-07-31 2017-12-01 北京雷石天地电子技术有限公司 A kind of hard disk hanging method, module and operating system
CN109086079A (en) * 2018-06-11 2018-12-25 青岛海信移动通信技术股份有限公司 A kind of storage equipment carry management method and device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113377627A (en) * 2021-06-10 2021-09-10 广州朗国电子科技有限公司 Method, system, equipment and storage medium for detecting abnormity of service server
CN113377627B (en) * 2021-06-10 2023-12-05 广州朗国电子科技股份有限公司 Business server abnormality detection method, system, equipment and storage medium
CN115086828A (en) * 2022-08-23 2022-09-20 荣耀终端有限公司 Earphone control method and related device
CN115086828B (en) * 2022-08-23 2022-12-27 荣耀终端有限公司 Earphone control method and related device

Also Published As

Publication number Publication date
CN113412480B (en) 2023-05-16
CN113412480A (en) 2021-09-17

Similar Documents

Publication Publication Date Title
US10437631B2 (en) Operating system hot-switching method and apparatus and mobile terminal
CN103838648A (en) Terminal and data backup method
US20140019496A1 (en) Data transfer method
WO2020223862A1 (en) Mounting processing method and apparatus, electronic device, and computer readable storage medium
WO2024007510A1 (en) Server management method, apparatus and system, and electronic device and readable storage medium
WO2024078218A1 (en) System booting method and electronic device
CN112860322B (en) Operating system switching method, device, equipment and storage medium
CN114327606B (en) Configuration management method and device, electronic equipment and computer readable storage medium
CN114064234B (en) Method and device for repairing WMI service
CN108845772B (en) Hard disk fault processing method, system, equipment and computer storage medium
CN110753040A (en) Request processing method and device
WO2020102940A1 (en) Abnormality processing method, terminal device and storage medium
CN111538536B (en) Method for formatting intelligent terminal, intelligent terminal and storage medium
WO2020119608A1 (en) Spark shuffle-based remote direct memory access system and method
CN110365839B (en) Shutdown method, shutdown device, shutdown medium and electronic equipment
WO2020210955A1 (en) Application program starting method and apparatus, and electronic device and storage medium
CN109634782B (en) Method and device for detecting system robustness, storage medium and terminal
CN114281389A (en) Method and device for upgrading SOC (system on chip) and automatic driving vehicle
CN106326049A (en) Fault locating method and terminal
CN113254274A (en) Message processing method, device, storage medium and server
CN107480004B (en) Fault recovery method and device and computer equipment
CN112416641A (en) Controlled end node restart detection method in master-slave architecture and master control end node
CN111813574A (en) Picture compression method and device, storage medium and electronic equipment
WO2021097626A1 (en) Touch screen firmware loading method and apparatus, electronic device, and storage medium
CN105791732A (en) Processing method and apparatus for MHL (Mobile High-Definition Link) driver

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19927660

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19927660

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 19927660

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC DATED 18.05.2022 (EPO FORM 1205A)

122 Ep: pct application non-entry in european phase

Ref document number: 19927660

Country of ref document: EP

Kind code of ref document: A1