WO2018006545A1 - Read and write method and apparatus for sd card - Google Patents

Read and write method and apparatus for sd card Download PDF

Info

Publication number
WO2018006545A1
WO2018006545A1 PCT/CN2016/108603 CN2016108603W WO2018006545A1 WO 2018006545 A1 WO2018006545 A1 WO 2018006545A1 CN 2016108603 W CN2016108603 W CN 2016108603W WO 2018006545 A1 WO2018006545 A1 WO 2018006545A1
Authority
WO
WIPO (PCT)
Prior art keywords
card
written
read
data
directory
Prior art date
Application number
PCT/CN2016/108603
Other languages
French (fr)
Chinese (zh)
Inventor
叶甘临
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2018006545A1 publication Critical patent/WO2018006545A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers

Definitions

  • the embodiments of the present invention relate to the field of software development technologies, and in particular, to a method and an apparatus for reading and writing an SD card.
  • the SD card to be read and written is formatted as an internal storage device, and the media file of the inserted device internal storage space is moved to the SD card to be read and written, and the directory for storing the media file inside the inserted device is Uninstall.
  • the SD card to be read and written is removed from the inserted device, and the directory for storing the media file inside the inserted device is not remounted.
  • the application that needs to store the media file has no place to store the file. , causing it to be unusable.
  • the embodiments of the present invention aim to solve at least one of the technical problems in the related art to some extent.
  • an object of the embodiment of the present invention is to provide a method for reading and writing an SD card, which can write data that has not been written in the memory of the device when the SD card is removed before reinsertion, thereby improving data reading and writing. Accuracy, avoid data loss, and effectively improve the user experience.
  • Another object of the embodiments of the present invention is to provide a read/write device for an SD card.
  • the method for reading and writing an SD card includes: determining that the device to be read and written by the SD card is connected when determining that the SD card to be read and written is a preset SD card Whether to write data in the memory to at least one preset SD card before entering the SD card to be read or written; if the data is written into the at least one preset SD card, At least one preset SD card is used as the target SD card; determining whether the SD card to be read and written is the target SD card; if the SD card to be read and written is the target SD card, saving The data that has been written in the SD card to be read and written, and the data that has not been written in the memory of the device is written into the first directory in the SD card to be read and written.
  • the method further includes: detecting whether the SD card to be read and written is removed from the device; if the SD card to be read and written is not removed from the device, the data is When the writing is completed, the second directory in the device is uninstalled, wherein the second directory is a storage directory in which the data is written in the memory of the device before the data is written to the SD card to be read or written. Changing a path in the device that locates the second directory to a path that locates the first directory.
  • the method further includes: if the SD card to be read and written is removed from the device, determining to remove Whether the data in the memory has been written to the SD card to be read and written before the SD card to be read or written; if the data in the memory has been written into the SD card to be read and written, the mount Describe a second directory, and change a path in the device that locates the first directory to the path that locates the second directory.
  • determining, by the following step, that the SD card to be read and written is the preset SD card acquiring a preset identifier of the SD card to be read and written; detecting the preset identifier in the Whether there is a record in the inserted device; if the preset identifier has the record in the inserted device, it is determined that the SD card to be read and written is the preset SD card.
  • the method further includes: if the preset identifier does not exist in the inserted device, And formatting the SD card to be read and written.
  • the method for reading and writing an SD card saves the data written in the SD card to be read and written when the SD card to be read or written is the target SD card, and the memory of the device is not yet written.
  • the entered data is written in the first directory of the SD card to be read and written, and the data that has not been written in the memory of the device can be written into the SD card that is removed before being inserted again, thereby improving the read/write accuracy of the data and avoiding Data loss, effectively improve the user experience.
  • the SD card reading and writing device includes: a first determining module, configured to determine, when determining that the SD card to be read or written is a preset SD card, whether the device inserted in the SD card to be read or written is in the memory before accessing the SD card to be read or written Data is written into at least one preset SD card; the first processing module is configured to set the at least one preset SD when the data is written into the at least one preset SD card The card is used as the target SD card; the second determining module is configured to determine whether the SD card to be read and written is the target SD card; and the saving module is configured to: when the SD card to be read and written is the target SD card, The data written in the SD card to be read and written is saved, and data not yet written in the memory of the device is written in the first directory in the SD card to be read and written.
  • the method further includes: a first detecting module, configured to detect whether the SD card to be read and written is unplugged from the device; and the uninstalling module is configured to not read the SD to be read or written When the card is detached from the device, when the data is written, the second directory in the device is uninstalled, wherein the second directory is written before the data is written to the SD card to be read and written. Determining a storage directory of data in a memory of the device; a change module configured to change a path in the device that locates the second directory to a path to locate the first directory.
  • the method further includes: a third determining module, configured to determine, when the SD card to be read or written is removed from the device, whether the SD card to be read or written is removed The data in the memory is written into the SD card to be read and written; the mounting module is configured to mount the second directory when data in the memory has been written to the SD card to be read and written, and Changing a path in the device that locates the first directory to the path that locates the second directory.
  • a third determining module configured to determine, when the SD card to be read or written is removed from the device, whether the SD card to be read or written is removed The data in the memory is written into the SD card to be read and written
  • the mounting module is configured to mount the second directory when data in the memory has been written to the SD card to be read and written, and Changing a path in the device that locates the first directory to the path that locates the second directory.
  • whether the SD card to be read or written is the preset SD card is determined by the following module: an acquiring module, configured to acquire a preset identifier of the SD card to be read and written; and second detecting a module, configured to detect whether the preset identifier has a record in the inserted device, and a second processing module configured to determine, when the preset identifier exists in the inserted device, The SD card to be read and written is the preset SD card.
  • the second processing module is further configured to format the SD card to be read and written when the preset identifier does not exist in the inserted device. deal with.
  • a computer storage medium is further provided, and the computer storage medium may store an execution instruction for executing the read/write method of the SD card in the foregoing embodiment.
  • the read/write device for the SD card saves the data written in the SD card to be read and written when the SD card to be read or written is the target SD card, and the memory of the device is not yet written.
  • the entered data is written in the first directory of the SD card to be read and written, and the data that has not been written in the memory of the device can be written into the SD card that is removed before being inserted again, thereby improving the read/write accuracy of the data and avoiding Data loss, effectively improve the user experience.
  • FIG. 1 is a schematic flow chart of a method for reading and writing an SD card according to an embodiment of the present invention
  • FIG. 2 is a schematic flow chart of a method for reading and writing an SD card according to another embodiment of the present invention.
  • FIG. 3 is a schematic flow chart of a method for reading and writing an SD card according to another embodiment of the present invention.
  • FIG. 4(a) is a schematic diagram of a path for a device to locate a first directory in an embodiment of the present invention
  • 4(b) is a schematic diagram showing the path of the second directory of the device in the embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a read/write device for an SD card according to an embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of a read/write device for an SD card according to another embodiment of the present invention.
  • FIG. 1 is a schematic flow chart of a method for reading and writing an SD card according to an embodiment of the present invention.
  • the reading and writing method of the SD card is configured as an SD card reading and writing device as an example.
  • Embodiments of the present invention can be applied in a process in which a user inserts an SD card using an electronic device.
  • the method for reading and writing the SD card includes the following steps:
  • S11 When determining that the SD card to be read or written is a preset SD card, determining whether the device inserted into the SD card is to write the data in the memory to at least one preset SD card before accessing the SD card to be read or written. in.
  • the SD card to be read and written is an SD card that the user needs to read and write.
  • the executor of this embodiment is a device that can be inserted into an SD card to be read and written, wherein the device to be read and written by the SD card is an electronic device having a function of inserting an SD card to be read and written, for example, a mobile terminal or a personal computer (Personal Computer) , PC), etc., there is no limit to this.
  • the mobile terminal may be a hardware device with various operating systems, such as a smart phone, a tablet computer, a personal digital assistant, and an e-book.
  • the SD card to be read and written after establishing a communication connection between the SD card to be read and written and the inserted device, determining whether the SD card to be read or written is a preset SD card, and when the SD card to be read and written is a preset SD card And determining whether the device to be read and written by the SD card inserts the data in the memory into the at least one preset SD card before accessing the SD card to be read or written, to trigger the subsequent step.
  • the embodiment of the present invention may determine whether the SD card to be read or written is a preset SD card by using the following steps.
  • the execution body of this embodiment is a device that can be inserted into the SD card to be read and written, including :
  • the preset identifier may be fsUuid, where Uuid is a Universally Unique Identifier (Uuid), and its format is, for example, 1234-ABCD. Or, partGuid, where the Guid is a Globally Unique Identifier (Guid), and the format is, for example, xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx, where each x is a range of 0-9 or af. 4-digit hexadecimal number.
  • detecting whether a partGuid of the SD card to be read or written has a record in the inserted device, and if there is a record determining whether the fsUuid recorded by the mPrimaryStorageUuid in the inserted device is equal to the fsUuid of the SD card to be read and written, If the two are equal, it is confirmed that the preset ID has a record in the inserted device.
  • the SD card to be read and written is formatted.
  • S24 Determine that the SD card to be read and written is a preset SD card.
  • the preset identifier when the preset identifier has a record in the inserted device, determining that the SD card to be read and written is a preset SD card.
  • the record when the record is detected in the inserted device by detecting the preset identifier, it is determined that the SD card to be read and written is a preset SD card, and the device that can be conveniently inserted is subjected to subsequent processing, thereby effectively improving the user experience.
  • the device to be read or written by the SD card when the device to be read or written by the SD card is inserted into the at least one preset SD card before accessing the SD card to be read or written, at least one preset SD card is used as the preset SD card.
  • the target SD card indicates that the device to be read and written by the SD card inserts the data in the memory to the target SD card before accessing the SD card to be read or written.
  • the inserted device moves the data in the memory to the SD card to be read and written before the SD card to be read or written is accessed, to trigger subsequent step.
  • S14 If the SD card to be read and written is the target SD card, save the data that has been written in the SD card to be read and written, and write the data that has not been written in the memory of the device into the first directory in the SD card to be read and written. under.
  • the first directory is a storage directory of data in the memory of the SD card to be read and written, for example, the /mnt/expand/fsUuid directory.
  • the SD card to be read or written is the target SD card, it indicates that the device to be read and written by the SD card has written part of the data in the memory into the SD card to be read and written before accessing the SD card to be read and written.
  • the data that has been written in the SD card to be read and written is saved, and the data that has not been written in the memory of the device is written in the first directory in the SD card to be read and written, for example, the memory of the device is not yet written.
  • the data is written to the /mnt/expand/fsUuid directory.
  • the method for reading and writing the SD card may further include:
  • the second directory is a storage directory in which data is written in the memory of the device before the data is written to the SD card to be read and written, for example, the /data/media directory.
  • the second directory in the device is uninstalled, that is, the second directory is in an uninstall state.
  • a path for locating the second directory in the device to a path for locating the first directory, That is, the first directory is in the mounted state, the second directory is in the unloading state, and the path of the first directory is located in the device, and the SD card to be read and written can be mounted when the data is written, and the storage space of the inserted device is expanded.
  • the /storage/emulated directory is the path for storing data in the upper layer.
  • the /mnt/expand/fsUuid directory is mounted.
  • the /data/media directory is unloaded.
  • /storage/emulated points to /mnt/expand/fsUuid.
  • S34 It is judged whether the data in the memory has been written into the SD card to be read and written before the SD card to be read or written is removed.
  • the SD card to be read or written when the SD card to be read or written is removed from the device, it is determined whether the data in the memory has been written into the SD card to be read and written before the SD card to be read or written is removed, to trigger the subsequent step.
  • the second directory is mounted, and the path of the first directory in the device is changed to the path for locating the second directory, that is, the second directory is In the mounted state, the first directory is in the unloaded state, and the path of the second directory is located in the device.
  • the internal storage space of the device can be re-mounted when the SD card to be read or written is removed, and the application that needs to store the media file is guaranteed to operate normally.
  • the /mnt/expand/fsUuid directory is in the uninstall state, and the /data/media directory is in the mount state. At this time, /storage /emulated points to /data/media.
  • the second directory in the device when the SD card to be read or written is not removed from the device, when the data is written, the second directory in the device is uninstalled, and the path of the second directory in the device is changed to the first location.
  • the directory path can mount the SD card to be read and written when the data is written, and expand the storage space of the inserted device without affecting the use of the originally installed application.
  • the SD card to be read and written is removed from the device.
  • the second directory is mounted, and the path of the first directory in the device is changed to the path for locating the second directory. Re-mount the internal storage space of the device when the SD card to be read or written is removed. This ensures that the application that needs to store media files runs normally and improves the user experience.
  • the SD card to be read or written is the target SD card
  • the data that has been written in the SD card to be read and written is saved, and the data that has not been written in the memory of the device is written into the SD card to be read and written.
  • the SD card that was unplugged before being inserted again can write data that has not been written in the memory of the device, thereby improving the read/write accuracy of the data, avoiding data loss, and effectively improving the user experience.
  • FIG. 5 is a schematic structural diagram of an apparatus for reading and writing an SD card according to an embodiment of the present invention.
  • the read/write device 500 of the SD card can be implemented by software, hardware, or a combination of both.
  • the read/write device 500 of the SD card may include: a first determining module 501, a first processing module 502, a second determining module 503, and a saving module 504. among them,
  • the first determining module 501 is configured to determine, when determining that the SD card to be read or written is a preset SD card, whether the device inserted into the SD card is to write at least one of the data in the memory before accessing the SD card to be read or written. Zhang's preset SD card.
  • the first processing module 502 is configured to set at least one preset SD card as the target SD card when writing data into at least one preset SD card.
  • the second determining module 503 is configured to determine whether the SD card to be read or written is a target SD card.
  • the saving module 504 is configured to save the data that has been written in the SD card to be read and written when the SD card to be read and written is the target SD card, and write the data that has not been written in the memory of the device into the SD card to be read and written.
  • the first directory is configured to save the data that has been written in the SD card to be read and written when the SD card to be read and written is the target SD card, and write the data that has not been written in the memory of the device into the SD card to be read and written. The first directory.
  • the read/write device 500 of the SD card may further include:
  • the first detecting module 505 is configured to detect whether the SD card to be read and written is removed from the device.
  • the unloading module 506 is configured to, when the SD card to be read or written is not removed from the device, uninstall the second directory in the device when the data is written, wherein the second directory is to write data to the SD card to be read and written.
  • the directory where the data is stored in the device's memory.
  • the change module 507 is configured to change the path of the second directory located in the device to the first position The path to the directory.
  • the third determining module 508 is configured to determine whether the data in the memory has been written into the SD card to be read or written before the SD card to be read or written is removed, when the SD card to be read or written is removed from the device.
  • the mounting module 509 is configured to mount the second directory when the data in the memory has been written to the SD card to be read and written, and change the path of the first directory in the device to the path for locating the second directory.
  • whether the SD card to be read or written is a preset SD card is determined by the following modules:
  • the obtaining module 510 is configured to obtain a preset identifier of the SD card to be read and written.
  • the second detecting module 511 is configured to detect whether the preset identifier has a record in the inserted device.
  • the second processing module 512 is configured to determine that the SD card to be read and written is a preset SD card when the preset identifier exists in the inserted device, and to read and write when the preset identifier does not exist in the inserted device.
  • the SD card is formatted.
  • the SD card to be read or written is the target SD card
  • the data that has been written in the SD card to be read and written is saved, and the data that has not been written in the memory of the device is written into the SD card to be read and written.
  • the SD card that was unplugged before being inserted again can write data that has not been written in the memory of the device, thereby improving the read/write accuracy of the data, avoiding data loss, and effectively improving the user experience.
  • Any process or method description in the flowchart or otherwise described herein can be understood to represent an executable that includes one or more steps for implementing a particular logical function or process. Modules, segments or portions of code of instructions, and the scope of preferred embodiments of the invention includes additional implementations, which may not be in the order shown or discussed, including in a substantially simultaneous manner or vice versa depending on the functionality involved. The order is to perform the functions, which should be understood by those skilled in the art to which the embodiments of the present invention pertain.
  • portions of the invention may be implemented in hardware, software, firmware or a combination thereof.
  • multiple steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system.
  • a suitable instruction execution system For example, if implemented in hardware, as in another embodiment, it can be implemented by any one or combination of the following techniques well known in the art: having logic gates for implementing logic functions on data signals. Discrete logic circuits, application specific integrated circuits with suitable combinational logic gates, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.
  • Embodiments of the present invention also provide a storage medium.
  • the foregoing storage medium may be configured to store program code for performing the following steps:
  • the foregoing storage medium may include, but is not limited to: a USB flash drive, only A medium that can store program code, such as a read-only memory (ROM), a random access memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
  • ROM read-only memory
  • RAM random access memory
  • removable hard disk such as a hard disk, a magnetic disk, or an optical disk.
  • each functional unit in each embodiment of the present invention may be integrated into one processing module, or each unit may exist physically separately, or two or more units may be integrated into one module.
  • the above integrated modules can be implemented in the form of hardware or in the form of software functional modules.
  • the integrated modules, if implemented in the form of software functional modules and sold or used as stand-alone products, may also be stored in a computer readable storage medium.
  • the above mentioned storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
  • data that has not been written in the memory of the device can be written into the SD card that is removed before being inserted again, thereby improving data reading and writing accuracy, avoiding data loss, and effectively improving the user experience.

