CN114115754B - Method and device for data updating, electronic equipment and storage medium - Google Patents

Method and device for data updating, electronic equipment and storage medium Download PDF

Info

Publication number
CN114115754B
CN114115754B CN202210103934.2A CN202210103934A CN114115754B CN 114115754 B CN114115754 B CN 114115754B CN 202210103934 A CN202210103934 A CN 202210103934A CN 114115754 B CN114115754 B CN 114115754B
Authority
CN
China
Prior art keywords
data
programming
length
target address
alternative
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210103934.2A
Other languages
Chinese (zh)
Other versions
CN114115754A (en
Inventor
武晓伟
马继荣
刘家齐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Unigroup Tsingteng Microsystems Co Ltd
Original Assignee
Beijing Unigroup Tsingteng Microsystems Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Unigroup Tsingteng Microsystems Co Ltd filed Critical Beijing Unigroup Tsingteng Microsystems Co Ltd
Priority to CN202210103934.2A priority Critical patent/CN114115754B/en
Publication of CN114115754A publication Critical patent/CN114115754A/en
Application granted granted Critical
Publication of CN114115754B publication Critical patent/CN114115754B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/062Securing storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0652Erasing, e.g. deleting, data cleaning, moving of data to a wastebasket
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Read Only Memory (AREA)
  • Stored Programmes (AREA)

Abstract

The application relates to the technical field of data encryption, and discloses a method for updating data, which comprises the following steps: acquiring first programming data and a target address in a storage array; acquiring the data length of first programming data; under the condition that the data length is smaller than a preset length threshold value, acquiring alternative data according to a target address; combining the first programming data with the alternative data to obtain second programming data, and performing data erasing operation on data corresponding to the target address; the second program data is programmed into the target address. In this way, the first programming data and the alternative data are combined, so that the length of the combined second programming data meets the length requirement of the minimum programming unit, and the second programming data is programmed into the target address, thereby realizing the updating of the key data with any data length. The application also discloses a device for updating data, electronic equipment and a storage medium.

Description

Method and device for data updating, electronic equipment and storage medium
Technical Field
The present application relates to the field of data encryption technologies, and for example, to a method and an apparatus for data updating, an electronic device, and a storage medium.
Background
The Nor Flash is used as a nonvolatile memory device, is widely applied to the fields of communication, finance, intelligent equipment, security and protection systems and the like due to the characteristics of large data storage capacity and good data retention characteristics, and in order to realize the security of system firmware, the key data in the Nor Flash memory array is usually updated in real time through programming operation, so that the dynamic change and encryption of the data are realized, the security performance of a product is improved, and the data is prevented from being copied and utilized. The Nor Flash has different types of memory array structures, and the minimum programming unit corresponding to the different types of memory array structures is different, for example: the minimum programming unit in the Nor Flash memory array is an entire row, and the minimum programming unit in the Nor Flash memory array is 8 bytes.
In the process of implementing the embodiments of the present disclosure, it is found that at least the following problems exist in the related art:
in the prior art, when the key data is updated in real time in each type of storage array structure, only the key data not smaller than the minimum programming unit can be updated, and the updating of the key data with any data length is difficult to realize.
Disclosure of Invention
The following presents a simplified summary in order to provide a basic understanding of some aspects of the disclosed embodiments. This summary is not an extensive overview nor is intended to identify key/critical elements or to delineate the scope of such embodiments but rather as a prelude to the more detailed description that is presented later.
The embodiment of the disclosure provides a method and a device for data updating, electronic equipment and a storage medium, so as to update key data with any data length.
In some embodiments, the method for data updating comprises: under the condition that the data length is smaller than a preset length threshold value, acquiring alternative data according to the target address; the alternative data is data which does not need to be updated in the storage unit corresponding to the target address; the length threshold value is used for characterizing the length of a minimum programming unit in the storage array; combining the first programming data with the alternative data to obtain second programming data, and performing data erasing operation on data corresponding to the target address; a data length of the second program data is not less than a length of the minimum program cell; programming the second programming data into the target address.
In some embodiments, the apparatus for data updating comprises: a first obtaining module configured to obtain first programming data and a target address in a memory array; the storage array comprises a plurality of storage units; a second obtaining module configured to obtain a data length of the first programming data; the data read-back module is configured to acquire alternative data according to the target address under the condition that the data length is smaller than a preset length threshold; the alternative data is data which does not need to be updated in the storage unit corresponding to the target address; the length threshold value is used for characterizing the length of a minimum programming unit in the storage array; the data processing module is configured to combine the first programming data with the alternative data to obtain second programming data, and perform data erasing operation on data corresponding to the target address; a data length of the second program data is not less than a length of the minimum program cell; a first update module configured to program the second programming data into the target address.
In some embodiments, the electronic device comprises a processor and a memory storing program instructions, the processor being configured to perform the above-described method for data updating when executing the program instructions.
In some embodiments, the storage medium stores program instructions that, when executed, perform the method for data updating described above.
The method and the device for updating data, the electronic device and the storage medium provided by the embodiment of the disclosure can achieve the following technical effects: obtaining first programming data and a target address in a storage array; the storage array comprises a plurality of storage units; acquiring the data length of first programming data; under the condition that the data length is smaller than a preset length threshold value, acquiring alternative data according to a target address; the alternative data is data which does not need to be updated in the storage unit corresponding to the target address; the length threshold is used for characterizing the length of a minimum programming unit in the storage array; combining the first programming data with the alternative data to obtain second programming data, and performing data erasing operation on data corresponding to the target address; the data length of the second program data is not less than the length of the minimum program cell; the second program data is programmed into the target address. In this way, when the data length of the first programming data is smaller than the preset length threshold, the first programming data and the alternative data are combined, so that the length of the combined second programming data meets the length requirement of the minimum programming unit, and the second programming data is programmed into the target address, so that the key data smaller than the minimum programming unit is updated, and the key data with any data length can be updated.
The foregoing general description and the following description are exemplary and explanatory only and are not restrictive of the application.
Drawings
One or more embodiments are illustrated by way of example in the accompanying drawings, which correspond to the accompanying drawings and not in limitation thereof, in which elements having the same reference numeral designations are shown as like elements and not in limitation thereof, and wherein:
fig. 1 is a schematic diagram of a first method for data update provided by an embodiment of the present disclosure;
FIG. 2 is a diagram illustrating a second method for data update provided by an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a third method for data update provided by an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of an apparatus for data update provided by an embodiment of the present disclosure;
FIG. 5 is a schematic diagram of an application of a method for data update provided by an embodiment of the present disclosure;
fig. 6 is a schematic diagram of an electronic device provided by an embodiment of the disclosure.
Detailed Description
So that the manner in which the features and elements of the disclosed embodiments can be understood in detail, a more particular description of the disclosed embodiments, briefly summarized above, may be had by reference to the embodiments, some of which are illustrated in the appended drawings. In the following description of the technology, for purposes of explanation, numerous details are set forth in order to provide a thorough understanding of the disclosed embodiments. However, one or more embodiments may be practiced without these details. In other instances, well-known structures and devices may be shown in simplified form in order to simplify the drawing.
The terms "first," "second," and the like in the description and in the claims, and the above-described drawings of embodiments of the present disclosure, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the present disclosure described herein may be made. Furthermore, the terms "comprising" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions.
The term "plurality" means two or more unless otherwise specified.
In the embodiment of the present disclosure, the character "/" indicates that the preceding and following objects are in an or relationship. For example, A/B represents: a or B.
The term "and/or" is an associative relationship that describes objects, meaning that three relationships may exist. For example, a and/or B, represents: a or B, or A and B.
The term "correspond" may refer to an association or binding relationship, and a corresponds to B refers to an association or binding relationship between a and B.
As shown in fig. 1, an embodiment of the present disclosure provides a method for data update, including:
step S101, the electronic equipment acquires first programming data and a target address in a storage array; the memory array includes a plurality of memory cells.
In step S102, the electronic device obtains a data length of the first programming data.
Step S103, the electronic equipment acquires alternative data according to the target address under the condition that the data length is smaller than a preset length threshold; the alternative data is data which does not need to be updated in the storage unit corresponding to the target address; the length threshold is used to characterize the length of the smallest programmed cell in the memory array.
Step S104, the electronic equipment combines the first programming data with the alternative data to obtain second programming data, and performs data erasing operation on data corresponding to the target address; the data length of the second program data is not less than the length of the minimum program cell.
In step S105, the electronic device programs the second programming data into the target address.
By adopting the method for updating data provided by the embodiment of the disclosure, the first programming data and the target address in the storage array are obtained; the storage array comprises a plurality of storage units; acquiring the data length of first programming data; under the condition that the data length is smaller than a preset length threshold value, acquiring alternative data according to a target address; combining the first programming data with the alternative data to obtain second programming data, and performing data erasing operation on data corresponding to the target address; the second program data is programmed into the target address. In this way, when the data length of the first programming data is smaller than the preset length threshold, the first programming data and the alternative data are combined, so that the length of the combined second programming data meets the length requirement of the minimum programming unit, and the second programming data is programmed into the target address, so that the key data smaller than the minimum programming unit is updated, and the key data with any data length can be updated.
Optionally, the preset length threshold is the length of the whole row in the memory array. Optionally, the length of the entire row is 256 bytes.
Optionally, the target address is a programming address.
Optionally, the target address includes row address information and column address information; the electronic equipment acquires the alternative data according to the target address, and the method comprises the following steps: and the electronic equipment extracts the alternative data from the storage unit corresponding to the target address according to the row address information and the column address information.
As shown in fig. 2, an embodiment of the present disclosure provides a method for data update, including:
step S201, the electronic equipment acquires first programming data and a target address in a storage array; the storage array comprises a plurality of storage units; the target address includes row address information and column address information.
In step S202, the electronic device obtains the data length of the first programming data.
Step S203, the electronic equipment extracts alternative data from a storage unit corresponding to the target address according to the row address information and the column address information under the condition that the data length is smaller than a preset length threshold; the alternative data is data which does not need to be updated in the storage unit corresponding to the target address; the length threshold is used to characterize the length of the smallest programmed cell in the memory array.
Step S204, the electronic equipment combines the first programming data with the alternative data to obtain second programming data, and performs data erasing operation on the data corresponding to the target address; the data length of the second program data is not less than the length of the minimum program cell.
In step S205, the electronic device programs the second programming data into the target address.
By adopting the method for updating data provided by the embodiment of the disclosure, under the condition that the data length of the first programming data is smaller than the preset length threshold, the first programming data and the alternative data are combined, so that the length of the combined second programming data meets the length requirement of the minimum programming unit, and the second programming data is programmed into the target address, thereby realizing the updating of the key data smaller than the minimum programming unit, and further realizing the updating of the key data with any data length.
Optionally, in a case that the data length is smaller than a preset length threshold, the method further includes: acquiring data to be updated according to the target address; and the data to be updated is the data needing to be updated in the storage unit corresponding to the target address. Optionally, the data to be updated is key data.
Optionally, obtaining data to be updated according to the target address includes: and extracting the data to be updated from the storage unit corresponding to the target address according to the row address information and the column address information. In this way, the data to be updated and the alternative data can be extracted by the target address, thereby facilitating the updating of the data to be updated to the first programming data.
Optionally, the data to be updated and the alternative data are in the same row in the memory array, that is, the row address information of the data to be updated and the alternative data is the same.
Optionally, the column address information includes a column address corresponding to the data to be updated and a column address corresponding to the alternative data.
Optionally, the electronic device performs a data erasing operation on data corresponding to the target address, including: and the electronic equipment carries out data erasing operation on the data corresponding to the row address information. In some embodiments, the data erasure is performed on all data in the address corresponding to the row address information.
Optionally, the target address includes row address information, and the electronic device programs the second programming data into the target address, including: the electronic device programs the second programming data into an address corresponding to the row address information.
Optionally, after acquiring the data length of the first programming data, the electronic device further includes: the electronic equipment performs data erasing operation on data corresponding to the target address under the condition that the data length is equal to the length threshold; the first program data is programmed into a target address.
Optionally, the target address includes row address information and column address information; the electronic equipment carries out data erasing operation on data corresponding to the target address, and the data erasing operation comprises the following steps: and the electronic equipment carries out data erasing operation on the data corresponding to the row address information. In some embodiments, the data erasure is performed on all data in the address corresponding to the row address information.
Optionally, the target address includes row address information and column address information; the electronic device programs first programming data into a target address, including: the electronic device programs the first programming data into an address corresponding to the row address information.
Optionally, the electronic device obtains the first programming data and a target address in the memory array; the storage array comprises a plurality of storage units; acquiring the data length of first programming data; under the condition that the data length is smaller than a preset length threshold value, acquiring alternative data according to a target address; the alternative data is data which does not need to be updated in the storage unit corresponding to the target address; the length threshold is used for characterizing the length of a minimum programming unit in the storage array; combining the first programming data with the alternative data to obtain second programming data, and performing data erasing operation on data corresponding to the target address; the data length of the second program data is not less than the length of the minimum program cell; programming second program data into the target address; under the condition that the data length is equal to the length threshold value, performing data erasing operation on data corresponding to the target address; the first program data is programmed into a target address.
Optionally, after acquiring the data length of the first programming data, the method further includes: under the condition that the data length of the first programming data is larger than the length threshold, third programming data with the length same as the length threshold is selected from the first programming data, and data erasing operation is carried out on data corresponding to the target address; the third program data is programmed into the target address.
Optionally, the target address includes row address information and column address information; the electronic equipment carries out data erasing operation on data corresponding to the target address, and the data erasing operation comprises the following steps: and the electronic equipment carries out data erasing operation on the data corresponding to the row address information. In some embodiments, the data erasure is performed on all data in the address corresponding to the row address information.
Optionally, the target address includes row address information and column address information; the electronic device programs third programming data into the target address, including: the electronic device programs the third programming data into an address corresponding to the row address information.
Optionally, obtaining first programming data and a target address in the memory array; the storage array comprises a plurality of storage units; acquiring the data length of first programming data; under the condition that the data length is smaller than a preset length threshold value, acquiring alternative data according to a target address; the alternative data is data which does not need to be updated in the storage unit corresponding to the target address; the length threshold is used for characterizing the length of a minimum programming unit in the storage array; combining the first programming data with the alternative data to obtain second programming data, and performing data erasing operation on data corresponding to the target address; the data length of the second program data is not less than the length of the minimum program cell; programming second program data into the target address; under the condition that the data length of the first programming data is larger than the length threshold, third programming data with the length same as the length threshold is selected from the first programming data, and data erasing operation is carried out on data corresponding to the target address; the third program data is programmed into the target address.
Optionally, selecting third programming data having the same length as the length threshold from the first programming data includes: and taking the last byte in the first programming data as a truncation starting point, truncating the data with the same length as the length threshold value from the truncation starting point forward, and determining the data as third programming data.
In some embodiments, the length threshold is 256 bytes in total from byte 0 to byte 255, in the case that the data length of the first programming data is 258 bytes, the data length of the first programming data is greater than the length threshold, the last byte in the first programming data, namely byte 257, is used as a truncation start point, data with the same length as the length threshold is truncated from byte 257 to byte 2, and the data from byte 2 to byte 257 is the third programming data.
As shown in fig. 3, an embodiment of the present disclosure provides a method for data update, including:
step S301, acquiring first programming data and a target address in a storage array; the memory array includes a plurality of memory cells.
In step S302, the data length of the first programming data is obtained.
Step S303, judging whether the data length is smaller than a preset length threshold value; if the data length is smaller than the preset length threshold, executing step S304; or, in case the data length is equal to the preset length threshold, executing step S307; alternatively, if the data length is greater than the preset length threshold, step S308 is performed.
Step S304, acquiring alternative data according to the target address; the alternative data is data which does not need to be updated in the storage unit corresponding to the target address; the length threshold is used to characterize the length of the smallest programmed cell in the memory array.
Step S305, combining the first programming data and the alternative data to obtain second programming data, and performing data erasing operation on the data corresponding to the target address; the data length of the second program data is not less than the length of the minimum program cell.
Step S306, program the second programming data into the target address.
Step S307, performing data erasing operation on the data corresponding to the row address information; the first program data is programmed into a target address.
Step S308, selecting third programming data with the same length as the length threshold value from the first programming data, and performing data erasing operation on data corresponding to the target address; the third program data is programmed into the target address.
By adopting the method for updating data provided by the embodiment of the disclosure, the data length of the acquired first programming data is judged according to the preset length threshold, and different data updating methods can be adopted according to different judgment results, so that data updating of any address and any data length is realized for memory devices with different memory array structures, the programming flexibility of the memory devices is increased, and safer key protection and dynamic key encryption functions are realized.
As shown in fig. 4, an embodiment of the present disclosure provides an apparatus for data update, where the apparatus includes: a first obtaining module 401, a second obtaining module 402, a data read-back module 403, a data processing module 404 and a first updating module 405; the first obtaining module 401 is configured to obtain first program data and a target address in a memory array; the storage array comprises a plurality of storage units; the first programming data is sent to a second acquisition module and a data processing module, and the target address is sent to a data read-back module; the second obtaining module 402 is configured to receive the first programming data sent by the first obtaining module, obtain the data length of the first programming data, and send the data length of the first programming data to the data read-back module; the data read-back module 403 is configured to receive the data length of the first programming data sent by the second obtaining module and the target address sent by the first obtaining module sent by the second obtaining module; under the condition that the data length is smaller than a preset length threshold value, acquiring alternative data according to a target address; the alternative data is data which does not need to be updated in the storage unit corresponding to the target address; the length threshold is used for characterizing the length of a minimum programming unit in the storage array; sending the alternative data to a data processing module; the data processing module 404 is configured to receive the first programming data sent by the first obtaining module and the alternative data sent by the data reading-back module; combining the first programming data with the alternative data to obtain second programming data, and performing data erasing operation on data corresponding to the target address; and sending the second programming data to the first update module; the first update module 405 is configured to receive the second programming data transmitted by the data processing module and program the second programming data into the target address.
By adopting the device for updating data provided by the embodiment of the disclosure, the first programming data and the target address in the storage array are acquired through the first acquisition module; the second obtaining module obtains the data length of the first programming data; the data read-back module acquires alternative data according to the target address under the condition that the data length is smaller than a preset length threshold; the data processing module combines the first programming data with the alternative data to obtain second programming data, and performs data erasing operation on data corresponding to the target address; the first update module programs second programming data into the target address. In this way, when the data length of the first programming data is smaller than the preset length threshold, the first programming data and the alternative data are combined, so that the length of the combined second programming data meets the length requirement of the minimum programming unit, and the second programming data is programmed into the target address, so that the key data smaller than the minimum programming unit is updated, and the key data with any data length can be updated.
Optionally, the target address includes row address information and column address information; the data read-back module is configured to obtain the alternative data according to the target address by: and extracting alternative data from the storage unit corresponding to the target address according to the row address information and the column address information.
Optionally, the data read-back module is further configured to obtain the data to be updated according to the target address by: acquiring data to be updated according to the target address; and the data to be updated is the data needing to be updated in the storage unit corresponding to the target address.
Optionally, after the data to be updated and the alternative data can be extracted from the storage unit corresponding to the template address through the data read-back module, the method further includes: storing the data to be updated and the alternative data into a data cache unit; and combining the first programming data and the alternative data to obtain second programming data.
Optionally, the apparatus for updating data further includes a second updating module, where the second updating module is configured to perform a data erasing operation on data corresponding to the target address when the data length is equal to the length threshold; the first program data is programmed into a target address.
Optionally, the apparatus for updating data further includes a third updating module, where the third updating module is configured to, when the data length is greater than the length threshold, select third programming data with the length same as the length threshold from the first programming data, and perform a data erasing operation on data corresponding to the target address; the third program data is programmed into the target address.
Referring to fig. 5, an application diagram of a method for updating data is provided in the embodiment of the present disclosure; the data processing module sends a programming control signal to the data reading module and the erasing circuit after receiving the target address, and triggers the data reading module to read out the data to be updated and the alternative data from the Nor Flash memory array according to the target address and sends the data to the data read-back module; meanwhile, triggering an erasing circuit to perform data erasing operation on data corresponding to row address information in the target address; the data read-back module stores the alternative data into the data cache unit, the data processing module transmits the first programming data into the data cache unit, and the first programming data and the alternative data are combined to obtain second programming data; and the first programming data is sent to the programming circuit, and the second programming data is programmed into a target address in the Nor Flash memory array through the programming circuit, so that the updating of the key data in the memory array is realized, a dynamic key encryption function can be realized, safer key protection is realized, and the data is effectively prevented from being copied or leaked.
In some embodiments, a data erase operation of the Nor flash memory device may implement a data 0 to data 1 transition; a program operation of the Nor flash memory device can implement a data 1 to data 0 transition and cannot implement a data 0 to 1 transition. Usually, a data erase operation is required for a program address before a program operation.
In some embodiments, the Nor flash memory array is typically word line shared and bit line shared, which can effectively reduce the area of the memory array, but limits the selection of the smallest memory cell. The series of memory cells shared by the word lines is referred to as a row and the series of cells shared by the bit lines is referred to as a column.
As shown in fig. 6, an embodiment of the present disclosure provides an electronic device including a processor (processor) 600 and a memory (memory) 601. Optionally, the electronic device may further include a Communication Interface 602 and a bus 603. The processor 600, the communication interface 602, and the memory 601 may communicate with each other via a bus 603. The communication interface 602 may be used for information transfer. The processor 600 may call logic instructions in the memory 601 to perform the method for data update of the above-described embodiments.
By adopting the electronic equipment provided by the embodiment of the disclosure, the first programming data and the target address in the storage array are acquired; the storage array comprises a plurality of storage units; acquiring the data length of first programming data; under the condition that the data length is smaller than a preset length threshold value, acquiring alternative data according to a target address; combining the first programming data with the alternative data to obtain second programming data, and performing data erasing operation on data corresponding to the target address; the second program data is programmed into the target address. In this way, when the data length of the first programming data is smaller than the preset length threshold, the first programming data and the alternative data are combined, so that the length of the combined second programming data meets the length requirement of the minimum programming unit, and the second programming data is programmed into the target address, so that the key data smaller than the minimum programming unit is updated, and the key data with any data length can be updated.
In addition, the logic instructions in the memory 601 may be implemented in the form of software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products.
The memory 601 is a computer-readable storage medium, and can be used for storing software programs, computer-executable programs, such as program instructions/modules corresponding to the methods in the embodiments of the present disclosure. The processor 600 executes functional applications and data processing, i.e. implements the method for data update in the above-described embodiments, by executing program instructions/modules stored in the memory 601.
The memory 601 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal device, and the like. In addition, the memory 601 may include a high speed random access memory, and may also include a non-volatile memory.
Alternatively, the electronic device comprises a computer or server or the like.
The embodiment of the disclosure provides a storage medium, which stores program instructions, and when the program instructions are executed, the method for updating data is executed.
Embodiments of the present disclosure provide a computer program product comprising a computer program stored on a computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, cause the computer to perform the above-described method for data updating.
The computer-readable storage medium described above may be a transitory computer-readable storage medium or a non-transitory computer-readable storage medium.
The technical solution of the embodiments of the present disclosure may be embodied in the form of a software product, where the computer software product is stored in a storage medium and includes one or more instructions to enable a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method of the embodiments of the present disclosure. And the aforementioned storage medium may be a non-transitory storage medium comprising: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes, and may also be a transient storage medium.
The above description and drawings sufficiently illustrate embodiments of the disclosure to enable those skilled in the art to practice them. Other embodiments may incorporate structural, logical, electrical, process, and other changes. The examples merely typify possible variations. Individual components and functions are optional unless explicitly required, and the sequence of operations may vary. Portions and features of some embodiments may be included in or substituted for those of others. Furthermore, the words used in the specification are words of description only and are not intended to limit the claims. As used in the description of the embodiments and the claims, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. Similarly, the term "and/or" as used in this application is meant to encompass any and all possible combinations of one or more of the associated listed. Furthermore, the terms "comprises" and/or "comprising," when used in this application, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. Without further limitation, an element defined by the phrase "comprising an …" does not exclude the presence of other like elements in a process, method or apparatus that comprises the element. In this document, each embodiment may be described with emphasis on differences from other embodiments, and the same and similar parts between the respective embodiments may be referred to each other. For methods, products, etc. of the embodiment disclosures, reference may be made to the description of the method section for relevance if it corresponds to the method section of the embodiment disclosure.
Those of skill in the art would appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software may depend upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the disclosed embodiments. It can be clearly understood by the skilled person that, for convenience and brevity of description, the specific working processes of the system, the apparatus and the unit described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments disclosed herein, the disclosed methods, products (including but not limited to devices, apparatuses, etc.) may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units may be merely a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form. The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to implement the present embodiment. In addition, functional units in the embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. In the description corresponding to the flowcharts and block diagrams in the figures, operations or steps corresponding to different blocks may also occur in different orders than disclosed in the description, and sometimes there is no specific order between the different operations or steps. For example, two sequential operations or steps may in fact be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved. Each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.

Claims (8)

1. A method for data updating, comprising:
acquiring first programming data and a target address in a storage array; the storage array comprises a plurality of storage units;
acquiring the data length of the first programming data;
under the condition that the data length is smaller than a preset length threshold value, acquiring alternative data according to the target address; the alternative data is data which does not need to be updated in the storage unit corresponding to the target address; the length threshold value is used for characterizing the length of a minimum programming unit in the storage array;
combining the first programming data with the alternative data to obtain second programming data, and performing data erasing operation on data corresponding to the target address; a data length of the second program data is not less than a length of the minimum program cell;
programming the second programming data into the target address;
after the data length of the first programming data is obtained, the method further comprises the following steps:
under the condition that the data length is larger than the length threshold, selecting third programming data with the same length as the length threshold from the first programming data, and performing data erasing operation on data corresponding to the target address;
programming the third programming data into the target address;
selecting third program data having the same length as the length threshold from the first program data, including: and taking the last byte in the first programming data as a truncation starting point, truncating the data with the same length as the length threshold value from the truncation starting point forward, and determining the data as third programming data.
2. The method of claim 1, wherein the target address comprises row address information and column address information; acquiring alternative data according to the target address, comprising:
and extracting the alternative data from the storage unit corresponding to the target address according to the row address information and the column address information.
3. The method of claim 1, wherein obtaining the data length of the first programming data further comprises:
performing data erasing operation on the data corresponding to the target address under the condition that the data length is equal to the length threshold;
programming the first programming data into the target address.
4. An apparatus for data updating, comprising:
a first obtaining module configured to obtain first programming data and a target address in a memory array; the storage array comprises a plurality of storage units;
a second obtaining module configured to obtain a data length of the first programming data;
the data read-back module is configured to acquire alternative data according to the target address under the condition that the data length is smaller than a preset length threshold; the alternative data is data which does not need to be updated in the storage unit corresponding to the target address; the length threshold value is used for characterizing the length of a minimum programming unit in the storage array;
the data processing module is configured to combine the first programming data with the alternative data to obtain second programming data, and perform data erasing operation on data corresponding to the target address; a data length of the second program data is not less than a length of the minimum program cell;
a first update module configured to program the second programming data into the target address;
the device further comprises a third updating module, wherein the third updating module is configured to select third programming data with the same length as the length threshold from the first programming data and perform data erasing operation on data corresponding to the target address under the condition that the data length is larger than the length threshold; programming the third programming data into the target address;
selecting third program data having the same length as the length threshold from the first program data, including: and taking the last byte in the first programming data as a truncation starting point, truncating the data with the same length as the length threshold value from the truncation starting point forward, and determining the data as third programming data.
5. The apparatus of claim 4, wherein the target address comprises row address information and column address information; the data read-back module is configured to obtain alternative data according to the target address by:
and extracting the alternative data from the storage unit corresponding to the target address according to the row address information and the column address information.
6. The apparatus according to claim 4, wherein the apparatus further comprises a second updating module configured to perform a data erasing operation on data corresponding to the target address if the data length is equal to the length threshold; programming the first programming data into the target address.
7. An electronic device comprising a processor and a memory storing program instructions, characterized in that the processor is configured to perform the method for data updating according to any of claims 1 to 3 when executing the program instructions.
8. A storage medium storing program instructions, characterized in that said program instructions, when executed, perform a method for data updating according to any of claims 1 to 3.
CN202210103934.2A 2022-01-28 2022-01-28 Method and device for data updating, electronic equipment and storage medium Active CN114115754B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210103934.2A CN114115754B (en) 2022-01-28 2022-01-28 Method and device for data updating, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210103934.2A CN114115754B (en) 2022-01-28 2022-01-28 Method and device for data updating, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114115754A CN114115754A (en) 2022-03-01
CN114115754B true CN114115754B (en) 2022-04-05

Family

ID=80361913

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210103934.2A Active CN114115754B (en) 2022-01-28 2022-01-28 Method and device for data updating, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114115754B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103399826A (en) * 2013-08-15 2013-11-20 南京新联电子股份有限公司 Data storage method based on NOR FLASH
CN103455435A (en) * 2013-08-29 2013-12-18 华为技术有限公司 Data writing method and device
CN103559146A (en) * 2013-11-05 2014-02-05 山东大学 Method for increasing reading and writing speeds of NAND flash controller
CN104615546A (en) * 2015-02-13 2015-05-13 小米科技有限责任公司 File data management method and device
CN107908436A (en) * 2017-10-18 2018-04-13 广州视源电子科技股份有限公司 Method for storing operation steps of access application and method and system for simplifying user operation
CN113409860A (en) * 2021-06-01 2021-09-17 芯天下技术股份有限公司 Nonvolatile memory erasing method, device, storage medium and terminal

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9632870B2 (en) * 2007-03-29 2017-04-25 Violin Memory, Inc. Memory system with multiple striping of raid groups and method for performing the same
CN109992205B (en) * 2019-03-27 2020-06-02 无锡海斯凯尔医学技术有限公司 Data storage device, method and readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103399826A (en) * 2013-08-15 2013-11-20 南京新联电子股份有限公司 Data storage method based on NOR FLASH
CN103455435A (en) * 2013-08-29 2013-12-18 华为技术有限公司 Data writing method and device
CN103559146A (en) * 2013-11-05 2014-02-05 山东大学 Method for increasing reading and writing speeds of NAND flash controller
CN104615546A (en) * 2015-02-13 2015-05-13 小米科技有限责任公司 File data management method and device
CN107908436A (en) * 2017-10-18 2018-04-13 广州视源电子科技股份有限公司 Method for storing operation steps of access application and method and system for simplifying user operation
CN113409860A (en) * 2021-06-01 2021-09-17 芯天下技术股份有限公司 Nonvolatile memory erasing method, device, storage medium and terminal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
MFTL:一种基于固态盘系统非对齐更新数据的合并策略;黄耀钦等;《小型微型计算机系统》;20180630(第06期);第1359-1365页 *

Also Published As

Publication number Publication date
CN114115754A (en) 2022-03-01

Similar Documents

Publication Publication Date Title
CN109597571B (en) Data storage method, data reading method, data storage device, data reading device and computer equipment
CN101918928B (en) Storage sub-system for a computer comprising write-once memory devices and write-many memory devices and related method
US10310772B2 (en) Memory control method and memory control apparatus
US11550474B2 (en) Data storage device and method for rewriting parameters thereof
CN102023843B (en) Function calling method and device as well as smart card
US10649840B2 (en) Data storage device performing recovery operation after sudden power-off and operating method thereof
CN114115754B (en) Method and device for data updating, electronic equipment and storage medium
CN106528436B (en) Data storage device and data maintenance method thereof
CN104484619A (en) Method for accessing file system of smart card through application module
CN109857740B (en) Character string storage method, matching method, electronic device and readable storage medium
CN108830114B (en) Data processing method and device of nonvolatile memory and storage medium
CN103139644B (en) A kind of method of sequence numbers match and digital TV terminal
CN114153396B (en) Data processing method and device, data storage device and terminal device
CN115857811A (en) Data processing method and device, solid state disk and readable storage medium
CN114281714A (en) Method and device for memory access, electronic equipment and storage medium
CN113792020A (en) Data processing method, device, terminal and storage medium
CN108959486B (en) Audit field information acquisition method and device, computer equipment and storage medium
US10089029B2 (en) Storage in flash memory
CN111191082A (en) Data management method and device, computer equipment and storage medium
CN115686373A (en) Method and device for data reinforcement, electronic equipment and storage medium
US10754548B2 (en) Data storage device and method for rewriting parameters thereof
CN115543876B (en) Method and device for verifying address decoding function, electronic equipment and medium
CN110909385B (en) Safety management method for storage data in esim card
CN108376052B (en) Data processing method and device for security chip
CN115588454A (en) Data writing method and device of memory, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant