Device control method and mobile storage device

By loading startup data and obtaining the entity block address in the memory module, and directly reading the system data and program code, the problem of slow startup speed of mobile storage devices is solved, significantly improving the startup speed and user experience.

CN114510438BActive Publication Date: 2025-02-11HOSIN GLOBAL ELECTRONICS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210182395.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-25
Publication Date
2025-02-11
Estimated Expiration
2042-02-25

AI Technical Summary

Technical Problem

As the storage capacity of the mobile storage device increases, the above-mentioned process of searching for system data may take a lot of time, resulting in poor user experience for the end user.

Method used

By loading startup data and obtaining the entity address of the first entity block in the memory module, the system data is directly read and the status information of the mobile storage device is provided to the host system.

Benefits of technology

It effectively accelerates the startup speed of mobile storage devices, especially the larger the storage capacity, the more obvious the increase in startup speed, improving the user's operating experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114510438B_ABST
    Figure CN114510438B_ABST
Patent Text Reader

Abstract

The present invention provides a device control method and a mobile storage device. The method comprises: connecting a power supply to a host system and loading startup data; obtaining first address information from the startup data, wherein the first address information reflects the physical address of a first physical block in the mobile storage device; reading system data from the first physical block according to the first address information; and providing the status information of the mobile storage device to the host system according to the system data. In this way, the startup speed of the mobile storage device can be effectively accelerated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a storage device control technology, and in particular to a device control method and a mobile storage device. Background Art

[0002] Mobile storage devices such as USB flash drives have the advantages of being small in size, easy to use, plug-and-play on computers, and highly compatible. Generally speaking, when a mobile storage device is connected to a computer, the mobile storage device will scan the memory modules therein to search for system data required for device startup and operation. After obtaining the required system data, the computer will present the status information of the mobile storage device (such as available capacity, etc.) to the end user through a display. However, as the storage capacity of mobile storage devices gradually increases, the above-mentioned process of searching for system data may take a lot of time (including scanning physical blocks one by one and correcting errors in the read data), resulting in a poor user experience of the mobile storage device for the end user. Summary of the invention

[0003] The invention provides a device control method and a mobile storage device, which can effectively speed up the startup speed of the mobile storage device.

[0004] An embodiment of the present invention provides a device control method for a mobile storage device. The mobile storage device includes a memory module. The device control method includes: connecting a power supply to a host system and loading startup data, wherein the host system is connected to the mobile storage device; obtaining first address information from the startup data, wherein the first address information reflects a physical address of a first physical block in the memory module; reading system data from the first physical block according to the first address information; and providing status information of the mobile storage device to the host system according to the system data.

[0005] An embodiment of the present invention further provides a mobile storage device, which includes a connection interface circuit, a memory module and a memory controller. The connection interface circuit is used to connect to a host system. The memory controller is connected to the connection interface circuit and the memory module. The memory controller is used to: turn on the power from the host system through the connection interface circuit and load startup data; obtain first address information from the startup data, wherein the first address information reflects the physical address of the first physical block in the memory module; read system data from the first physical block according to the first address information; and provide status information of the mobile storage device to the host system according to the system data.

[0006] Based on the above, after being connected to the host system and powered on by the host system, the memory controller can load the startup data and obtain the first address information from the startup data. In particular, the first address information can reflect the physical address of the first physical block in the memory module. According to the first address information, the memory controller can read the system data from the first physical block. According to the system data, the memory controller can provide the status information of the mobile storage device to the host system. Thereby, the startup speed of the mobile storage device can be effectively accelerated. BRIEF DESCRIPTION OF THE DRAWINGS

[0007] Figure 1 is a schematic diagram of a host system and a mobile storage device according to an embodiment of the present invention;

[0008] Figure 2 is a schematic diagram of startup data according to an embodiment of the present invention;

[0009] Figure 3 is a schematic diagram of a physical block in a memory module according to an embodiment of the present invention;

[0010] Figure 4 is a schematic diagram of an operation scenario according to an embodiment of the present invention;

[0011] Figure 5 is a flow chart of a device control method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0012] Reference will now be made in detail to exemplary embodiments of the present invention, examples of which are illustrated in the accompanying drawings. Whenever possible, the same reference numerals are used in the drawings and the description to refer to the same or like parts.

[0013] Figure 1 is a schematic diagram of a host system and a mobile storage device according to an embodiment of the present invention. Figure 1 , the host system 11 can be connected to the mobile storage device 12. The host system 11 can be used to store data (such as user data) in the mobile storage device 12 or read data from the mobile storage device 12. For example, the host system 11 may include various computer systems such as smart phones, tablet computers, notebook computers, desktop computers, industrial computers, game consoles, or server hosts. In addition, the host system 11 may be configured with various electronic circuit elements required for its operation, such as a central processing unit (CPU), a buffer memory, and a power management circuit.

[0014] The mobile storage device 12 can be used to store data. For example, the mobile storage device 12 can include various portable storage devices such as a USB flash drive or a mobile hard disk.

[0015] The mobile storage device 12 may include a connection interface circuit 121 , a memory controller 122 , and a memory module 123 . The memory controller 122 is connected to the connection interface circuit 121 and the memory module 123 .

[0016] The connection interface circuit 121 is used to connect the mobile storage device 12 to the host system 11. For example, the connection interface circuit 121 may support connection interface standards such as Universal Serial Bus (USB). The mobile storage device 12 may establish communication with the host system 11 through the connection interface circuit 121.

[0017] The memory controller 122 is responsible for the overall or partial operation of the mobile storage device 12. The memory controller 122 may include a central processing unit (CPU), other programmable general-purpose or special-purpose microprocessors, digital signal processors (DSP), programmable controllers, application-specific integrated circuits (ASIC), programmable logic devices (PLD), or other similar devices or combinations of these devices. In addition, the memory controller 122 may be used to control the memory module 123. The following description of the memory controller 122 is equivalent to the description of the mobile storage device 12.

[0018] The memory module 123 may be used to store data. For example, the memory module 123 may include one or more physical blocks. Each physical block may include a single level cell (SLC) NAND flash memory module, a multi level cell (MLC) NAND flash memory module, a triple level cell (TLC) NAND flash memory module, a quad level cell (QLC) NAND flash memory module, or other flash memory modules or other memory modules with the same or similar characteristics.

[0019] When the mobile storage device 12 is connected to the host system 11 through the connection interface circuit 121, the memory controller 122 can connect the power supply to the host system 11 through the connection interface circuit 121. The power supply can be used to supply power to the electronic circuit elements such as the connection interface circuit 121, the memory controller 122 and the memory module 123 in the mobile storage device 12.

[0020] After the host system 11 is powered on, the memory controller 122 may load the startup data. For example, the memory controller 122 may scan at least a portion of the physical blocks in the memory module 123 to search for the startup data. For example, the startup data may carry a specific tag. When the specific tag is scanned, the memory controller 122 may read the data with the specific tag (i.e., the startup data) from the memory module 123. In addition, the startup data may be loaded into a memory such as a static random access memory (SRAM) in the memory controller 122.

[0021] After loading the startup data, the memory controller 122 may obtain specific address information (also referred to as first address information) from the startup data. The first address information may reflect the physical address of a specific physical block (also referred to as a first physical block) in the memory module 123. The memory controller 122 may read system data from the first physical block according to the first address information.

[0022] In one embodiment, a physical block may correspond to one or more physical block addresses (PBA). A physical block may be mapped to one or more logical units. A logical unit may correspond to one or more logical block addresses (LBA). In addition, a physical block and / or a logical block may also have different management units, which is not limited by the present invention.

[0023] In one embodiment, the system data may include one or more system management tables. The system management table may reflect the usage status of the memory module 123. For example, the system management table may include a logical to physical (Logical to Physical, L2P) mapping table, an idle block management table and / or a bad block management table, and the type of the system management table is not limited thereto. Among them, the logical to physical mapping table may reflect the mapping relationship between the logical unit and at least part of the physical blocks in the memory module 123. The idle block management table may reflect which physical blocks in the memory module 123 are located in the idle pool or in an idle state. The bad block management table may reflect which physical blocks in the memory module 123 are bad blocks. In addition, the system data may also include various management information such as the brand, device model and / or firmware version of the mobile storage device 12, which is not limited by the present invention.

[0024] After obtaining the system data, the memory controller 122 may provide the status information of the mobile storage device 12 to the host system 11 according to the system data. For example, the status information of the mobile storage device 12 may include file management information such as the total capacity, available capacity, and usage status of the logical unit of the mobile storage device 12. In addition, the status information of the mobile storage device 12 may also include various types of device management information such as the brand, device model, and / or firmware version of the mobile storage device 12, which is not limited by the present invention.

