Flash memory card, pre-allocation method and system for flash memory card

By employing a combined management approach that combines the first storage unit using SLC technology and the second storage unit using MLC/TLC technology in the memory card, and by pre-allocating them into non-data areas and data areas respectively, the problem of balancing reliability and capacity in memory cards is solved, thus achieving a memory card with high reliability and high capacity.

CN114356796BActive Publication Date: 2025-11-28HANGZHOU EZVIZ SOFTWARE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111668122.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-30
Publication Date
2025-11-28
Estimated Expiration
2041-12-30

AI Technical Summary

Technical Problem

In existing technologies, it is difficult to balance the reliability and data storage capacity of memory cards. While MLC and TLC technologies increase storage capacity, they reduce reliability.

Method used

Different management methods are adopted for storage units. SLC technology is used for the first storage unit with high reliability requirements, while MLC and TLC technologies are used for the second storage unit with low reliability requirements. The first storage unit is allocated as a non-data area and the second storage unit is allocated as a data area through a pre-allocation method.

Benefits of technology

While ensuring high reliability, the memory card achieves high capacity and low cost, extends its service life, and improves the reliability of data storage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114356796B_ABST
    Figure CN114356796B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a flash memory card, a pre-allocation method and system of the flash memory card, the flash memory card comprising: a plurality of hardware structures same storage units; the storage unit comprises a first quantity of first storage units and a second quantity of second storage units; the first storage units are arranged continuously and located in front of the second storage units, each first storage unit is used for storing a third quantity of data; the second storage units are arranged continuously, and each second storage unit is used for storing a fourth quantity of data; the fourth quantity is greater than the third quantity. The embodiment of the present application is arranged by arranging the first quantity of first storage units to be arranged continuously, the second quantity of second storage units to be arranged continuously, and the first storage units to be located in front of the second storage units, so that a small amount of data with high reliability requirement can be stored in the first storage units, and a large amount of data with low reliability requirement can be stored in the second storage units, thereby giving consideration to high reliability and high capacity of the flash memory card.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of storage and the field of memory card, in particular to a flash memory card, a pre-allocation method and system of the flash memory card. BACKGROUND

[0002] With the development of electronic technology, the use of memory cards is more and more widely used. In the use of memory cards, on the one hand, the user's demand for data storage capacity is rapidly growing, and small-capacity memory cards are difficult to meet the growing capacity needs of users; on the other hand, the reliability of the memory card is also increasingly valued. Once the memory card is damaged, it will bring a lot of inconvenience to the user.

[0003] Generally, in order to meet the demand for data storage capacity, MLC (Multi-Level Cell) technology or TLC (Trinary-Level Cell) technology is uniformly used in each storage unit of the memory card. Compared with SLC (Single-Level Cell) technology, MLC technology and TLC technology can significantly expand the data storage capacity of the memory card, but reduce the reliability of the memory card. SUMMARY

[0004] The purpose of the embodiments of the present application is to provide a flash memory card, a pre-allocation method and system of the flash memory card, to solve the problem of how to balance the reliability and data storage capacity of the flash memory card.

[0005] To solve the above technical problems, the embodiments of the present application are implemented as follows:

[0006] In a first aspect, the embodiments of the present application provide a flash memory card, comprising:

[0007] A plurality of storage units with the same hardware structure; the storage units include a first number of first storage units and a second number of second storage units;

[0008] The first storage units are arranged continuously and located in front of the second storage units, and each first storage unit is used to store a third number of data;

[0009] The second storage units are arranged continuously, and each second storage unit is used to store a fourth number of data; the fourth number is greater than the third number.

[0010] In a second aspect, the embodiments of the present application provide a pre-allocation method of a flash memory card, applied to an adjusting device matched with the flash memory card as described in the first aspect, the method comprising:

[0011] Establishing a connection with an electronic device;

[0012] determining a target pre-allocation program matched with the electronic device from preset multiple pre-allocation programs;

[0013] sending the target pre-allocation program to the electronic device through the connection, so that the electronic device performs pre-allocation processing on the flash memory card based on the target pre-allocation program to allocate a first storage unit of the flash memory card as a non-data area and a second storage unit of the flash memory card as a data area when the flash memory card is installed and it is determined that a pre-allocation processing condition is met.

[0014] In a third aspect, an embodiment of the present application provides a pre-allocation system of a flash memory card, which comprises the flash memory card, the electronic device and the adjustment device matched with the flash memory card according to the first aspect; the flash memory card is installed in the electronic device;

[0015] The adjustment device establishes a connection with the electronic device, determines a target pre-allocation program matched with the electronic device from preset multiple pre-allocation programs, and sends the target pre-allocation program to the electronic device through the connection.

[0016] The electronic device receives the target pre-allocation program, and performs pre-allocation processing on the flash memory card based on the target pre-allocation program to allocate a first storage unit of the flash memory card as a non-data area and a second storage unit of the flash memory card as a data area when it is determined that a pre-allocation processing condition is met.

[0017] In a fourth aspect, an embodiment of the present application provides a pre-allocation device of a flash memory card, which is applied to an adjustment device matched with the flash memory card according to the first aspect, and the device comprises:

