Data programming method, electronic device, and storage medium
By identifying risky word lines in storage devices and programming data into non-risky word lines, the problem of data loss in harsh environments is solved, thereby improving data reliability and accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-22
- Publication Date
- 2026-03-27
AI Technical Summary
When a storage device is programmed in a harsh environment, data loss may occur.
By determining whether the current environmental parameters of the storage device are within the preset range, risky word lines are identified, and data is programmed into non-risk word lines under harsh conditions. Environmental parameters are adjusted for programming processing, and word line risks are determined through error correction codes to ensure that data is stored in non-risk word lines.
It reduces the risk of data loss in harsh environments and improves data reliability and accuracy.
Smart Images

Figure CN119512437B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of data processing, and particularly relates to a data programming method, an electronic device and a storage medium. BACKGROUND
[0002] The manufacturing process of the storage device determines that the number of errors of different storage word lines in the storage device will be different.
[0003] When the storage device is programmed in a harsh environment, the storage data of some storage word lines may be lost. SUMMARY
[0004] The application provides a data programming method, an electronic device and a storage medium to solve the problem of storage data loss when the storage device is programmed in a harsh environment.
[0005] To solve the above technical problem, the application provides a data programming method, which comprises the following steps: in response to receiving a programming instruction for a target word line of a storage device, determining whether a current environmental parameter of the storage device is within a range of a corresponding preset environmental parameter; when the current environmental parameter of the storage device is not within the range of the preset environmental parameter, determining whether the target word line is a risk word line; and if the target word line is a risk word line, performing programming processing on other non-risk word lines based on the programming instruction.
[0006] In the application, the target word line belongs to a first storage block; and if the target word line is a risk word line, the step of performing programming processing on other non-risk word lines based on the programming instruction comprises the following steps: if the target word line is a risk word line and the target word line is a boundary word line of the first storage block, performing programming processing on other blank non-risk word lines of a second storage block based on the programming instruction.
[0007] In the application, if the target word line is a risk word line, the step of performing programming processing on other non-risk word lines based on the programming instruction comprises the following steps: if the target word line is a risk word line and the target word line is not a boundary word line of the first storage block, performing programming processing on other blank non-risk word lines of the first storage block based on the programming instruction.
[0008] In the application, in response to receiving the programming instruction for the target word line of the storage device: adjusting the current environment of the storage device so that the current environmental parameter of the storage device is not within the range of the corresponding preset environmental parameter, performing programming processing on each word line of the storage device, and performing risk judgment on each word line after the programming processing to divide each word line into a risk word line or a non-risk word line.
[0009] The step of judging the risk of each word line after the programming processing and dividing each word line into a risk word line or a non-risk word line comprises: counting the data error amount of each word line after the programming processing; determining the word line with the data error amount exceeding the error correction amount of the storage device as the risk word line; and determining the word line with the data error amount not exceeding the error correction amount of the storage device as the non-risk word line.
[0010] The step of respectively performing the programming processing on each word line of the storage device comprises: respectively storing the target data in each word line of the storage device; and the step of counting the data error amount of each word line after the programming processing comprises: comparing the target data stored in each word line with the original target data to determine the data error amount of each word line.
[0011] The environment parameter is temperature, the step of judging whether the current environment parameter of the storage device is in the range of the corresponding preset environment parameter comprises: acquiring the current temperature of the storage device, and judging whether the current temperature exceeds the preset temperature threshold; and when the current temperature exceeds the preset temperature threshold, it is determined that the current environment parameter of the storage device is not in the range of the preset environment parameter.
[0012] The programming method of the data further comprises: when the current environment parameter of the storage device is in the range of the corresponding preset environment parameter or the target word line is a non-risk word line, performing the programming processing on the target word line based on the programming instruction.
[0013] To solve the above technical problems, the application further provides an electronic device comprising a memory and a processor coupled to each other, and the processor is configured to execute program instructions stored in the memory to implement the programming method of the data according to any one of the above.
[0014] To solve the above technical problems, the application further provides a computer readable storage medium having program instructions stored thereon, and the program instructions are executed by a processor to implement the programming method of the data according to any one of the above.
[0015] To solve the above technical problems, the application in the programming method of the data judges whether the current environment parameter of the storage device is in the range of the corresponding preset environment parameter after receiving the programming instruction of the target word line of the storage device; when the current environment parameter of the storage device is not in the range of the preset environment parameter, it is further judged whether the target word line is a risk word line; and if the target word line is a risk word line, the programming processing is performed on other non-risk word lines based on the programming instruction, so as to reduce the data loss risk when programming the word line of the storage device in a harsh environment, and further improve the data reliability and accuracy of the storage device. BRIEF DESCRIPTION OF DRAWINGS
[0016] Figure 1 is a flowchart of an embodiment of the data programming method of the application;
[0017] Figure 2 is a flowchart of another embodiment of the programming method of the data of the present application;
[0018] Figure 3 is a framework diagram of an embodiment of the electronic device of the present application.
[0019] Figure 4 is a framework diagram of an embodiment of the computer readable storage medium of the present application. DETAILED DESCRIPTION
[0020] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work are within the scope of protection of the present application.
[0021] It should be noted that if the embodiments of the present application involve directional indications (such as up, down, left, right, front, back, etc.), the directional indications are only used to explain the relative position relationship, movement condition, etc. between components in a certain posture (as shown in the drawings), and if the certain posture changes, the directional indications also change accordingly.
[0022] In addition, if the embodiments of the present application involve descriptions such as "first", "second", etc., the descriptions of "first", "second", etc. are only for description purposes, and cannot be understood as indicating or implying the relative importance of the indicated technical features or implicitly indicating the number of the indicated technical features. Therefore, the features limited by "first", "second" can explicitly or implicitly include at least one of the features. In addition, the technical solutions of each embodiment can be combined with each other, but it must be based on the fact that a person of ordinary skill in the art can realize it, and when the combination of technical solutions contradicts each other or cannot be realized, it should be considered that the combination of technical solutions does not exist and is not within the scope of protection claimed by the present application.
[0023] Please refer to Figure 1 , Figure 1 is a flowchart of an embodiment of the programming method of the data of the present application.
[0024] Step S11: In response to receiving a programming instruction for a target word line of the storage device, it is judged whether the current environmental parameter of the storage device is within the range of the corresponding preset environmental parameter.
[0025] The storage device can include, but is not limited to, a solid state disk or other storage device with Nand Flash (non-volatile memory) as the storage medium. The storage device has a plurality of storage blocks (or data blocks). Among them, a plurality of word lines are arranged on each storage block.
[0026] The programming process refers to the operation of storing data to be stored in the word line of the storage device. The programming instruction refers to the current need to program the target word line.
[0027] When receiving the programming instruction to program the target word line, it is judged whether the current environmental parameter of the storage device is within the range of the corresponding preset environmental parameter. Among them, the environmental parameter can include, but is not limited to, temperature, humidity or electromagnetic interference and other environmental factors. And the preset environmental parameter is the environmental condition required for the normal operation of the storage device, that is, when the current environmental parameter of the storage device is within the range of the corresponding preset environmental parameter, the storage device can work normally.
[0028] And when the current environmental parameter of the storage device is not within the range of the corresponding preset environmental parameter, the data programming of the storage device may have a data loss situation.
[0029] In a specific application scenario, when the temperature is too high or too low, not within the range of the corresponding preset temperature, it can be confirmed that the current environment belongs to a harsh environment, and the data programming of the storage device may have a loss. In a specific application scenario, when the humidity is too high, not within the range of the corresponding preset humidity, it can also be confirmed that the current environment belongs to a harsh environment, and the data programming of the storage device may have a loss. In a specific application scenario, when the electromagnetic interference is too large, not within the range of the corresponding preset electromagnetic interference, it can also be confirmed that the current environment belongs to a harsh environment, and the data programming of the storage device may have a loss, and so on, without limitation.
[0030] Step S12: When the current environmental parameter of the storage device is not within the range of the preset environmental parameter, it is judged whether the target word line is a risk word line.
[0031] When the current environmental parameter of the storage device is not within the range of the preset environmental parameter, it is further judged whether the target word line is a risk word line.
[0032] In a specific application scenario, the method of judging whether the target word line is a risk word line can be confirmed by artificial experience, for example, generally, the word lines at the boundary of each storage block of the storage device have a high probability of having a large risk of data loss, and the word lines at the boundary of the storage block can be regarded as risk word lines, and the word lines not at the boundary of the storage block can be regarded as non-risk word lines.
[0033] In a specific application scenario, the method for determining whether the target word line is a risk word line can also be determined by a pre-test. Specifically, when the current environmental parameter is not within the range of the corresponding preset environmental parameter, each word line of the storage device is subjected to a programming process, and each word line after the programming process is subjected to a risk determination to divide each word line into a risk word line or a non-risk word line. The risk determination can be determined by comparing the difference between the data before and after storage of each word line, and the larger the difference, the more likely it is a risk word line, and the smaller the difference or no difference, the more likely it is a non-risk word line. The method for determining whether the target word line is a risk word line is not limited here.
[0034] Step S13: If the target word line is a risk word line, program other non-risk word lines based on the programming instruction.
[0035] When it is determined that the target word line is a risk word line, it means that if the data corresponding to the programming instruction is stored in the target word line, there is a high risk of data loss. Therefore, the embodiment programs other non-risk word lines based on the programming instruction, that is, stores the data corresponding to the programming instruction in other non-risk word lines for programming processing, thereby reducing the risk of data loss.
[0036] Through the above steps, the data programming method of the embodiment can determine whether the current environmental parameter of the storage device is within the range of the corresponding preset environmental parameter after receiving the programming instruction for the target word line of the storage device; when the current environmental parameter of the storage device is not within the range of the preset environmental parameter, it is further determined whether the target word line is a risk word line; if the target word line is a risk word line, other non-risk word lines are programmed based on the programming instruction, thereby reducing the risk of data loss when programming the word line of the storage device in a harsh environment, and further improving the data reliability and accuracy of the storage device.
[0037] Please refer to Figure 2 , Figure 2 is a flowchart of another embodiment of the data programming method of the present application. The current environmental factors are temperature in this embodiment, and in actual application, environmental factors such as humidity or electromagnetic interference may also affect the current environment, and the method for determining harsh environment for each factor is similar to this embodiment.
[0038] Step S21: In response to receiving a programming instruction for a target word line in a first storage block of a storage device, obtaining the current temperature of the storage device, and determining whether the current temperature exceeds a preset temperature threshold.
[0039] When a programming instruction for a target word line in a first storage block of a storage device is received, a current temperature of the storage device can be obtained by a temperature sensor of the storage device, and it is determined whether the current temperature exceeds a preset temperature threshold. The temperature sensor is arranged on the storage device to measure the real-time temperature of the storage device.
[0040] The preset temperature threshold can be set based on the type or measurement experience of each storage device, for example, 80 degrees, 120 degrees, 125 degrees, 130 degrees, etc. The temperature corresponding to the case where the storage device has a large amount of data errors can be determined by temperature incremental measurement experiments on each storage device, and then the temperature is determined as the preset temperature threshold, or the corresponding preset temperature threshold of the storage device is determined by the working temperature in the factory manual of the storage device, which is not limited here.
[0041] Step S22: When the current temperature exceeds the preset temperature threshold, it is determined that the current environmental parameter of the storage device is not within the range of the preset environmental parameter.
[0042] When the current temperature does not exceed the preset temperature threshold, it is determined that the current environmental parameter of the storage device is not within the range of the preset environmental parameter, and the current environment of the storage device does not belong to a harsh environment, then the target word line is directly programmed based on the programming instruction, that is, the programming operation can be normally performed.
[0043] Step S23: Determine whether the target word line is a risk word line.
[0044] Before step S21, the current environment of the storage device is adjusted so that the current environmental parameter of the storage device is not within the range of the corresponding preset environmental parameter, and each word line of the storage device is programmed and processed, and each word line after the programming processing is judged to divide each word line into a risk word line or a non-risk word line.
[0045] The specific method of risk judgment is: adjust the current environment of the storage device so that the current environmental parameter of the storage device is not within the range of the corresponding preset environmental parameter, and store the target data in each word line of the storage device respectively; compare the target data stored in each word line with the original target data to determine the data error amount of each word line, and then count the data error amount of each word line after the programming processing; the word line whose data error amount exceeds the error correction amount of the storage device is determined as a risk word line; the word line whose data error amount does not exceed the error correction amount of the storage device is determined as a non-risk word line. The error correction amount of the storage device is obtained by ECC (Error Correcting Code) error correction.
[0046] When the current environmental parameter of the storage device is not within the range of the preset environmental parameter, whether the target word line is a risk word line is determined only by comparison based on the aforementioned risk determination result. For example, after risk determination is performed on 10 word lines in the first storage block, it is determined that the first, eighth, and tenth word lines are risk word lines, and the others are non-risk word lines. Assuming that the target word line is the first word line of the first storage block, it is determined that the target word line is a risk word line. Assuming that the target word line is the second word line of the first storage block, which is not any of the risk word lines, it is determined that the target word line is a non-risk word line, and so on, without limitation.
[0047] Step S24: If the target word line is a risk word line and the target word line is a boundary word line of the first storage block, other blank non-risk word lines of a second storage block are programmed based on the programming instruction.
[0048] When it is determined that the target word line is a risk word line, it is further determined whether the target word line is a boundary word line of the first storage block. The boundary word line is a word line located at the boundary position of the corresponding storage block. For example, assuming that a storage block includes three word lines, and the three word lines are arranged in the order of the first word line, the second word line, and the third word line, the first word line and the third word line are boundary word lines, and the second word line is not a boundary word line.
[0049] If the target word line is a risk word line and the target word line is a boundary word line of the first storage block, other blank non-risk word lines of a second storage block are programmed based on the programming instruction. The second storage block is another storage block different from the first storage block.
[0050] Since data programming is generally performed in the order of the position sequence of the word lines in the storage block, when the target word line is a risk word line and a boundary word line of the first storage block, there can be no blank non-risk word line in the first storage block. Therefore, other blank non-risk word lines of a second storage block are directly programmed based on the programming instruction to ensure accurate storage of data.
[0051] Step S25: If the target word line is a risk word line and the target word line is not a boundary word line of the first storage block, other blank non-risk word lines of the first storage block are programmed based on the programming instruction.
[0052] If the target word line is a risk word line and the target word line is not a boundary word line of the first storage block, it indicates that there are still blank word lines in the first storage block. Therefore, other blank non-risk word lines of the first storage block are programmed based on the programming instruction to ensure accurate storage of data.
[0053] When it is determined that the target word line is a non-risk word line, the target word line is directly programmed based on the programming instruction, that is, normal programming operation can be performed.
[0054] Through the above steps, the data programming method of the embodiment receives a programming instruction for a target word line in a first storage block of a storage device, obtains a current temperature of the storage device, determines whether the current temperature exceeds a preset temperature threshold, determines that a current environment of the storage device belongs to a harsh environment when the current temperature exceeds the preset temperature threshold, and further determines whether the target word line is a risk word line. If the target word line is a risk word line and the target word line is a boundary word line of the first storage block, other blank non-risk word lines of a second storage block are programmed based on the programming instruction; or if the target word line is a risk word line and the target word line is not a boundary word line of the first storage block, other blank non-risk word lines of the first storage block are programmed based on the programming instruction. Thus, by storing data in the non-risk word lines, the risk of data loss when programming the word lines of the storage device in a harsh environment is reduced, and the data reliability and accuracy of the storage device are improved.
[0055] Please refer to Figure 3 , Figure 3 is a frame schematic diagram of an embodiment of the electronic device. The electronic device 30 includes a memory 31 and a processor 32 coupled with each other. The processor 32 is configured to execute program instructions stored in the memory 31 to implement the steps of the above method embodiments. In a specific implementation scenario, the electronic device 30 can include but is not limited to a microcomputer, a server, and in addition, the electronic device 30 can also include a notebook computer, a tablet computer, a Nand Flash, etc., which are not limited herein.
[0056] Specifically, the processor 32 is configured to control itself and the memory 31 to implement the steps of any of the above method embodiments. The processor 32 can also be referred to as a CPU (Central Processing Unit, central processing unit). The processor 32 can be an integrated circuit chip with a processing capability of signals. The processor 32 can also be a general-purpose processor, a DSP (Digital Signal Processor, digital signal processor), an ASIC (Application Specific Integrated Circuit, application specific integrated circuit), an FPGA (Field-Programmable Gate Array, field programmable gate array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor or the like. In addition, the processor 32 can be implemented by an integrated circuit chip together.
[0057] The scheme can reduce the data loss risk of the word line of the storage device in the harsh environment, and further improve the data reliability and accuracy of the storage device.
[0058] Please refer to Figure 4 , Figure 4 The framework diagram of an embodiment of the computer readable storage medium is shown. The computer readable storage medium 40 stores program instructions 401 capable of being executed by the processor, and the program instructions 401 are used to implement the steps of any method embodiment.
[0059] In several embodiments provided in the present application, it should be understood that the disclosed method and device can be implemented in other ways. For example, the above-described device implementation is only schematic, for example, the division of the module or unit is only a logical function division, and actual implementation can have another division manner, for example, the unit or component can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the shown or discussed units can be indirect coupling or communication connection through some interfaces, devices or units, and can be electrical, mechanical or other forms.
[0060] The unit described as a separate component can be or can not be physically separated, and the component shown as a unit can be or can not be a physical unit, that is, it can be located in one place, or can be distributed to network units. According to actual needs, part or all of the units can be selected to achieve the purpose of the present embodiment scheme.
[0061] In addition, the functional units in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0062] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or say the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the methods of the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0063] The above is only an embodiment of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation using the content of the specification and drawings, or direct or indirect application in other related technical fields, is also included in the patent protection scope of the present application.
Claims
1. A method of programming data, characterized by, The programming method of the data comprises: in response to receiving a programming instruction for a target word line of a storage device, judging whether a current environmental parameter of the storage device is within a range of a corresponding preset environmental parameter; the environmental parameter comprises temperature, humidity and electromagnetic interference; when the current environmental parameter of the storage device is not within the range of the preset environmental parameter, judging whether the target word line is a risk word line; if the target word line is a risk word line, performing programming processing on other non-risk word lines based on the programming instruction; wherein the target word line belongs to a first storage block, if the target word line is a risk word line and the target word line is a boundary word line of the first storage block, performing programming processing on other blank non-risk word lines of a second storage block based on the programming instruction; if the target word line is a risk word line and the target word line is not a boundary word line of the first storage block, performing programming processing on other blank non-risk word lines of the first storage block based on the programming instruction; when the current environmental parameter of the storage device is within the range of the corresponding preset environmental parameter or the target word line is a non-risk word line, performing programming processing on the target word line based on the programming instruction; the step of responding to receiving a programming instruction for a target word line of a storage device comprises: adjusting the current environment of the storage device so that the current environmental parameter of the storage device is not within the range of the corresponding preset environmental parameter; performing programming processing on each word line of the storage device respectively, and performing risk judgment on each word line after programming processing to divide each word line into a risk word line or a non-risk word line.
2. The data programming method according to claim 1, wherein, the step of performing risk judgment on each word line after programming processing to divide each word line into a risk word line or a non-risk word line comprises: counting the data error amount of each word line after programming processing; determining the word line with data error amount exceeding the error correction amount of the storage device as the risk word line; determining the word line with data error amount not exceeding the error correction amount of the storage device as the non-risk word line.
3. The data programming method according to claim 2, wherein, the step of performing programming processing on each word line of the storage device respectively comprises: storing target data in each word line of the storage device respectively; the step of counting the data error amount of each word line after programming processing comprises: comparing the target data stored in each word line with the original target data to determine the data error amount of each word line.
4. The data programming method of claim 1, wherein, the environmental parameter is temperature; the step of judging whether the current environmental parameter of the storage device is within the range of the corresponding preset environmental parameter comprises: obtaining the current temperature of the storage device, and judging whether the current temperature exceeds a preset temperature threshold; when the current temperature exceeds the preset temperature threshold, determining that the current environmental parameter of the storage device is not within the range of the preset environmental parameter.
5. An electronic device, comprising: a storage device comprising a memory and a processor coupled to each other, the processor being configured to execute program instructions stored in the memory to implement the data programming method according to any one of claims 1 to 4.
6. A computer-readable storage medium having stored thereon program instructions, wherein, The program instructions, when executed by the processor, implement the data programming method as claimed in any one of claims 1 to 4.
Citation Information
Patent Citations
Forecasting program disturb in memory by detecting natural threshold voltage distribution
CN102576568A