[0025] In one embodiment, the host system 11 can manage and access the mobile storage device 12 according to the status information. For example, according to the status information of the mobile storage device 12, the host system 11 can send a standard access instruction to the mobile storage device 12 to instruct to store user data in the mobile storage device 12, read user data from the mobile storage device 12, and / or delete user data from the mobile storage device 12.

[0026] On the other hand, after loading the startup data, the memory controller 122 can also obtain another address information (also referred to as the second address information) from the startup data. The second address information can reflect the physical address of a specific physical block (also referred to as the second physical block) in the memory module 123. The memory controller 122 can read a program code from the second physical block according to the second address information. For example, the program code includes a firmware code for starting and operating the mobile storage device 12. Then, the memory controller 122 can execute the program code. For example, the memory controller 122 can execute the program code to start and control the mobile storage device 12. In one embodiment, the startup data is included in or can be regarded as a header of the program code.

[0027] Traditionally, after the mobile storage device 12 is powered on (i.e., connected to the host system), the memory controller 122 needs to search for a specific program code first. After finding the program code, the memory controller 122 can run the program code and start searching for the system data from the memory module 123 of the mobile storage device 12. As the storage capacity of the mobile storage device 12 gradually increases, the process of searching for the system data from a large number of physical blocks may take a lot of time (including scanning all the physical blocks in the memory module 123 one by one and correcting errors in the read data), thereby resulting in a poor user experience of the mobile storage device 12.

[0028] In one embodiment, by acquiring and loading the startup data once, the physical addresses of the first physical block storing the system data required for the operation of the mobile storage device 12 and the second physical block storing the program code can be acquired simultaneously (or almost simultaneously), and the system data and the program code can be directly read from the first physical block and the second physical block. Compared with the traditional method, the startup speed of the mobile storage device 12 after power-on can be greatly improved in the embodiment of the present invention, and the larger the storage capacity of the mobile storage device 12, the more obvious the improvement of the startup speed.

[0029] Figure 2 is a schematic diagram of startup data according to an embodiment of the present invention. Figure 3 is a schematic diagram of a physical block according to an embodiment of the present invention.

[0030] Please refer to Figure 2 and Figure 3 , the startup data 21 may record address information 201 and 202. The address information 201 may include the first address information. The address information 202 may include the second address information. The address information 201 may reflect the physical addresses of the physical blocks 301(1)-301(n) (i.e., the first physical block) in the memory module 123. The address information 202 may reflect the physical addresses of the physical blocks 302(1)-302(m) (i.e., the second physical block) in the memory module 123.

[0031] In one embodiment, after loading the startup data 21, the memory controller 122 can read the system data from the physical blocks 301(1)-301(n) according to the address information 201 in the startup data 21. At the same time, the memory controller 122 can read the program code (e.g., firmware code) required for starting and operating the mobile storage device 12 from the physical blocks 302(1)-302(m) according to the address information 202 in the startup data 21. In this way, the startup of the mobile storage device 12 can be completed quickly and the startup speed of the mobile storage device 12 after power-on can be effectively improved.

[0032] In one embodiment, the first physical block (eg Figure 3The physical blocks 301(1) to 301(n)) can be operated in a single-level cell (SLC) mode. For example, in the single-level cell (SLC) mode, each memory cell in the first physical block is used to store one bit. Thereby, the efficiency of reading the system data from the first physical block can be effectively improved, and / or the reliability of the system data read from the first physical block can be improved. In addition, at least a portion of the remaining physical blocks in the memory module 123 can be operated in a second-level cell (MLC) mode, a third-level cell (TLC) mode, or a fourth-level cell (QLC) mode, etc., to improve the overall capacity of the memory module 123.

[0033] In one embodiment, the second physical block (eg Figure 3 The physical blocks 302(1)-302(m)) can also operate in a single-level cell (SLC) mode to improve the efficiency of reading the program code from the second physical block and / or improve the reliability of the program code read from the second physical block.

[0034] In one embodiment, before the mobile storage device 12 is powered off (previous time), the memory controller 122 may write the first address information (and the second address information) into the startup data. For example, the startup data with the first address information (and the second address information) may be restored to the memory module 123. Thereby, after the memory controller 122 is powered on (next time), the memory controller 122 may quickly obtain the first address information (and the second address information) from the startup data.

[0035] Figure 4 is a schematic diagram of an operation scenario according to an embodiment of the present invention. Figure 4 , the host system 41 may include Figure 1 The host system 11, and the mobile storage device 40 may include Figure 1 For example, the mobile storage device 40 may be a USB flash drive or other types of mobile storage devices.

