Data storage method, device, equipment and computer readable storage medium
By selecting target logical storage cells in phase-change memory and adopting a non-adjacent write order, the problem of weak reliability page stacking in multi-phase-change memory is solved, thereby improving the reliability and stability of data storage.
Patent Information
- Application Number
- CN202611210781.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-11
- Publication Date
- 2026-11-24
AI Technical Summary
In the concurrent access architecture of multiphase change memory, due to the manufacturing process deviation of phase change memory, cells in the same physical location have similar reliability characteristics, resulting in the superposition of weak reliability pages, which seriously affects the reliability of data storage.
By responding to data storage requests, the reliability level requirements of the target stored data are determined, the target logical storage unit is selected, and the data is written into the phase change memory in a preset non-adjacent write order to avoid the superposition of multiple weak reliability logical storage units.
It improves the reliability of data storage, avoids the overall reliability decline caused by the superposition of weak reliability logical storage units, and enhances the stability of the storage system.
Smart Images

Figure CN123157129A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of storage technology, and in particular to a data storage method, apparatus, device, and computer-readable storage medium. Background Technology
[0002] Phase change memory (PCM) uses phase change materials to switch between crystalline and amorphous states at different temperatures to store data. It has advantages such as non-volatility, byte addressing, and read speed comparable to DRAM, and is regarded as an important candidate technology for future main memory and storage-class memory.
[0003] To accelerate access speed, storage systems typically incorporate multiple phase-change memories (PCOs), employing simultaneous access to these PCOs and utilizing bank read / write concurrency technology to read multiple data entries at once. However, due to manufacturing variations in PCOs, cells at the same physical location within the same batch or different PCOs often exhibit similar reliability characteristics. In a multi-PCO concurrent access architecture, if pages at the same physical location from different PCOs are simultaneously combined into a single access cell, and that location happens to be a weak page (a page with low reliability), multiple weak pages will overlap, causing a sharp decline in the overall reliability of that concurrent access cell and severely impacting the reliability of data storage. Summary of the Invention
[0004] In view of the above, the purpose of this application is to overcome the shortcomings of the prior art and provide a data storage method, the method being applied to a storage system including a phase-change memory, the method comprising: In response to a data storage request, the target stored data and the reliability level requirements of the target stored data are determined based on the data storage request; Based on the reliability level requirements and the target reliability label of each logical storage unit, target logical storage units are selected in the phase change memory of the storage system, and target logical storage unit groups are constructed based on the target logical storage units. The target storage data is allocated to the target logical storage unit group, and the target storage data is written to the physical storage unit inside the target logical storage unit according to a preset non-adjacent write order.
[0005] In one embodiment, the step of selecting a target logical memory cell in the phase-change memory of the storage system based on the reliability level requirements and the target reliability tag for each logical memory cell includes: Obtain the target reliability marker and location region for each logical memory cell in each phase-change memory; Based on the reliability level requirements, determine the proportion of weak reliability logical storage units in the target logical storage unit group; Based on the ratio, the target reliability marker, and / or the location region, a target logical memory cell is selected in the phase-change memory of the storage system.
[0006] In one embodiment, the method further includes: For each logical memory cell in each phase-change memory, each logical memory cell is tested according to a preset test procedure, and an initial reliability label for each logical memory cell is determined based on the test results. During the operation of the storage system, the preset reliability index of each logical storage unit is continuously monitored, and the target reliability mark of each logical storage unit is determined based on the monitoring results and the initial reliability mark.
[0007] In one embodiment, the step of writing the target storage data into the physical storage unit inside the target logical storage unit according to a preset non-adjacent write order includes: The target storage data is segmented according to a preset segmentation rule to determine the target storage data segment corresponding to each target logical storage unit; Obtain the logical storage address of the target storage data segment, determine the target word line address and the target bit line address based on the logical storage address and the preset mapping relationship of the target logical storage unit, and determine the physical storage address of each target storage data unit in the target storage data segment in the target logical storage unit based on the target word line address and the target bit line address, wherein the physical storage addresses corresponding to each target storage data unit are non-adjacent; According to the logical storage address corresponding to each target storage data unit, each target storage data unit is written into the physical storage unit inside the target logical storage unit.
[0008] In one embodiment, prior to the step of determining target stored data and the reliability level requirement of the target stored data based on the data storage request in response to the data storage request, the method includes: For each phase-change memory in the storage system, identify the physical structure of the phase-change memory; Based on the physical structure, identify physical memory cells in the phase-change memory where word lines and bit lines are independent of each other or isolated by dummy, and use them as target physical memory cells. Based on preset combination rules and the target physical storage units, the logical storage units of the phase-change memory are constructed. The preset combination rules are to combine the target physical storage units in the phase-change memory that are physically independent and have consistent reliability characteristics into the logical storage units.
[0009] In one embodiment, after the step of writing the target storage data into the physical storage unit inside the target logical storage unit according to a preset non-adjacent write order, the method includes: Update the preset address mapping table based on the result of writing the target storage data into the physical storage unit; In response to the read instruction of the target stored data, the logical address of the target stored data is parsed, and the address mapping table is queried based on the logical address to determine the physical address of the target stored data; Based on the physical address, the target stored data is read from the physical storage unit inside the target logical storage unit.
[0010] In one embodiment, the method further includes: Scan the data stored in each logical storage unit and count the amount of invalid data stored in each logical storage unit; The logical storage unit with the largest amount of invalid data is identified as the reclaimed logical storage unit, and the valid data in the reclaimed logical storage unit is migrated to a new logical storage unit so that the reclaimed logical storage unit can be redistributed.
[0011] This application also provides a data storage device, the data storage device comprising: A response module is used to respond to a data storage request and determine the target stored data and the reliability level requirements of the target stored data based on the data storage request. The construction module is used to select target logical storage units in the phase change memory of the storage system according to the reliability level requirements and the target reliability label of each logical storage unit, and to construct a target logical storage unit group based on the target logical storage units. The write module is used to allocate the target storage data to the target logical storage unit group and write the target storage data into the physical storage unit inside the target logical storage unit according to a preset non-adjacent write order.
[0012] This application also provides a computer device, which includes a processor and a memory, the memory storing a computer program, and the processor executing the computer program to implement the data storage method described above.
[0013] This application also provides a computer-readable storage medium storing a computer program that executes the above-described data storage method when run on a processor.
[0014] The embodiments of this application have the following beneficial effects: In response to a data storage request, this embodiment determines the target stored data and its reliability level requirements based on the data storage request. According to the reliability level requirements and the target reliability flag for each logical storage unit, target logical storage units are selected in the phase-change memory (PCM) of the storage system, and a target logical storage unit group is constructed based on these target logical storage units. The target stored data is allocated to the target logical storage unit group and written to the physical storage units within the target logical storage units according to a preset non-adjacent write order. By combining the reliability level requirements of the target stored data and the preset target reliability flag for each logical storage unit in the storage system, a target logical storage unit group for storing the target stored data is determined. This avoids the situation where multiple weakly reliable logical storage units are superimposed when the target logical storage units in the PCM are combined into a single logical storage unit group, thus improving the reliability of data storage. Attached Figure Description
[0015] To more clearly illustrate the technical solutions of this application, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of this application and therefore should not be considered as a limitation on the scope of protection of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 A flowchart illustrating the first embodiment of the data storage method provided in this application; Figure 2 A flowchart illustrating a second embodiment of the data storage method provided in this application; Figure 3 A flowchart illustrating a third embodiment of the data storage method provided in this application; Figure 4 A schematic diagram of the distribution of physical storage units in which each target storage data unit is written into the target logical storage unit, as provided in this application; Figure 5 A flowchart illustrating the fourth embodiment of the data storage method provided in this application; Figure 6 A schematic diagram of the physical structure of the phase-change memory provided in this application; Figure 7 A flowchart illustrating the fifth embodiment of the data storage method provided in this application; Figure 8 A schematic diagram of the data storage device provided in this application. Detailed Implementation
[0017] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.
[0018] The components of the embodiments of this application described and illustrated in the accompanying drawings can be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of this application provided in the drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0019] In the following, the terms “comprising,” “having,” and their cognates, which may be used in various embodiments of this application, are intended only to indicate a particular feature, number, step, operation, element, component, or combination thereof, and should not be construed as excluding, firstly, the presence of one or more other features, numbers, steps, operations, elements, components, or combinations thereof, or adding the possibility of one or more features, numbers, steps, operations, elements, components, or combinations thereof.
[0020] Furthermore, the terms "first," "second," and "third" are used only to distinguish descriptions and should not be interpreted as indicating or implying relative importance.
[0021] Unless otherwise specified, all terms used herein (including technical and scientific terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which the various embodiments of this application pertain. Terms (such as those defined in commonly used dictionaries) shall be interpreted as having the same meaning as in their contextual meaning in the relevant technical field and shall not be construed as having an idealized or overly formal meaning, unless clearly defined in the various embodiments of this application.
[0022] It is understood that the method of this application is applied to a storage system, which includes multiple phase-change memories. For ease of explanation, the following embodiments use a storage system as an example for detailed description.
[0023] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0024] Please refer to Figure 1 , Figure 1This is a flowchart illustrating a first embodiment of the data storage method provided in this application. The method is applied to a storage system including a phase-change memory, and includes: Step S101: In response to the data storage request, determine the target stored data and the reliability level requirements of the target stored data based on the data storage request.
[0025] In this embodiment, the storage system connects to the host and, in response to a data storage request sent by the host, determines the target stored data and its reliability level requirements based on the data storage request. It should be noted that different target stored data have different reliability level requirements. For example, the loss of critical metadata (such as FTL mapping tables, ECC information, and system logs) may lead to system crashes and requires a higher reliability level, while ordinary user data has relatively lower reliability requirements, and temporary cached data has the lowest reliability requirements.
[0026] Step S102: Based on the reliability level requirements and the target reliability label of each logical storage unit, select a target logical storage unit in the phase change memory of the storage system, and construct a target logical storage unit group based on the target logical storage unit.
[0027] In this embodiment, the storage system selects target logical memory cells from the phase-change memory (PCM) within the storage system based on reliability level requirements and the target reliability label for each logical memory cell, and constructs a target logical memory cell group based on these target logical memory cells. It should be noted that the storage system may contain multiple PCMs or only one PCM; each PCM is pre-divided into multiple logical memory cells, which are obtained by combining physically independent and consistent physical memory cells with the same reliability characteristics within the PCM based on preset rules. After dividing each PCM into multiple logical memory cells, the storage system pre-tests the reliability of each logical memory cell and then labels each logical memory cell with a target reliability label. The source of each target logical memory cell in the target logical memory cell group is not limited to a single PCM, but rather, under the premise of meeting the aforementioned reliability level requirements, multiple logical memory cells are selected from different PCMs for pairing. Although the multiple logical memory cells come from different chips, different Qs, and different sub-regions, they have the same row number (for address alignment), consistent bank number (to ensure bank-level parallel control synchronization), and the overall weakpage ratio is controllable after evaluation. More importantly, this cross-chip selection is not random, but intentionally avoids "homogeneous fragility": for example, it avoids selecting all rows from the same manufacturing batch or all rows located in the thermally sensitive area at the edge of the die; if a row of a phase change memory is marked as weak reliability, the memory system will actively pair it with another row of the same number in another phase change memory but marked as high reliability to achieve complementary balance.
[0028] In one embodiment, the storage system includes multiple phase-change memories. The storage system determines the proportion of weak reliability logical storage units in the target logical storage unit group according to the reliability level requirements, and determines the required number of target logical storage units according to the data length of the target stored data. Then, based on the proportion of weak reliability logical storage units and the required number of target logical storage units, combined with the target reliability label of each logical storage unit, the target logical storage unit is selected from the multiple phase-change memories to construct the target logical storage unit group.
[0029] In one embodiment, the storage system includes a phase-change memory, in which the storage system directly selects a target logical storage cell to construct a target logical storage cell group.
[0030] It should be noted that the method for determining the target reliability rating of each logical storage unit is to read the same address at the write interval and determine the reliability level based on the number of bits flipped. Manufacturers typically provide a table mapping the read interval and bit flipping count to the reliability level. The reliability of multiple media combinations is also based on the same principle: determining the reliability level based on the read interval and bit flipping count. The specific thresholds and read intervals are determined based on manufacturer recommendations and reliability requirements. This method is a mature engineering approach.
[0031] Step S103: Allocate the target storage data to the target logical storage unit group, and write the target storage data into the physical storage unit inside the target logical storage unit according to a preset non-adjacent write order.
[0032] In this embodiment, after determining the target logical storage unit group for the target stored data, the storage system allocates the target stored data to the target logical storage unit group and writes the target stored data into the physical storage unit inside the target logical storage unit according to a preset non-adjacent write order.
[0033] The storage system of this embodiment, in response to a data storage request, determines the target stored data and the reliability level requirements of the target stored data based on the data storage request; according to the reliability level requirements and the target reliability label of each logical storage unit, it selects target logical storage units from multiple phase-change memories in the storage system, and constructs target logical storage unit groups based on the target logical storage units; it allocates the target stored data to the target logical storage unit groups, and writes the target stored data into the physical storage units inside the target logical storage units according to a preset non-adjacent write order. By combining the reliability level requirements of the target stored data and the preset target reliability label of each logical storage unit in the storage system, the target logical storage unit group for storing the target stored data is determined, avoiding the superposition of multiple weakly reliable logical storage units when combining target logical storage units from multiple phase-change memories into a single logical storage unit group, thus improving the reliability of data storage.
[0034] Please refer to Figure 2 , Figure 2 This is a flowchart illustrating a second embodiment of the data storage method provided in this application. The difference between the second embodiment and the first embodiment is that the step of selecting a target logical storage unit from multiple phase-change memories in the storage system based on the reliability level requirements and the target reliability label of each logical storage unit includes: Step S201: Obtain the target reliability marker and location region for each logical storage cell in each phase-change memory.
[0035] In this embodiment, the storage system obtains the target reliability marker and location region for each logical storage cell in each phase-change memory.
[0036] It should be noted that the target reliability flag for each logical memory cell in each phase-change memory is set in advance. Of course, the target reliability flag for each logical memory cell will also be updated during the operation of the storage system.
[0037] It should be noted that each logical memory unit includes multiple physical memory units, and each physical memory unit has a unique number. These numbers constitute the location area of the logical memory unit. For example, the storage system includes 9 phase-change memories, numbered PCM[0:8]; each phase-change memory includes 16 banks, numbered [0:15], each bank includes 2 Qs, numbered [0:1], labeled from left to right according to their physical location; each Q includes 256 blocks, each block corresponding to 1 bit, numbered [0:255]; each block is divided into 4 regions, numbered [0:3], labeled from left to right and from top to bottom according to their physical location; each region includes 1024 rows (physical memory units), numbered [0:1023], labeled from left to right and from top to bottom according to their physical location. The physical storage unit is numbered as PCM[0][1][1][2]
[123] , and the location area of the physical storage unit is PCM0, bank1, Q1, area 2, row 123.
[0038] Step S202: Determine the proportion of weak reliability logical storage units in the target logical storage unit group according to the reliability level requirements.
[0039] In this embodiment, the storage system determines the proportion of weak reliability logical storage units in the target logical storage unit group based on the reliability level requirements of the target stored data. It should be noted that different reliability levels correspond to different proportions of weak reliability logical storage units. For critical data with high reliability requirements, the number of weak reliability logical storage units in the target logical storage unit group is reduced or even zero, prioritizing the use of strong reliability logical storage units. For ordinary data with moderate reliability requirements, weak reliability logical storage units are evenly distributed across the target logical storage unit groups to avoid a single target logical storage unit group having too many weak reliability logical storage units concentrated in it.
[0040] For example, depending on the different usage requirements of the target stored data (such as system metadata, user data, log cache, etc.), the following scenarios apply: If the target stored data is a high-reliability media type: the proportion of weak-reliability logical storage units in the target logical storage unit group is ≤5%, and the target stored data is critical metadata (FTL mapping table, ECC verification information, system configuration data, etc.); If the target stored data is a standard media type: the proportion of weak-reliability logical storage units in the target logical storage unit group is ≈ the system average, and the target stored data is ordinary user data; If the target stored data is a high-throughput media type: the proportion of weak-reliability logical storage units in the target logical storage unit group is ≤50%, and the target stored data is temporary cache, log buffer, etc., which have low reliability requirements but require high throughput.
[0041] Step S203: Select a target logical memory cell in the phase-change memory of the storage system according to the ratio, the target reliability mark and / or the location region.
[0042] In this embodiment, the storage system selects target logical storage cells in the phase-change memory of the storage system based on the proportion of weak reliability logical storage cells in the target logical storage cell group, the target reliability mark of each logical storage cell group, and / or the location area of each target logical storage cell group.
[0043] In one embodiment, the storage system selects target logical storage units from multiple phase-change memories (PCMs) in the storage system based on the proportion of weakly reliable logical storage units in the target logical storage unit group and the target reliability label of each logical storage unit group. Specifically, the logical storage units of each PCM are divided into a set of weakly reliable logical storage units and a set of strongly reliable logical storage units according to the target reliability label; based on the proportion of weakly reliable logical storage units in the target logical storage unit group, and the sets of weakly reliable and strongly reliable logical storage units, the weakly reliable and strongly reliable logical storage units are mixed and allocated according to this proportion, thereby selecting the target logical storage unit from multiple PCMs.
[0044] In one embodiment, the storage system selects target logical memory cells from multiple phase-change memories (PCMs) within the storage system based on the proportion of weakly reliable logical memory cells in the target logical memory cell group and the location region of each logical memory cell group. Looking at the reliability label distribution from a certain media manufacturer, the reliability labels of the four regions within the same block exhibit a symmetrical trend. The symmetrical grouping strategy utilizes this characteristic to simplify the grouping rules. According to the media characteristic diagram, combining the upper left and upper right regions of a block, or combining the lower left and lower right regions, results in complementary reliability characteristics. The combined regions are then classified for reliability based on the number of weak rows. Logical pages with no weak rows are considered the highest quality.
[0045] Understandably, the storage system combines the reliability level requirements of the target stored data with the target reliability markers and location areas of each logical storage unit preset by the storage system to determine the target logical storage unit group for storing the target stored data. This avoids the situation where multiple weakly reliable logical storage units are superimposed when multiple phase-change memory units are combined into one logical storage unit group, causing system-level reliability hotspots. This achieves a balanced distribution of strong and weakly reliable logical storage units within the target logical storage unit group for storing data in a multi-phase-change memory environment, which helps to improve the reliability of data storage.
[0046] In one embodiment, the method further includes: For each logical storage cell in each phase-change memory, each logical storage cell is tested according to a preset test procedure, and an initial reliability label for each logical storage cell is determined based on the test results.
[0047] In this embodiment, the storage system tests each logical memory cell in each phase-change memory (PCM) according to a preset test procedure, and determines the initial reliability denominator for each logical memory cell based on the test results. It should be noted that the reliability of each logical memory cell in the PCM is evaluated through a systematic test procedure at the time of manufacture. The tests include: write / erase cycle endurance test, data retention capability test, WD sensitivity test, BD sensitivity test, etc. Based on the test results, the initial reliability denominator for each logical memory cell is determined, including initial weak reliability and initial strong reliability.
[0048] During the operation of the storage system, the preset reliability index of each logical storage unit is continuously monitored, and the target reliability mark of each logical storage unit is determined based on the monitoring results and the initial reliability mark.
[0049] In this embodiment, during operation, the storage system continuously monitors the preset reliability indicators of each logical storage unit, and determines the target reliability label for each logical storage unit based on the monitoring results and the initial reliability label. It can be understood that during storage system operation, the reliability status of each logical storage unit is continuously tracked through an online monitoring mechanism. The monitored preset reliability indicators include: ECC error correction frequency, read retries, programming failure rate, etc. When the reliability indicator of an initially highly reliable logical storage unit drops to a preset threshold, it is dynamically relabeled as less reliable; conversely, when the reliability indicator of an initially less reliable logical storage unit rises above the preset threshold, it is dynamically relabeled as highly reliable.
[0050] In one embodiment, the storage system also establishes a reliability assessment table for logical storage units, recording metadata such as the reliability tag, assessment time, assessment result, and usage count for each logical storage unit. This table is loaded into memory during system initialization and used for data allocation and GC decisions. The reliability tagging is performed on a logical storage unit basis, rather than on individual physical cells or pages. This coarse-grained tagging method significantly reduces the overhead of tag management while ensuring the effectiveness of reliability management.
[0051] It is understandable that phase-change memories (PCMs) exhibit reliability variations due to factors such as process deviations and material inhomogeneities, with some logic memory cells exhibiting significantly lower-than-average reliability. By implementing factory testing and operational monitoring, and establishing an effective marking and management mechanism, the accuracy of identifying weakly reliable and highly reliable logic memory cells within PCMs has been improved.
[0052] Please refer to Figure 3 , Figure 3 This is a flowchart illustrating a third embodiment of the data storage method provided in this application. The difference between the third embodiment and the first to second embodiments is that the step of writing the target storage data into the physical storage unit inside the target logical storage unit according to a preset non-adjacent write order includes: Step S301: The target storage data is segmented according to a preset segmentation rule to determine the target storage data segment corresponding to each target logical storage unit.
[0053] In this embodiment, the storage system segments the target storage data according to a preset segmentation rule to determine the target storage data segment corresponding to each target logical storage unit. It is understood that the target logical storage units can store target storage data segments of the same length, and based on this, the target storage data can be segmented.
[0054] Step S302: Obtain the logical storage address of the target storage data segment; determine the target word line address and the target bit line address based on the logical storage address and the preset mapping relationship of the target logical storage unit; and determine the physical storage address of each target storage data unit in the target storage data segment in the target logical storage unit based on the target word line address and the target bit line address. The physical storage addresses corresponding to each target storage data unit are non-adjacent.
[0055] In this embodiment, the storage system obtains the logical storage address of the target storage data segment, determines the target word line address and the target bit line address based on the logical storage address and the preset mapping relationship of the target logical storage unit, and determines the physical storage address of each target storage data unit in the target storage data segment in the target logical storage unit based on the target word line address and the target bit line address. The physical storage addresses corresponding to each target storage data unit are not adjacent.
[0056] Understandably, the storage system determines the target storage data segment corresponding to each target logical storage unit and assigns it to each target logical storage unit in the target logical storage unit group in sequence. For each target logical storage unit, it calls its exclusive preset mapping relationship (preferably a diagonal mapping engine) to convert the logical storage address of the input target storage data segment (such as the 0th, 1st, 2nd... 32B unit inside the target logical storage unit) into the target word line address and the target bit line address in real time. Based on the formulas W[5:0] = SYS_ADDR[11:0]% 64, B[5:0] = ((SYS_ADDR[11:0]- W[5:0]) / 64 + W[5:0]) % 64, and SYS_ADDR[11:0] = W[5:0]+ (B[5:0] - W[5:0]) % 64 × 64, the physical storage address of each target storage data unit in the target logical storage unit is calculated online, ensuring that the physical storage addresses corresponding to each target storage data unit are non-adjacent and distributed along the diagonal. Where W represents the write order index of the logical address within the row, and B represents the corresponding physical row and column position; through this mapping, data that was originally consecutive at logical addresses (such as 0, 1, 2, 3...) is distributed to physically non-adjacent physical storage units (such as: logical address 0 → physical (0,0), logical address 1 → physical (1,1), logical address 2 → physical (2,2)...).
[0057] Step S303: Write each target storage data unit into the physical storage unit inside the target logical storage unit according to the logical storage address corresponding to each target storage data unit.
[0058] In this embodiment, the storage system writes each target storage data unit into the physical storage unit inside the target logical storage unit according to the logical storage address corresponding to each target storage data unit. For example... Figure 4 As shown, Figure 4 This application provides a schematic diagram of the distribution of physical storage units within the target logical storage unit, illustrating the writing methods for each target storage data unit. These methods include writing from top left to bottom right, from bottom right to top left, from top right to bottom left, and from bottom left to top right. Through this mapping algorithm, consecutive logical addresses are distributed diagonally in space, meaning consecutive logical addresses are mapped to non-adjacent physical storage units. This writing method avoids the problem of heat generated during programming spreading to neighboring units, causing the amorphous portion of adjacent free units to collapse into a crystalline state and resulting in bit inversion. This ensures that adjacent physical storage units are not written consecutively, thereby minimizing the cumulative effect of write interference.
[0059] The storage system of this embodiment divides the target storage data according to a preset segmentation rule to determine the target storage data segment corresponding to each target logical storage unit; obtains the logical storage address of the target storage data segment; determines the target word line address and target bit line address based on the logical storage address and the preset mapping relationship of the target logical storage unit; and determines the physical storage address of each target storage data unit in the target storage data segment within the target logical storage unit based on the target word line address and the target bit line address, wherein the physical storage addresses corresponding to each target storage data unit are non-adjacent; and writes each target storage data unit into the physical storage unit inside the target logical storage unit according to the logical storage address corresponding to each target storage data unit. This avoids the problem of heat generated during programming spreading to neighboring units during write operations, causing the amorphous part of adjacent free units to collapse into a crystalline state and causing bit inversion, thus preventing adjacent physical storage units from being written continuously and minimizing the cumulative effect of write interference.
[0060] Please refer to Figure 5 , Figure 5 This is a flowchart illustrating a fourth embodiment of the data storage method provided in this application. The difference between the fourth embodiment and the first to third embodiments is that, prior to the step of determining the target stored data and the reliability level requirement of the target stored data based on the data storage request in response to the data storage request, the method includes: Step S401: For each phase change memory in the storage system, identify the physical structure of the phase change memory.
[0061] In this embodiment, the storage system identifies the physical structure of each phase-change memory. In one embodiment, such as Figure 6 As shown, Figure 6 This is a schematic diagram of the physical structure of the phase-change memory provided in this application. Each phase-change memory includes 16 banks, each with an independent read voltage path, and its selection is not through address lines. Each bank includes 2 Qs, each with an independent WL (word line) and BL (bit line), and there is no write interference or bias drift between Qs. Each Q includes 256 blocks, each corresponding to 1 bit, and the WL / BL of each block are independent, with no write interference or bias drift between blocks. Each block is divided into 4 regions, with dummy isolation between regions. There is no write interference between regions, but there is bias drift. Each region includes 1024 rows (physical memory units). As a logical unit, a row is controlled by multiple word lines (WL) and bit lines (BL). The corresponding WL and BL are selected through address control. The intersection of WL and BL is the actual physical address. Data on adjacent rows has write interference. Rows on the same WL and BL will have bias drift.
[0062] Step S402: Based on the physical structure, identify physical memory cells in the phase-change memory where word lines and bit lines are independent of each other or isolated by dummy, and use them as target physical memory cells.
[0063] In this embodiment, the storage system identifies and extracts "naturally exclusive domains" from the physical structure. It traverses all banks, establishing independent row index spaces for the two Qs within each bank; then, for each of the 256 blocks under each Q, it verifies whether their WL / BL are truly independent; finally, within each block, based on the decoding results of ADDR22 / ADDR16, it categorizes the rows contained in that block according to their respective sub-regions and marks the dummy isolation status between each sub-region. This process essentially draws a "safe distance map" on the chip layout. Rows (physical memory cells) determined to have independent WL / BL or physically separated by dummy partitions are considered candidate cells that can be safely combined, thus determining the target physical memory cells in the phase-change memory.
[0064] Step S403: Based on the preset combination rules and the target physical storage units, construct the logical storage units of the phase-change memory. The preset combination rules are to combine the target physical storage units in the phase-change memory that are physically independent and have consistent reliability characteristics into the logical storage units.
[0065] In this embodiment, the storage system constructs the logical storage unit of the phase change memory based on preset combination rules and target physical storage units. The preset combination rules are to combine target physical storage units in the phase change memory that are physically independent and have consistent reliability characteristics into logical storage units.
[0066] Specifically, the storage system does not randomly select several rows to assemble a logical storage unit. Instead, it follows three rigid constraints: First, the selected rows must all come from mutually exclusive physical domains, such as a row from Q0, a row from Q1, and a row from Q0 in an adjacent bank, with no shared write levels (WL / BL). Second, these rows must physically belong to the same process-sensitive area during chip manufacturing, such as being located in the upper center of the die or near the edge thermal stress concentration zone, to ensure high synchronization in key reliability dimensions such as aging rate, resistance drift trend, and thermal diffusion response. Third, all selected rows must have the same internal structural granularity, i.e., all support the same diagonal mapping parameters (e.g., all using a 32×32 WL / BL grid), to ensure unified write scheduling in the future. After completing the above selection, the controller enters the address space reconstruction stage. It allocates a contiguous logical address space for this newly assembled logical storage unit and establishes the mapping relationship between this space and each physical row. This mapping is not a static lookup table, but a dynamic calculation: when the host writes to the logical address SYS_ADDR[11:0], the controller runs a preset algorithm in real time. First, it takes the modulo of the address to obtain the wordline index W[5:0], then substitutes it into the formula to reverse-engineer the corresponding bitline index B[5:0]. Finally, based on the values of W and B, combined with the pre-recorded Q, block, and sub-region numbers of each physical row, it locates the specific PCM chip, bank, Q, and block within a specific sub-region of which physical cell. The entire process ensures that logically continuous data is physically distributed strictly along a diagonal trajectory and spans multiple non-interfering physical domains, satisfying both write interference avoidance requirements and offset drift amortization.
[0067] The storage system implemented in this paper fully utilizes the physical structural independence of phase-change memory when constructing logical storage cells in the phase-change memory. It constructs logical storage cells that are not affected by write interference and bias drift. This avoids the problem that traditional storage cell management, which is based on physically adjacent storage cells, causes the two main reliability threats in phase-change memory to accumulate in the same data cell, seriously affecting data reliability. This helps to improve the reliability of data storage.
[0068] Please refer to Figure 7 , Figure 7 This is a flowchart illustrating a fifth embodiment of the data storage method provided in this application. The difference between the fifth embodiment and the first to fourth embodiments is that, after the step of writing the target storage data into the physical storage unit inside the target logical storage unit according to a preset non-adjacent writing order, the method includes: Step S501: Update the preset address mapping table based on the result of writing the target storage data into the physical storage unit.
[0069] Step S502: In response to the read instruction of the target stored data, parse the logical address of the target stored data, query the address mapping table based on the logical address, and determine the physical address of the target stored data.
[0070] Step S503: Based on the physical address, read the target stored data from the physical storage unit inside the target logical storage unit.
[0071] In this embodiment, after writing the target storage data into the physical storage unit, the storage system updates a preset address mapping table based on the writing result. The preset address mapping table stores the address of each data segment of the target storage data. In response to the host's read command for the target storage data, the storage system parses the logical address of the target storage data, queries the address mapping table based on the logical address to determine the physical address of the target storage data, and reads the target storage data from the physical storage unit within the target logical storage unit based on the physical address.
[0072] In one embodiment, the method further includes: Step S504: Scan the data stored in each logical storage unit and count the amount of invalid data stored in each logical storage unit.
[0073] Step S505: The logical storage unit with the largest amount of invalid data storage is identified as the reclaimed logical storage unit, and the valid data in the reclaimed logical storage unit is migrated to a new logical storage unit so that the reclaimed logical storage unit can be redistributed.
[0074] In this embodiment, the storage system scans the data stored in each logical storage unit and counts the amount of invalid data stored in each logical storage unit. The logical storage unit with the largest amount of invalid data stored is identified as the reclaimed logical storage unit, and the valid data in the reclaimed logical storage unit is migrated to a new logical storage unit so that the reclaimed logical storage unit can be redistributed for use.
[0075] The storage system in this embodiment avoids the accumulation of two major reliability threats—write interference and bias drift—in the same data unit, which are present in phase-change memory, and avoids combining multiple weakly reliable logical storage units into a single logical storage unit group. This improves the reliability of data storage while providing efficient read / write and garbage collection processes to support normal operation and space management, thus helping to further improve the efficiency of data read / write and garbage collection in the storage system.
[0076] refer to Figure 8 , Figure 8 This is a schematic diagram of the data storage device provided in this application. The data storage device includes: The response module 10 is used to respond to a data storage request and determine the target stored data and the reliability level requirements of the target stored data based on the data storage request.
[0077] The construction module 20 is used to select target logical storage units in the phase change memory of the storage system according to the reliability level requirements and the target reliability label of each logical storage unit, and to construct a target logical storage unit group based on the target logical storage units.
[0078] The writing module 30 is used to allocate the target storage data to the target logical storage unit group and write the target storage data into the physical storage unit inside the target logical storage unit according to a preset non-adjacent writing order.
[0079] It is understood that the data storage device in this embodiment corresponds to the data storage method in the above embodiment, and the options in the above embodiment are also applicable to this embodiment, so they will not be described again here.
[0080] This application also provides a computer device, exemplary of which includes a processor and a memory, wherein the memory stores a computer program, and the processor executes the computer device to perform the data storage method described above by running the computer program.
[0081] The processor can be an integrated circuit chip with signal processing capabilities. The processor can be a general-purpose processor, including at least one of a Central Processing Unit (CPU), Graphics Processing Unit (GPU), Network Processor (NP), Digital Signal Processor (DSP), Application-Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor or any conventional processor, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application.
[0082] The memory can be, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), etc. The memory is used to store computer programs, and the processor can execute the computer programs accordingly after receiving execution instructions.
[0083] This application also provides a computer storage medium for storing the computer program used in the aforementioned computer device. The computer storage medium can be a readable storage medium, a non-volatile storage medium, or a volatile storage medium. For example, the computer storage medium may include, but is not limited to, various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0084] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that, in alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0085] In addition, the functional modules or units in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0086] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a smartphone, personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.
[0087] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A data storage method, characterized in that, The method is applied to a storage system including a phase-change memory, and the method includes: In response to a data storage request, the target stored data and the reliability level requirements of the target stored data are determined based on the data storage request; Based on the reliability level requirements and the target reliability label of each logical storage unit, a target logical storage unit is selected from the phase change memory in the storage system, and a target logical storage unit group is constructed based on the target logical storage unit. The target storage data is allocated to the target logical storage unit group, and the target storage data is written to the physical storage unit inside the target logical storage unit according to a preset non-adjacent write order.
2. The data storage method according to claim 1, characterized in that, The step of selecting a target logical memory cell in the phase-change memory of the storage system based on the reliability level requirements and the target reliability label of each logical memory cell includes: Obtain the target reliability marker and location region for each logical memory cell in each phase-change memory; Based on the reliability level requirements, determine the proportion of weak reliability logical storage units in the target logical storage unit group; Based on the ratio, the target reliability marker, and / or the location region, a target logical memory cell is selected in the phase-change memory of the storage system.
3. The data storage method according to claim 2, characterized in that, The method further includes: For each logical memory cell in each phase-change memory, each logical memory cell is tested according to a preset test procedure, and an initial reliability label for each logical memory cell is determined based on the test results. During the operation of the storage system, the preset reliability index of each logical storage unit is continuously monitored, and the target reliability mark of each logical storage unit is determined based on the monitoring results and the initial reliability mark.
4. The data storage method according to claim 1, characterized in that, The step of writing the target storage data into the physical storage unit inside the target logical storage unit according to a preset non-adjacent write order includes: The target storage data is segmented according to a preset segmentation rule to determine the target storage data segment corresponding to each target logical storage unit; Obtain the logical storage address of the target storage data segment, determine the target word line address and the target bit line address based on the logical storage address and the preset mapping relationship of the target logical storage unit, and determine the physical storage address of each target storage data unit in the target storage data segment in the target logical storage unit based on the target word line address and the target bit line address, wherein the physical storage addresses corresponding to each target storage data unit are non-adjacent; According to the logical storage address corresponding to each target storage data unit, each target storage data unit is written into the physical storage unit inside the target logical storage unit.
5. The data storage method according to claim 1, characterized in that, Prior to the step of determining the target stored data and the reliability level requirement of the target stored data based on the data storage request in response to the data storage request, the following steps are included: For each phase-change memory in the storage system, identify the physical structure of the phase-change memory; Based on the physical structure, identify physical memory cells in the phase-change memory where word lines and bit lines are independent of each other or isolated by dummy, and use them as target physical memory cells. Based on preset combination rules and the target physical storage units, the logical storage units of the phase-change memory are constructed. The preset combination rules are to combine the target physical storage units in the phase-change memory that are physically independent and have consistent reliability characteristics into the logical storage units.
6. The data storage method according to claim 1, characterized in that, After the step of writing the target storage data into the physical storage unit inside the target logical storage unit according to a preset non-adjacent write order, the method includes: Update the preset address mapping table based on the result of writing the target storage data into the physical storage unit; In response to the read instruction of the target stored data, the logical address of the target stored data is parsed, and the address mapping table is queried based on the logical address to determine the physical address of the target stored data; Based on the physical address, the target stored data is read from the physical storage unit inside the target logical storage unit.
7. The data storage method according to claim 1, characterized in that, The method further includes: Scan the data stored in each logical storage unit and count the amount of invalid data stored in each logical storage unit; The logical storage unit with the largest amount of invalid data is identified as the reclaimed logical storage unit, and the valid data in the reclaimed logical storage unit is migrated to a new logical storage unit so that the reclaimed logical storage unit can be redistributed.
8. A data storage device, characterized in that, The data storage device includes: A response module is used to respond to a data storage request and determine the target stored data and the reliability level requirements of the target stored data based on the data storage request. The construction module is used to select target logical storage units in the phase change memory of the storage system according to the reliability level requirements and the target reliability label of each logical storage unit, and to construct a target logical storage unit group based on the target logical storage units. The write module is used to allocate the target storage data to the target logical storage unit group and write the target storage data into the physical storage unit inside the target logical storage unit according to a preset non-adjacent write order.
9. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing a computer program, and the processor executing the computer program to implement the data storage method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed on a processor, performs the data storage method according to any one of claims 1-7.
