[go: up one dir, main page]

CN107203478B - Data storage method and device - Google Patents

Data storage method and device Download PDF

Info

Publication number
CN107203478B
CN107203478B CN201710474458.4A CN201710474458A CN107203478B CN 107203478 B CN107203478 B CN 107203478B CN 201710474458 A CN201710474458 A CN 201710474458A CN 107203478 B CN107203478 B CN 107203478B
Authority
CN
China
Prior art keywords
data
information
item
stored
data item
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
CN201710474458.4A
Other languages
Chinese (zh)
Other versions
CN107203478A (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.)
Suzhou Metabrain Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN201710474458.4A priority Critical patent/CN107203478B/en
Publication of CN107203478A publication Critical patent/CN107203478A/en
Application granted granted Critical
Publication of CN107203478B publication Critical patent/CN107203478B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0238Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
    • G06F12/0246Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory in block erasable memory, e.g. flash memory
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/06Addressing a physical block of locations, e.g. base addressing, module addressing, memory dedication
    • G06F12/0615Address space extension

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a data storage method and a data storage device, wherein when data to be stored needs to be expanded, modification information of preset data item description information is acquired, wherein the preset data item description information is data item attribute group information comprising data offset information, data length information, last field information and subsequent item information; modifying the description information of the preset data item according to the modification information to obtain the description information of the extended data item; and storing the expanded data to be stored to a storage medium according to the expanded data item description information. Each item of data is described through the data item description information attribute group, and when the data length needs to be expanded, only the last field information and the subsequent item information of the original data item need to be simply modified, so that the influence of the expansion of the data item on other data items is avoided; meanwhile, the storage space is not required to be reserved for each data item, the difficulty of data layout design in a storage medium at the initial stage of system design is reduced, and the extensibility of stored data is improved.

Description

一种数据存储的方法及装置A method and device for data storage

技术领域technical field

本发明涉及存储技术领域,特别是涉及一种数据存储的方法及装置。The present invention relates to the technical field of storage, and in particular, to a method and device for data storage.

背景技术Background technique

随着存储技术的发展进步,所需存储的数据长度也在不断增加。With the development of storage technology, the length of data that needs to be stored is also increasing.

现有采用顺序保存方式来将数据存储在存储介质中,该存储介质可以为EEPROM等存储设备。当需要将数据存储在EEPROM等存储介质时,一般地,按照(数据偏移,数据长度)对的形式进行顺序保存。In the prior art, data is stored in a storage medium in a sequential preservation manner, and the storage medium may be a storage device such as an EEPROM. When data needs to be stored in a storage medium such as an EEPROM, generally, the data is stored sequentially in the form of (data offset, data length) pairs.

但是,当所需存储数据的数据长度发生变化时,例如,假定系统设计初期规定product_sn占7个字节,在实现时将EEPROM的0x0000—0x0006七个字节用于存放product_sn,并预留一个字节用于扩展;而从0x0008偏移处开始的四个字节用于存放节点的ipv4地址。在开发过程中,发现产品序列号product_sn需要由7位扩展为9位,按照传统的形式组织EEPROM中的数据,由于预留空间不足,首先需要将ipv4地址数据后移,为product_sn留出足够的空间;而ipv4址数数据存放位置改变时,必须同时修改ipv4数据的描述信息即(数据偏移,数据长度)数据对;当EEPROM中存入大量数据时,格式变更导致的存储空间调整将变得异常复杂,复杂性甚至不亚于对EEPROM空间进行重新分配。由上可知,采用顺序保存的方式的存在较大弊端:当某条信息的格式发生变化,如长度变长而预留的空间不足以容纳新的数据格式时,需要重新规划所有数据在EEPROM中的分布,造成前期工作的浪费;而为每条信息预留超过所需的存储空间又势必造成空间的浪费。However, when the data length of the data to be stored changes, for example, it is assumed that the product_sn occupies 7 bytes in the early stage of the system design, and the 0x0000-0x0006 seven bytes of the EEPROM are used to store the product_sn during implementation, and one The bytes are used for expansion; and the four bytes starting at offset 0x0008 are used to store the ipv4 address of the node. During the development process, it was found that the product serial number product_sn needs to be expanded from 7 bits to 9 bits, and the data in the EEPROM is organized according to the traditional form. Due to insufficient reserved space, firstly, the ipv4 address data needs to be moved backward to leave enough space for product_sn. When the storage location of the ipv4 address data is changed, the description information of the ipv4 data (data offset, data length) data pair must be modified at the same time; when a large amount of data is stored in the EEPROM, the storage space adjustment caused by the format change will change. It is extremely complex, and the complexity is not inferior to the reallocation of EEPROM space. It can be seen from the above that there are major drawbacks in the method of sequential storage: when the format of a certain piece of information changes, such as when the length becomes longer and the reserved space is not enough to accommodate the new data format, it is necessary to re-plan all data in the EEPROM The distribution of information will cause waste of preliminary work; and reserving more than required storage space for each piece of information will inevitably lead to waste of space.