Abstract

Disclosed are a read and write method and apparatus for an SD card. The read and write method for an SD card comprises: when it is determined that an SD card to be read and written is a pre-set SD card, determining whether a device, into which the SD card to be read and written is inserted, writes data in a memory into at least one pre-set SD card before the SD card to be read and written is accessed (S11); if the data is written into the at least one pre-set SD card, taking the least one pre-set SD card as a target SD card (S12); determining whether the SD card to be read and written is the target SD card (S13); and if the SD card to be read and written is the target SD card, saving data which has been written into the SD card to be read and written, and writing the data, which has not been unwritten, in the memory of the device into a first directory of the SD card to be read and written (S14). The method can write, when a previously removed SD card is inserted again, data, which has not been written, in a memory of a device into same, which improves the data read and write accuracy and avoids data loss, thereby effectively improving the user experience.

Description

SD卡的读写方法和装置SD card reading and writing method and device 技术领域Technical field
本发明实施例涉及软件开发技术领域,尤其涉及一种SD卡的读写方法和装置。The embodiments of the present invention relate to the field of software development technologies, and in particular, to a method and an apparatus for reading and writing an SD card.
背景技术Background technique
用户在使用电子设备插入待读写SD卡时,会有扩大电子设备内部存储空间的需求。相关技术中,将待读写SD卡格式化为内部存储设备,并将插入的设备内部存储空间的媒体文件移动到待读写SD卡上,则插入的设备内部用于存储媒体文件的目录被卸载。When a user inserts an SD card to be read and written using an electronic device, there is a need to expand the internal storage space of the electronic device. In the related art, the SD card to be read and written is formatted as an internal storage device, and the media file of the inserted device internal storage space is moved to the SD card to be read and written, and the directory for storing the media file inside the inserted device is Uninstall.
这种方式下,将待读写SD卡从插入的设备上拔除,插入的设备内部用于存储媒体文件的目录不会被重新挂载,此时需要存储媒体文件的应用就没有地方来存放文件,导致无法使用。In this way, the SD card to be read and written is removed from the inserted device, and the directory for storing the media file inside the inserted device is not remounted. In this case, the application that needs to store the media file has no place to store the file. , causing it to be unusable.
发明内容Summary of the invention
本发明实施例旨在至少在一定程度上解决相关技术中的技术问题之一。The embodiments of the present invention aim to solve at least one of the technical problems in the related art to some extent.
为此,本发明实施例的一个目的在于提出一种SD卡的读写方法,能够在再次插入之前拔除的SD卡时将设备的存储器中尚未写入的数据写入其中,提高数据的读写准确率,避免数据丢失,有效提升用户体验。Therefore, an object of the embodiment of the present invention is to provide a method for reading and writing an SD card, which can write data that has not been written in the memory of the device when the SD card is removed before reinsertion, thereby improving data reading and writing. Accuracy, avoid data loss, and effectively improve the user experience.
本发明实施例的另一个目的在于提出一种SD卡的读写装置。Another object of the embodiments of the present invention is to provide a read/write device for an SD card.
为达到上述目的,本发明第一方面实施例提出的SD卡的读写方法,包括:在判定待读写SD卡为预设SD卡时,判断所述待读写SD卡插入的设备在接入所述待读写SD卡之前是否将存储器中的数据写入至少一张的预设SD卡中;如果将所述数据写入所述至少一张的预设SD卡中,则将所述至少一张的预设SD卡作为目标SD卡;判断所述待读写SD卡是否为所述目标SD卡;如果所述待读写SD卡为所述目标SD卡,则保存 所述待读写SD卡中已写入的数据,并将所述设备的存储器中尚未写入的数据写入所述待读写SD卡中的第一目录下。In order to achieve the above object, the method for reading and writing an SD card according to the first aspect of the present invention includes: determining that the device to be read and written by the SD card is connected when determining that the SD card to be read and written is a preset SD card Whether to write data in the memory to at least one preset SD card before entering the SD card to be read or written; if the data is written into the at least one preset SD card, At least one preset SD card is used as the target SD card; determining whether the SD card to be read and written is the target SD card; if the SD card to be read and written is the target SD card, saving The data that has been written in the SD card to be read and written, and the data that has not been written in the memory of the device is written into the first directory in the SD card to be read and written.
在本发明的一个实施例中,还包括:检测是否将所述待读写SD卡从所述设备中拔除;如果未将所述待读写SD卡从所述设备拔除,则在所述数据写入完毕时,卸载所述设备中的第二目录,其中,所述第二目录为将所述数据写入所述待读写SD卡之前所述数据在所述设备的存储器中的存储目录;将所述设备中定位所述第二目录的路径更改为定位所述第一目录的路径。In an embodiment of the present invention, the method further includes: detecting whether the SD card to be read and written is removed from the device; if the SD card to be read and written is not removed from the device, the data is When the writing is completed, the second directory in the device is uninstalled, wherein the second directory is a storage directory in which the data is written in the memory of the device before the data is written to the SD card to be read or written. Changing a path in the device that locates the second directory to a path that locates the first directory.
在本发明的一个实施例中,所述检测所述待读写SD卡是否从所述设备中拔除之后,还包括:如果将所述待读写SD卡从所述设备拔除,则判断在拔除所述待读写SD卡之前是否已将所述存储器中的数据写入所述待读写SD卡;如果已将所述存储器中的数据写入所述待读写SD卡,则挂载所述第二目录,并将所述设备中定位所述第一目录的路径更改为所述定位所述第二目录的路径。In an embodiment of the present invention, after detecting whether the SD card to be read or written is removed from the device, the method further includes: if the SD card to be read and written is removed from the device, determining to remove Whether the data in the memory has been written to the SD card to be read and written before the SD card to be read or written; if the data in the memory has been written into the SD card to be read and written, the mount Describe a second directory, and change a path in the device that locates the first directory to the path that locates the second directory.
在本发明的一个实施例中,通过以下步骤判定所述待读写SD卡为所述预设SD卡:获取所述待读写SD卡的预设标识;检测所述预设标识在所述插入的设备中是否存在记录;如果所述预设标识在所述插入的设备中存在所述记录,则判定所述待读写SD卡为所述预设SD卡。In an embodiment of the present invention, determining, by the following step, that the SD card to be read and written is the preset SD card: acquiring a preset identifier of the SD card to be read and written; detecting the preset identifier in the Whether there is a record in the inserted device; if the preset identifier has the record in the inserted device, it is determined that the SD card to be read and written is the preset SD card.
在本发明的一个实施例中,所述检测所述预设标识在所述插入的设备中是否存在记录之后,还包括:如果所述预设标识在所述插入的设备中不存在所述记录,则对所述待读写SD卡进行格式化处理。In an embodiment of the present invention, after detecting whether the preset identifier has a record in the inserted device, the method further includes: if the preset identifier does not exist in the inserted device, And formatting the SD card to be read and written.
本发明第一方面实施例提出的SD卡的读写方法,通过在待读写SD卡为目标SD卡时,保存待读写SD卡中已写入的数据,并将设备的存储器中尚未写入的数据写入待读写SD卡中的第一目录下,能够在再次插入之前拔除的SD卡时将设备的存储器中尚未写入的数据写入其中,提高数据的读写准确率,避免数据丢失,有效提升用户体验。The method for reading and writing an SD card according to the first aspect of the present invention saves the data written in the SD card to be read and written when the SD card to be read or written is the target SD card, and the memory of the device is not yet written. The entered data is written in the first directory of the SD card to be read and written, and the data that has not been written in the memory of the device can be written into the SD card that is removed before being inserted again, thereby improving the read/write accuracy of the data and avoiding Data loss, effectively improve the user experience.
为达到上述目的,本发明第二方面实施例提出的SD卡的读写装置, 包括:第一判断模块,设置为在判定待读写SD卡为预设SD卡时,判断所述待读写SD卡插入的设备在接入所述待读写SD卡之前是否将存储器中的数据写入至少一张的预设SD卡中;第一处理模块,设置为在将所述数据写入所述至少一张的预设SD卡中时,将所述至少一张的预设SD卡作为目标SD卡;第二判断模块,设置为判断所述待读写SD卡是否为所述目标SD卡;保存模块,设置为在所述待读写SD卡为所述目标SD卡时,保存所述待读写SD卡中已写入的数据,并将所述设备的存储器中尚未写入的数据写入所述待读写SD卡中的第一目录下。In order to achieve the above object, the SD card reading and writing device according to the second aspect of the present invention is The method includes: a first determining module, configured to determine, when determining that the SD card to be read or written is a preset SD card, whether the device inserted in the SD card to be read or written is in the memory before accessing the SD card to be read or written Data is written into at least one preset SD card; the first processing module is configured to set the at least one preset SD when the data is written into the at least one preset SD card The card is used as the target SD card; the second determining module is configured to determine whether the SD card to be read and written is the target SD card; and the saving module is configured to: when the SD card to be read and written is the target SD card, The data written in the SD card to be read and written is saved, and data not yet written in the memory of the device is written in the first directory in the SD card to be read and written.
在本发明的一个实施例中,还包括:第一检测模块,设置为检测是否将所述待读写SD卡从所述设备中拔除;卸载模块,设置为在未将所述待读写SD卡从所述设备拔除时,在所述数据写入完毕时,卸载所述设备中的第二目录,其中,所述第二目录为将所述数据写入所述待读写SD卡之前所述数据在所述设备的存储器中的存储目录;更改模块,设置为将所述设备中定位所述第二目录的路径更改为定位所述第一目录的路径。In an embodiment of the present invention, the method further includes: a first detecting module, configured to detect whether the SD card to be read and written is unplugged from the device; and the uninstalling module is configured to not read the SD to be read or written When the card is detached from the device, when the data is written, the second directory in the device is uninstalled, wherein the second directory is written before the data is written to the SD card to be read and written. Determining a storage directory of data in a memory of the device; a change module configured to change a path in the device that locates the second directory to a path to locate the first directory.
在本发明的一个实施例中,还包括:第三判断模块,设置为在将所述待读写SD卡从所述设备拔除时,判断在拔除所述待读写SD卡之前是否已将所述存储器中的数据写入所述待读写SD卡;挂载模块,设置为在已将所述存储器中的数据写入所述待读写SD卡时,挂载所述第二目录,并将所述设备中定位所述第一目录的路径更改为所述定位所述第二目录的路径。In an embodiment of the present invention, the method further includes: a third determining module, configured to determine, when the SD card to be read or written is removed from the device, whether the SD card to be read or written is removed The data in the memory is written into the SD card to be read and written; the mounting module is configured to mount the second directory when data in the memory has been written to the SD card to be read and written, and Changing a path in the device that locates the first directory to the path that locates the second directory.
在本发明的一个实施例中,所述待读写SD卡是否为所述预设SD卡通过以下模块判定:获取模块,设置为获取所述待读写SD卡的预设标识;第二检测模块,设置为检测所述预设标识在所述插入的设备中是否存在记录;第二处理模块,设置为在所述预设标识在所述插入的设备中存在所述记录时,判定所述待读写SD卡为所述预设SD卡。In an embodiment of the present invention, whether the SD card to be read or written is the preset SD card is determined by the following module: an acquiring module, configured to acquire a preset identifier of the SD card to be read and written; and second detecting a module, configured to detect whether the preset identifier has a record in the inserted device, and a second processing module configured to determine, when the preset identifier exists in the inserted device, The SD card to be read and written is the preset SD card.
在本发明的一个实施例中,第二处理模块还设置为:在所述预设标识在所述插入的设备中不存在所述记录时,对所述待读写SD卡进行格式化 处理。In an embodiment of the present invention, the second processing module is further configured to format the SD card to be read and written when the preset identifier does not exist in the inserted device. deal with.
在本发明实施例中,还提供了一种计算机存储介质,该计算机存储介质可以存储有执行指令,该执行指令用于执行上述实施例中的SD卡的读写方法。In the embodiment of the present invention, a computer storage medium is further provided, and the computer storage medium may store an execution instruction for executing the read/write method of the SD card in the foregoing embodiment.
本发明第二方面实施例提出的SD卡的读写装置,通过在待读写SD卡为目标SD卡时,保存待读写SD卡中已写入的数据,并将设备的存储器中尚未写入的数据写入待读写SD卡中的第一目录下,能够在再次插入之前拔除的SD卡时将设备的存储器中尚未写入的数据写入其中,提高数据的读写准确率,避免数据丢失,有效提升用户体验。The read/write device for the SD card according to the second embodiment of the present invention saves the data written in the SD card to be read and written when the SD card to be read or written is the target SD card, and the memory of the device is not yet written. The entered data is written in the first directory of the SD card to be read and written, and the data that has not been written in the memory of the device can be written into the SD card that is removed before being inserted again, thereby improving the read/write accuracy of the data and avoiding Data loss, effectively improve the user experience.
本发明附加的方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本发明的实践了解到。The additional aspects and advantages of the invention will be set forth in part in the description which follows.
附图说明DRAWINGS
本发明上述的和/或附加的方面和优点从下面结合附图对实施例的描述中将变得明显和容易理解,其中:The above and/or additional aspects and advantages of the present invention will become apparent and readily understood from
图1是本发明一实施例提出的SD卡的读写方法的流程示意图;1 is a schematic flow chart of a method for reading and writing an SD card according to an embodiment of the present invention;
图2是本发明另一实施例提出的SD卡的读写方法的流程示意图;2 is a schematic flow chart of a method for reading and writing an SD card according to another embodiment of the present invention;
图3是本发明另一实施例提出的SD卡的读写方法的流程示意图;3 is a schematic flow chart of a method for reading and writing an SD card according to another embodiment of the present invention;
图4(a)是本发明实施例中设备定位第一目录的路径示意图;4(a) is a schematic diagram of a path for a device to locate a first directory in an embodiment of the present invention;
图4(b)是本发明实施例中设备定位第二目录的路径示意图;4(b) is a schematic diagram showing the path of the second directory of the device in the embodiment of the present invention;
图5是本发明一实施例提出的SD卡的读写装置的结构示意图;FIG. 5 is a schematic structural diagram of a read/write device for an SD card according to an embodiment of the present invention; FIG.
图6是本发明另一实施例提出的SD卡的读写装置的结构示意图。FIG. 6 is a schematic structural diagram of a read/write device for an SD card according to another embodiment of the present invention.
具体实施方式detailed description
下面详细描述本发明的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,仅用于解释本 发明,而不能理解为对本发明的限制。相反,本发明的实施例包括落入所附加权利要求书的精神和内涵范围内的所有变化、修改和等同物。The embodiments of the present invention are described in detail below, and the examples of the embodiments are illustrated in the drawings, wherein the same or similar reference numerals are used to refer to the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the drawings are exemplified and are only used to explain the present invention. The invention is not to be construed as limiting the invention. Rather, the invention is to cover all modifications, modifications and equivalents within the spirit and scope of the appended claims.
图1是本发明一实施例提出的SD卡的读写方法的流程示意图。以该SD卡的读写方法被配置为SD卡的读写装置中来举例说明。本发明的实施例可以应用在用户使用电子设备插入SD卡的过程中。FIG. 1 is a schematic flow chart of a method for reading and writing an SD card according to an embodiment of the present invention. The reading and writing method of the SD card is configured as an SD card reading and writing device as an example. Embodiments of the present invention can be applied in a process in which a user inserts an SD card using an electronic device.
参见图1,该SD卡的读写方法包括如下几个步骤:Referring to FIG. 1, the method for reading and writing the SD card includes the following steps:
S11:在判定待读写SD卡为预设SD卡时,判断待读写SD卡插入的设备在接入待读写SD卡之前是否将存储器中的数据写入至少一张的预设SD卡中。S11: When determining that the SD card to be read or written is a preset SD card, determining whether the device inserted into the SD card is to write the data in the memory to at least one preset SD card before accessing the SD card to be read or written. in.
在本发明的实施例中,待读写SD卡为用户需要对其进行读写的SD卡。In the embodiment of the present invention, the SD card to be read and written is an SD card that the user needs to read and write.
本实施例的执行主体是可以为待读写SD卡插入的设备,其中待读写SD卡插入的设备为具有插入待读写SD卡功能的电子设备,例如,移动终端或者个人电脑(Personal Computer,PC)等,对此不作限制。The executor of this embodiment is a device that can be inserted into an SD card to be read and written, wherein the device to be read and written by the SD card is an electronic device having a function of inserting an SD card to be read and written, for example, a mobile terminal or a personal computer (Personal Computer) , PC), etc., there is no limit to this.
其中,移动终端可以是智能手机、平板电脑、个人数字助理、电子书等具有各种操作系统的硬件设备。The mobile terminal may be a hardware device with various operating systems, such as a smart phone, a tablet computer, a personal digital assistant, and an e-book.
在本发明的实施例中,建立待读写SD卡与插入的设备之间的通信连接后,判定待读写SD卡是否为预设SD卡,在待读写SD卡为预设SD卡时,判断待读写SD卡插入的设备在接入待读写SD卡之前是否将存储器中的数据写入至少一张的预设SD卡中,以触发后续步骤。In the embodiment of the present invention, after establishing a communication connection between the SD card to be read and written and the inserted device, determining whether the SD card to be read or written is a preset SD card, and when the SD card to be read and written is a preset SD card And determining whether the device to be read and written by the SD card inserts the data in the memory into the at least one preset SD card before accessing the SD card to be read or written, to trigger the subsequent step.
一些实施例中,参见图2,本发明的实施例可以通过以下步骤判定待读写SD卡是否为预设SD卡,本实施例的执行主体是可以为待读写SD卡插入的设备,包括:In some embodiments, referring to FIG. 2, the embodiment of the present invention may determine whether the SD card to be read or written is a preset SD card by using the following steps. The execution body of this embodiment is a device that can be inserted into the SD card to be read and written, including :
S21:获取待读写SD卡的预设标识。S21: Obtain a preset identifier of the SD card to be read and written.
在本发明的实施例中,预设标识可以是fsUuid,其中,Uuid为通用唯一识别码(Universally Unique Identifier,Uuid),其格式例如为:1234-ABCD, 或者,partGuid,其中,Guid为全局唯一标识符(Globally Unique Identifier,Guid),其格式例如为:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx,其中,每个x是0-9或a-f范围内的一个4位十六进制数。In the embodiment of the present invention, the preset identifier may be fsUuid, where Uuid is a Universally Unique Identifier (Uuid), and its format is, for example, 1234-ABCD. Or, partGuid, where the Guid is a Globally Unique Identifier (Guid), and the format is, for example, xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, where each x is a range of 0-9 or af. 4-digit hexadecimal number.
S22:检测预设标识在插入的设备中是否存在记录,若是,执行S24,否则,执行S23。S22: Detect whether the preset identifier has a record in the inserted device, and if yes, execute S24; otherwise, execute S23.
可选地,例如,检测待读写SD卡的partGuid在插入的设备中是否存在记录,在存在记录的情况下,判断插入的设备中mPrimaryStorageUuid记录的fsUuid是否等于待读写SD卡的fsUuid,在两者相等的情况下,即可确认预设标识在插入的设备中存在记录。Optionally, for example, detecting whether a partGuid of the SD card to be read or written has a record in the inserted device, and if there is a record, determining whether the fsUuid recorded by the mPrimaryStorageUuid in the inserted device is equal to the fsUuid of the SD card to be read and written, If the two are equal, it is confirmed that the preset ID has a record in the inserted device.
可选地,检测预设标识在插入的设备中是否存在记录,以触发后续步骤。Optionally, detecting whether the preset identifier has a record in the inserted device to trigger a subsequent step.
S23:对待读写SD卡进行格式化处理。S23: Formatting the SD card to be read and written.
可选地,在预设标识在插入的设备中不存在记录时,对待读写SD卡进行格式化处理。Optionally, when the preset identifier does not have a record in the inserted device, the SD card to be read and written is formatted.
S24:判定待读写SD卡为预设SD卡。S24: Determine that the SD card to be read and written is a preset SD card.
可选地,在预设标识在插入的设备中存在记录时,判定待读写SD卡为预设SD卡。Optionally, when the preset identifier has a record in the inserted device, determining that the SD card to be read and written is a preset SD card.
本实施例中,通过检测预设标识在插入的设备中存在记录时,判定待读写SD卡为预设SD卡,能够方便插入的设备对其进行后续处理,有效提升用户的使用体验。In this embodiment, when the record is detected in the inserted device by detecting the preset identifier, it is determined that the SD card to be read and written is a preset SD card, and the device that can be conveniently inserted is subjected to subsequent processing, thereby effectively improving the user experience.
S12:如果将数据写入至少一张的预设SD卡中,则将至少一张的预设SD卡作为目标SD卡。S12: If the data is written into at least one preset SD card, at least one preset SD card is used as the target SD card.
可选地,在待读写SD卡插入的设备在接入待读写SD卡之前将存储器中的数据写入至少一张的预设SD卡中时,将至少一张的预设SD卡作为目标SD卡,表明待读写SD卡插入的设备在接入待读写SD卡之前将存储器中的数据移动到目标SD卡中。 Optionally, when the device to be read or written by the SD card is inserted into the at least one preset SD card before accessing the SD card to be read or written, at least one preset SD card is used as the preset SD card. The target SD card indicates that the device to be read and written by the SD card inserts the data in the memory to the target SD card before accessing the SD card to be read or written.
S13:判断待读写SD卡是否为目标SD卡。S13: Determine whether the SD card to be read or written is a target SD card.
可选地,通过判断待读写SD卡是否为目标SD卡,能够获知在接入待读写SD卡之前,插入的设备是否将存储器中的数据移动到待读写SD卡中,以触发后续步骤。Optionally, by determining whether the SD card to be read or written is a target SD card, it can be learned whether the inserted device moves the data in the memory to the SD card to be read and written before the SD card to be read or written is accessed, to trigger subsequent step.
S14:如果待读写SD卡为目标SD卡,则保存待读写SD卡中已写入的数据,并将设备的存储器中尚未写入的数据写入待读写SD卡中的第一目录下。S14: If the SD card to be read and written is the target SD card, save the data that has been written in the SD card to be read and written, and write the data that has not been written in the memory of the device into the first directory in the SD card to be read and written. under.
在本发明的实施例中,第一目录为数据在待读写SD卡的存储器中的存储目录,例如为/mnt/expand/fsUuid目录。In an embodiment of the invention, the first directory is a storage directory of data in the memory of the SD card to be read and written, for example, the /mnt/expand/fsUuid directory.
可选地,在待读写SD卡为目标SD卡时,表明待读写SD卡插入的设备在接入待读写SD卡之前已经将存储器中的部分数据写入待读写SD卡中,此时,保存待读写SD卡中已写入的数据,并将设备的存储器中尚未写入的数据写入待读写SD卡中的第一目录下,例如将设备的存储器中尚未写入的数据写入/mnt/expand/fsUuid目录下。Optionally, when the SD card to be read or written is the target SD card, it indicates that the device to be read and written by the SD card has written part of the data in the memory into the SD card to be read and written before accessing the SD card to be read and written. At this time, the data that has been written in the SD card to be read and written is saved, and the data that has not been written in the memory of the device is written in the first directory in the SD card to be read and written, for example, the memory of the device is not yet written. The data is written to the /mnt/expand/fsUuid directory.
一些实施例中,参见图3,该SD卡的读写方法还可以包括:In some embodiments, referring to FIG. 3, the method for reading and writing the SD card may further include:
S31:检测是否将待读写SD卡从设备中拔除,若是,执行S34,否则,执行S32。S31: Detect whether the SD card to be read or written is removed from the device, and if yes, execute S34; otherwise, execute S32.
可选地,检测是否将待读写SD卡从设备中拔除,以触发后续步骤。Optionally, it is detected whether the SD card to be read and written is removed from the device to trigger a subsequent step.
S32:在数据写入完毕时,卸载设备中的第二目录,其中,第二目录为将数据写入待读写SD卡之前数据在设备的存储器中的存储目录。S32: When the data is written, the second directory in the device is unloaded, wherein the second directory is a storage directory in which the data is written in the memory of the device before the data is written to the SD card to be read or written.
在本发明的实施例中,第二目录为将数据写入待读写SD卡之前数据在设备的存储器中的存储目录,例如为/data/media目录。In the embodiment of the present invention, the second directory is a storage directory in which data is written in the memory of the device before the data is written to the SD card to be read and written, for example, the /data/media directory.
可选地,在未将待读写SD卡从设备中拔除时,在数据写入完毕时,卸载设备中的第二目录,即第二目录为卸载状态。Optionally, when the SD card to be read or written is not removed from the device, when the data is written, the second directory in the device is uninstalled, that is, the second directory is in an uninstall state.
S33:将设备中定位第二目录的路径更改为定位第一目录的路径。S33: Change the path of the second directory in the device to the path of the first directory.
可选地,将设备中定位第二目录的路径更改为定位第一目录的路径, 即第一目录为挂载状态,第二目录为卸载状态,设备中定位第一目录的路径,能够在数据写入完毕时挂载待读写SD卡,扩大插入的设备的存储空间。Optionally, changing a path for locating the second directory in the device to a path for locating the first directory, That is, the first directory is in the mounted state, the second directory is in the unloading state, and the path of the first directory is located in the device, and the SD card to be read and written can be mounted when the data is written, and the storage space of the inserted device is expanded.
作为一种示例,参见图4(a),/storage/emulated目录为上层应用存储数据的路径,在未将待读写SD卡从设备中拔除时,/mnt/expand/fsUuid目录为挂载状态,/data/media目录为卸载状态,此时/storage/emulated指向/mnt/expand/fsUuid。As an example, referring to FIG. 4(a), the /storage/emulated directory is the path for storing data in the upper layer. When the SD card to be read or written is not removed from the device, the /mnt/expand/fsUuid directory is mounted. The /data/media directory is unloaded. At this point /storage/emulated points to /mnt/expand/fsUuid.
S34:判断在拔除待读写SD卡之前是否已将存储器中的数据写入待读写SD卡。S34: It is judged whether the data in the memory has been written into the SD card to be read and written before the SD card to be read or written is removed.
可选地,在将待读写SD卡从设备中拔除时,判断在拔除待读写SD卡之前是否已将存储器中的数据写入待读写SD卡,以触发后续步骤。Optionally, when the SD card to be read or written is removed from the device, it is determined whether the data in the memory has been written into the SD card to be read and written before the SD card to be read or written is removed, to trigger the subsequent step.
S35:如果已将存储器中的数据写入待读写SD卡,则挂载第二目录,并将设备中定位第一目录的路径更改为定位第二目录的路径。S35: If the data in the memory has been written to the SD card to be read and written, the second directory is mounted, and the path of the first directory in the device is changed to the path for locating the second directory.
可选地,在已将存储器中的数据写入待读写SD卡时,挂载第二目录,并将设备中定位第一目录的路径更改为定位第二目录的路径,即第二目录为挂载状态,第一目录为卸载状态,设备中定位第二目录的路径,能够在拔除待读写SD卡时重新挂载设备内部存储空间,保障需要存储媒体文件的应用正常运行。Optionally, when the data in the memory has been written into the SD card to be read and written, the second directory is mounted, and the path of the first directory in the device is changed to the path for locating the second directory, that is, the second directory is In the mounted state, the first directory is in the unloaded state, and the path of the second directory is located in the device. The internal storage space of the device can be re-mounted when the SD card to be read or written is removed, and the application that needs to store the media file is guaranteed to operate normally.
作为一种示例,参见图4(b),在将待读写SD卡从设备中拔除时,/mnt/expand/fsUuid目录为卸载状态,/data/media目录为挂载状态,此时/storage/emulated指向/data/media。As an example, referring to FIG. 4(b), when the SD card to be read or written is removed from the device, the /mnt/expand/fsUuid directory is in the uninstall state, and the /data/media directory is in the mount state. At this time, /storage /emulated points to /data/media.
本实施例中,通过在未将待读写SD卡从设备中拔除时,在数据写入完毕时,卸载设备中的第二目录,并将设备中定位第二目录的路径更改为定位第一目录的路径,能够在数据写入完毕时挂载待读写SD卡,扩大插入的设备的存储空间,且不影响原先已安装的应用的使用,在将待读写SD卡从设备中拔除且已将存储器中的数据写入待读写SD卡时,挂载第二目录,并将设备中定位第一目录的路径更改为定位第二目录的路径,能 够在拔除待读写SD卡时重新挂载设备内部存储空间,保障需要存储媒体文件的应用正常运行,有效提升用户的使用体验。In this embodiment, when the SD card to be read or written is not removed from the device, when the data is written, the second directory in the device is uninstalled, and the path of the second directory in the device is changed to the first location. The directory path can mount the SD card to be read and written when the data is written, and expand the storage space of the inserted device without affecting the use of the originally installed application. The SD card to be read and written is removed from the device. When the data in the memory has been written to the SD card to be read and written, the second directory is mounted, and the path of the first directory in the device is changed to the path for locating the second directory. Re-mount the internal storage space of the device when the SD card to be read or written is removed. This ensures that the application that needs to store media files runs normally and improves the user experience.
本实施例中,通过在待读写SD卡为目标SD卡时,保存待读写SD卡中已写入的数据,并将设备的存储器中尚未写入的数据写入待读写SD卡中的第一目录下,能够在再次插入之前拔除的SD卡时将设备的存储器中尚未写入的数据写入其中,提高数据的读写准确率,避免数据丢失,有效提升用户体验。In this embodiment, when the SD card to be read or written is the target SD card, the data that has been written in the SD card to be read and written is saved, and the data that has not been written in the memory of the device is written into the SD card to be read and written. In the first directory, the SD card that was unplugged before being inserted again can write data that has not been written in the memory of the device, thereby improving the read/write accuracy of the data, avoiding data loss, and effectively improving the user experience.
图5是本发明一实施例提出的SD卡的读写装置的结构示意图。该SD卡的读写装置500可以通过软件、硬件或者两者的结合实现。FIG. 5 is a schematic structural diagram of an apparatus for reading and writing an SD card according to an embodiment of the present invention. The read/write device 500 of the SD card can be implemented by software, hardware, or a combination of both.
参见图5,该SD卡的读写装置500可以包括:第一判断模块501、第一处理模块502、第二判断模块503,以及保存模块504。其中,Referring to FIG. 5, the read/write device 500 of the SD card may include: a first determining module 501, a first processing module 502, a second determining module 503, and a saving module 504. among them,
第一判断模块501,设置为在判定待读写SD卡为预设SD卡时,判断待读写SD卡插入的设备在接入待读写SD卡之前是否将存储器中的数据写入至少一张的预设SD卡中。The first determining module 501 is configured to determine, when determining that the SD card to be read or written is a preset SD card, whether the device inserted into the SD card is to write at least one of the data in the memory before accessing the SD card to be read or written. Zhang's preset SD card.
第一处理模块502,设置为在将数据写入至少一张的预设SD卡中时,将至少一张的预设SD卡作为目标SD卡。The first processing module 502 is configured to set at least one preset SD card as the target SD card when writing data into at least one preset SD card.
第二判断模块503,设置为判断待读写SD卡是否为目标SD卡。The second determining module 503 is configured to determine whether the SD card to be read or written is a target SD card.
保存模块504,设置为在待读写SD卡为目标SD卡时,保存待读写SD卡中已写入的数据,并将设备的存储器中尚未写入的数据写入待读写SD卡中的第一目录下。The saving module 504 is configured to save the data that has been written in the SD card to be read and written when the SD card to be read and written is the target SD card, and write the data that has not been written in the memory of the device into the SD card to be read and written. The first directory.
一些实施例中,参见图6,该SD卡的读写装置500还可以包括:In some embodiments, referring to FIG. 6, the read/write device 500 of the SD card may further include:
第一检测模块505,设置为检测是否将待读写SD卡从设备中拔除。The first detecting module 505 is configured to detect whether the SD card to be read and written is removed from the device.
卸载模块506,设置为在未将待读写SD卡从设备拔除时,在数据写入完毕时,卸载设备中的第二目录,其中,第二目录为将数据写入待读写SD卡之前数据在设备的存储器中的存储目录。The unloading module 506 is configured to, when the SD card to be read or written is not removed from the device, uninstall the second directory in the device when the data is written, wherein the second directory is to write data to the SD card to be read and written. The directory where the data is stored in the device's memory.
更改模块507,设置为将设备中定位第二目录的路径更改为定位第一 目录的路径。The change module 507 is configured to change the path of the second directory located in the device to the first position The path to the directory.
第三判断模块508,设置为在将待读写SD卡从设备拔除时,判断在拔除待读写SD卡之前是否已将存储器中的数据写入待读写SD卡。The third determining module 508 is configured to determine whether the data in the memory has been written into the SD card to be read or written before the SD card to be read or written is removed, when the SD card to be read or written is removed from the device.
挂载模块509,设置为在已将存储器中的数据写入待读写SD卡时,挂载第二目录,并将设备中定位第一目录的路径更改为定位第二目录的路径。The mounting module 509 is configured to mount the second directory when the data in the memory has been written to the SD card to be read and written, and change the path of the first directory in the device to the path for locating the second directory.
可选地,待读写SD卡是否为预设SD卡通过以下模块判定:Optionally, whether the SD card to be read or written is a preset SD card is determined by the following modules:
获取模块510,设置为获取待读写SD卡的预设标识。The obtaining module 510 is configured to obtain a preset identifier of the SD card to be read and written.
第二检测模块511,设置为检测预设标识在插入的设备中是否存在记录。The second detecting module 511 is configured to detect whether the preset identifier has a record in the inserted device.
第二处理模块512,设置为在预设标识在插入的设备中存在记录时,判定待读写SD卡为预设SD卡,在预设标识在插入的设备中不存在记录时,对待读写SD卡进行格式化处理。The second processing module 512 is configured to determine that the SD card to be read and written is a preset SD card when the preset identifier exists in the inserted device, and to read and write when the preset identifier does not exist in the inserted device. The SD card is formatted.
需要说明的是,前述图1-图4实施例中对SD卡的读写方法实施例的解释说明也适用于该实施例的SD卡的读写装置,其实现原理类似,此处不再赘述。It should be noted that the description of the method for reading and writing the SD card in the foregoing embodiments of FIG. 1 to FIG. 4 is also applicable to the read/write device of the SD card of the embodiment, and the implementation principle thereof is similar, and details are not described herein again. .
本实施例中,通过在待读写SD卡为目标SD卡时,保存待读写SD卡中已写入的数据,并将设备的存储器中尚未写入的数据写入待读写SD卡中的第一目录下,能够在再次插入之前拔除的SD卡时将设备的存储器中尚未写入的数据写入其中,提高数据的读写准确率,避免数据丢失,有效提升用户体验。In this embodiment, when the SD card to be read or written is the target SD card, the data that has been written in the SD card to be read and written is saved, and the data that has not been written in the memory of the device is written into the SD card to be read and written. In the first directory, the SD card that was unplugged before being inserted again can write data that has not been written in the memory of the device, thereby improving the read/write accuracy of the data, avoiding data loss, and effectively improving the user experience.
需要说明的是,在本发明的描述中,术语“第一”、“第二”等仅用于描述目的,而不能理解为指示或暗示相对重要性。此外,在本发明的描述中,除非另有说明,“多个”的含义是两个或两个以上。It should be noted that in the description of the present invention, the terms "first", "second" and the like are used for descriptive purposes only, and are not to be construed as indicating or implying relative importance. Further, in the description of the present invention, the meaning of "a plurality" is two or more unless otherwise specified.
流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个用于实现特定逻辑功能或过程的步骤的可执行 指令的代码的模块、片段或部分,并且本发明的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能,这应被本发明的实施例所属技术领域的技术人员所理解。Any process or method description in the flowchart or otherwise described herein can be understood to represent an executable that includes one or more steps for implementing a particular logical function or process. Modules, segments or portions of code of instructions, and the scope of preferred embodiments of the invention includes additional implementations, which may not be in the order shown or discussed, including in a substantially simultaneous manner or vice versa depending on the functionality involved. The order is to perform the functions, which should be understood by those skilled in the art to which the embodiments of the present invention pertain.
应当理解,本发明的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或固件来实现。例如,如果用硬件来实现,和在另一实施方式中一样,可用本领域公知的下列技术中的任一项或他们的组合来实现:具有用于对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列(PGA),现场可编程门阵列(FPGA)等。It should be understood that portions of the invention may be implemented in hardware, software, firmware or a combination thereof. In the above-described embodiments, multiple steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented by any one or combination of the following techniques well known in the art: having logic gates for implementing logic functions on data signals. Discrete logic circuits, application specific integrated circuits with suitable combinational logic gates, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.
本技术领域的普通技术人员可以理解实现上述实施例方法携带的全部或部分步骤是可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,该程序在执行时,包括方法实施例的步骤之一或其组合。One of ordinary skill in the art can understand that all or part of the steps carried by the method of implementing the above embodiments can be completed by a program to instruct related hardware, and the program can be stored in a computer readable storage medium. When executed, one or a combination of the steps of the method embodiments is included.
本发明的实施例还提供了一种存储介质。可选地,在本实施例中,上述存储介质可以被设置为存储用于执行以下步骤的程序代码:Embodiments of the present invention also provide a storage medium. Optionally, in the embodiment, the foregoing storage medium may be configured to store program code for performing the following steps:
S1,在判定待读写SD卡为预设SD卡时,判断待读写SD卡插入的设备在接入待读写SD卡之前是否将存储器中的数据写入至少一张的预设SD卡中;S1, when determining that the SD card to be read and written is a preset SD card, determining whether the device inserted into the SD card is to write the data in the memory to at least one preset SD card before accessing the SD card to be read or written. in;
S2,如果将数据写入至少一张的预设SD卡中,则将至少一张的预设SD卡作为目标SD卡;S2, if the data is written into at least one preset SD card, at least one preset SD card is used as the target SD card;
S3,判断待读写SD卡是否为目标SD卡;S3, determining whether the SD card to be read or written is a target SD card;
S4,如果待读写SD卡为目标SD卡,则保存待读写SD卡中已写入的数据,并将设备的存储器中尚未写入的数据写入待读写SD卡中的第一目录下。S4, if the SD card to be read or written is the target SD card, save the data that has been written in the SD card to be read and written, and write the data that has not been written in the memory of the device into the first directory in the SD card to be read and written. under.
可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只 读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。Optionally, in this embodiment, the foregoing storage medium may include, but is not limited to: a USB flash drive, only A medium that can store program code, such as a read-only memory (ROM), a random access memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
此外,在本发明各个实施例中的各功能单元可以集成在一个处理模块中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. The integrated modules, if implemented in the form of software functional modules and sold or used as stand-alone products, may also be stored in a computer readable storage medium.
上述提到的存储介质可以是只读存储器,磁盘或光盘等。The above mentioned storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本发明的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不一定指的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任何的一个或多个实施例或示例中以合适的方式结合。In the description of the present specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" and the like means a specific feature described in connection with the embodiment or example. A structure, material or feature is included in at least one embodiment or example of the invention. In the present specification, the schematic representation of the above terms does not necessarily mean the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in a suitable manner in any one or more embodiments or examples.
尽管上面已经示出和描述了本发明的实施例,可以理解的是,上述实施例是示例性的,不能理解为对本发明的限制,本领域的普通技术人员在本发明的范围内可以对上述实施例进行变化、修改、替换和变型。Although the embodiments of the present invention have been shown and described, it is understood that the above-described embodiments are illustrative and are not to be construed as limiting the scope of the invention. The embodiments are subject to variations, modifications, substitutions and variations.
工业实用性Industrial applicability
在本发明实施例中,能够在再次插入之前拔除的SD卡时将设备的存储器中尚未写入的数据写入其中,提高数据的读写准确率,避免数据丢失,有效提升用户体验。 In the embodiment of the present invention, data that has not been written in the memory of the device can be written into the SD card that is removed before being inserted again, thereby improving data reading and writing accuracy, avoiding data loss, and effectively improving the user experience.

