Data storage method and device of memory, electronic equipment and storage medium

文档序号:1686774 发布日期:2020-01-03 浏览:6次 中文

阅读说明:本技术 存储器的数据存储方法、装置、电子设备和存储介质 (Data storage method and device of memory, electronic equipment and storage medium ) 是由 贺元魁 胡洪 潘荣华 于 2018-06-26 设计创作,主要内容包括:本发明实施例公开了一种存储器的数据存储方法、装置、电子设备和存储介质。所述方法包括:接收用户输入的数据写入指令,获取与数据写入指令对应的待写入数据;用随机数发生器生成数量与待写入数据的数量相同的随机数;根据设定计算方法获取待写入数据与随机数的计算结果,将计算结果存储至与数据写入指令对应的存储地址。本发明实施例的技术方案通过将前后两次差别细微的待存储数据转变为数据重复率较小的两组待存储数据,实现了向同一个字块中存储差别较小的数据时,该字块中的各个字线被选取用于写入数据的概率基本相同,使得该字块中的各个浮栅场效应管的导通阈值更加接近。(The embodiment of the invention discloses a data storage method and device of a memory, electronic equipment and a storage medium. The method comprises the following steps: receiving a data writing instruction input by a user, and acquiring data to be written corresponding to the data writing instruction; generating random numbers with the same number as the data to be written by using a random number generator; and acquiring a calculation result of the data to be written and the random number according to a set calculation method, and storing the calculation result to a storage address corresponding to the data writing instruction. According to the technical scheme of the embodiment of the invention, the data to be stored with slight difference between the front and the back is converted into two groups of data to be stored with smaller data repetition rate, so that when the data with smaller difference is stored in the same word block, the probability that each word line in the word block is selected for writing in the data is basically the same, and the conduction threshold values of each floating gate field effect transistor in the word block are closer.)

1. A method for storing data in a memory, comprising:

receiving a data writing instruction input by a user, and acquiring data to be written corresponding to the data writing instruction;

generating random numbers with the same number as the data to be written by using a random number generator;

and according to a set calculation method, obtaining the calculation result of the data to be written and the random number, and storing the calculation result to a storage address corresponding to the data writing instruction.

2. The method of claim 1, wherein the data write instruction comprises a random seed;

the generating, by using a random number generator, random numbers of which the number is the same as that of the data to be written includes:

and generating random numbers with the same number as the data to be written by using a random number generator according to the random seeds.

3. The method of claim 1, wherein generating the same number of random numbers as the number of data to be written using a random number generator comprises:

and generating random numbers with the same number as the data to be written by using a random number generator according to the pre-stored random seeds.

4. The method according to claim 1, wherein after the obtaining the calculation result of the data to be written and the random number according to the set calculation method and storing the calculation result to a storage address corresponding to the data writing instruction, the method further comprises:

receiving a data reading instruction which is input by a user and corresponds to the data to be written;

acquiring the random number and the calculation result corresponding to the data to be written;

and according to a decoding calculation method corresponding to the set calculation method, acquiring a decoding result of decoding the calculation result by the random number, and outputting the decoding result.

5. The method according to claim 4, wherein the set calculation method is an exclusive OR calculation method, and the decoding calculation method corresponding to the set calculation method is an exclusive OR calculation method.

6. A data storage device for a memory, comprising:

the data writing instruction receiving module is used for receiving a data writing instruction input by a user and acquiring data to be written corresponding to the data writing instruction;

the random number generation module is used for generating random numbers with the same number as the data to be written by using a random number generator;

and the data calculation module is used for acquiring the calculation result of the data to be written and the random number according to a set calculation method and storing the calculation result to a storage address corresponding to the data writing instruction.

7. The apparatus of claim 6, wherein the data write instruction comprises a random seed;

the random number generation module is specifically configured to:

and generating random numbers with the same number as the data to be written by using a random number generator according to the random seeds.

8. The apparatus of claim 6, further comprising:

a data reading instruction receiving module, configured to receive a data reading instruction corresponding to the data to be written, input by a user, after obtaining a calculation result of the data to be written and the random number according to a set calculation method and storing the calculation result in a storage address corresponding to the data writing instruction;

the data acquisition module is used for acquiring the random number corresponding to the data to be written and the calculation result;

and the data decoding module is used for acquiring a decoding result of decoding the calculation result by the random number according to a decoding calculation method corresponding to the set calculation method and outputting the decoding result.

9. An electronic device, characterized in that the electronic device comprises:

one or more processors;

storage means for storing one or more programs;

the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method for data storage of the memory of any of claims 1-5.

10. A storage medium containing computer-executable instructions for performing a method of data storage of a memory as claimed in any one of claims 1-5 when executed by a computer processor.

Technical Field

The embodiment of the invention relates to the technical field of data storage, in particular to a data storage method and device of a memory, electronic equipment and a storage medium.

Background

The floating gate field effect transistor in the memory is structured by additionally arranging a floating gate between an original gate and a silicon substrate, and when a certain voltage is applied to the original gate (namely a control gate), a large amount of electrons in a drain can pass through the substrate and penetrate through a tunneling oxide layer to reach the floating gate. However, a part of electrons will remain in the tunnel oxide layer during the process of passing a large amount of electrons through the tunnel oxide layer, so that during the subsequent data reading process, the electrons remaining in the tunnel oxide layer in the floating gate field effect transistor in the unselected word line may be sucked into the floating gate, resulting in the threshold of the floating gate field effect transistor being raised.

