[go: up one dir, main page]

CN101520787B - Method for storing real-time data - Google Patents

Method for storing real-time data Download PDF

Info

Publication number
CN101520787B
CN101520787B CN2008101022106A CN200810102210A CN101520787B CN 101520787 B CN101520787 B CN 101520787B CN 2008101022106 A CN2008101022106 A CN 2008101022106A CN 200810102210 A CN200810102210 A CN 200810102210A CN 101520787 B CN101520787 B CN 101520787B
Authority
CN
China
Prior art keywords
index
content
data
storage
information
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.)
Expired - Fee Related
Application number
CN2008101022106A
Other languages
Chinese (zh)
Other versions
CN101520787A (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.)
Institute of Automation of Chinese Academy of Science
Original Assignee
Institute of Automation of Chinese Academy of Science
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 Institute of Automation of Chinese Academy of Science filed Critical Institute of Automation of Chinese Academy of Science
Priority to CN2008101022106A priority Critical patent/CN101520787B/en
Publication of CN101520787A publication Critical patent/CN101520787A/en
Application granted granted Critical
Publication of CN101520787B publication Critical patent/CN101520787B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种对实时数据进行存储的方法,由采集器实时采集存储传感器的数据;读取主份索引概要信息并校验比较;提取主份索引内容的最新指针;读数据内容最新存储指针;存储数据内容和校验码;计算新索引内容和校验码;存储主份索引内容与校验码;更新并存储主份索引概要;存储备份索引内容与校验码;存储备份索引概要;读取备份索引概要,对备份索引概要校验比较;获取备份索引最新指针;读取数据内容最新存储指针;重新建立存储信息。采用双索引和多重校验对存储器中的数据保护,保证采集器中所存储数据内容完整,采用循环覆盖实现固定存储容量下的数据内容连续存储,提高工业过程中重要参数记录的可靠性和完整性,提高过程监测和安全生产的工作效益。

Figure 200810102210

A method for storing real-time data, the collector collects the data of the storage sensor in real time; reads the summary information of the main part index and verifies and compares it; extracts the latest pointer of the main part index content; reads the latest storage pointer of the data content; stores the data Content and check code; calculate new index content and check code; store primary index content and check code; update and store primary index summary; store backup index content and check code; store backup index summary; read backup Index summary, check and compare the backup index summary; obtain the latest pointer of the backup index; read the latest storage pointer of the data content; re-establish the storage information. Double index and multiple checks are used to protect the data in the memory to ensure the integrity of the data stored in the collector, and cyclic coverage is used to realize continuous storage of data content under fixed storage capacity, improving the reliability and integrity of important parameter records in industrial processes Sex, improve the work efficiency of process monitoring and safety production.

Figure 200810102210

Description

一种对实时数据进行存储的方法 A method for storing real-time data

技术领域technical field

本发明涉及信息技术与自动化领域信息处理技术领域,涉及一种在嵌入式采集器上使用的实时数据的存储方法,是在嵌入式操作系统上执行的一种软件流程,适用于恶劣应用环境中的嵌入式采集器实时数据存储。The present invention relates to the field of information processing technology in the field of information technology and automation, and relates to a method for storing real-time data used on an embedded collector, which is a software process executed on an embedded operating system and is suitable for harsh application environments Embedded collector real-time data storage.

背景技术Background technique

在工业生产过程中,各种参数的变化过程往往反映了在一个阶段内生产设备的运行状况和生产工序的衔接情况,各种参数过程对于合理制定生产计划、适时对设备进行维护、保障安全生产要求等都具有非常重要的意义。在工业领域内嵌入式采集器被广泛应用,对许多工业参数(如温度、压力、流量等)进行测量和记录,生成连续的历史数据,为技术人员和管理人员提供分析研究的一手资料。但由于许多工业生产中,工作环境比较恶劣(如高温、高湿、强腐蚀等),嵌入式采集器的运行条件不是非常稳定(如频繁断电、外部干扰严重等),虽然采集器具有一定的环境适应能力,但仍不可避免的会频繁出现造成采集器断电、重启、甚至死机、损坏等意外情况出现。这样如果正在存储过程中程序被意外中断,则存储到存储器中的数据就不完整,再次读取时将可能无法对数据内容进行解释。为了保证在采集器存储器硬件不损坏的条件下其内的存储数据不丢失,就需要采用高可靠性的数据存储方法,提高存储器的利用率,并提高软件系统的容错性,保障历史数据的连续性。目前计算机上的数据存储使用规范的文件管理系统,如FAT、NTFS等,它们都采用目录式的管理方式,在实际物理地址中通过指针的方式逐级指向文件内容所在的存储地址,统一对多个文件的数据进行管理,这样一旦物理地址中的某个目录指针出错,就无法对文件中的内容进行读取和解释,在嵌入式采集器中使用具有一定的风险性。目前的许多嵌入式采集器中采用基于记录的存储方式,每条记录包含数据内容的所有信息,在物理地址中连续存储,以此来保证因某些数据损坏而造成所有数据不可读的弊端,但这种方式需要每条记录采用固定的存储格式以包含所有存储信息,造成每条记录都占用很多个字节,不便于在容量有限的存储器内存储更多的记录数目。因此,高效率、高可靠性的数据存储方法是解决工业生产过程中嵌入式采集器数据存储需求的一种有效手段。In the industrial production process, the change process of various parameters often reflects the operation status of the production equipment and the connection of the production process in a stage. Requirements, etc. are of great significance. Embedded collectors are widely used in the industrial field to measure and record many industrial parameters (such as temperature, pressure, flow, etc.), generate continuous historical data, and provide first-hand information for analysis and research for technicians and managers. However, due to the harsh working environment in many industrial productions (such as high temperature, high humidity, strong corrosion, etc.), the operating conditions of the embedded collector are not very stable (such as frequent power failures, severe external However, it is still unavoidable that accidents such as power failure, restart, or even crash and damage of the collector will occur frequently. In this way, if the program is accidentally interrupted during the storage process, the data stored in the memory will be incomplete, and the data content may not be able to be interpreted when it is read again. In order to ensure that the stored data in the collector memory is not lost under the condition that the hardware of the memory is not damaged, it is necessary to adopt a high-reliability data storage method to improve the utilization rate of the memory, improve the fault tolerance of the software system, and ensure the continuity of historical data. sex. At present, the data storage on the computer uses a standard file management system, such as FAT, NTFS, etc., which all adopt a directory-based management method. In the actual physical address, the storage address of the file content is pointed to the storage address of the file content step by step through the pointer. Unified to many The data of each file is managed, so that once a certain directory pointer in the physical address is wrong, the content in the file cannot be read and interpreted, and it is risky to use it in an embedded collector. Many current embedded collectors use a record-based storage method. Each record contains all the information of the data content and is stored continuously in the physical address to ensure that all data is unreadable due to some data corruption. However, this method requires each record to adopt a fixed storage format to contain all storage information, causing each record to take up many bytes, which is not convenient for storing more records in a memory with limited capacity. Therefore, a high-efficiency, high-reliability data storage method is an effective means to solve the data storage requirements of embedded collectors in the industrial production process.

发明内容Contents of the invention

为了解决现有技术的问题,本发明的目的是提供一种在嵌入式采集器对实时数据进行存储的方法,在工业过程监测中对参数变化过程进行高效率地可靠存储,避免因外部原因而造成所存储的所有历史数据不可读的情况,提高嵌入式采集器使用的安全性,保障工业生产中的参数监测过程。In order to solve the problems of the prior art, the purpose of the present invention is to provide a method for storing real-time data in an embedded collector, which can efficiently and reliably store the parameter change process in industrial process monitoring, and avoid failure due to external factors. All the stored historical data cannot be read, improving the safety of embedded collectors and ensuring the parameter monitoring process in industrial production.

为达到上述目的,本发明的技术解决方案是提供一种基于双索引的嵌入式采集器对实时数据进行存储的方法,其技术方案是:In order to achieve the above object, the technical solution of the present invention is to provide a method for storing real-time data by an embedded collector based on a double index, and its technical solution is:

步骤A:先由采集器实时采集各传感器的数值,并经处理后得到需要存储的数据内容;Step A: first collect the values of each sensor in real time by the collector, and obtain the data content to be stored after processing;

步骤B:读取主份索引概要信息;Step B: Read the summary information of the primary share index;

步骤C:对主份索引概要信息进行校验比较;如果校验主份索引概要信息正确,则执行步骤D;如果校验主份索引概要信息错误,则执行步骤N;Step C: Verify and compare the summary information of the primary share index; if the summary information of the primary share index is verified to be correct, perform step D; if the summary information of the primary share index is verified to be wrong, perform step N;

步骤D:提取主份索引内容的最新指针;Step D: Extract the latest pointer of the main index content;

步骤E:读主份索引内容最新存储指针,利用最新存储指针在索引内容中读取最新一条索引信息;Step E: Read the latest storage pointer of the primary index content, and use the latest storage pointer to read the latest piece of index information in the index content;

步骤F:对最新一条索引信息进行校验比较,如果校验错误,则执行步骤N,如果校验正确,则执行步骤G;Step F: Verify and compare the latest index information, if the verification is wrong, execute step N, if the verification is correct, execute step G;

步骤G:从最新一条索引信息中提取步骤Q的数据内容最新的存储指针,并在存储指针所在的地址中存储的时、分、秒、通道、数值的数据内容和校验码;Step G: extract the latest storage pointer of the data content of step Q from the latest index information, and store the data content and check code of the hour, minute, second, channel, and value in the address where the storage pointer is located;

步骤H:计算新索引内容和校验码,并根据存储指针是否到达物理最大存储地址来决定是否需要进行环形覆盖操作,若需覆盖则对索引年、月、日、存储内容起始地址、存储内容长度的内容进行相应调整;Step H: Calculate the new index content and check code, and decide whether to perform circular overwriting operation according to whether the storage pointer reaches the physical maximum storage address. If overwriting is required, the index year, month, day, storage content start address, Content-length content is adjusted accordingly;

步骤I:存储主份索引内容与校验码;Step 1: store the main part index content and check code;

步骤J:更新主份索引概要;Step J: update the summary of the primary and share index;

步骤K:存储主份索引概要;Step K: storing the master-part index summary;

步骤L:存储备份索引内容与校验码;Step L: storing backup index content and check code;

步骤M:存储备份索引概要,完成本次存储操作,并由步骤A开始重新执行;Step M: Store the backup index summary, complete the storage operation, and start re-execution from step A;

步骤N:读取备份索引概要,利用备份索引进行相关操作;Step N: Read the summary of the backup index, and use the backup index to perform related operations;

步骤O:对备份索引概要操作时,进行校验比较,若备份索引概要中的内容校验错误,说明该存储器的数据已被完全损坏,利用软件不能继续维护,则执行步骤R;若备份索引中的内容也校验正确,则执行步骤P;Step O: When operating the backup index summary, perform a verification comparison. If the content verification error in the backup index summary indicates that the data in the memory has been completely damaged, and the software cannot continue to maintain it, then perform step R; if the backup index The content in is also verified to be correct, then execute step P;

步骤P:获取备份索引最新指针;Step P: Obtain the latest pointer of the backup index;

步骤Q:读取数据内容最新存储指针,并执行步骤G;Step Q: read the latest storage pointer of the data content, and execute step G;

步骤R:重新建立存储信息,从步骤A开始重新执行。Step R: re-establish storage information, and start from step A again.

根据本发明的实施例,所述实时采集数据还包括:According to an embodiment of the present invention, the real-time data collection also includes:

步骤A1:将所述实时采集的包含:通道号、年、月、日、时、分、秒、数据值信息、校验码数据按日为单元生成索引和数据内容;Step A1: The real-time collection includes: channel number, year, month, day, hour, minute, second, data value information, check code data to generate an index and data content on a daily basis;

步骤A2:将包含有年、月、日、起始地址、结束地址、校验码,索引信息与已存储索引相比较,确定数据内容的存储地址;Step A2: Compare the index information including the year, month, day, start address, end address, check code, and the stored index with the stored index to determine the storage address of the data content;

步骤A3:根据数据内容的存储地址判断是否需要对已存储数据进行覆盖,如果需要覆盖,则将需要覆盖存储区的内容删除,在该区域存储数据内容,并更改索引信息;如果不需要则直接将数据内容存储在由步骤A2得到的存储地址中;Step A3: Determine whether the stored data needs to be overwritten according to the storage address of the data content. If overwriting is required, delete the content in the overwritten storage area, store the data content in this area, and change the index information; if not, directly Store the data content in the storage address obtained by step A2;

步骤A4:根据数据内容的存储情况确定是否需要更新索引信息,如果需要则将已存储的索引更改为新索引信息,如果不需要则维持原索引不变。Step A4: Determine whether the index information needs to be updated according to the storage situation of the data content, if necessary, change the stored index to new index information, and if not, keep the original index unchanged.

根据本发明的实施例,所述存储数据内容覆盖采用环形顺序存储的循环覆盖存储方式,步骤如下:According to an embodiment of the present invention, the stored data content coverage adopts a cyclic coverage storage method of circular sequential storage, and the steps are as follows:

步骤A31:在SD存储卡中按物理地址顺序依次存储;Step A31: sequentially store in the SD memory card according to the physical address sequence;

步骤A32:存储到SD存储卡的最大物理地址时,将SD存储卡中最早一天的数据删除掉;Step A32: When storing to the maximum physical address of the SD memory card, delete the data of the earliest day in the SD memory card;

步骤A33:然后在最早一天存储内容的物理地址处继续存储数据,构成环形存储方式,并对索引内容进行相应改动。Step A33: Then continue to store data at the physical address where the stored content was stored on the earliest day to form a circular storage mode, and make corresponding changes to the index content.

根据本发明的实施例,所述的索引还包括:According to an embodiment of the present invention, the index also includes:

所述索引包含指向该日的数据内容的物理存储地址,存储索引采用双索引的主份和备份的存储方式,内容相同的主份索引和备份索引存储在铁电存储器中不同的物理地址中,各自含有校验信息;The index includes the physical storage address pointing to the data content of the day, and the storage index adopts the storage mode of the main part and the backup of the double index, and the main part index and the backup index with the same content are stored in different physical addresses in the ferroelectric memory, Each contains verification information;

存储索引由索引概要和索引内容组成,索引概要的内容包含索引内容起始与结束物理地址、存储记录总数、物理存储器剩余空间,索引内容是以天为单位生成的指向存储数据的索引信息。The storage index consists of an index summary and index content. The content of the index summary includes the starting and ending physical addresses of the index content, the total number of storage records, and the remaining space of the physical storage. The index content is the index information pointing to the stored data generated in units of days.

根据本发明的实施例,所述的嵌入式采集器实时数据存储方法中,其所述校验码R(X)多项式为CRC16循环校验码,其计算公式为According to an embodiment of the present invention, in the real-time data storage method of the embedded collector, the check code R (X) polynomial is a CRC16 cyclic check code, and its calculation formula is

BB (( Xx )) ·&Center Dot; 22 1616 GG (( Xx )) == QQ (( Xx )) ++ RR (( Xx )) GG (( Xx ))

其中B(X)为要校验的n位二进制序列数,G(X)=X16+X15+X2+1为固定多项式,Q(X)为整多项式,R(X)余式为循环校验码,X是多项式自由变量。Wherein B(X) is the n-bit binary sequence number to be checked, G(X)=X 16 +X 15 +X 2 +1 is a fixed polynomial, Q(X) is an integer polynomial, and the remainder of R(X) is Cyclic check code, X is a polynomial free variable.

根据本发明的实施例,所述的嵌入式采集器实时数据存储方法中,其所述实时数据值为单精度浮点数,由4字节表示,起始地址和结束地址为整型数,由4字节表示。According to an embodiment of the present invention, in the real-time data storage method of the embedded collector, the real-time data value is a single-precision floating-point number, represented by 4 bytes, and the start address and the end address are integer numbers, represented by 4 bytes representation.

根据本发明的实施例,所述的嵌入式采集器实时数据存储方法中,其所述SD存储卡的存储容量为256MB~4GB,所述铁电存储器的存储容量为16KB~128KB。According to an embodiment of the present invention, in the real-time data storage method of the embedded collector, the storage capacity of the SD memory card is 256MB-4GB, and the storage capacity of the ferroelectric memory is 16KB-128KB.

根据本发明的实施例,所述的嵌入式采集器实时数据存储方法中,其所述嵌入式采集器为由ARM处理器构成的移植嵌入式操作系统的装置,该装置软件中不移植文件系统。According to an embodiment of the present invention, in the real-time data storage method of the embedded collector, the embedded collector is a device for transplanting an embedded operating system composed of an ARM processor, and the file system is not transplanted in the device software .

本发明对实时数据进行存储的方法在嵌入式ARM采集器上的应用。The method for storing real-time data of the present invention is applied to an embedded ARM collector.

本发明提出的嵌入式采集器为硬件的采集系统中使用的可靠性实时数据存储方法主要优点如下:采用索引方式对数据内容进行管理,可以减少每条数据内容所占用的字节数,提高了一定存储容量下数据记录的存储数量;每条数据记录都采用CRC16校验,保证了所存储的每条数据的正确性;采用主份和备份双索引的存储方式,避免了因主份或备份一个索引损坏而造成整个数据内容无法解释的情况出现;主份和备份索引都由索引概要和索引内容构成,并各自有CRC16校验码,保证了存储内容读取与解释的可维护性;数据存储过程按照先内容再索引,先主份再备份的顺序,保证了存储过程中不会因意外中断而引起存储信息错乱的情况出现。采用循环覆盖的方式实现固定存储容量下的数据内容连续存储,用最新采集数据覆盖最早历史数据,保证采集器中存储数据的连续性,可提高工业生产过程中重要参数记录的可靠性和完整性。这种存储方法适合于嵌入式采集器应用,特别适合于多干扰环境、条件恶劣的工业采集场合下使用。The embedded collector proposed by the present invention is the main advantage of the reliable real-time data storage method used in the acquisition system of hardware as follows: the index mode is used to manage the data content, which can reduce the occupied bytes of each data content, and improve the The number of data records stored under a certain storage capacity; each data record is verified by CRC16 to ensure the correctness of each stored data; the storage method of primary and backup double indexes is adopted to avoid the An index is damaged and the entire data content cannot be explained; the primary and backup indexes are composed of index summary and index content, and each has a CRC16 check code, which ensures the maintainability of reading and interpretation of the stored content; data The storage process follows the order of content first, then index, first master copy, and then backup, which ensures that the stored information will not be confused due to unexpected interruption during the storage process. The continuous storage of data content under fixed storage capacity is achieved by means of cyclic coverage, and the earliest historical data is covered with the latest collected data to ensure the continuity of stored data in the collector, which can improve the reliability and integrity of important parameter records in the industrial production process . This storage method is suitable for the application of embedded collectors, and is especially suitable for use in industrial collection occasions with multiple interference environments and harsh conditions.

附图说明Description of drawings

图1为是本发明实施例采用嵌入式采集器对实时数据进行存储方法的流程图;Fig. 1 is the flowchart of the method for storing real-time data using an embedded collector in an embodiment of the present invention;

图2本发明实施例采用嵌入式采集器的实时数据存储系统的结构框图;Fig. 2 embodiment of the present invention adopts the structural block diagram of the real-time data storage system of embedded collector;

图3为本发明嵌入式采集器实时数据存储方法中环形覆盖方式的实施例示意图。Fig. 3 is a schematic diagram of an embodiment of the ring coverage mode in the real-time data storage method of the embedded collector of the present invention.

具体实施方式Detailed ways

下面将结合附图对本发明加以详细说明,应指出的是,所描述的实施例仅旨在便于对本发明的理解,而对其不起任何限定作用。The present invention will be described in detail below in conjunction with the accompanying drawings. It should be noted that the described embodiments are only intended to facilitate the understanding of the present invention, rather than limiting it in any way.

本发明的一种采用嵌入式采集器对实时数据进行存储的方法,由所述嵌入式采集器实时采集的多个传感器的数据作为存储对象;是工业采集环境中ARM采集器所用的高可靠性实时数据存储时的专用方法,采用特殊的存储格式和管理方式,由存储索引和数据内容构成。A method for storing real-time data using an embedded collector of the present invention, the data of multiple sensors collected in real time by the embedded collector is used as a storage object; it is a high-reliability ARM collector used in an industrial collection environment A dedicated method for real-time data storage, using a special storage format and management method, consisting of storage indexes and data content.

采集器采集的每条实时数据包含通道号、年、月、日、时、分、秒、实时数据值信息,其中实时数据值为单精度浮点数,由4字节表示。存储时以铁电存储器和SD存储卡为存储介质,存储索引由主份索引和备份索引构成,它们有相同的内容,且都各自包含校验信息,存储在铁电存储器中,指向存储在SD存储卡中的数据内容。主份索引和备份索引都分别由索引概要和索引内容组成,索引概要的内容包含索引内容起始与结束物理地址、存储记录总数、SD存储卡剩余空间,索引内容是以日为单位的指向数据内容的信息,包含年、月、日、数据内容起始地址和结束地址,其中起始地址和结束地址采用4字节整型数表示。数据内容中的每条数据记录包含通道号、时、分、秒、实时数据值、校验码信息。Each piece of real-time data collected by the collector includes channel number, year, month, day, hour, minute, second, and real-time data value information. The real-time data value is a single-precision floating-point number represented by 4 bytes. When storing, the ferroelectric memory and SD memory card are used as storage media. The storage index is composed of a primary index and a backup index. They have the same content, and each contains verification information, which is stored in the ferroelectric memory and points to the data content in the memory card. Both the primary index and the backup index are composed of an index summary and index content. The content of the index summary includes the starting and ending physical addresses of the index content, the total number of stored records, and the remaining space of the SD memory card. The index content is pointing data in units of days Content information, including year, month, day, data content start address and end address, where the start address and end address are represented by 4-byte integers. Each data record in the data content includes channel number, hour, minute, second, real-time data value, and check code information.

数据采集器在采集到实时数据后,把采集器的时间信息加入进去,使其称为包含通道号、年、月、日、时、分、秒、数据值信息的数据记录,再按日为单元生成索引和数据内容,其中索引包含有年、月、日,数据内容包含通道号、时、分、秒、数据值信息;将该索引与已存储的最新一条索引相比较,以确定数据内容的存储地址;根据数据内容的存储地址判断是否需要对已存储数据进行覆盖,如果需要覆盖,则将需要覆盖存储区的内容删除,在该区域存储数据内容,并更改索引信息,具体的覆盖方法如图3所示的环形覆盖实施例所述;如果不需要则直接将数据内容存储在从存储索引中得到的存储地址中;根据数据内容的存储情况确定是否需要更新索引信息,如果需要则将已存储的索引更改为新索引信息,如果不需要则维持原索引不变。After the data collector collects real-time data, it adds the time information of the collector into it, making it a data record containing channel number, year, month, day, hour, minute, second, and data value information, and then divides it by day into a data record. The unit generates an index and data content, where the index includes year, month, day, and the data content includes channel number, hour, minute, second, and data value information; compare the index with the latest stored index to determine the data content According to the storage address of the data content, it is judged whether the stored data needs to be overwritten. If overwriting is required, the content of the overwritten storage area is deleted, the data content is stored in this area, and the index information is changed. The specific overwriting method As described in the embodiment of ring coverage as shown in Figure 3; if not needed, then directly store the data content in the storage address obtained from the storage index; determine whether the index information needs to be updated according to the storage situation of the data content, and if necessary, The stored index is changed to the new index information, and the original index remains unchanged if it is not needed.

图1是采用嵌入式采集器实时数据存储方法的流程图,它描述了嵌入式采集器数据存储的整个过程,其具体步骤为:Fig. 1 is a flow chart of the real-time data storage method using the embedded collector, which describes the entire process of data storage of the embedded collector, and its specific steps are:

步骤A:由采集器采集各传感器的数值,并经处理后得到需要存储的数据内容;步骤B:读取主份索引概要信息;步骤C:并对其利用CRC16循环校验码进行校验比较,以确定是否需要读取备份索引信息。其中CRC16循环校验码的计算公式为:Step A: The value of each sensor is collected by the collector, and the data content to be stored is obtained after processing; Step B: Read the summary information of the master index; Step C: Verify and compare it using the CRC16 cycle check code , to determine whether to read the backup index information. The calculation formula of CRC16 cycle check code is:

BB (( Xx )) ·&Center Dot; 22 1616 GG (( Xx )) == QQ (( Xx )) ++ RR (( Xx )) GG (( Xx ))

其中B(X)为要校验的n位二进制序列数,G(X)=X16+X15+X2+1为固定多项式,Q(X)为整多项式,R(X)余式为循环校验码。校验过程采用循环移位和异或运算来实现,其代码与标准CRC16运算代码相同。Wherein B(X) is the n-bit binary sequence number to be checked, G(X)=X 16 +X 15 +X 2 +1 is a fixed polynomial, Q(X) is an integer polynomial, and the remainder of R(X) is cyclic checksum. The verification process is realized by circular shift and XOR operation, and its code is the same as the standard CRC16 operation code.

如果主份索引概要信息计算出的校验码与存储的校验码不相符则说明校验错误,就执行步骤N,利用备份索引进行相关操作,若相符则说明校验正确,就执行步骤D;步骤D:从主份索引概要信息中提取主份索引内容的最新指针;步骤E:利用主份索引最新存储指针在索引内容中读取最新一条索引信息;步骤F:对最新一条索引信息进行校验比较,如果校验错误则执行步骤N,如果校验正确则执行步骤G;步骤G:从最新一条索引信息中提取步骤Q的数据内容最新的存储指针,并在存储指针所在的地址中存储数据内容,包括时、分、秒、通道号、实时数值和CRC16校验码;步骤H:计算新索引内容和校验码,根据指针是否到达物理最大存储地址来决定是否需要进行环形覆盖操作,若需覆盖则对索引内容中的年、月、日、存储内容起始地址、存储内容长度信息进行相应调整,并采用覆盖方式用新数据将已存储数据替换,若不需覆盖则直接将数据内容存储到相应的存储地址中;步骤I:将主份索引内容和校验码存储到最新主份索引内容指针所指的物理地址中;步骤J:根据主份索引内容的信息更新主份索引概要;步骤K:将主份索引概要存储在原主份索引概要所在位置;步骤L:复制与主份索引内容相同的索引内容和校验码,并存储在最新一条备份索引内容所指的物理地址中;步骤M:存储备份索引概要,完成本次存储操作,并由步骤A开始重新执行;步骤N:利用备份索引操作时,进行CRC16校验比较,若备份索引中的内容也校验错误,则说明该存储器的数据已被完全损坏,利用软件方法已不能继续维护,则执行步骤R;若备份索引中的内容校验正确,则执行步骤P;步骤P:从备份索引概要中获取备份索引内容的最新指针;步骤Q:读取数据内容最新存储指针,并执行步骤G;步骤R:重新建立存储信息,从步骤A开始重新执行。If the check code calculated by the primary share index summary information does not match the stored check code, it means that the check code is wrong, and then execute step N, and use the backup index to perform related operations. If they match, it means that the check code is correct, and then execute step D ;Step D: Extract the latest pointer of the main share index content from the master share index summary information; Step E: Use the latest storage pointer of the master share index to read the latest index information in the index content; Step F: Perform the latest index information Check and compare, if the check is wrong, execute step N, if the check is correct, execute step G; step G: extract the latest storage pointer of the data content of step Q from the latest index information, and store it in the address where the storage pointer is located Store data content, including hour, minute, second, channel number, real-time value and CRC16 check code; Step H: Calculate the new index content and check code, and decide whether to perform ring coverage operation according to whether the pointer reaches the physical maximum storage address , if it needs to be overwritten, adjust the year, month, day, storage content start address, and storage content length information in the index content accordingly, and use the overwriting method to replace the stored data with new data; if it does not need overwriting, directly replace the The data content is stored in the corresponding storage address; step I: store the main share index content and check code in the physical address pointed to by the latest main share index content pointer; step J: update the main share according to the information of the main share index content Index summary; step K: store the primary share index summary at the location of the original primary share index summary; step L: copy the same index content and verification code as the main share index content, and store it in the physical location pointed to by the latest backup index content In the address; Step M: Store the backup index summary, complete the storage operation, and re-execute from Step A; Step N: When using the backup index operation, perform CRC16 check comparison, if the content in the backup index is also verified incorrectly , it means that the data in the memory has been completely damaged, and the software method can no longer be used for maintenance, then perform step R; if the content in the backup index is verified to be correct, then perform step P; step P: get the backup from the backup index summary The latest pointer of the index content; step Q: read the latest storage pointer of the data content, and execute step G; step R: re-establish the storage information, and re-execute from step A.

采用这种存储方式和存储顺序,可以保证在软件程序意外中断时仍然能够通过索引对数据内容进行解释:如果在存储内容时被中断,由于索引信息未被修改,则在数据解释时不会出错;如果在存储主份索引内容时被中断,由于主份索引概要还未修改,在解释时可以按照内容未改变之前的数据进行解释;若在存储主份索引概要时被中断,则校验比较时会出错,而由于此时备份索引信息还未被修改,则可以利用备份索引信息对数据内容未改变之前的数据进行解释。这样,只要物理存储介质不受损坏,按照这种存储方式,主份索引和备份索引中肯定有一个是完整正确的信息,就可以对数据内容进行解释,不会造成因某条数据记录存储错误而引起的整个数据内容无法读取解释。With this storage method and storage order, it can be guaranteed that the data content can still be interpreted through the index when the software program is interrupted unexpectedly: if the content is interrupted when storing the content, since the index information has not been modified, there will be no error when interpreting the data ; If it is interrupted when storing the main part index content, since the main part index summary has not been modified, it can be interpreted according to the data before the content has not changed; if it is interrupted when storing the main part index summary, then check and compare At this time, an error will occur, and since the backup index information has not been modified at this time, the backup index information can be used to explain the data before the data content has not changed. In this way, as long as the physical storage medium is not damaged, according to this storage method, one of the primary index and the backup index must have complete and correct information, and the data content can be interpreted without causing a storage error due to a certain data record And cause the entire data content to be unreadable for interpretation.

本发明的技术核心是把多重校验和双索引方式应用于数据存储过程中,使所存储的内容具有更高的可靠性,能够从软件上保证在恶劣环境下工作嵌入式采集器对于外部影响的可靠处理性能,增强数据存储的可维护性,提高历史数据的可信度。它利用合理的执行步骤,避免了因意外中断造成的数据不可读现象,提高了存储介质的利用效率,也增强了存储数据的完整性,比一般的嵌入式文件系统更安全可靠,保证了物理存储器不损坏的情况下数据内容的可读性,对于工业生产过程重要过程参数的长时间监测和记录具有重要意义。The technical core of the present invention is to apply multiple verification and double index methods in the data storage process, so that the stored content has higher reliability, and can ensure that the embedded collector working in a harsh environment is not affected by external influences from the software. Reliable processing performance, enhance the maintainability of data storage, and improve the credibility of historical data. It uses reasonable execution steps to avoid unreadable data caused by unexpected interruptions, improves the utilization efficiency of storage media, and enhances the integrity of stored data. It is safer and more reliable than ordinary embedded file systems, ensuring physical The readability of the data content under the condition that the memory is not damaged is of great significance for the long-term monitoring and recording of important process parameters in the industrial production process.

为了实现本发明的对实时数据进行存储的方法,实施例示出图2采用嵌入式ARM采集器典型的对实时数据进行存储系统的结构框图,该对实时数据进行存储系统采集设备主要由N个传感器1、嵌入式ARM采集器2和计算机3组成,N个传感器表示为11、12、13......1N,其中嵌入式ARM采集器2含有计算机通讯接口21、ARM控制器22、铁电存储器23、SD存储卡24、通讯接口25,所述通讯接口25可为RS232、RS485或CAN接口,计算机通讯接口21可为RS232、USB或以太网接口,传感器11、12、13......1N为具有相同通讯接口25的数字传感器,通过通讯总线与嵌入式ARM采集器2连接。所述SD存储卡的存储容量为256MB~4GB,所述铁电存储器的存储容量为16KB~128KB。所述嵌入式采集器为由ARM处理器构成的移植嵌入式操作系统的装置,该装置的软件中不移植常用文件系统。In order to realize the method for storing real-time data of the present invention, the embodiment shows a structural block diagram of a typical real-time data storage system using an embedded ARM collector in Figure 2, and the real-time data storage system acquisition device is mainly composed of N sensors 1. An embedded ARM collector 2 and a computer 3 are composed, and N sensors are represented as 11, 12, 13...1N, wherein the embedded ARM collector 2 includes a computer communication interface 21, an ARM controller 22, an iron Electric memory 23, SD memory card 24, communication interface 25, the communication interface 25 can be RS232, RS485 or CAN interface, computer communication interface 21 can be RS232, USB or Ethernet interface, sensors 11, 12, 13... ... 1N is a digital sensor with the same communication interface 25, which is connected to the embedded ARM collector 2 through a communication bus. The storage capacity of the SD memory card is 256MB-4GB, and the storage capacity of the ferroelectric memory is 16KB-128KB. The embedded collector is a device for transplanting an embedded operating system composed of an ARM processor, and the common file system is not transplanted in the software of the device.

图2的工作原理如下:ARM控制器22通过通讯接口25依次向各个传感器11、12、13.....1N发送采集命令,再接收传感器11、12、13.....1N传输来的数值信息,并根据ARM控制器22自身的时钟信息生成要存储的完整实时数据内容,然后按照该发明的对实时数据进行存储的方法,把该实时数据内容分解为索引信息和数据内容,分别存储到铁电存储器23和SD存储卡24中。当计算机3通过计算机通讯接口21与嵌入式ARM采集器2相连时,可以读取存储在铁电存储器23和SD存储卡24中的数据内容,得到该采集器2所监测的参数历史记录。The working principle of Fig. 2 is as follows: the ARM controller 22 sequentially sends collection commands to each sensor 11, 12, 13...1N through the communication interface 25, and then receives the transmission from the sensors 11, 12, 13...1N numerical information, and generate complete real-time data content to be stored according to the clock information of the ARM controller 22 itself, and then decompose the real-time data content into index information and data content according to the method for storing real-time data of the invention, respectively It is stored in the ferroelectric memory 23 and the SD memory card 24 . When the computer 3 is connected to the embedded ARM collector 2 through the computer communication interface 21, the data content stored in the ferroelectric memory 23 and the SD memory card 24 can be read to obtain the historical records of the parameters monitored by the collector 2.

图3是嵌入式采集器实时数据存储方法环形覆盖方式的实施例示意图。在该实施例图中为了简化描述过程,将主份索引内容和备份索引内容统称为索引信息,将存储数据内容的物理存储区域采用分块管理的方式,每个单元称为数据块。该实时例中采用这些名称,其他名称与权利要求书中相同,特此说明。物理存储区域由BL1、BL2、......、BLm共m个数据块构成,每条索引信息In中分别包含起始地址Sa和结束地址Ea,对于当前最新一条的索引信息包含起始地址Sa和最新内容存储地址N(简称当前地址,下同)。在使用本发明的存储方法时,实施例中的存储器中已存储三个存储索引信息In1、In2、In3,数据内容按照物理地址从小到大的顺序在存储区内依次向后存储,其中索引In3是当前最新一条索引信息,它们各自所包含的起始地址Sa和结束地址Ea指向数据区中的相应位置,起始地址Sa1指向数据块BL1的起始端,结束地址Ea1和起始地址Sa2指向数据块BL2的同一地址,结束地址Ea2和起始地址Sa3指向数据块BL4的同一地址,索引In3的当前地址Na3指向了数据块BLm的底端(即最大物理存储地址边界)。这一时刻的对应关系都用实线标识。在采集器又采集到一条新数据后,由于物理存储器都已经存满,必须将旧数据清除掉才能存储新数据。此时最早的数据是索引In1所指向的数据块BL1,先由程序把索引In3中的当前地址Na3用结束地址Ea3替换,再将数据块BL1的内容清除掉,然后新建一个索引In4,其起始地址Sa4和当前地址Na4指向数据块BL1的起始端,并修改索引In1的起始地址Sa1指向数据块BL2的起始端。此时的对应关系都用短虚线标识。在按照本发明的数据存储方法进行采集存储一段时间之后,索引In4的当前地址指向了数据块BL1的最底端(长虚线标识),此时数据再次被存满,还需进行数据覆盖。此时采集到新的数据以后,先将数据块BL2中的内容清除掉,再修改索引In4的当前地址Na4指向数据块BL2的起始端,此时由于索引In1的结束地址Ea1指向数据块BL2的中间,也就意味着存储器中已没有索引In1的数据,将索引In1从存储器中删除,修改索引In2的起始地址Sa2指向数据块BL3的起始端。此时的对应关系用长虚线标识。采用这种循环覆盖的存储方式,就可以保证存储器中一直都以较高的效率被使用,并可以确保存储器中所存储的数据都是最新的数据内容,缓解了存储器尺寸限制对数据存储容量的限制。Fig. 3 is a schematic diagram of an embodiment of a real-time data storage method of an embedded collector in a circular coverage mode. In the figure of this embodiment, in order to simplify the description process, the primary index content and the backup index content are collectively referred to as index information, and the physical storage area for storing data content is managed in blocks, and each unit is called a data block. These names are used in this real-time example, and other names are the same as those in the claims, which are hereby described. The physical storage area is composed of m data blocks including BL1, BL2, ..., BLm. Each index information In contains the start address Sa and the end address Ea respectively. For the current latest index information, it contains the start address The address Sa and the latest content storage address N (referred to as the current address, the same below). When using the storage method of the present invention, three storage index information In1, In2, and In3 have been stored in the memory in the embodiment, and the data content is sequentially stored in the storage area according to the order of physical addresses from small to large, wherein the index In3 It is the latest index information. The start address Sa and end address Ea contained in each of them point to the corresponding position in the data area. The start address Sa1 points to the beginning of the data block BL1, and the end address Ea1 and start address Sa2 point to the data block. The same address of the block BL2, the end address Ea2 and the start address Sa3 point to the same address of the data block BL4, and the current address Na3 of the index In3 points to the bottom of the data block BLm (ie, the maximum physical storage address boundary). The corresponding relationship at this moment is marked with a solid line. After the collector collects a new piece of data, since the physical storage is full, the old data must be cleared before new data can be stored. At this time, the earliest data is the data block BL1 pointed to by the index In1. First, the program replaces the current address Na3 in the index In3 with the end address Ea3, then clears the content of the data block BL1, and then creates a new index In4, which starts The start address Sa4 and the current address Na4 point to the start of the data block BL1, and the start address Sa1 of the modified index In1 points to the start of the data block BL2. The corresponding relationship at this time is marked with a short dashed line. After collecting and storing for a period of time according to the data storage method of the present invention, the current address of the index In4 points to the bottom of the data block BL1 (marked by a long dotted line), and now the data is full again and needs to be overwritten. After collecting new data at this time, first clear the content in the data block BL2, and then modify the current address Na4 of the index In4 to point to the beginning of the data block BL2. At this time, because the end address Ea1 of the index In1 points to the data block BL2 In the middle, it means that there is no data of the index In1 in the memory, the index In1 is deleted from the memory, and the starting address Sa2 of the index In2 is modified to point to the starting end of the data block BL3. The corresponding relationship at this time is marked with a long dotted line. Using this cyclic coverage storage method can ensure that the memory is always used with high efficiency, and can ensure that the data stored in the memory is the latest data content, alleviating the impact of the memory size limit on the data storage capacity limit.

以上所述,仅为本发明中的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉该技术的人在本发明所揭露的技术范围内,可理解想到的变换或替换,都应涵盖在本发明的包含范围之内,因此,本发明的保护范围应该以权利要求书的保护范围为准。The above is only a specific implementation mode in the present invention, but the scope of protection of the present invention is not limited thereto. Anyone familiar with the technology can understand the conceivable transformation or replacement within the technical scope disclosed in the present invention. All should be covered within the scope of the present invention, therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims (10)

1.一种对实时数据进行存储的方法,是针对嵌入式ARM采集器的设计,存储主份索引和备份索引,主份索引和备份索引分别由索引概要和索引内容组成,其中索引概要的内容包含索引内容起始与结束物理地址、存储记录总数;其中索引内容是以日为单位的指向数据内容的信息,包含年、月、日、数据内容起始地址和结束地址;其特征在于:1. A method for storing real-time data is aimed at the design of an embedded ARM collector, storing a primary index and a backup index. The primary index and the backup index are respectively composed of an index summary and an index content, wherein the content of the index summary Contains the starting and ending physical addresses of the index content, and the total number of storage records; the index content is the information pointing to the data content in units of days, including year, month, day, data content start address and end address; it is characterized in that: 其存储步骤为:Its storage steps are: 步骤A:先由采集器实时采集各传感器的数据,并经处理后得到需要存储的数据内容;Step A: first collect the data of each sensor in real time by the collector, and obtain the data content to be stored after processing; 步骤B:读取主份索引概要信息;Step B: Read the summary information of the primary share index; 步骤C:对主份索引概要信息进行校验比较;如果校验主份索引概要信息正确,则执行步骤D;如果校验主份索引概要信息错误,则执行步骤N;Step C: Verify and compare the summary information of the primary share index; if the summary information of the primary share index is verified to be correct, perform step D; if the summary information of the primary share index is verified to be wrong, perform step N; 步骤D:提取主份索引内容的最新存储指针;Step D: Extract the latest storage pointer of the primary index content; 步骤E:读主份索引内容的最新存储指针,利用该最新存储指针在索引内容中读取最新一条索引信息;Step E: Read the latest storage pointer of the primary index content, and use the latest storage pointer to read the latest piece of index information in the index content; 步骤F:对最新一条索引信息进行校验比较,如果校验错误,则执行步骤N,如果校验正确,则执行步骤G;Step F: Verify and compare the latest index information, if the verification is wrong, execute step N, if the verification is correct, execute step G; 步骤G:从最新一条索引信息中提取数据内容最新的存储指针,并在数据内容最新的存储指针所在的地址中存储时、分、秒、通道、数值的数据内容和校验码;Step G: Extract the latest storage pointer of the data content from the latest index information, and store the data content and check code of the hour, minute, second, channel, and value in the address where the latest storage pointer of the data content is located; 步骤H:计算新索引内容和校验码,并根据步骤G中的数据内容最新的存储指针是否到达物理最大存储地址来决定是否需要进行环形覆盖操作,若需覆盖则对索引年、月、日、存储内容起始地址、存储内容长度的内容进行相应调整;Step H: Calculate the new index content and check code, and decide whether to perform circular overwriting operation according to whether the latest storage pointer of the data content in step G reaches the physical maximum storage address. If overwriting is required, the index year, month, and day , the starting address of the storage content, and the content of the storage content length are adjusted accordingly; 步骤I:存储主份索引内容与校验码;Step 1: store the main part index content and check code; 步骤J:更新主份索引概要;Step J: update the master-part index summary; 步骤K:存储主份索引概要;Step K: storing the master share index summary; 步骤L:存储备份索引内容与校验码;Step L: storing backup index content and check code; 步骤M:存储备份索引概要,完成本次存储操作,并由步骤A开始重新执行;Step M: Store the backup index summary, complete the storage operation, and start re-execution from step A; 步骤N:读取备份索引概要,利用备份索引进行相关操作;Step N: Read the summary of the backup index, and use the backup index to perform related operations; 步骤O:对备份索引概要进行校验比较,若备份索引概要中的内容校验错误,说明存储器的数据已被完全损坏,利用软件不能继续维护,则执行步骤R;若备份索引概要也校验正确,则执行步骤P;Step O: Verify and compare the backup index summary. If the content in the backup index summary is incorrectly verified, it means that the data in the memory has been completely damaged, and the software cannot continue to maintain it. Then perform step R; if the backup index summary is also verified If it is correct, execute step P; 步骤P:从备份索引概要中获取备份索引内容的最新存储指针,利用该最新存储指针在备份索引内容中读取最新一条索引信息;Step P: Obtain the latest storage pointer of the backup index content from the backup index summary, and use the latest storage pointer to read the latest piece of index information in the backup index content; 步骤Q:从步骤P中的索引信息中提取数据内容的最新存储指针,并执行步骤G;Step Q: extract the latest storage pointer of the data content from the index information in step P, and execute step G; 步骤R:重新建立存储信息,从步骤A开始重新执行。Step R: re-establish storage information, and start from step A again. 2.根据权利要求1所述的对实时数据进行存储的方法,其特征在于,所述实时采集各传感器的数据还包括:2. the method for storing real-time data according to claim 1, is characterized in that, the data of described real-time collection each sensor also comprises: 步骤A1:将所述实时采集的包含:通道号、年、月、日、时、分、秒、数据值信息、校验码数据按日为单元生成索引和数据内容;Step A1: The real-time collection includes: channel number, year, month, day, hour, minute, second, data value information, check code data to generate an index and data content on a daily basis; 步骤A2:将包含有年、月、日、起始地址、结束地址、校验码的索引信息与已存储索引相比较,确定数据内容的存储地址;Step A2: Compare the index information including the year, month, day, start address, end address, and check code with the stored index to determine the storage address of the data content; 步骤A3:根据数据内容的存储地址判断是否需要对已存储数据进行覆盖,如果需要覆盖,则将需要覆盖存储区的内容删除,在该区域存储数据内容,并更改索引信息;如果不需要则直接将数据内容存储在由步骤A2得到的存储地址中;Step A3: Determine whether the stored data needs to be overwritten according to the storage address of the data content. If overwriting is required, delete the content in the overwritten storage area, store the data content in this area, and change the index information; if not, directly Store the data content in the storage address obtained by step A2; 步骤A4:根据数据内容的存储情况确定是否需要更新索引信息,如果需要则将已存储的索引更改为新索引信息,如果不需要则维持原索引不变。Step A4: Determine whether the index information needs to be updated according to the storage situation of the data content, if necessary, change the stored index to new index information, and if not, keep the original index unchanged. 3.如权利要求2所述的对实时数据进行存储的方法,其特征在于:所述存储数据内容覆盖采用环形顺序存储的循环覆盖存储方式,步骤如下:3. the method for storing real-time data as claimed in claim 2, is characterized in that: described storage data content coverage adopts the circular coverage storage mode of circular sequential storage, and the steps are as follows: 步骤A31:在SD存储卡中按物理地址顺序依次存储;Step A31: sequentially store in the SD memory card according to the physical address sequence; 步骤A32:存储到SD存储卡的最大物理地址时,将SD存储卡中最早一天的数据删除掉;Step A32: When storing to the maximum physical address of the SD memory card, delete the data of the earliest day in the SD memory card; 步骤A33:然后在最早一天存储内容的物理地址处继续存储数据,构成环形存储方式,并对索引内容进行相应改动。Step A33: Then continue to store data at the physical address where the stored content was stored on the earliest day to form a circular storage mode, and make corresponding changes to the index content. 4.如权利要求1所述的对实时数据进行存储的方法,其特征在于,所述的索引还包括:4. The method for storing real-time data as claimed in claim 1, wherein said index further comprises: 所述索引包含指向该日的数据内容的物理存储地址,存储索引采用双索引的主份和备份的存储方式,内容相同的主份索引和备份索引存储在铁电存储器中不同的物理地址中,各自含有校验信息;The index includes the physical storage address pointing to the data content of the day, and the storage index adopts the storage mode of the main part and the backup of the double index, and the main part index and the backup index with the same content are stored in different physical addresses in the ferroelectric memory, Each contains verification information; 存储索引由索引概要和索引内容组成,索引概要的内容包含索引内容起始与结束物理地址、存储记录总数、物理存储器剩余空间,索引内容是以天为单位生成的指向存储数据的索引信息。The storage index consists of an index summary and index content. The content of the index summary includes the starting and ending physical addresses of the index content, the total number of storage records, and the remaining space of the physical storage. The index content is the index information pointing to the stored data generated in units of days. 5.如权利要求1所述的对实时数据进行存储的方法,其特征在于:所述校验码R(X)多项式为CRC16循环校验码,其计算为:5. the method for storing real-time data as claimed in claim 1, is characterized in that: described check code R (X) polynomial is CRC16 cyclic check code, and its calculation is: BB (( Xx )) ·· 22 1616 GG (( Xx )) == QQ (( Xx )) ++ RR (( Xx )) GG (( Xx )) 其中B(X)为要校验的n位二进制序列数,G(X)=X16+X15+X2+1为固定多项式,Q(X)为整多项式,R(X)余式为循环校验码,X是多项式自由变量。Wherein B(X) is the n-bit binary sequence number to be checked, G(X)=X 16 +X 15 +X 2 +1 is a fixed polynomial, Q(X) is an integer polynomial, and the remainder of R(X) is Cyclic check code, X is a polynomial free variable. 6.如权利要求1所述的对实时数据进行存储的方法,其特征在于:所述实时数据值为单精度浮点数,由4字节表示,起始地址和结束地址为整型数,由4字节表示。6. the method for storing real-time data as claimed in claim 1, is characterized in that: described real-time data value is a single-precision floating-point number, represented by 4 bytes, start address and end address are integer numbers, by 4 bytes representation. 7.如权利要求3所述的对实时数据进行存储的方法,其特征在于:所述SD存储卡的存储容量为256MB~4GB。7. The method for storing real-time data according to claim 3, characterized in that: the storage capacity of the SD memory card is 256MB˜4GB. 8.如权利要求4所述的对实时数据进行存储的方法,其特征在于:所述铁电存储器的存储容量为16KB~128KB。8. The method for storing real-time data according to claim 4, characterized in that: the storage capacity of the ferroelectric memory is 16KB˜128KB. 9.如权利要求1所述的对实时数据进行存储的方法,其特征在于:所述嵌入式采集器为由ARM处理器构成的移植嵌入式操作系统的装置,该装置的软件中不移植常用文件系统。9. The method for storing real-time data as claimed in claim 1, characterized in that: the embedded collector is a device for transplanting an embedded operating system constituted by an ARM processor, and the software of the device does not transplant the commonly used File system. 10.如权利要求1所述对实时数据进行存储的方法在嵌入式ARM采集器上应用的方法。10. the method that the method for storing real-time data as claimed in claim 1 is applied on the embedded ARM collector.
CN2008101022106A 2008-03-19 2008-03-19 Method for storing real-time data Expired - Fee Related CN101520787B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2008101022106A CN101520787B (en) 2008-03-19 2008-03-19 Method for storing real-time data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2008101022106A CN101520787B (en) 2008-03-19 2008-03-19 Method for storing real-time data

Publications (2)

Publication Number Publication Date
CN101520787A CN101520787A (en) 2009-09-02
CN101520787B true CN101520787B (en) 2011-04-06

Family

ID=41081379

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2008101022106A Expired - Fee Related CN101520787B (en) 2008-03-19 2008-03-19 Method for storing real-time data

Country Status (1)

Country Link
CN (1) CN101520787B (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102103597A (en) * 2009-12-17 2011-06-22 上海威乾视频技术有限公司 DSP (digital signal processor) embedded FLASH file storage system
CN103049450B (en) * 2011-10-14 2018-01-23 深圳市世纪光速信息技术有限公司 One kind index establishes apparatus and method
CN102637197B (en) * 2012-02-28 2013-11-06 中北大学 File Management Method of Real-time Data Acquisition and Storage System
CN102646130B (en) * 2012-03-12 2013-08-14 华中科技大学 Method for storing and indexing mass historical data
CN103365766B (en) * 2012-03-31 2016-01-27 京信通信系统(中国)有限公司 A kind of method and system of file integrality protection
CN102663107A (en) * 2012-04-16 2012-09-12 深圳市华曦达科技股份有限公司 Method and system for managing embedded data
CN103092730B (en) * 2013-01-29 2016-06-29 许继集团有限公司 A kind of information storage and read method
CN103391246A (en) * 2013-08-02 2013-11-13 盛科网络(苏州)有限公司 Message processing method and device
WO2016192110A1 (en) * 2015-06-05 2016-12-08 深圳市大疆创新科技有限公司 File information processing method and device, and file processing apparatus and system
CN107605464A (en) * 2017-09-22 2018-01-19 中国石油集团西部钻探工程有限公司 Gas well switch board control system and its control method
CN114089916B (en) * 2018-01-12 2022-12-20 珠海极海半导体有限公司 Data acquisition system and temperature and humidity sensor system
CN110781026A (en) * 2019-10-25 2020-02-11 宁波三星医疗电气股份有限公司 Embedded equipment data storage and repair method and device and embedded equipment
CN113886186B (en) * 2021-10-18 2022-11-22 南京大鱼半导体有限公司 Processor exception tracking system and method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5813009A (en) * 1995-07-28 1998-09-22 Univirtual Corp. Computer based records management system method
CN1564158A (en) * 2004-04-12 2005-01-12 南京大学 Modeling memory and access method of real time database
CN101004744A (en) * 2006-01-17 2007-07-25 鸿富锦精密工业(深圳)有限公司 System and method for synchronizing indexes of remote files at multiple points

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5813009A (en) * 1995-07-28 1998-09-22 Univirtual Corp. Computer based records management system method
CN1564158A (en) * 2004-04-12 2005-01-12 南京大学 Modeling memory and access method of real time database
CN101004744A (en) * 2006-01-17 2007-07-25 鸿富锦精密工业(深圳)有限公司 System and method for synchronizing indexes of remote files at multiple points

Also Published As

Publication number Publication date
CN101520787A (en) 2009-09-02

Similar Documents

Publication Publication Date Title
CN101520787B (en) Method for storing real-time data
CN102567146B (en) Log backup method and device and smart card
CN106407050A (en) Data storage method
EP2916240A1 (en) Database storage system based on compact disk and method using the system
CN106776106A (en) A kind of date storage method based on NandFlash
CN1831786A (en) Data completeness protection method of flash storage
US7853568B2 (en) High speed data historian
CN103577574A (en) High-reliability linear file system based on nand flash
CN103996412A (en) Power-fail protection method applied to intelligent-card nonvolatile memories
CN113884976B (en) Cloud platform based intelligent electric meter data protection method and system
CN109240870A (en) Solid state disk fault positioning method and related device
CN103309779B (en) Secondary equipment of intelligent converting station condition detection method
CN109189724B (en) Method and device for improving audio and video data storage efficiency of video monitoring system
CN110865903A (en) Node abnormal reconnection multiplexing method and system based on erasure code distributed storage
CN103714060A (en) Interrupt-period historical data processing method and front-end collecting sub system equipment
CN104166627B (en) A kind of SCM Based NAND FLASH write operation methods
CN103514063A (en) Method and device for processing FLASH data
CN104484280B (en) A car mileage access system
CN110855644A (en) Method and device for protecting data
CN102479116A (en) Method and device for checking code information when system is abnormal
CN104504349B (en) A kind of Video data safe storage device and method
CN115167761A (en) Intelligent water affair terminal data protection method and system
CN109947600B (en) File recovery method, device, equipment and medium based on Ceph
CN105607957A (en) OPC DA based data collection and monitoring system and method
JP5868766B2 (en) Plant data storage device, plant data storage method, and plant data storage program

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
EE01 Entry into force of recordation of patent licensing contract

Assignee: Beijing Mailing Medical Technology Development Co., Ltd.

Assignor: Institute of Automation, Chinese Academy of Sciences

Contract record no.: 2011110000073

Denomination of invention: Method for storing real-time data

Granted publication date: 20110406

License type: Exclusive License

Open date: 20090902

Record date: 20110704

CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20110406

Termination date: 20210319

CF01 Termination of patent right due to non-payment of annual fee