发明内容SUMMARY OF THE INVENTION

本发明的目的是提供一种数据存储的方法及装置,目的在于解决现有采用顺序保存方式存储数据的易扩展性较差的问题。The purpose of the present invention is to provide a data storage method and device, and the purpose is to solve the problem of poor scalability of data stored in the existing sequential storage method.

为解决上述技术问题,本发明提供一种数据存储的方法,该方法包括:In order to solve the above-mentioned technical problems, the present invention provides a method for data storage, the method comprising:

当待存储数据需要扩展时,获取预设数据项描述信息的修改信息,其中,所述预设数据项描述信息为包括数据偏移信息、数据长度信息、最后字段信息和后续项信息的数据项属性组信息;When the data to be stored needs to be expanded, the modification information of the description information of the preset data item is obtained, wherein the description information of the preset data item is a data item including data offset information, data length information, last field information and subsequent item information attribute group information;

根据所述修改信息,修改所述预设数据项描述信息,得出扩展数据项描述信息,所述修改信息为用于修改所述后续项信息和所述最后字段信息的信息;According to the modification information, modify the preset data item description information to obtain extended data item description information, where the modification information is information used to modify the subsequent item information and the last field information;

根据所述扩展数据项描述信息,将扩展后的所述待存储数据存储至存储介质。According to the description information of the extended data item, the extended data to be stored is stored in a storage medium.

可选地,在所述根据所述扩展数据项描述信息,将所述待存储数据存储至存储介质之后还包括:Optionally, after storing the to-be-stored data to a storage medium according to the extended data item description information, the method further includes:

获取数据读取指令;Get the data read command;

根据所述数据读取指令包含的所述后续项信息和所述最后字段信息,读取扩展数据和原存储数据;Read extended data and original stored data according to the subsequent item information and the last field information contained in the data read instruction;

将所述控制数据和所述原存储数据进行拼接,得出扩展后的所述待存储数据。The control data and the original stored data are spliced to obtain the expanded data to be stored.

可选地,所述存储介质为EEPROM。Optionally, the storage medium is an EEPROM.

此外,本发明还提供了一种数据存储的装置,该装置包括:In addition, the present invention also provides a data storage device, the device comprising:

修改信息获取模块,用于当待存储数据需要扩展时,获取预设数据项描述信息的修改信息,其中,所述预设数据项描述信息为包括数据偏移信息、数据长度信息、最后字段信息和后续项信息的数据项属性组信息;A modification information acquisition module, configured to acquire modification information of the description information of a preset data item when the data to be stored needs to be expanded, wherein the description information of the preset data item includes data offset information, data length information, and last field information and data item attribute group information of subsequent item information;

描述信息修改模块,用于根据所述修改信息,修改所述预设数据项描述信息,得出扩展数据项描述信息,所述修改信息为用于修改所述后续项信息和所述最后字段信息的信息;A description information modification module, configured to modify the preset data item description information according to the modification information to obtain extended data item description information, where the modification information is used to modify the subsequent item information and the last field information Information;

扩展存储模块,用于根据所述扩展数据项描述信息,将扩展后的所述待存储数据存储至存储介质。An extended storage module, configured to store the extended data to be stored in a storage medium according to the extended data item description information.

可选地,还包括:Optionally, also include:

读取指令获取模块,用于获取数据读取指令;The read instruction acquisition module is used to acquire the data read instruction;