In the process of debugging a program, a user may slightly modify a certain statement in the program many times, and thus, a situation may occur in which data writing and erasing operations are repeatedly performed on one block in a memory for storing the program. As the number of data writing and erasing operations increases, the probability that some word lines in the block are repeatedly written and erased increases because the difference between the data written in the previous and subsequent times is small. Therefore, the more electrons are stored in the tunnel oxide layer of the floating gate field effect transistor in the word lines, so that when the word lines are used as non-selected word lines in a data reading operation, the more electrons are more easily absorbed into the floating gate in the tunnel oxide layer of the floating gate field effect transistor in the word lines, the threshold value of the floating gate field effect transistor is raised, and the reliability of stored data is affected.

Disclosure of Invention

In view of this, embodiments of the present invention provide a data storage method and apparatus for a memory, an electronic device, and a storage medium, so as to optimize an existing data storage method.

In a first aspect, an embodiment of the present invention provides a data storage method for a memory, including:

receiving a data writing instruction input by a user, and acquiring data to be written corresponding to the data writing instruction;

generating random numbers with the same number as the data to be written by using a random number generator;

and according to a set calculation method, obtaining the calculation result of the data to be written and the random number, and storing the calculation result to a storage address corresponding to the data writing instruction.

In the above method, optionally, the data write instruction includes a random seed;

the generating, by using a random number generator, random numbers of which the number is the same as that of the data to be written includes:

and generating random numbers with the same number as the data to be written by using a random number generator according to the random seeds.

In the foregoing method, optionally, the generating, by using a random number generator, a number of random numbers that is the same as the number of the data to be written includes:

and generating random numbers with the same number as the data to be written by using a random number generator according to the pre-stored random seeds.

In the foregoing method, optionally, after the obtaining, according to a set calculation method, a calculation result of the data to be written and the random number, and storing the calculation result in a storage address corresponding to the data writing instruction, the method further includes:

receiving a data reading instruction which is input by a user and corresponds to the data to be written;

acquiring the random number and the calculation result corresponding to the data to be written;

and according to a decoding calculation method corresponding to the set calculation method, acquiring a decoding result of decoding the calculation result by the random number, and outputting the decoding result.

In the above method, optionally, the setting calculation method is an exclusive or calculation method, and the decoding calculation method corresponding to the setting calculation method is an exclusive or calculation method.

In a second aspect, an embodiment of the present invention provides a data storage apparatus for a memory, including:

the data writing instruction receiving module is used for receiving a data writing instruction input by a user and acquiring data to be written corresponding to the data writing instruction;

the random number generation module is used for generating random numbers with the same number as the data to be written by using a random number generator;

and the data calculation module is used for acquiring the calculation result of the data to be written and the random number according to a set calculation method and storing the calculation result to a storage address corresponding to the data writing instruction.

In the above apparatus, optionally, the data write instruction includes a random seed;

the random number generation module is specifically configured to:

and generating random numbers with the same number as the data to be written by using a random number generator according to the random seeds.

In the above apparatus, optionally, the apparatus further includes:

a data reading instruction receiving module, configured to receive a data reading instruction corresponding to the data to be written, input by a user, after obtaining a calculation result of the data to be written and the random number according to a set calculation method and storing the calculation result in a storage address corresponding to the data writing instruction;

the data acquisition module is used for acquiring the random number corresponding to the data to be written and the calculation result;

and the data decoding module is used for acquiring a decoding result of decoding the calculation result by the random number according to a decoding calculation method corresponding to the set calculation method and outputting the decoding result.

In a third aspect, an embodiment of the present invention provides an electronic device, including:

one or more processors;

storage means for storing one or more programs;

when executed by the one or more processors, cause the one or more processors to implement a method for data storage of a memory according to any embodiment of the invention.

In a fourth aspect, embodiments of the present invention provide a storage medium containing computer-executable instructions which, when executed by a computer processor, perform a method of data storage of a memory according to any of the embodiments of the present invention.

The embodiment of the invention provides a data storage method, a data storage device, electronic equipment and a storage medium of a memory, wherein by using data to be written and random numbers generated by a random number generator, the method carries out operation according to the set calculation method to obtain the final storage data and stores the data, thereby solving the problems that when the data with small difference is repeatedly written into one block in the memory in the prior art, the tunneling oxide layer in the floating gate field effect transistor corresponding to some word lines in the word block has serious technical defects of accumulated electrons, by converting the data to be stored with slight difference between the front and the back into two groups of data to be stored with smaller data repetition rate, when the data with smaller difference is stored in the same block, the probability that each word line in the block is selected for writing data is substantially the same, so that the turn-on thresholds of each floating gate field effect transistor in the block are closer.

Drawings

FIG. 1 is a flowchart of a data storage method of a memory according to an embodiment of the present invention;

FIG. 2 is a flowchart of a data storage method of a memory according to a second embodiment of the present invention;

FIG. 3 is a block diagram of a data storage device of a memory according to a third embodiment of the present invention;

fig. 4 is a structural diagram of an electronic device according to a fourth embodiment of the present invention.

Detailed Description

In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention are described in further detail below with reference to the accompanying drawings. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention.

It should be further noted that, for the convenience of description, only some but not all of the relevant aspects of the present invention are shown in the drawings. Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the operations (or steps) as a sequential process, many of the operations can be performed in parallel, concurrently or simultaneously. In addition, the order of the operations may be re-arranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.

13页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:数据储存装置及其快取分流方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类