[0018] The processor is configured to establish a connection with the electronic device, determine a target pre-allocation program matched with the electronic device from preset multiple pre-allocation programs, and send the target pre-allocation program to the electronic device through the connection, so that the electronic device performs pre-allocation processing on the flash memory card based on the target pre-allocation program to allocate a first storage unit of the flash memory card as a non-data area and a second storage unit of the flash memory card as a data area when the flash memory card is installed and it is determined that a pre-allocation processing condition is met.

[0019] In a fifth aspect, an electronic device is provided, which comprises a processor and a memory electrically connected to the processor. The memory stores a computer program, and the processor is configured to invoke and execute the computer program from the memory to implement the steps of the pre-allocation method of the flash memory card according to the second aspect.

[0020] In a sixth aspect, a computer readable storage medium is provided, which stores a computer program. When the computer program is executed by a processor, the steps of the pre-allocation method of the flash memory card according to the second aspect are implemented.

[0021] In the embodiments of the present application, the flash memory card comprises a plurality of storage units with the same hardware structure; the storage units comprise a first quantity of first storage units and a second quantity of second storage units; the first storage units are arranged continuously and located in front of the second storage units, and each first storage unit is configured to store a third quantity of data; the second storage units are arranged continuously, and each second storage unit is configured to store a fourth quantity of data; the fourth quantity is greater than the third quantity. In the embodiments of the present application, the first quantity of first storage units are arranged continuously, the second quantity of second storage units are arranged continuously, and the first storage units are located in front of the second storage units, so that the data with high reliability requirements can be stored in the first storage units, and the data with low reliability requirements can be stored in the second storage units, thereby balancing the high reliability and high capacity of the flash memory card as a whole. BRIEF DESCRIPTION OF DRAWINGS

[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the drawings needed in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0023] Figure 1 A structure schematic diagram of a flash memory card is provided for the embodiments of the present application;

[0024] Figure 2 Another structure schematic diagram of a flash memory card is provided for the embodiments of the present application;

[0025] Figure 3 A flowchart of a pre-allocation method of a flash memory card is provided for the embodiments of the present application;

[0026] Figure 4 A module composition schematic diagram of a pre-allocation device of a flash memory card is provided for the embodiments of the present application;

[0027] Figure 5 A pre-allocation system of a flash memory card according to an embodiment of the present specification;

[0028] Figure 6 An electronic device according to an embodiment of the present specification. DETAILED DESCRIPTION

[0029] In order to enable persons skilled in the art to better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be described clearly and completely in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by persons skilled in the art without creative labor should fall within the scope of protection of the present application.

[0030] Figure 1 A structure diagram of a flash memory card according to an embodiment of the present specification.

[0031] As shown in Figure 1 , the flash memory card comprises a plurality of storage units with the same hardware structure; the storage units comprise a first number of first storage units 101 and a second number of second storage units 102; the first storage units 101 are arranged continuously and located in front of the second storage units 102, each first storage unit 101 is used to store a third number of data; the second storage units 102 are arranged continuously, each second storage unit 102 is used to store a fourth number of data; the fourth number is greater than the third number.

[0032] The flash memory card can be a Micro SD card (Micro SD Card), originally named TF card (Trans-flash Card). The flash memory card can be installed in various types of electronic devices, such as mobile phones, cameras, etc. In the case of installing the flash memory card in the electronic device, the data collected or generated by the electronic device can be stored in the flash memory card. The installation form of the flash memory card can be inserted into the card slot of the electronic device, or other connection forms.

[0033] The plurality of storage units included in the flash memory card have the same hardware structure. The storage unit can be a floating gate transistor, or other electronic devices with storage function. The storage unit can be the basic storage unit in the flash memory card.

[0034] The first storage units 101 are arranged continuously and in front of the second storage units 102, and the second storage units 102 are arranged continuously, which means that the flash memory card accesses and reads data according to a one-dimensional logical address, and the plurality of storage units can be regarded as being arranged continuously according to the one-dimensional logical address, wherein the first storage units 101 in the plurality of storage units are arranged continuously, and the second storage units 102 in the plurality of storage units are arranged continuously, as shown in FIG. 1. Figure 1 The first quantity of the first storage units 101 can be determined according to the capacity of the non-data area of the electronic device calculated in advance, and the second quantity of the second storage units 102 can be determined according to the capacity of the data area of the electronic device calculated in advance.

[0035] The first quantity can be determined according to the capacity of the non-data area of the electronic device calculated in advance, and the second quantity can be determined according to the capacity of the data area of the electronic device calculated in advance.

[0036] The third quantity can be one or more, and the fourth quantity can be two, three, four, or more than four. The fourth quantity is greater than the third quantity, that is, the first storage unit 101 can store less data than the second storage unit 102.

[0037] Optionally, the first storage unit includes an SLC single-layer cell, and the second storage unit includes at least one of an MLC multi-layer cell, a TLC three-layer cell, and a QLC four-layer cell.

[0038] It should be emphasized that the hardware structure of each storage unit in the flash memory card is the same, that is, the first storage unit can use SLC technology, and the second storage unit can use MLC technology, TLC technology, QLC technology, etc. different from the first storage unit, and the structures of the electronic devices used by the two are completely consistent, not that the first storage unit uses one type of storage grain and the second storage unit uses another type of storage grain with different structures. The first storage unit and the second storage unit use two different management methods for the same type of electronic device.

[0039] For example, the first storage unit 101 uses SLC (Single-Level Cell) technology, and the first storage unit 101 is an SLC single-layer cell for storing 1 bit of data, and the second storage unit 102 uses TLC (Trinary-Level Cell) technology, and the second storage unit 102 is a TLC three-layer cell for storing 3 bits of data, and 1 bit is less than 3 bits.

[0040] Table 1 shows some characteristic parameters of SLC, MLC, EMLC (Enterprise Multi-Level Cell), and TLC.

[0041]

[0042] Table 1

[0043] As shown in Table 1, each storage unit using SLC technology can be used to store 1 bit of data, has the highest cost, the longest data retention time, and the shortest data read time and erase time. Compared with the storage unit corresponding to SLC, the storage units corresponding to MLC, EMLC and TLC have increased data storage capacity, reduced cost, shortened data retention time, and prolonged data read time and erase time.

[0044] It can be seen that SLC has the advantages of high reliability, good performance and long service life. Compared with SLC, MLC, EMLC and TLC have reduced reliability, decreased performance and shortened service life, but have the advantage of high data storage capacity.

[0045] The hardware structure of each storage unit in the flash memory card is the same, and the materials used in each storage unit are also the same, so the cost of each storage unit is the same. Since SLC has the advantage of high reliability, even if each storage unit uses low-cost electronic device materials, the flash memory card as a whole has high reliability. For a flash memory card using MLC technology or TLC technology uniformly, if the flash memory card is to have the same degree of reliability, high-cost electronic device materials must be used. Therefore, the flash memory card provided in the embodiments of the present application has the advantage of low cost under the premise of ensuring high reliability.

[0046] Optionally, the flash memory card further comprises a main control board; the main control board is connected with each storage unit and is configured to control the amount of data stored in each storage unit.

[0047] The main control board controls the amount of data stored in each storage unit. The main control board can control the management mode of each storage unit, for example, the main control board controls a storage unit to use a first management mode, in which the storage unit can store 1 bit of data; the main control board controls another storage unit to use a second management mode, in which the storage unit can store 2 bits of data.

[0048] The flash memory card comprises a main control board and a plurality of storage units; the main control board is connected with each storage unit and is configured to control the amount of data that can be stored in each storage unit.

[0049] The first storage unit 101 and the second storage unit 102 have the same hardware structure, but through the control of the main control board, the storage units with the same hardware structure can store different amounts of data. For example, for two floating gate transistors with the same structure, the main control board can control the first floating gate transistor to store 1 bit of data and control the second floating gate transistor to store 2 bits of data.

[0050] Optionally, the first storage unit is allocated as a non-data area after pre-allocation, the non-data area including a file allocation table area and an index area; the second storage unit is allocated as a data area after pre-allocation; the file allocation table area is located in front of the index area, and the file allocation table area is used to store partition table information; the partition table information is used to enable an operating system of an electronic device installed with the flash memory card to open and read files stored in the index area and the data area; the index area is used to store index files; the index files are used to search for storage positions of corresponding content files in the data area; and the data area is used to store the content files.

[0051] The flash memory card can use a pre-allocation mechanism for data storage. A pre-allocated file system on the flash memory card can be divided into a non-data area and a data area.

[0052] The non-data area is used to assist the operating system of the electronic device installed with the flash memory card to search for important data of a file. The non-data area can include a file allocation table area and an index area.

[0053] If the storage unit corresponding to the non-data area is damaged, the data stored in the data area can not be normally interpreted. For example, a phone takes a photo, and the photo can be stored in the flash memory card in the form of binary data. However, due to damage of part of the storage unit in the index area in the non-data area, the photo cannot be opened and displayed. It should be noted that the binary data stored in the data area can be read, but the binary data cannot be normally interpreted by the phone, and therefore cannot be displayed in the form of a picture in the phone.

[0054] If the storage unit corresponding to the non-data area is damaged, the operating system of the electronic device can not recognize the flash memory card, and data reading and data writing cannot be performed. For example, a video taken by a camera is stored in the data area before damage of the storage unit in the file allocation table area in the non-data area. After damage of part of the storage unit in the file allocation table area, the data in the flash memory card installed in the camera cannot be recognized by the operating system of the camera, and the video cannot be read in the camera. In the case that the camera is connected to a computer in communication, the operating system of the computer also cannot recognize the data in the flash memory card, and the video cannot be read on the computer.

[0055] The data area is used to store content data, such as picture files, audio files, video files, and the like. The total data storage capacity of the data area is large, and the damage of individual storage units does not affect the normal work of the remaining undamaged storage units. For example, the total data storage capacity of the data area is 128G, and even if there are dozens or even hundreds of damaged storage units in the data area, there are still a large number of available storage units in the data area, which does not affect the normal work of the flash memory card.