[0036] After the mobile storage device 40 (e.g., a USB flash drive) is electrically connected to the host system 41, the system data and the program code required to operate the mobile storage device 40 can be quickly acquired, and the status information of the mobile storage device 40 can be quickly provided to the host system 41. In other words, after the mobile storage device 40 (e.g., a USB flash drive) is electrically connected to the host system 41, the mobile storage device 40 can be started more quickly by skipping the conventional process of searching for the system data.

[0037] According to the status information of the mobile storage device 40, the host system 41 can present information related to the mobile storage device 40 in the user interface 42. For example, the host system 41 can present a device image representing the mobile storage device 40 (e.g., labeled as "U disk (D:)") and capacity information of the mobile storage device 40 (e.g., labeled as "remaining capacity is 2GB and total capacity is 6GB") in the user interface 42. It should be noted that the information related to the mobile storage device 40 presented in the user interface 42 can be adjusted according to actual needs, and the present invention is not limited thereto.

[0038] Figure 5 is a flow chart of a device control method according to an embodiment of the present invention. Figure 5 In step S501, the host system is powered on. In step S502, startup data is loaded. In step S503, first address information is obtained from the startup data, wherein the first address information reflects the physical address of the first physical block in the memory module. In step S504, system data is read from the first physical block according to the first address information. In step S505, status information of the mobile storage device is provided to the host system according to the system data.

[0039] However, Figure 5 The steps in the above are described in detail, so I will not repeat them here. It is worth noting that Figure 5 Each step in the above process can be implemented as multiple program codes or circuits, and the present invention is not limited thereto. Figure 5 The method can be used in conjunction with the above exemplary embodiments or can be used alone, and the present invention is not limited thereto.

[0040] In summary, the mobile storage device and the device control method provided by the embodiments of the present invention can be started more quickly without the traditional system data search process. For example, after the mobile storage device (such as a USB flash drive) is electrically connected to the host system, the startup speed of the mobile storage device and the speed of presenting information related to the mobile storage device in the user interface of the host system can be increased, thereby effectively improving the user's operating experience.

[0041] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A device control method, characterized in that: Used in a mobile storage device, the mobile storage device includes a memory module and a memory controller, and the device control method includes: Connecting power to a host system and loading startup data by the memory controller, wherein the host system is connected to the mobile storage device; The memory controller obtains first address information from the startup data, wherein the first address information reflects a physical address of a first physical block in the memory module; The memory controller reads system data from the first physical block according to the first address information; and The memory controller feeds back the status information of the mobile storage device to the host system according to the system data.

2. The device control method according to claim 1, further comprising: Acquire second address information from the startup data, wherein the second address information reflects a physical address of a second physical block in the memory module; Reading a program code from the second physical block according to the second address information; as well as Execute the program code. 3 . The device control method according to claim 1 , wherein the first physical block operates in a single-level memory cell mode. 4 . The device control method according to claim 2 , wherein the program code comprises a firmware code for starting the mobile storage device. 5 . The device control method according to claim 1 , wherein the system data includes a system management table which reflects a usage status of the memory module.

6. The device control method according to claim 1, further comprising: Before the mobile storage device is powered off, the first address information is written into the startup data.

7. A mobile storage device, characterized in that: include: A connection interface circuit for connecting to a host system; Memory module; as well as a memory controller connected to the connection interface circuit and the memory module, The memory controller is used to: Connecting power from the host system through the connection interface circuit and loading startup data; Acquire first address information from the startup data, wherein the first address information reflects a physical address of a first physical block in the memory module; Reading system data from the first physical block according to the first address information; as well as The status information of the mobile storage device is provided to the host system according to the system data.

8. The mobile storage device according to claim 7, wherein the memory controller is further configured to: Acquire second address information from the startup data, wherein the second address information reflects a physical address of a second physical block in the memory module; Reading a program code from the second physical block according to the second address information; and Execute the program code. 9 . The mobile storage device of claim 7 , wherein the first physical block operates in a single-level memory cell mode.

10. The mobile storage device according to claim 8, wherein the program code comprises a firmware code for starting the mobile storage device.

11. The mobile storage device according to claim 7, wherein the system data comprises a system management table which reflects the usage status of the memory module.

12. The mobile storage device according to claim 7, wherein the memory controller is further configured to: Before the mobile storage device is powered off, the first address information is written into the startup data.

Citation Information

Patent Citations

  • Method and device for detecting capacity of storage device

    CN103500586A

  • Firmware code loading method, memorizer controller and memorizer memory device

    CN104166558A