Semiconductor memory device and data storage method thereof
By storing similar data in adjacent physical storage pages in semiconductor memory devices and judging data similarity using embedded vector tables, the inefficiency problem caused by random read and write is solved, and more efficient data access is achieved.
Patent Information
- Application Number
- CN202311683810.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-11-16
- Filing Date
- 2023-12-08
- Publication Date
- 2025-05-16
AI Technical Summary
In existing semiconductor memory devices, read and write operations are usually random, resulting in lower read efficiency and search speed.
By storing similar data in an adjacent physical storage page in a semiconductor memory device, and judging the similarity of data using an embedded vector table, the continuous writing and reading of data is realized.
The read efficiency and search speed of semiconductor memory devices are improved, the chance of random reads is reduced, and the performance of data access is improved.
Smart Images

Figure CN120010752A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a semiconductor memory device and a data storage method thereof. Background Art
[0002] Semiconductor memory devices are at the core of modern electronic technology. They have a variety of uses and play an extremely important role in many fields. In terms of uses, (1) Data storage: For example, solid-state drives (SSDs) use semiconductor technology to store data, which is faster, longer-lasting, and more rugged than traditional mechanical hard drives. (2) Memory: Memory such as DRAM (dynamic random access memory) and SRAM (static random access memory) are core components in computers, mobile phones, and other electronic devices. (3) Cache storage: Used to store frequently used data to speed up access. (4) Embedded applications: Microcontrollers and some chips with specific functions contain embedded memory. (5) Mobile devices: Smartphones, tablets, and other portable devices rely on semiconductor memory devices to store operating systems, applications, and user data.
[0003] The importance of semiconductor memory devices is as follows: (1) Speed and performance: Semiconductor memory devices provide fast data access speeds, greatly improving the performance of computers and other electronic devices. (2) Durability and reliability: Compared with traditional mechanical storage devices, semiconductor memory devices are more robust and less susceptible to damage due to impact or vibration. (3) Energy saving: Semiconductor memory devices generally consume less energy, which helps to improve battery life, especially in mobile devices. (4) Small size: Semiconductor technology allows the manufacture of small and lightweight memory devices, which makes modern electronic devices thinner and lighter. (5) Technological progress and innovation: The continuous development of semiconductor memory devices has promoted technological progress, making new applications, functions and services possible.
[0004] In general, semiconductor memory devices are indispensable in today's electronic world, supporting the operation of various applications and enabling continuous technological advancement and innovation.
[0005] In the case of solid-state drives, sequential read and write speeds are faster than random read and write speeds. However, because of the Flash translation layer (FTL) in the SSD, most reads and writes are random. This is because the FTL maps the logical addresses of the operating system to the physical addresses of the SSD, making the actual locations of read and write operations discontinuous.
[0006] According to the file management (FM) method, related pictures are placed in the same folder, for example, a pet folder, a family folder, a travel folder, etc. This file management method helps users to easily find photos of a specific event or theme.
[0007] When opening different folders or searching for images by text, the purpose is to browse or find related images. Therefore, if similar images can be stored in adjacent physical storage pages of a semiconductor memory device, efficiency can be improved by continuous reading.
[0008] Therefore, how to achieve as much continuous reading as possible in a semiconductor memory device and thus improve the reading efficiency and search speed in the semiconductor memory device is one of the directions of the industry's efforts. Summary of the invention
[0009] According to a first aspect of the present invention, a data storage method of a semiconductor memory device is provided, wherein the semiconductor memory device comprises a memory array. The data storage method comprises the following steps: when it is determined that an input data conforms to a target format, generating an input data vector according to the input data; and when it is determined that the input data is similar to a storage data in a target block of the memory array, writing the input data to a blank target storage page of the target block of the memory array.
[0010] According to a second aspect of the present invention, a semiconductor memory device is provided, comprising: a control circuit; and a memory array coupled to the control circuit. The control circuit is configured to: generate an input data vector according to an input data when it is determined that an input data conforms to a target format; and write the input data to a blank target storage page of the target block of the memory array when it is determined that the input data is similar to a storage data in a target block of the memory array.
[0011] In order to better understand the above and other aspects of the present invention, the following embodiments are specifically described in detail with reference to the accompanying drawings as follows: BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 A functional block diagram of a semiconductor memory device according to an embodiment of the present disclosure is shown.
[0013] Figure 2 A flow chart of a data storage method of a semiconductor memory device according to an embodiment of the present disclosure is shown.
[0014] FIG. 3A to FIG. 3C The writing strategy of the embedded vector table according to an embodiment of the present disclosure is shown.
[0015] FIG. 4A to FIG. 4C The writing strategy of input data according to an embodiment of the present disclosure and the conventional technology is shown.
[0016] Figure 5A The present invention is applied to the file management of a personal computer. Figure 5B The application of an embodiment of the present disclosure to “search images by text” on a cloud server is displayed.
[0017]
Explanation of symbols
[0018] 100: Semiconductor memory device
[0019] 110: control circuit 120: memory array
[0020] 112: Host interface 114: Buffer management circuit
[0021] 116: Processing circuit 118: Memory interface
[0022] B0-B3: Block
[0023] 300: Embedding vector table 310-340: Steps
[0024] P0-P9: Storage page
[0025] L1-L5, N1-N6, E1-E8 and F1-F7: Imaging DETAILED DESCRIPTION
[0026] The technical terms in this specification refer to the customary terms in the technical field. If some terms are explained or defined in this specification, the interpretation of these terms shall be based on the explanation or definition in this specification. Each embodiment of the present disclosure has one or more technical features. Under the premise of possible implementation, those skilled in the art may selectively implement some or all of the technical features in any embodiment, or selectively combine some or all of the technical features in these embodiments.
[0027] In one embodiment of the present disclosure, images or data with high similarity are stored in adjacent physical storage pages of a semiconductor memory device. Due to user habits and file management, images or data with high similarity in the same folder have a high chance of being read at the same time. Therefore, data in the semiconductor memory device can be read continuously instead of randomly, thereby improving reading efficiency.
[0028] Figure 1A functional block diagram of a semiconductor memory device according to an embodiment of the present disclosure is shown. A semiconductor memory device 100 according to an embodiment of the present disclosure includes: a control circuit 110 and a memory array 120. The memory array 120 is coupled to the control circuit 110. Of course, the semiconductor memory device 100 may also include other components, which are omitted here. The semiconductor memory device 100 has a continuous read and write mode and a random read and write mode, and the continuous read and write speed is higher than the random read and write speed.
[0029] The control circuit 110 includes: a host interface 112, a buffer management circuit 114, a processing circuit 116, and a memory interface 118. Of course, the control circuit 110 may also include other components, which are omitted here.
[0030] The control circuit 110 receives input data from a host (not shown) through a host interface 112. Here, the host is, for example, a personal computer, a notebook computer, a cloud server, etc. The semiconductor memory device 100 is installed in the host, or is coupled to the host through other communication protocols (such as but not limited to USB), which is within the scope of the present disclosure.
[0031] The buffer management circuit 114 is coupled to the host interface 112, the processing circuit 116, and the memory interface 118. The buffer management circuit 114 can perform buffer management. Details of the buffer management circuit 114 are omitted here.
[0032] The processing circuit 116 is coupled to the host interface 112, the buffer management circuit 114 and the memory interface 118. The processing circuit 116 performs a storage strategy on the received input data so that the received input data is stored in the memory array 120 according to the storage strategy. The storage strategy of the processing circuit 116 will be described later.
[0033] The memory interface 118 is coupled to the buffer management circuit 114 and the processing circuit 116. The control circuit 110 is coupled to the memory array 120 through the memory interface 118. The memory array 120 includes a plurality of blocks, and each block includes a plurality of storage pages. For example, through the storage strategy of the processing circuit 116, night scene images are stored in block B0; pet images are stored in block B1; leaf images are stored in block B2; and alpaca images are stored in block B3. That is, highly similar data is stored in consecutive physical storage pages of the same block to increase the possibility of consecutive reading.
[0034] Figure 2 The flowchart of the data storage method of the semiconductor memory device 100 according to one embodiment of the present disclosure is shown. That is, Figure 2is the storage strategy of the processing circuit 116 .
[0035] Step 205, receiving input data.
[0036] Step 210, determine whether the received input data conforms to the target format. Here, the target format is taken as an example of "image format", but it should be known that the present disclosure is not limited to this. In other possible embodiments of the present disclosure, the target format can also be: video format, music format, etc. That is, the target format includes: an image format, a video format, and / or a music format. When step 210 is no, the process continues to step 215. When step 210 is yes, the process continues to step 220.
[0037] In step 215 (when the input data does not conform to the target format), the input data is stored in a blank block of the memory array 120 of the semiconductor memory device 100 .
[0038] In step 220 (when the input data conforms to the target format), an input data vector is generated according to the input data using an embedding model. For example, but not limited to, the input data vector is a one-dimensional vector. Of course, the present disclosure is not limited thereto. In other possible embodiments of the present disclosure, the input data vector is a multi-dimensional vector. This is also within the spirit of the present disclosure.
[0039] Step 225 , determining whether the embedding vector table is empty. When the answer to step 225 is no, the process proceeds to step 235 . When the answer to step 225 is yes, the process proceeds to step 230 .
[0040] Step 230 (when the embedded vector table is blank) writes the input data to a blank block of the memory array 120 of the semiconductor memory device 100, and writes the input data vector to the embedded vector table. That is, in one embodiment of the present disclosure, when the input data is written to a blank block of the memory array 120 of the semiconductor memory device 100, the input data vector of the input data is also written to the embedded vector table. Therefore, in one embodiment of the present disclosure, the input data vector of the input data stored in the memory array 120 will be written to the embedded vector table.
[0041] In step 235 (when the embedding vector table is not blank), at least one similarity between the input data vector of the input data and at least one target vector is calculated. Here, the “target vector” refers to the vector of data stored in the last non-blank storage page in each non-blank block of the memory array 120. The similarity may be, for example but not limited to, Euclidean distance, Manhattan distance, Minkowski distance, Chebyshev distance, cosine similarity, etc. That is, in step 235, the input data is compared with the data stored in the last non-blank storage page in each non-blank block of the memory array 120.
[0042] In step 240, it is determined whether at least one similarity between the input data vector of the input data and at least one target vector is higher than a similarity threshold. Here, the similarity threshold is, for example but not limited to, 0.75. The value of the similarity threshold can be set according to the accuracy of the embedded model. When step 240 is yes (indicating that the input data is highly similar to one of the data currently stored in the memory array 120), the process continues to step 245. In other words, in step 240, it is determined whether the input data is highly similar to the storage data of the last non-blank storage page in all non-blank blocks of the memory array 120.
[0043] When the answer of step 240 is no (meaning the input data is not highly similar to all the data currently stored in the memory array 120 ), the process continues to step 230 .
[0044] In step 245, the input data is written to a subsequent adjacent blank target storage page of a target block of the memory array 120 of the semiconductor memory device 100, and the input data vector is written to the embedded vector table. Here, the target block refers to the storage data of the last non-blank storage page in the target block of the memory array 120 that is highly similar to the input data, so the input data is written to the subsequent adjacent blank target storage page in the target block. That is to say, in one embodiment of the present disclosure, highly similar data is stored in adjacent physical storage locations. In this way, when searching / reading, there is an opportunity to read these highly similar data continuously to improve reading efficiency.
[0045] To make the storage strategy of an embodiment of the present disclosure more clear, please refer to FIG. 3A to FIG. 3C, which shows the writing strategy of the embedded vector table according to an embodiment of the present disclosure. The embedded vector table 300 is stored in the processing circuit 116. The embedded vector table 300 includes multiple fields, and three fields are used as examples for explanation, but it should be known that the present disclosure is not limited thereto. The embedded vector table 300 includes: a vector field, a block field, and a storage page field. The vector field is used to store vectors, the block field indicates in which block the storage data related to the vector is stored, and the storage page field indicates in which storage page the storage data related to the vector is stored.
[0046] like Figure 3A As shown, the embedded vector table 300 currently has 3 vectors.
[0047] like Figure 3B As shown, the input vector [0.060.30…-0.19] is compared to the second vector [0.110.38…-0.21] and the third vector [-0.78-0.24…0.19], wherein the second vector corresponds to the storage data of the last non-blank storage page (127) of block 23, and the third vector corresponds to the storage data of the last non-blank storage page (65) of block 10. In step 310, it is determined that the input vector is highly similar to the third vector. Therefore, in step 320, the input vector is written to the fourth position of the vector field, and the input data related to the input vector is written to the adjacent blank storage page (66) of block 10. Although in Figure 3B In the embodiment, the input vector is compared with the vector of the storage data of the last non-blank storage page of the non-blank block, but in other possible embodiments of the present disclosure, the input vector may also be compared with the vector of the storage data of any non-blank storage page of the non-blank block, which is also within the scope of the present disclosure.
[0048] like Figure 3C As shown, the input vector is compared to the second vector and the third vector. In step 330, it is determined that the input vector is not highly similar to the second vector and the third vector. Therefore, in step 340, the input vector is written to the fourth position of the vector field, and the input data related to the input vector is written to the first blank storage page (0) of the blank block (13).
[0049] To make the storage strategy of an embodiment of the present disclosure more clear, please refer to FIG. 4A to FIG. 4C , which shows the writing strategy of input data according to an embodiment of the present disclosure and the conventional technology. Figure 4A In the embodiment, the memory array 120 includes a plurality of blocks, each of which includes a plurality of storage pages. For example, the memory array 120 includes blocks B0-B3, and each of which includes storage pages P0-P9. However, it should be noted that the present disclosure is not limited thereto.
[0050] Figure 4B Shows the writing strategy of input data of the conventional technology. Figure 4C The writing strategy of input data according to an embodiment of the present disclosure is shown. Figure 4B and Figure 4C In the figure, L1-L5 represent 5 alpaca images, N1-N6 represent 6 night scene images, E1-E8 represent 8 pet images, and F1-F7 represent 7 leaf images. Of course, this is just for illustration.
[0051] like Figure 4B As shown, in the conventional technology, the alpaca images L1 - L5 , the night scene images N1 - N6 , the pet images E1 - E8 and the leaf images F1 - F7 are written into the memory array 120 in a random writing mode.
[0052] like Figure 4C As shown, in one embodiment of the present disclosure, the images are written into the memory array 120 according to the similarity between the images. For example, but not limited to, the alpaca images L1-L5 are written into the storage pages P0-P4 of block B0; the night scene images N1-N6 are written into the storage pages P0-P5 of block B1; the pet images E1-E8 are written into the storage pages P0-P7 of block B2; and the leaf images F1-F7 are written into the storage pages P0-P6 of block B3.
[0053] In the storage strategy of traditional technology, even input data with high similarity is still randomly written to different storage pages (such as Figure 4B ). In this way, when the user searches for these input data with high similarity, they can only use random reading to read these input data. Since the random reading speed is slower than the continuous reading speed, Figure 4B The reading efficiency is poor.
[0054] On the contrary, through the storage strategy of an embodiment of the present disclosure, input data with high similarity can be written into multiple adjacent physical storage pages of the same block (such as Figure 4C ). In this way, when the user searches for these input data with high similarity, these input data can be read continuously. Since the continuous reading speed is higher than the random reading speed, Figure 4C The reading efficiency is better than Figure 4B Reading efficiency.
[0055] Here, the storage page of the memory array 120 is 4KB, the continuous read speed is 7000MB / s, and the random read speed is 1000K IOPS (input / output operations per second) as an example for explanation, but it should be understood that the present disclosure is not limited to this. Accordingly, the time required to read a single storage page in the continuous read mode is: 4KB / 7000MB=5.71×10 -7 (s), the time required to read a single storage page in random read mode is: 1 / 1000K = 1×10 -6 (s).
[0056] exist Figure 4B In the example, the reading of 6 night scene images N1-N6 is taken as an example. Since the night scene images N1 and N2 are stored in adjacent storage pages and the night scene images N3-N6 are stored in non-adjacent storage pages, when reading the night scene images N1-N6, there will be 1 continuous read and 5 random reads. Therefore, the total read time is: 5×1×10 -6 (s)+1×5.71×10 -7 (s) = 5.571 × 10 -6 (s).
[0057] On the contrary, Figure 4C In the example, the reading of 6 night scene images N1-N6 is taken as an example. Since the night scene images N1-N6 are stored in adjacent storage pages, there will be 1 random read and 5 continuous reads when reading the night scene images N1-N6. Therefore, the total reading time is: 1×1×10 -6 (s)+5×5.71×10 -7 (s) = 3.855 × 10 -6 (s).
[0058] Figure 4C The reading time of the disclosed embodiment is Figure 4B Reading time of traditional technology: 3.855×10 -6 (s) / 5.571×10 -6 (s) = 69%. That is, about 31% of the reading time can be saved.
[0059] Assume that a block has N (N is a positive integer) storage pages. If we look at the worst case, in the conventional technology, the N images are all randomly read, but in an embodiment of the present disclosure, the N images are all read continuously. Then the reading time that can be saved by an embodiment of the present disclosure is as shown in formula (1):
[0060]
[0061] In formula (1), “with strategy” and “without strategy” represent the read time of an embodiment of the present disclosure and the read time of the conventional technology, respectively; “random read time” and “sequential read time” represent the random read time and the sequential read time, respectively.
[0062] It can be seen from formula (1) that an embodiment of the present disclosure can indeed effectively shorten the reading time.
[0063] Figure 5A The present invention is applied to the file management of a personal computer. Figure 5B The application of an embodiment of the present disclosure to “search images by text” on a cloud server is displayed.
[0064] The embodiments of the present disclosure can be used in an image data center. By replacing different embedding models, it can also be used for streaming media services and music platforms (for example, but not limited to, such as Netflix, YouTube, Apple Music, etc.). For example, when the embodiments of the present disclosure are applied to streaming services, movies of the same type (such as action movies, etc.) can be placed in adjacent physical storage locations, or the same series of movies (such as Harry Potter movies Episodes 1 to 6) can be placed in adjacent physical storage locations. Therefore, the embodiments of the present disclosure are highly flexible, allowing the embedding model to be replaced or adjusted to adapt to different applications and to improve data reading efficiency.
[0065] File-specific servers can also improve data search efficiency by storing similar data or data from the same author in adjacent storage pages.
[0066] According to the NVME Zoned Namespaces (ZNS) command set specification in the NVME 2.0 specification released by the Non-Volatile Memory Express (NVME) organization, an embodiment of the present disclosure can be easily implemented in a host computer.
[0067] As described above, in one embodiment of the present disclosure, storing highly similar data in adjacent physical storage locations of a memory array of a semiconductor device can improve the speed of searching or browsing data. The optimized data storage strategy of one embodiment of the present disclosure can reduce the probability of random reading because similar data may be read together at similar times or in similar situations.
[0068] Although the present disclosure may describe many specific details, these should not be understood as limiting the scope of the claimed invention, but should be regarded as descriptions of the characteristics of specific embodiments. In the present disclosure, certain characteristics described in the context of a single embodiment may also be implemented in a single embodiment in combination. Conversely, the various characteristics described in the context of a single embodiment may also be implemented in multiple embodiments alone or in any appropriate sub-combination. In addition, although the characteristics may initially be described as working in certain combinations, or even initially described as such a combination, in some cases, one or more characteristics may be deleted from the combination, and the described combination may be for a sub-combination or a variation of the sub-combination. Similarly, although the operations are depicted in the diagrams as being performed in a particular order, this should not be understood as requiring that the operations must be performed in the particular order or sequence shown, or that all depicted operations must be performed to achieve the desired result.
[0069] Although the above embodiments of the present disclosure only disclose some examples and implementations, according to the disclosed content, the examples and implementations and other implementations may be changed, modified and enhanced.
[0070] In summary, although the present invention has been disclosed in the above embodiments, it is not intended to limit the present invention. Those skilled in the art to which the present invention belongs may make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention shall be defined by the scope of the attached claims.
Claims
1. A data storage method of a semiconductor memory device, characterized in that: The semiconductor memory device includes a memory array, and the data storage method includes the following steps: When it is determined that an input data conforms to a target format, an input data vector is generated according to the input data; as well as When it is determined that the input data is similar to a stored data in a target block of the memory array, the input data is written to a blank target storage page of the target block of the memory array.
2. The data storage method of the semiconductor memory device according to claim 1, wherein: Also includes: Determine whether an embedded vector table is empty.
3. The data storage method of the semiconductor memory device according to claim 2, wherein: in, The step of determining whether the input data is similar to the stored data in the target block of the memory array comprises: When it is determined that the embedded vector table is not blank, a similarity between the input data vector of the input data and a target vector is calculated to determine whether the input data is similar to the stored data of the target block of the memory array, wherein the target vector is related to a stored data in a non-blank storage page of the target block of the memory array.
4. The data storage method of the semiconductor memory device according to claim 3, wherein: in, The target vector is a vector of storage data of a last non-blank storage page of the target block of the memory array; When the similarity between the input data vector of the input data and the target vector is lower than a similarity threshold, it is determined that the input data is not similar to the stored data of the target block of the memory array; as well as When it is determined that the input data is not similar to the stored data of the target block of the memory array, the input data is written into a blank block of the memory array, and the input data vector is written into the embedded vector table.
5. The data storage method of the semiconductor memory device according to claim 3, wherein: in, The target vector is a vector of storage data of a last non-blank storage page of the target block of the memory array; When the similarity between the input data vector of the input data and the target vector is higher than a similarity threshold, determining that the input data is similar to the stored data of the target block of the memory array; as well as When it is determined that the input data is similar to the stored data of the target block of the memory array, the input data is written to a subsequent adjacent blank target storage page of the target block of the memory array, and the input data vector is written to the embedded vector table.
6. A semiconductor memory device, characterized in that: include: a control circuit; as well as a memory array coupled to the control circuit, The control circuit architecture is composed of: When it is determined that an input data conforms to a target format, an input data vector is generated according to the input data; as well as When it is determined that the input data is similar to a stored data in a target block of the memory array, the input data is written to a blank target storage page of the target block of the memory array.
7. The semiconductor memory device according to claim 6, wherein: in, The control circuit architecture is composed of: Determine whether an embedded vector table is empty.
8. The semiconductor memory device according to claim 7, wherein: in, When it is determined that the input data is similar to the stored data in the target block of the memory array, the control circuit structure is configured as follows: When it is determined that the embedded vector table is not blank, a similarity between the input data vector of the input data and a target vector is calculated to determine whether the input data is similar to the stored data of the target block of the memory array, wherein the target vector is related to a stored data in a non-blank storage page of the target block of the memory array.
9. The semiconductor memory device according to claim 8, wherein: in, The target vector is a vector of storage data of a last non-blank storage page of the target block of the memory array; The control circuit architecture is composed of: When the similarity between the input data vector of the input data and the target vector is lower than a similarity threshold, it is determined that the input data is not similar to the stored data of the target block of the memory array; as well as When it is determined that the input data is not similar to the stored data of the target block of the memory array, the input data is written into a blank block of the memory array, and the input data vector is written into the embedded vector table.
10. The semiconductor memory device according to claim 8, wherein: in, The target vector is a vector of storage data of a last non-blank storage page of the target block of the memory array; The control circuit architecture is composed of: When the similarity between the input data vector of the input data and the target vector is higher than a similarity threshold, determining that the input data is similar to the stored data of the target block of the memory array; as well as When it is determined that the input data is similar to the stored data of the target block of the memory array, the input data is written to a subsequent adjacent blank target storage page of the target block of the memory array, and the input data vector is written to the embedded vector table.