[0056] The file allocation table area is located in front of the index area, and is used to store partition table information. The partition table information is used for the operating system of the electronic device installed with the flash memory card to open and read and write the files stored in the index area and the data area. The file allocation table area can be a FAT32 area or other types of file allocation table areas. The FAT32 area can be recognized and used by LINUX and WINDOWS operating systems. For example, the WINDOWS operating system can open and read and write the files stored in the index area and the data area according to the partition table information stored in the FAT32 area, using a standard C interface.

[0057] In the case of damage to the storage unit storing the partition table information, the WINDOWS operating system can not recognize the content in the flash memory card, so that data reading and data writing cannot be performed, resulting in data being unavailable, so the flash memory card can be considered as a whole damaged and cannot continue to be used.

[0058] The index area is used to store index files. The index files are used to retrieve the storage location of the corresponding content files in the data area. The index files are for pre-allocated file systems and can include metadata of the data area. Taking a piece of video as an example, the index file can record the start time, end time, storage location of the video file in the data area, file offset, and length of the piece of video. The operating system of the electronic device installed with the flash memory card can read the index file in the index area according to the partition table information stored in the file allocation table area, and search for the specific content data in the data area according to the metadata of the content data recorded in the index file. Other forms of content data are similar to video files, which will not be described here.

[0059] The damage of the index area can cause the operating system to be unable to recognize the content in the flash memory card, so that data reading and data writing cannot be performed, resulting in data being unavailable, so the flash memory card can be considered as a whole damaged and cannot continue to be used.

[0060] During the use of the flash memory card, the service life of the storage units reaches the limit, or the device is powered off at any time during operation, which can damage the data stored in the storage units. Therefore, the reliability of the storage units corresponding to the index area and the file allocation table area directly affects the normal use of the entire flash memory card. Compared with the non-data area, the reliability of the storage units corresponding to the data area only affects a small amount of data and has less destructive.

[0061] Therefore, the first storage units are allocated as non-data areas, and the second storage units are allocated as data areas, based on the following considerations: on the one hand, the non-data area requires a small amount of data space and has a low demand for data storage capacity, but has a high requirement for reliability; on the other hand, the data area requires a large amount of storage space and has a high demand for data storage capacity, but has a relatively low requirement for reliability.

[0062] By allocating the first storage units as non-data areas and the second storage units as data areas, the high reliability and high capacity of the entire flash memory card can be considered, and the first storage units with high reliability advantage are used to store important data that has a greater impact on the use of the entire flash memory card, so that the important data is not easily damaged, and the service life of the flash memory card is prolonged.

[0063] Optionally, the total data storage capacity of the first quantity of first storage units is a preset capacity value; the preset capacity value is determined according to the capacity value of the non-data area of the target device; the non-data area includes the index area and the file allocation table area; wherein the target device is determined by the following way; in a plurality of electronic devices matched with the flash memory card, according to the data storage structure of each electronic device, the capacity value of the non-data area of each electronic device is calculated; the electronic device corresponding to the largest non-data area capacity value is determined as the target device.

[0064] The preset capacity value can be 128M, or other pre-set values.

[0065] The capacity value of the largest non-data area can be less than the preset capacity value, or equal to the preset capacity value.

[0066] The preset capacity value can be determined according to the capacity value of the non-data area of the target device, which can be the capacity value of the non-data area of the target device as the preset capacity value, or the sum of the capacity value of the non-data area of the target device and a preset capacity threshold as the preset capacity value.

[0067] For example, a flash memory card can be installed in a mobile phone, a camera, and a smart home appliance. According to the data storage structure of the mobile phone, the capacity of the non-data area of the mobile phone is calculated to be 115M. According to the data storage structure of the camera, the capacity of the non-data area of the camera is calculated to be 120M. According to the data storage structure of the smart home appliance, the capacity of the non-data area of the smart home appliance is calculated to be 80M. The camera corresponding to 120M is determined as the target device. According to the capacity of the non-data area of the target device, i.e., 120M, the sum of the preset capacity value and the preset capacity threshold value, i.e., 128M, is determined as the preset capacity value.

[0068] Optionally, the first storage unit is configured to store the data content of the non-data area of the electronic device in which the flash memory card is installed; and the second storage unit is configured to store the data content of the data area of the electronic device in which the flash memory card is installed.

[0069] In the case where the flash memory card is inserted into the card slot of the electronic device, when the electronic device collects or generates new content data, the new content data can be stored in the second storage unit, and the index file corresponding to the new content data can be stored in the first storage unit.

[0070] Alternatively, in the case where the flash memory card is inserted into the card slot of the electronic device, when the electronic device receives a data transfer instruction, the content data specified by the data transfer instruction can be transferred from the memory of the electronic device to the second storage unit, and the index file corresponding to the content data can be stored in the first storage unit.

[0071] Optionally, the total data storage capacity of the first storage unit 101 of the first quantity is less than the total data storage capacity of the second storage unit 102 of the second quantity.

[0072] For example, the total data storage capacity of the first storage unit 101 of the first quantity can be 128M, and the total data storage capacity of the second storage unit 102 of the second quantity can be 16G, 32G, 64G, or 128G, etc.