读取模块,用于根据所述数据读取指令包含的所述后续项信息和所述最后字段信息,读取扩展数据和原存储数据;a reading module, configured to read extended data and original storage data according to the subsequent item information and the last field information contained in the data reading instruction;

拼接模块,用于将所述控制数据和所述原存储数据进行拼接,得出扩展后的所述待存储数据。The splicing module is used for splicing the control data and the original stored data to obtain the expanded data to be stored.

可选地,所述存储介质为EEPROM。Optionally, the storage medium is an EEPROM.

本发明所提供的一种数据存储的方法及装置,当待存储数据需要扩展时,获取预设数据项描述信息的修改信息,其中,上述预设数据项描述信息为包括数据偏移信息、数据长度信息、最后字段信息和后续项信息的数据项属性组信息;根据修改信息,修改预设数据项描述信息,得出扩展数据项描述信息,上述修改信息为用于修改最后字段信息和后续项信息的信息;根据扩展数据项描述信息,将扩展后的待存储数据存储至存储介质。本申请通过数据项描述信息属性组描述每一项数据,当需要对数据长度进行扩展时,只需要简单修改原数据项的最后字段信息和后续项信息,避免了数据项的扩展对其它数据项的影响;同时无需考虑为每个数据项预留存储空间,降低了系统设计初期在存储介质中进行数据布局设计的难度,进而提高了存储数据的易扩展性。In the method and device for data storage provided by the present invention, when the data to be stored needs to be expanded, the modification information of the description information of a preset data item is obtained, wherein the description information of the preset data item includes data offset information, data The data item attribute group information of length information, last field information and subsequent item information; according to the modification information, modify the preset data item description information to obtain the extended data item description information, and the above modification information is used to modify the last field information and subsequent items. information; store the expanded data to be stored in the storage medium according to the expanded data item description information. This application describes each item of data through the data item description information attribute group. When the data length needs to be extended, it is only necessary to simply modify the last field information and subsequent item information of the original data item, thereby avoiding the expansion of the data item to other data items. At the same time, there is no need to consider reserving storage space for each data item, which reduces the difficulty of data layout design in the storage medium in the early stage of system design, thereby improving the scalability of stored data.

附图说明Description of drawings

为了更清楚的说明本发明实施例或现有技术的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单的介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions of the embodiments of the present invention or the prior art more clearly, the following will briefly introduce the accompanying drawings used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only For some embodiments of the present invention, for those of ordinary skill in the art, other drawings can also be obtained according to these drawings without any creative effort.

图1为本发明实施例所提供的数据存储方法的一种具体实施方式的流程示意图;1 is a schematic flowchart of a specific implementation of a data storage method provided by an embodiment of the present invention;

图2为本发明实施例所提供的数据存储装置的结构框图。FIG. 2 is a structural block diagram of a data storage device provided by an embodiment of the present invention.

具体实施方式Detailed ways

为了使本技术领域的人员更好地理解本发明方案,下面结合附图和具体实施方式对本发明作进一步的详细说明。显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make those skilled in the art better understand the solution of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only some, but not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

请参见图1,图1为本发明实施例所提供的数据存储方法的一种具体实施方式的流程示意图,该方法包括以下步骤:Please refer to FIG. 1. FIG. 1 is a schematic flowchart of a specific implementation of a data storage method provided by an embodiment of the present invention. The method includes the following steps:

步骤101:当待存储数据需要扩展时,获取预设数据项描述信息的修改信息,其中,所述预设数据项描述信息为包括数据偏移信息、数据长度信息、最后字段信息和后续项信息的数据项属性组信息。Step 101: When the data to be stored needs to be expanded, obtain the modification information of the description information of the preset data item, wherein the description information of the preset data item includes data offset information, data length information, last field information and subsequent item information The data item attribute group information.

可以理解,上述最后字段信息可以是指表征待存储数据的各行数据是否为最后字段的信息,即表明各个数据是否为最后数据,具体地可以用is_end表示,当is_end列为false时,表明该行数据不是最后的数据;当is_end列为true时,表明该行数据是最后的数据。It can be understood that the above-mentioned last field information may refer to the information representing whether each row of data to be stored is the last field, that is, whether each data is the last data, specifically, it can be represented by is_end, when is_end is listed as false, it indicates that the row The data is not the last data; when the is_end column is true, it indicates that the row of data is the last data.

上述后续项信息可以表明后续一行数据项的信息,具体可以用next_field来表示,当is_end列为false时,next_field列则表明后续数据的所在行。The above subsequent item information can indicate the information of a subsequent row of data items, which can be specifically represented by next_field. When the is_end column is false, the next_field column indicates the row of the subsequent data.

步骤102:根据所述修改信息,修改所述预设数据项描述信息,得出扩展数据项描述信息,所述修改信息为用于修改所述后续项信息和所述最后字段信息的信息。Step 102: Modify the preset data item description information according to the modification information to obtain extended data item description information, where the modification information is information for modifying the subsequent item information and the last field information.

上述修改信息可以是指用户根据需要对上述后续线信息和最后字段信息配置的信息,例如,可以将is_end列由true改为false。The above modification information may refer to the information configured by the user for the above-mentioned subsequent line information and last field information as required, for example, the is_end column may be changed from true to false.

步骤103:根据所述扩展数据项描述信息,将扩展后的所述待存储数据存储至存储介质。Step 103: Store the expanded data to be stored in a storage medium according to the expanded data item description information.

可以理解,上述存储介质优选地为EEPROM,当然,也可以具体为其它存储介质,在此不作限定。It can be understood that the above-mentioned storage medium is preferably an EEPROM, of course, it can also be other storage medium, which is not limited here.

为了更好地介绍整个扩展存储的过程,下面将以product_sn(产品的序列号)存储至EEPROM为例进行介绍说明。In order to better introduce the whole process of extended storage, the following will take the example of storing product_sn (the serial number of the product) to the EEPROM for description.

假定系统设计初期规定product_sn占7个字节,在实现时将EEPROM的0x0000—0x0006七个字节用于存放product_sn,并预留一个字节用于扩展;而从0x0008偏移处开始的四个字节用于存放节点的ipv4地址。Assuming that product_sn occupies 7 bytes in the early stage of system design, seven bytes of 0x0000-0x0006 of EEPROM are used to store product_sn during implementation, and one byte is reserved for expansion; and four bytes starting from offset 0x0008 The bytes are used to store the ipv4 address of the node.

而开发过程中,发现product_sn需要由7位扩展为9位,采用如下文所示的eeprom_dafa_field属性数组描述每一个数据项的信息,每一行用于描述data_filed_enum中的一项在EEPROM中的存储方式,数组中last_field_e项之前的每一行表示基础行;last_field_e项之后的每一行表示扩展行,是对基础行中数据的扩展;每一列表示数据的一个属性,其中is_end列表示该行数据是否最后的数据,当is_end列为false时next_field列表明后续数据的所在行。During the development process, it was found that product_sn needs to be expanded from 7 bits to 9 bits. The eeprom_dafa_field attribute array as shown below is used to describe the information of each data item, and each line is used to describe the storage method of an item in the data_filed_enum in the EEPROM. Each row before the last_field_e item in the array represents the basic row; each row after the last_field_e item represents an extended row, which is an extension of the data in the basic row; each column represents an attribute of the data, and the is_end column represents whether the row of data is the last data , when the is_end column is false, the next_field column indicates the row of the subsequent data.

Figure BDA0001327892910000051
Figure BDA0001327892910000051

当EEPROM中的product_sn_e需要由7字节扩展为9字节时,只需要将product_sn_e对应的行的is_end项由true改为false,表明该行的数据不是最终数据;在EEPROM中寻找一块2字节的空闲空间存放product_sn_e的扩展部分;在eeprom_dafa_field中增加一行(last_field_e+1)用于描述扩展的EEPROM存储空间;将product_sn_e对应的行的next_field列修改为扩展的EEPROM存储空间中新增的行。When the product_sn_e in the EEPROM needs to be extended from 7 bytes to 9 bytes, it is only necessary to change the is_end item of the line corresponding to product_sn_e from true to false, indicating that the data in this line is not the final data; look for a block of 2 bytes in the EEPROM The free space for storing the extended part of product_sn_e; add a row (last_field_e+1) to the eeprom_dafa_field to describe the extended EEPROM storage space; modify the next_field column of the row corresponding to product_sn_e to a new row in the extended EEPROM storage space.

对EEPROM中的数据进行扩展存储后,在读取product_sn_e时,可以通过is_end为false判断该行数据不完全,再根据next_filed列找到扩展数据,将两者拼接成完整的product_sn。After the data in the EEPROM is extended and stored, when reading product_sn_e, it can be judged that the row of data is incomplete by is_end being false, and then the extended data can be found according to the next_filed column, and the two are spliced into a complete product_sn.

作为一种具体实施方式,在上述根据所述扩展数据项描述信息,将所述待存储数据存储至存储介质之后还可以包括:获取数据读取指令;根据所述数据读取指令包含的所述后续项信息和所述最后字段信息,读取扩展数据和原存储数据;将所述控制数据和所述原存储数据进行拼接,得出扩展后的所述待存储数据。As a specific implementation manner, after storing the data to be stored in the storage medium according to the extended data item description information, the method may further include: acquiring a data read instruction; according to the data read instruction included in the data read instruction The subsequent item information and the last field information, read the extended data and the original stored data; splicing the control data and the original stored data to obtain the expanded data to be stored.

本实施例所提供的数据存储的方法,当待存储数据需要扩展时,获取预设数据项描述信息的修改信息,其中,上述预设数据项描述信息为包括数据偏移信息、数据长度信息、最后字段信息和后续项信息的数据项属性组信息;根据修改信息,修改预设数据项描述信息,得出扩展数据项描述信息,上述修改信息为用于修改最后字段信息和后续项信息的信息;根据扩展数据项描述信息,将扩展后的待存储数据存储至存储介质。该方法通过数据项描述信息属性组描述每一项数据,当需要对数据长度进行扩展时,只需要简单修改原数据项的最后字段信息和后续项信息,避免了数据项的扩展对其它数据项的影响;同时无需考虑为每个数据项预留存储空间,降低了系统设计初期在存储介质中进行数据布局设计的难度,进而提高了存储数据的易扩展性。In the data storage method provided in this embodiment, when the data to be stored needs to be expanded, the modification information of the description information of the preset data item is obtained, wherein the description information of the preset data item includes data offset information, data length information, The data item attribute group information of the last field information and the subsequent item information; according to the modification information, modify the preset data item description information to obtain the extended data item description information, and the above modification information is the information used to modify the last field information and the subsequent item information. ; According to the description information of the extended data item, store the extended data to be stored in the storage medium. The method describes each item of data through the data item description information attribute group. When the data length needs to be extended, only the last field information and subsequent item information of the original data item need to be simply modified, avoiding the expansion of the data item to other data items. At the same time, there is no need to consider reserving storage space for each data item, which reduces the difficulty of data layout design in the storage medium in the early stage of system design, thereby improving the scalability of stored data.

下面对本发明实施例提供的数据存储装置进行介绍,下文描述的数据存储装置与上文描述的数据存储方法可相互对应参照。The following describes the data storage device provided by the embodiment of the present invention, and the data storage device described below and the data storage method described above may refer to each other correspondingly.

图2为本发明实施例所提供的数据存储装置的结构框图,参照图2数据存储装置可以包括:FIG. 2 is a structural block diagram of a data storage device provided by an embodiment of the present invention. Referring to FIG. 2, the data storage device may include:

修改信息获取模块21,用于当待存储数据需要扩展时,获取预设数据项描述信息的修改信息,其中,所述预设数据项描述信息为包括数据偏移信息、数据长度信息、最后字段信息和后续项信息的数据项属性组信息;The modification information acquisition module 21 is configured to acquire modification information of the description information of a preset data item when the data to be stored needs to be expanded, wherein the description information of the preset data item includes data offset information, data length information, and last field Data item attribute group information of information and subsequent item information;

描述信息修改模块22,用于根据所述修改信息,修改所述预设数据项描述信息,得出扩展数据项描述信息,所述修改信息为用于修改所述后续项信息和所述最后字段信息的信息;The description information modification module 22 is configured to modify the description information of the preset data item according to the modification information to obtain the description information of the extended data item, and the modification information is used for modifying the subsequent item information and the last field information about the information;

扩展存储模块23,用于根据所述扩展数据项描述信息,将扩展后的所述待存储数据存储至存储介质。The extended storage module 23 is configured to store the extended data to be stored in a storage medium according to the extended data item description information.

可选地,还包括:Optionally, also include:

读取指令获取模块,用于获取数据读取指令;The read instruction acquisition module is used to acquire the data read instruction;

读取模块,用于根据所述数据读取指令包含的所述后续项信息和所述最后字段信息,读取扩展数据和原存储数据;a reading module, configured to read extended data and original storage data according to the subsequent item information and the last field information contained in the data reading instruction;

拼接模块,用于将所述控制数据和所述原存储数据进行拼接,得出扩展后的所述待存储数据。The splicing module is used for splicing the control data and the original stored data to obtain the expanded data to be stored.

可选地,所述存储介质为EEPROM。Optionally, the storage medium is an EEPROM.

本实施例所提供的数据存储的装置,通过数据项描述信息属性组描述每一项数据,当需要对数据长度进行扩展时,只需要简单修改原数据项的最后字段信息和后续项信息,避免了数据项的扩展对其它数据项的影响;同时无需考虑为每个数据项预留存储空间,降低了系统设计初期在存储介质中进行数据布局设计的难度,进而提高了存储数据的易扩展性。The data storage device provided in this embodiment describes each item of data through the attribute group of data item description information. When the data length needs to be extended, it is only necessary to simply modify the last field information and subsequent item information of the original data item to avoid At the same time, there is no need to consider reserving storage space for each data item, which reduces the difficulty of data layout design in the storage medium in the early stage of system design, thereby improving the scalability of stored data. .

本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其它实施例的不同之处,各个实施例之间相同或相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments may be referred to each other. As for the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant part can be referred to the description of the method.

以上对本发明所提供的数据存储的方法及装置进行了详细介绍。本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想。应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以对本发明进行若干改进和修饰,这些改进和修饰也落入本发明权利要求的保护范围内。The data storage method and device provided by the present invention have been described in detail above. The principles and implementations of the present invention are described herein by using specific examples, and the descriptions of the above embodiments are only used to help understand the method and the core idea of the present invention. It should be pointed out that for those skilled in the art, without departing from the principle of the present invention, several improvements and modifications can also be made to the present invention, and these improvements and modifications also fall within the protection scope of the claims of the present invention.

Claims (4)

1. A method of data storage, comprising:
when the data to be stored needs to be expanded, acquiring modification information of preset data item description information, wherein the preset data item description information is data item attribute group information comprising data offset information, data length information, last field information and subsequent item information;
modifying the preset data item description information according to the modification information to obtain extended data item description information, wherein the modification information is used for modifying the subsequent item information and the last field information;
storing the expanded data to be stored into a storage medium according to the expanded data item description information;
after the storing the data to be stored to a storage medium according to the extended data item description information, the method further includes: acquiring a data reading instruction; reading extended data and original storage data according to the subsequent item information and the last field information contained in the data reading instruction; and splicing the control data and the original storage data to obtain the expanded data to be stored.
2. The method of claim 1, wherein the storage medium is an EEPROM.
3. An apparatus for data storage, comprising:
the system comprises a modification information acquisition module, a data storage module and a data processing module, wherein the modification information acquisition module is used for acquiring modification information of preset data item description information when data to be stored needs to be expanded, and the preset data item description information is data item attribute group information comprising data offset information, data length information, last field information and subsequent item information;
a description information modification module, configured to modify the preset data item description information according to the modification information to obtain extended data item description information, where the modification information is information used to modify the subsequent item information and the last field information;
the extended storage module is used for storing the extended data to be stored to a storage medium according to the extended data item description information;
the device, still include: the reading instruction acquisition module is used for acquiring a data reading instruction; the reading module is used for reading the extended data and the original storage data according to the subsequent item information and the last field information contained in the data reading instruction; and the splicing module is used for splicing the control data and the original storage data to obtain the expanded data to be stored.
4. The apparatus of claim 3, wherein the storage medium is an EEPROM.
CN201710474458.4A 2017-06-21 2017-06-21 Data storage method and device Active CN107203478B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710474458.4A CN107203478B (en) 2017-06-21 2017-06-21 Data storage method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710474458.4A CN107203478B (en) 2017-06-21 2017-06-21 Data storage method and device

Publications (2)

Publication Number Publication Date
CN107203478A CN107203478A (en) 2017-09-26
CN107203478B true CN107203478B (en) 2020-07-24

Family

ID=59908063

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710474458.4A Active CN107203478B (en) 2017-06-21 2017-06-21 Data storage method and device

Country Status (1)

Country Link
CN (1) CN107203478B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113806364B (en) * 2021-08-28 2023-12-22 深圳特斯联智能科技有限公司 Big data storage system and method

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6343341B1 (en) * 1999-08-20 2002-01-29 Microsoft Corporation Efficient access to variable-length data on a sequential access storage medium
US8166263B2 (en) * 2008-07-03 2012-04-24 Commvault Systems, Inc. Continuous data protection over intermittent connections, such as continuous data backup for laptops or wireless devices
CN101751413A (en) * 2008-12-18 2010-06-23 中国银联股份有限公司 Field marking method transaction pipeline file and information recording method thereof
CN102298584A (en) * 2010-06-23 2011-12-28 上海博路信息技术有限公司 Electronic book structure with dynamically-increased data
CN102073702A (en) * 2010-12-30 2011-05-25 浪潮集团山东通用软件有限公司 Personnel information dynamic-extension realizing method for human resource management information system
US9766812B2 (en) * 2011-07-20 2017-09-19 Veritas Technologies Llc Method and system for storing data in compliance with a compression handling instruction
CN104102664B (en) * 2013-04-10 2017-04-12 中国科学院计算技术研究所 Data processing method and system for physical machine resource information

Also Published As

Publication number Publication date
CN107203478A (en) 2017-09-26

Similar Documents

Publication Publication Date Title
WO2024124843A1 (en) Data processing method and apparatus, and device and readable storage medium
WO2014190601A1 (en) Data programming system and method
CN101420484B (en) Wallpaper displaying method used for mobile terminal and mobile terminal
CN101645052B (en) Quick direct memory access (DMA) ping-pong caching method
CN105205019B (en) NV parameter reading and writing system and methods based on high-pass platform mobile phone
CN107203478B (en) Data storage method and device
CN102096562A (en) Data writing method and device
CN107943727B (en) High-efficient DMA controller
CN104615459A (en) MoCA equipment parameter configuration method and device
US8688947B1 (en) Aligned data access
CN112363736A (en) Method, device and storage medium for burning product serial number
CN107766021B (en) Image processing method, image processing apparatus, display system, and storage medium
CN107329833B (en) Method and device for realizing memory continuity by using linked list
JP6038292B2 (en) Data transfer apparatus and data transfer method
WO2017076007A1 (en) Method and device for storing channel data
TW200537497A (en) Silicon storage media and controller thereof, controlling method thereof, and data frame based storage media
US20190087102A1 (en) Method, apparatus, storage medium, and terminal for optimizing memory card performance
TW201709207A (en) Access method of flash memory and associated memory controller and electronic device
CN109993274A (en) Artificial intelligence computing devices and related products
CN111104403B (en) LSM tree data processing method, system, equipment and computer medium
TWI533316B (en) Error correction method and memory device
CN115964084A (en) Data interaction method, electronic equipment and storage medium
CN106814974B (en) A kind of configuration information caching method, device, main control chip and storage system
CN106155924A (en) Picture merges method, device and smart machine
CN114298885B (en) Image processing method, device, 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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20200628

Address after: 215100 No. 1 Guanpu Road, Guoxiang Street, Wuzhong Economic Development Zone, Suzhou City, Jiangsu Province

Applicant after: SUZHOU LANGCHAO INTELLIGENT TECHNOLOGY Co.,Ltd.

Address before: 450018 Henan province Zheng Dong New District of Zhengzhou City Xinyi Road No. 278 16 floor room 1601

Applicant before: ZHENGZHOU YUNHAI INFORMATION TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: Building 9, No.1, guanpu Road, Guoxiang street, Wuzhong Economic Development Zone, Wuzhong District, Suzhou City, Jiangsu Province

Patentee after: Suzhou Yuannao Intelligent Technology Co.,Ltd.

Country or region after: China

Address before: Building 9, No.1, guanpu Road, Guoxiang street, Wuzhong Economic Development Zone, Wuzhong District, Suzhou City, Jiangsu Province

Patentee before: SUZHOU LANGCHAO INTELLIGENT TECHNOLOGY Co.,Ltd.

Country or region before: China