Claims (10)

  1. 一种SD卡的读写方法,包括以下步骤:A method for reading and writing an SD card, comprising the following steps:
    在判定待读写SD卡为预设SD卡时,判断所述待读写SD卡插入的设备在接入所述待读写SD卡之前是否将存储器中的数据写入至少一张的预设SD卡中;When it is determined that the SD card to be read and written is a preset SD card, it is determined whether the device inserted in the SD card to be read and written writes at least one preset data in the memory before accessing the SD card to be read or written. In the SD card;
    如果将所述数据写入所述至少一张的预设SD卡中,则将所述至少一张的预设SD卡作为目标SD卡;If the data is written into the at least one preset SD card, the at least one preset SD card is used as the target SD card;
    判断所述待读写SD卡是否为所述目标SD卡;Determining whether the SD card to be read or written is the target SD card;
    如果所述待读写SD卡为所述目标SD卡,则保存所述待读写SD卡中已写入的数据,并将所述设备的存储器中尚未写入的数据写入所述待读写SD卡中的第一目录下。If the SD card to be read and written is the target SD card, save the data that has been written in the SD card to be read and written, and write data that has not been written in the memory of the device to the to-be-read Write the first directory in the SD card.
  2. 如权利要求1所述的SD卡的读写方法,其中,还包括:The method for reading and writing an SD card according to claim 1, further comprising:
    检测是否将所述待读写SD卡从所述设备中拔除;Detecting whether the SD card to be read and written is removed from the device;
    如果未将所述待读写SD卡从所述设备拔除,则在所述数据写入完毕时,卸载所述设备中的第二目录,其中,所述第二目录为将所述数据写入所述待读写SD卡之前所述数据在所述设备的存储器中的存储目录;If the SD card to be read or written is not removed from the device, when the data is written, the second directory in the device is uninstalled, wherein the second directory is to write the data. a storage directory of the data in the memory of the device before the SD card to be read or written;
    将所述设备中定位所述第二目录的路径更改为定位所述第一目录的路径。Changing a path in the device that locates the second directory to a path that locates the first directory.
  3. 如权利要求2所述的SD卡的读写方法,其中,所述检测所述待读写SD卡是否从所述设备中拔除之后,还包括:The method for reading and writing an SD card according to claim 2, wherein the detecting whether the SD card to be read or written is removed from the device further comprises:
    如果将所述待读写SD卡从所述设备拔除,则判断在拔除所述待读写SD卡之前是否已将所述存储器中的数据写入所述待读写SD卡; If the SD card to be read and written is removed from the device, it is determined whether the data in the memory has been written into the SD card to be read and written before the SD card to be read or written is removed;
    如果已将所述存储器中的数据写入所述待读写SD卡,则挂载所述第二目录,并将所述设备中定位所述第一目录的路径更改为所述定位所述第二目录的路径。If the data in the memory has been written to the SD card to be read and written, the second directory is mounted, and the path of the first directory in the device is changed to the positioning The path to the second directory.
  4. 如权利要求1所述的SD卡的读写方法,其中,通过以下步骤判定所述待读写SD卡为所述预设SD卡:The method for reading and writing an SD card according to claim 1, wherein the SD card to be read and written is determined to be the preset SD card by the following steps:
    获取所述待读写SD卡的预设标识;Obtaining a preset identifier of the SD card to be read and written;
    检测所述预设标识在所述插入的设备中是否存在记录;Detecting whether the preset identifier has a record in the inserted device;
    如果所述预设标识在所述插入的设备中存在所述记录,则判定所述待读写SD卡为所述预设SD卡。If the preset identifier has the record in the inserted device, determining that the SD card to be read and written is the preset SD card.
  5. 如权利要求4所述的SD卡的读写方法,其中,所述检测所述预设标识在所述插入的设备中是否存在记录之后,还包括:The method for reading and writing an SD card according to claim 4, wherein the detecting whether the preset identifier has a record in the inserted device further comprises:
    如果所述预设标识在所述插入的设备中不存在所述记录,则对所述待读写SD卡进行格式化处理。If the preset identifier does not exist in the inserted device, the SD card to be read and written is formatted.
  6. 一种SD卡的读写装置,包括:A reading and writing device for an SD card, comprising:
    第一判断模块,设置为在判定待读写SD卡为预设SD卡时,判断所述待读写SD卡插入的设备在接入所述待读写SD卡之前是否将存储器中的数据写入至少一张的预设SD卡中;The first determining module is configured to determine, when determining that the SD card to be read or written is a preset SD card, whether the device inserted in the SD card to be read and written writes data in the memory before accessing the SD card to be read or written Enter at least one preset SD card;
    第一处理模块,设置为在将所述数据写入所述至少一张的预设SD卡中时,将所述至少一张的预设SD卡作为目标SD卡;The first processing module is configured to: when the data is written into the at least one preset SD card, use the at least one preset SD card as a target SD card;
    第二判断模块,设置为判断所述待读写SD卡是否为所述目标SD卡;a second determining module, configured to determine whether the SD card to be read or written is the target SD card;
    保存模块,设置为在所述待读写SD卡为所述目标SD卡时,保 存所述待读写SD卡中已写入的数据,并将所述设备的存储器中尚未写入的数据写入所述待读写SD卡中的第一目录下。Saving a module, when the SD card to be read and written is the target SD card, And storing the data that has been written in the SD card to be read and written, and writing data that has not been written in the memory of the device to the first directory in the SD card to be read and written.
  7. 如权利要求6所述的SD卡的读写装置,其中,还包括:The apparatus for reading and writing of an SD card according to claim 6, further comprising:
    第一检测模块,设置为检测是否将所述待读写SD卡从所述设备中拔除;a first detecting module, configured to detect whether the SD card to be read and written is removed from the device;
    卸载模块,设置为在未将所述待读写SD卡从所述设备拔除时,在所述数据写入完毕时,卸载所述设备中的第二目录,其中,所述第二目录为将所述数据写入所述待读写SD卡之前所述数据在所述设备的存储器中的存储目录;And the uninstalling module is configured to: when the SD card to be read or written is not removed from the device, uninstall the second directory in the device when the data is written, wherein the second directory is a storage directory of the data in the memory of the device before the data is written to the SD card to be read or written;
    更改模块,设置为将所述设备中定位所述第二目录的路径更改为定位所述第一目录的路径。And a change module configured to change a path in the device that locates the second directory to a path that locates the first directory.
  8. 如权利要求7所述的SD卡的读写装置,其中,还包括:The apparatus for reading and writing of an SD card according to claim 7, further comprising:
    第三判断模块,设置为在将所述待读写SD卡从所述设备拔除时,判断在拔除所述待读写SD卡之前是否已将所述存储器中的数据写入所述待读写SD卡;a third determining module, configured to: when the SD card to be read and written is removed from the device, determine whether data in the memory has been written into the to-be-read before reading and writing the SD card to be read or written SD card;
    挂载模块,设置为在已将所述存储器中的数据写入所述待读写SD卡时,挂载所述第二目录,并将所述设备中定位所述第一目录的路径更改为所述定位所述第二目录的路径。a mounting module, configured to: when the data in the memory has been written into the SD card to be read and written, mount the second directory, and change a path in the device that locates the first directory to The path of the second directory is located.
  9. 如权利要求6所述的SD卡的读写方法,其中,所述待读写SD卡是否为所述预设SD卡通过以下模块判定:The method for reading and writing an SD card according to claim 6, wherein whether the SD card to be read or written is the preset SD card is determined by the following module:
    获取模块,设置为获取所述待读写SD卡的预设标识;Obtaining a module, configured to obtain a preset identifier of the SD card to be read and written;
    第二检测模块,设置为检测所述预设标识在所述插入的设备中是否存在记录; a second detecting module, configured to detect whether the preset identifier has a record in the inserted device;
    第二处理模块,设置为在所述预设标识在所述插入的设备中存在所述记录时,判定所述待读写SD卡为所述预设SD卡。The second processing module is configured to determine that the SD card to be read and written is the preset SD card when the preset identifier exists in the inserted device.
  10. 如权利要求9所述的SD卡的读写装置,其中,所述第二处理模块还设置为:The apparatus for reading and writing of an SD card according to claim 9, wherein the second processing module is further configured to:
    在所述预设标识在所述插入的设备中不存在所述记录时,对所述待读写SD卡进行格式化处理。 When the preset identifier does not exist in the inserted device, the SD card to be read and written is formatted.
PCT/CN2016/108603 2016-07-08 2016-12-05 Read and write method and apparatus for sd card WO2018006545A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610533603.7 2016-07-08
CN201610533603.7A CN107589904B (en) 2016-07-08 2016-07-08 SD card reading and writing method and device

Publications (1)

Publication Number Publication Date
WO2018006545A1 true WO2018006545A1 (en) 2018-01-11

Family

ID=60901671

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/108603 WO2018006545A1 (en) 2016-07-08 2016-12-05 Read and write method and apparatus for sd card

Country Status (2)

Country Link
CN (1) CN107589904B (en)
WO (1) WO2018006545A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112887166A (en) * 2021-01-18 2021-06-01 惠州Tcl移动通信有限公司 Detection method and system for SD card of mobile terminal, intelligent terminal and storage medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108521646B (en) * 2018-03-30 2021-09-03 珠海极海半导体有限公司 Near field communication method, device and computer readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012172041A1 (en) * 2011-06-16 2012-12-20 Giesecke & Devrient Secure Flash Solutions Gmbh Storage medium with access protection and method for operating such a storage medium
CN103425539A (en) * 2012-05-14 2013-12-04 联想(北京)有限公司 Information processing method and information processing device
CN103440178A (en) * 2013-07-30 2013-12-11 广东明创软件科技有限公司 Method and mobile terminal for backing up operating parameters of application program
CN104424136A (en) * 2013-09-06 2015-03-18 中兴通讯股份有限公司 Dynamic linking method and device of path and mobile terminal
CN104572152A (en) * 2013-10-22 2015-04-29 中兴通讯股份有限公司 Smart terminal and virtual memory card and real memory card synchronization method and device
CN105550311A (en) * 2015-12-14 2016-05-04 珠海全志科技股份有限公司 Method for dynamically changing application storage path

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101505332A (en) * 2008-02-04 2009-08-12 德信智能手机技术(北京)有限公司 Optimized processing method for sleeping/waking SD card by smart phone
US20130151615A1 (en) * 2011-12-08 2013-06-13 Google Inc. Sharing personally owned media with peers via social graphs
CN104156259A (en) * 2013-05-15 2014-11-19 中兴通讯股份有限公司 Stored information sending method and device for memory cards

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012172041A1 (en) * 2011-06-16 2012-12-20 Giesecke & Devrient Secure Flash Solutions Gmbh Storage medium with access protection and method for operating such a storage medium
CN103425539A (en) * 2012-05-14 2013-12-04 联想(北京)有限公司 Information processing method and information processing device
CN103440178A (en) * 2013-07-30 2013-12-11 广东明创软件科技有限公司 Method and mobile terminal for backing up operating parameters of application program
CN104424136A (en) * 2013-09-06 2015-03-18 中兴通讯股份有限公司 Dynamic linking method and device of path and mobile terminal
CN104572152A (en) * 2013-10-22 2015-04-29 中兴通讯股份有限公司 Smart terminal and virtual memory card and real memory card synchronization method and device
CN105550311A (en) * 2015-12-14 2016-05-04 珠海全志科技股份有限公司 Method for dynamically changing application storage path

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112887166A (en) * 2021-01-18 2021-06-01 惠州Tcl移动通信有限公司 Detection method and system for SD card of mobile terminal, intelligent terminal and storage medium
CN112887166B (en) * 2021-01-18 2023-04-18 深圳市思桅电子有限公司 Detection method and system for SD card of mobile terminal, intelligent terminal and storage medium

Also Published As

Publication number Publication date
CN107589904A (en) 2018-01-16
CN107589904B (en) 2021-09-03

Similar Documents

Publication Publication Date Title
US8954805B2 (en) Computer booting method and computer system
US20140245286A1 (en) Application managing system and method using same
TWI510913B (en) Testing device and testing method thereof
US8607227B2 (en) Electronic device and method for burning firmware to embedded device
WO2015062389A1 (en) Method and apparatus for uninstalling system application on terminal device
CN105094903A (en) Method and device for upgrading firmware
WO2016183951A1 (en) System upgrade method and terminal
CN103186387B (en) Electronic installation and its method for updating OS
CN110515634B (en) Method, computer system and medium for updating firmware by remote tool program
CN106484719B (en) Method and terminal for expanding mobile phone storage
WO2018049883A1 (en) File operation method and device
WO2018006545A1 (en) Read and write method and apparatus for sd card
EP3040856B1 (en) Firmware refreshing method and device
CN105657309A (en) Multi-way data collection method and system of law enforcement recorder
US8521791B2 (en) Electronic device and file management method
CN102999349A (en) Software upgrading method
CN104461622A (en) System update method and system update device for intelligent terminal
US20120260022A1 (en) Handling commands within a write-once read-many storage device configuration
US9753933B2 (en) Electronic device and method for mounting file system using virtual block device
US9201576B2 (en) Display method and portable device
CN104765631A (en) Restoration method and device for application program of mobile terminal
CN104156175A (en) Virtual disk size smooth expansion method
CN110750521A (en) Data migration method, device and equipment and computer readable storage medium
US9086806B2 (en) System and method for controlling SAS expander to electronically connect to a RAID card
CN105095026A (en) Superblock repair method and apparatus for EXT file system and intelligent device

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: 16908049

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: 16908049

Country of ref document: EP

Kind code of ref document: A1