[0073] The total data storage capacity of the first storage unit 101 of the first quantity can be much less than the total data storage capacity of the second storage unit 102 of the second quantity. Specifically, the ratio of the total data storage capacity of the first storage unit 101 of the first quantity to the total data storage capacity of the second storage unit 102 of the second quantity can be less than or equal to a preset proportion threshold value. The preset proportion threshold value can be 1 / 128.

[0074] In the case where the flash memory card is inserted into the card slot of the electronic device, when the electronic device collects or generates new content data, the new content data can be stored in the second storage unit, and the index file corresponding to the new content data can be stored in the first storage unit. Figure 1In the shown embodiment, the flash memory card comprises: a plurality of hardware-identical storage units; the storage units comprise a first quantity of first storage units and a second quantity of second storage units; the first storage units are arranged in series and located in front of the second storage units, each first storage unit is configured to store a third quantity of data; the second storage units are arranged in series, each second storage unit is configured to store a fourth quantity of data; the fourth quantity is greater than the third quantity. In the embodiment, the first quantity of first storage units are arranged in series, the second quantity of second storage units are arranged in series, and the first storage units are located in front of the second storage units, so that a small amount of data with high reliability requirement can be stored in the first storage units, and a large amount of data with low reliability requirement can be stored in the second storage units, thereby balancing the high reliability and high capacity of the flash memory card as a whole.

[0075] Based on the same technical concept, the embodiment of the present specification also provides a flash memory card. Figure 2 Another structural schematic diagram of a flash memory card provided by the embodiment of the present specification is shown in Figure 2 After the pre-allocation processing, the flash memory card is divided into a non-data area 201 and a data area 202. The non-data area 201 comprises a FAT32 area and an index area, and the FAT32 area and the index area are adjacent according to a one-dimensional logical address, and the FAT32 area is located before the index area.

[0076] The non-data area 201 adopts SLC technology, i.e., each storage unit in the non-data area 201 is configured to store 1 bit of data, the data area 202 adopts MLC, TLC or QLC technology, i.e., each storage unit in the data area 202 is configured to store 2 bits of data, or each storage unit is configured to store 3 bits of data, or each storage unit is configured to store 4 bits of data.

[0077] In addition, for the flash memory card embodiment shown in Figure 2 Since the flash memory card embodiment shown in Figure 1 is basically similar to the flash memory card embodiment shown in Figure 1 , the description is relatively simple, and the relevant parts refer to the part of the description of the flash memory card embodiment shown in

[0078] Based on the same technical concept, the embodiment of the present specification also provides a pre-allocation method of a flash memory card, which is applied to an adjustment device matched with the flash memory card provided by the foregoing flash memory card embodiment. Figure 3 A flowchart of a pre-allocation method of a flash memory card provided by the embodiment of the present specification.

[0079] Step 302: connection with an electronic device is established.

[0080] The electronic device in step 302 can be one of a plurality of electronic devices matched with the flash memory card, such as a mobile phone, a camera, and a smart home appliance.

[0081] The adjustment device can be an electronic device. The adjustment device is different from the electronic device in step 302. The adjustment device can be matched with the flash memory card. The adjustment device can be used to assist the electronic device in step 302 to perform the pre-allocation process on the matched flash memory card.

[0082] The adjustment device and the electronic device can establish a wireless connection, for example, the adjustment device establishes a wireless connection with the electronic device through an internal Bluetooth or Wi-Fi module. The adjustment device and the electronic device can also establish a wired connection, for example, the adjustment device establishes a wired connection with the electronic device through a data transmission line.

[0083] It should be noted that step 302 can be performed when the electronic device is installed with the flash memory card, or before the electronic device is installed with the flash memory card.

[0084] In step 304, a target pre-allocation program matched with the electronic device is determined from a plurality of pre-allocation programs.

[0085] The adjustment device can store a plurality of pre-allocation programs, each of which corresponds to one of a plurality of electronic devices matched with the flash memory card. For example, the adjustment device stores a first pre-allocation program and a second pre-allocation program, the first pre-allocation program corresponds to a mobile phone, and the second pre-allocation program corresponds to a camera. If the electronic device is a camera, the adjustment device determines the second pre-allocation program as the target pre-allocation program.

[0086] Optionally, determining the target pre-allocation program matched with the electronic device from the plurality of pre-allocation programs includes: determining a device type of the electronic device; obtaining an associated pre-allocation program from an association relationship between the device type and the pre-allocation program according to the device type; and determining the obtained pre-allocation program as the target pre-allocation program matched with the electronic device.

[0087] The device type of the electronic device is determined. In actual implementation, the device type of the electronic device can be automatically acquired by the adjusting device when the adjusting device establishes a connection with the electronic device, or the device type of the electronic device can be acquired according to a user operation after the adjusting device is connected with the electronic device. The device type identifier can be used to uniquely identify the device type of the electronic device. For example, the device type identifier of a mobile phone is X, the device type identifier of a camera is Y, and the device type identifier of a smart home appliance is Z. The above device type identifiers are only exemplary and do not limit the present application. The device type identifier can be a device model of the electronic device or another parameter that can uniquely identify the device type of the electronic device. The user operation can be an operation of the user on the adjusting device or an operation of the user on the electronic device.

[0088] According to the device type, the associated pre-allocation program is acquired from a preset association between device types and pre-allocation programs, and the acquired pre-allocation program is determined as a target pre-allocation program matched with the electronic device. The corresponding pre-allocation program can be queried from the pre-stored association according to the device type identifier, and the queried pre-allocation program is used as the target pre-allocation program.

[0089] In step 306, the target pre-allocation program is sent to the electronic device through the connection, so that the electronic device performs a pre-allocation process on the flash memory card based on the target pre-allocation program when the flash memory card is installed and it is determined that the pre-allocation condition is met, to allocate the first storage unit of the flash memory card as a non-data area and allocate the second storage unit of the flash memory card as a data area.

[0090] The adjusting device sends the target pre-allocation program to the electronic device through the connection, which can be transmitting the target pre-allocation program to the electronic device and replacing the pre-allocation program stored in the electronic device.

[0091] The pre-allocation condition can be that the flash memory card is inserted into the card slot of the electronic device, or that the user performs a pre-allocation trigger operation on the electronic device after the flash memory card is inserted into the card slot of the electronic device.

[0092] For example, after the user inserts the flash memory card into the card slot of the mobile phone, the mobile phone pops up a management interface of the flash memory card, the user clicks a pre-allocation trigger control in the management interface, and the mobile phone runs the target pre-allocation program to perform a pre-allocation process on the flash memory card in response to the user operation.

[0093] In the embodiment of the present application, a connection is established with the electronic device; a target pre-allocation program matched with the electronic device is determined from a plurality of pre-set pre-allocation programs; the target pre-allocation program is sent to the electronic device through the connection, so that the electronic device performs pre-allocation processing on the flash memory card based on the target pre-allocation program when the flash memory card is installed and it is determined that the processing condition of pre-allocation is met, to allocate a first storage unit of the flash memory card as a non-data area and allocate a second storage unit of the flash memory card as a data area. The embodiment of the present application can make the electronic device run the target pre-allocation program to perform pre-allocation processing when the flash memory card is installed and the processing condition of pre-allocation is met, so that the first storage unit with high reliability but small data storage capacity is allocated as the non-data area, and the second storage unit with low reliability but large data storage capacity is allocated as the data area, thereby balancing the high reliability and high capacity of the flash memory card.

[0094] Based on the same technical concept, the embodiment of the present application also provides a pre-allocation device of a flash memory card, Figure 4 A module composition schematic diagram of the pre-allocation device of the flash memory card provided by the embodiment of the present application is shown in Figure 4 The device comprises:

[0095] The processor 401 is configured to establish a connection with an electronic device; determine a target pre-allocation program matched with the electronic device from a plurality of pre-set pre-allocation programs; send the target pre-allocation program to the electronic device through the connection, so that the electronic device performs pre-allocation processing on the flash memory card based on the target pre-allocation program when the flash memory card is installed and it is determined that the processing condition of pre-allocation is met, to allocate a first storage unit of the flash memory card as a non-data area and allocate a second storage unit of the flash memory card as a data area.

[0096] Optionally, the processor 401 is specifically configured to

[0097] Determine the device type of the electronic device;

[0098] According to the device type, obtain an associated pre-allocation program from the pre-set association relationship between the device type and the pre-allocation program;

[0099] Determine the obtained pre-allocation program as the target pre-allocation program matched with the electronic device.

[0100] The pre-allocation device of the flash memory card provided in the embodiments of the present application establishes a connection with the electronic device, determines a target pre-allocation program matched with the electronic device from a plurality of pre-allocation programs, and sends the target pre-allocation program to the electronic device through the connection, so that the electronic device performs pre-allocation processing on the flash memory card based on the target pre-allocation program when the flash memory card is installed and the processing condition of pre-allocation is met, to allocate a first storage unit of the flash memory card as a non-data area and a second storage unit of the flash memory card as a data area. The embodiments of the present application can make the electronic device run the target pre-allocation program to perform pre-allocation processing when the flash memory card is installed and the processing condition of pre-allocation is met, so that the first storage unit with high reliability but small data storage capacity is allocated as the non-data area and the second storage unit with low reliability but large data storage capacity is allocated as the data area, thereby balancing the high reliability and high capacity of the flash memory card.

[0101] In addition, for the pre-allocation device of the flash memory card, since it is basically similar to the method embodiment of the pre-allocation method of the flash memory card, the description is relatively simple, and the relevant parts can be referred to the part of the method embodiment of the pre-allocation method of the flash memory card. In addition, it should be noted that, in each component of the pre-allocation device of the flash memory card of the present application, the components are logically divided according to the functions to be achieved, but the present application is not limited thereto, and each component can be re-divided or combined as needed.

[0102] Based on the same technical concept, one or more embodiments of the present specification also provide a pre-allocation system of a flash memory card, Figure 5 A composition schematic diagram of a pre-allocation system of a flash memory card provided in the embodiments of the present specification is shown in the figure. Figure 5 As shown in the figure, the pre-allocation system of the flash memory card includes a flash memory card 503, an electronic device 502, and an adjustment device 501 matched with the flash memory card 503; the flash memory card 503 is installed in the electronic device 502;

[0103] The adjustment device 501 establishes a connection with the electronic device 502, determines a target pre-allocation program matched with the electronic device from a plurality of pre-allocation programs, and sends the target pre-allocation program to the electronic device 502 through the connection;

[0104] The electronic device 502 receives the target pre-allocation program, and performs pre-allocation processing on the flash memory card 503 based on the target pre-allocation program when the processing condition of pre-allocation is met, to allocate a first storage unit of the flash memory card 503 as a non-data area and a second storage unit of the flash memory card as a data area.

[0105] The flash memory card pre-allocation system provided in this application embodiment establishes a connection between an adjustment device and an electronic device; determines a target pre-allocation program matching the electronic device from a plurality of preset pre-allocation programs; and sends the target pre-allocation program to the electronic device through the connection. This allows the electronic device, when the flash memory card is installed and the pre-allocation processing conditions are met, to perform pre-allocation processing on the flash memory card based on the target pre-allocation program, allocating the first storage unit of the flash memory card as a non-data area and the second storage unit as a data area. By sending the target pre-allocation program matching the electronic device to the electronic device through the adjustment device, this application embodiment enables the electronic device to run the target pre-allocation program when the flash memory card is installed and the pre-allocation processing conditions are met. This allows the first storage unit, which has high reliability but small data storage capacity, to be allocated as a non-data area, while the second storage unit, which has lower reliability but large data storage capacity, is allocated as a data area, thus balancing the high reliability and high capacity of the flash memory card.

[0106] Furthermore, since the above system embodiments are basically similar to the corresponding method embodiments, the description is relatively simple, and relevant details can be found in the description of the method embodiments.

[0107] Based on the same technical concept, embodiments of this application also provide an electronic device, such as... Figure 6 As shown. This electronic device can be an adjustment device for performing the aforementioned pre-allocation method for flash memory cards. Figure 6 This is a schematic diagram illustrating the composition of an electronic device provided in an embodiment of this specification. See also... Figure 6 The electronic device includes a processor, an internal bus, a network interface, memory, and non-volatile memory, and may also include other hardware required for business operations. The processor reads the corresponding computer program from the non-volatile memory into memory and then runs it, forming a pre-allocation device for the flash memory card at the logical level. Of course, in addition to software implementation, this application does not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. That is to say, the execution entity of the following processing flow is not limited to individual logic units, but can also be hardware or logic devices.

[0108] The network interface, the processor and the memory can be connected with each other through a bus system. The bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, Figure 6 Only one bidirectional arrow is used to represent the bus in the figure, but it does not mean that there is only one bus or only one type of bus.

[0109] The memory is used to store programs. Specifically, the programs can include program codes, and the program codes include computer operation instructions. The memory can include read-only memory and random access memory, and provide instructions and data for the processor. The memory can include high-speed random access memory (RAM), and can also include non-volatile memory such as at least one disk memory.

[0110] The processor is configured to execute the programs stored in the memory, and specifically execute:

[0111] establish a connection with the electronic device;

[0112] determine a target pre-allocation program matched with the electronic device from a plurality of preset pre-allocation programs;

[0113] send the target pre-allocation program to the electronic device through the connection, so that the electronic device performs pre-allocation processing on the flash memory card based on the target pre-allocation program when the flash memory card is installed and it is determined that the pre-allocation processing condition is met, to allocate a first storage unit of the flash memory card as a non-data area and allocate a second storage unit of the flash memory card as a data area.

[0114] The above as described in the present application Figure 3The pre-allocation method of the flash memory card disclosed by the embodiment of the pre-allocation device of the flash memory card can be applied to a processor or implemented by the processor. The processor can be an integrated circuit chip with signal processing capability. In the implementation process, each step of the above method can be completed by integrated logic circuits of hardware in the processor or instructions in the form of software. The above processor can be a general processor, including a central processing unit (CPU), a network processor (NP), etc.; can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. Each method, step and logic block disclosed in the embodiment of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the pre-allocation method of the flash memory card disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor for execution, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a random memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register or other mature storage medium in the art. The storage medium is located in the memory, and the processor reads the information in the memory and combines the hardware to complete the steps of the pre-allocation method of the flash memory card.

[0115] Based on the same technical concept, the embodiment of the present application also provides a computer readable storage medium, which stores one or more programs, and the one or more programs, when executed by an adjusting device including a plurality of application programs, cause an electronic device to execute the pre-allocation method of the flash memory card provided by the method embodiment.

[0116] Each embodiment in the specification is described in a progressive manner, and the same or similar parts between each embodiment can be referred to each other. Each embodiment focuses on the difference from other embodiments. Especially, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the related parts can be referred to the part of the method embodiment.

[0117] The above described embodiments of the present specification. Other embodiments are within the scope of the following claims. In some cases, the acts or steps recited in the claims can be performed in a different order than those in the embodiments and still achieve the desired result. In addition, the processes depicted in the figures do not necessarily require the particular order shown, or sequential order, to achieve the desired results. In certain implementations, multitasking and parallel processing can be advantageous or necessary.

[0118] Those skilled in the art will appreciate that embodiments of the present application can be devised for a method, a system, or a computer program product. Accordingly, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, etc.) embodying computer readable program code.

[0119] The present application is described in reference to the flowchart illustrations and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart illustrations and / or block diagrams block or blocks. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams block or blocks. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams block or blocks.

[0120] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the function specified in the flowchart illustrations and / or block diagrams block or blocks. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams block or blocks. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams block or blocks.

[0121] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart illustrations and / or block diagrams block or blocks. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams block or blocks. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams block or blocks.

[0122] In one typical arrangement, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0123] The memory can include non-persistent memory and / or volatile memory, such as random access memory (RAM) and / or cache memory, which can provide temporary storage for outgoing and incoming calls. The memory is an example of computer readable media.

[0124] Computer readable media includes permanent and non-permanent, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital versatile disc (DVD), or other optical storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to a computing device. According to the definition herein, computer readable media does not include transitory media, such as modulated data signals and carrier waves.

[0125] It is also important to note that the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without limitation, an element preceded by "comprises... a" does not, without more constraints, foreclose the existence of additional identical elements in the process, method, article, or apparatus that comprises the identified element.

[0126] Those skilled in the art will appreciate that embodiments of the present application can be devised for a method, a system, or a computer program product. Accordingly, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application can take the form of a computer program product on one or more computer readable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, etc.) embodying computer readable program code.

[0127] The above merely provides an example of the present application, and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the present application should be included in the scope of claims of the present application.

Claims

1. A flash memory card, characterized by comprising: The flash memory card comprises: a plurality of storage units with the same hardware structure; the storage units comprise a first number of first storage units and a second number of second storage units; the first storage units are arranged in series and located in front of the second storage units, and each of the first storage units is used for storing a third number of data; the second storage units are arranged in series, and each of the second storage units is used for storing a fourth number of data; the fourth number is greater than the third number; the first storage units comprise SLC single-layer cells, and the second storage units comprise at least one of MLC multi-layer cells, TLC three-layer cells and QLC four-layer cells.

2. The flash memory card of claim 1, wherein, The first storage units are allocated as non-data areas after a pre-allocation process, and the non-data areas comprise a file allocation table area and an index area; the second storage units are allocated as data areas after the pre-allocation process; the file allocation table area is located in front of the index area, and the file allocation table area is used for storing partition table information; the partition table information is used for opening and reading and writing files stored in the index area and the data area by an operating system of an electronic device installed with the flash memory card; the index area is used for storing an index file; the index file is used for searching a storage position of a corresponding content file in the data area; the data area is used for storing the content file.

3. The flash memory card according to claim 1, wherein a total data storage capacity of the first number of the first storage units is a preset capacity value; the preset capacity value is determined according to a capacity value of a non-data area of a target device; the non-data area comprises an index area and a file allocation table area; wherein the target device is determined in the following manner: in a plurality of electronic devices matched with the flash memory card, a capacity value of a non-data area of each of the electronic devices is calculated according to a data storage structure of each of the electronic devices; an electronic device corresponding to the maximum capacity value of the non-data area is determined as the target device.

4. The flash memory card according to claim 3, wherein the first storage units are used for storing data content of the non-data area of the electronic device installed with the flash memory card; the second storage units are used for storing data content of a data area of the electronic device installed with the flash memory card.

5. The flash memory card according to claim 1, wherein a total data storage capacity of the first number of the first storage units is less than a total data storage capacity of the second number of the second storage units.

6. The flash memory card of claim 1, wherein, The flash memory card further comprises: a master control board; the master control board is connected with each of the storage units and is used for controlling a data quantity stored by each of the storage units.

7. A method of preallocating a flash memory card, applied to an adjusting device matching the flash memory card of any one of claims 1 to 6, characterized in that, The method comprises: establishing a connection with an electronic device; determining a target pre-allocation program matched with the electronic device from a plurality of preset pre-allocation programs. The target pre-allocation program is sent to the electronic device through the connection, so that the electronic device performs pre-allocation processing on the flash memory card based on the target pre-allocation program to allocate a first storage unit of the flash memory card as a non-data area and a second storage unit of the flash memory card as a data area when the flash memory card is installed and it is determined that the pre-allocation processing condition is met.

8. The method of claim 7, wherein, The target pre-allocation program matched with the electronic device is determined from the plurality of pre-allocation programs, and the target pre-allocation program matched with the electronic device is determined from the plurality of pre-allocation programs, comprising: determining the device type of the electronic device; obtaining the associated pre-allocation program from the association between the device type and the pre-allocation program according to the device type; determining the target pre-allocation program matched with the electronic device from the obtained pre-allocation program.

9. A preallocation system for a flash memory card, characterized by, The flash memory card, the electronic device and the adjustment device matched with the flash memory card according to any one of claims 1-6 are provided; the flash memory card is installed in the electronic device; The adjustment device is connected with the electronic device; the target pre-allocation program matched with the electronic device is determined from the plurality of pre-allocation programs; The target pre-allocation program is sent to the electronic device through the connection; The electronic device receives the target pre-allocation program, and performs pre-allocation processing on the flash memory card based on the target pre-allocation program to allocate a first storage unit of the flash memory card as a non-data area and a second storage unit of the flash memory card as a data area when it is determined that the pre-allocation processing condition is met.

Citation Information

Patent Citations

  • File managing method and device

    CN103745007A