CN101055199A - Method and device for recording data and instrument capable of recording data - Google Patents

Method and device for recording data and instrument capable of recording data Download PDF

Info

Publication number
CN101055199A
CN101055199A CN 200710110774 CN200710110774A CN101055199A CN 101055199 A CN101055199 A CN 101055199A CN 200710110774 CN200710110774 CN 200710110774 CN 200710110774 A CN200710110774 A CN 200710110774A CN 101055199 A CN101055199 A CN 101055199A
Authority
CN
China
Prior art keywords
data
record
index
unit
recording
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.)
Granted
Application number
CN 200710110774
Other languages
Chinese (zh)
Other versions
CN100507456C (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.)
ZHONGKONG SCIENCE AND TECHNOLOGY GROUP Co Ltd
Zhejiang University ZJU
Supcon Group Co Ltd
Original Assignee
ZHONGKONG SCIENCE AND TECHNOLOGY GROUP Co Ltd
Zhejiang University ZJU
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 ZHONGKONG SCIENCE AND TECHNOLOGY GROUP Co Ltd, Zhejiang University ZJU filed Critical ZHONGKONG SCIENCE AND TECHNOLOGY GROUP Co Ltd
Priority to CNB200710110774XA priority Critical patent/CN100507456C/en
Publication of CN101055199A publication Critical patent/CN101055199A/en
Application granted granted Critical
Publication of CN100507456C publication Critical patent/CN100507456C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a method for recording data in instrument, including: generating index comprising record beginning time, record interval and record number, and corresponding data recording block after the recording system starts up; determining whether the record interval point is achieved; storing the data into the data recording block and adding 1 to the record number when the record interval point is achieved. The invention also discloses an apparatus for recording data in instrument which includes a index management unit for generating index comprising record beginning time, record interval and record number; a data recording block management unit for generating the corresponding data recording block with the index; a record interval point monitoring unit for monitoring the record interval point; a data recording unit for storing the data into the data recording block. The invention also discloses an instrument capable of recording data. The invention is capable of recording data at random record interval and stopping record at will.

Description

Method for recording data in instrument, device and instrument that can record data
Technical field
The present invention relates to Data recording technique, particularly relate to a kind of in method for recording data in instrument, device and instrument that can record data.
Background technology
Existingly a kind ofly be: the logging interval that 1, record data are set in method for recording data in instrument; 2, will need each data of writing down according to the interval of presetting record respectively; And in these group data of record, note the start time and the record number of these group data.Wherein, the described start time is the writing time of first data in these group data.When reading these group data, just can corresponding only definite record data according to described start time, record number, three key elements of logging interval.
In carrying out the invention process, the inventor finds that there are the following problems at least in the prior art: when record data, because this method for recording data of prior art requires according to regular time interval record, logging interval is changeless in recording process, so the data of record must be continuous in time, writing time that could obtain these data according to the record number of each data and the time interval like this, and then retrieve this data.Therefore, when instrument because of outage with power on etc. former again thereby when causing record to interrupt, time continuity for the data of holding the record, last data that the data that just must not note have then been stored during according to described and former the record identical logging interval fill into respectively, thereby guarantee the record number of each data and be consistent the writing time of these data.Can increase the power-up initializing time of instrument like this.If this section does not need to carry out data recording, just there is no need to carry out data when powering on so again and fill.And if the logging interval change, then the data of record all can't be retrieved in the past, and the recording method of this data can not be carried out flexibly data recording easily, the problem of the record of start-stop at any time.
Summary of the invention
In view of this, the purpose of the one or more embodiment of the present invention is to provide a kind of in method for recording data in instrument, device and instrument that can record data, to solve the problem of the above-mentioned record of start-stop at any time.
For addressing the above problem, the embodiment of the invention provides a kind of method for recording data in instrument, and this method comprises the steps:
After register system starts, generate the index data recording piece corresponding with described index, described index comprises start-of-record time, logging interval and record number;
Judge whether logging interval point arrives;
When described logging interval point arrives, deposit data in described data recording piece, described record number is added 1.
For addressing the above problem, the embodiment of the invention provides a kind of device of recording data in instrument, comprising:
Index management unit is used for after receiving the register system enabling signal, generates index, and described index comprises start-of-record time, logging interval and record number, and described start-of-record time and described logging interval are delivered to logging interval point monitor unit;
Data recording piece administrative unit is used for after receiving described enabling signal, generates the data recording piece corresponding with described index;
Described logging interval point monitor unit, be used to receive described start-of-record time and described logging interval after, monitor whether described logging interval point arrives, and when logging interval point arrives, send recording instruction to data record unit;
Described data record unit is used for after receiving described recording instruction, and data are deposited in the described data recording piece.
For addressing the above problem, the embodiment of the invention discloses a kind of instrument that can record data, comprise the record data device, the record data device comprises:
Index management unit, be used for after the register system startup, receiving enabling signal, generate index, described index comprises start-of-record time, logging interval and record number, and described start-of-record time and described logging interval are delivered to logging interval point monitor unit;
Data recording piece administrative unit is used for after receiving described enabling signal, generates the data recording piece corresponding with described index;
Described logging interval point monitor unit, be used to receive described start-of-record time and described logging interval after, monitor whether described logging interval point arrives, and when logging interval point arrives, send recording instruction to data record unit;
Described data record unit is used for after receiving described recording instruction, and data are deposited in the described data recording piece.
Compared with prior art, method provided by the invention, device and instrument have the following advantages:
Owing to when register system starts, generated index and corresponding data recording piece thereof, in index, deposited contents such as start-of-record time, logging interval, record number, use these contents can reflect, customize the record data process.By the logging interval in the index is set, can has at ground and in data recording piece record, realize coming record data with different densities.And for different index, its corresponding data recording piece uses different logging interval, at different time opening entries, writes down different data numbers therein.The start-of-record time can be different and different with the record number with each data recording piece start-of-record time with the record number, and logging interval can be a predefined default value.Whenever outage or other reasons again and interrupted the current record process, when restarting new data recording again, will generate a new index and corresponding data recording piece thereof again, and with the logging interval in the described index, record data in described data recording piece.Can not carry out again data and fill, realize any start-stop for record data to the unwritten time period of centre.Also can carry out in its corresponding data recording piece, finding corresponding record data, can't cause recorded data to discern because of the difference of logging interval according to index.
Description of drawings
Fig. 1 is the process flow diagram of first embodiment of method of the present invention;
Fig. 2 is the process flow diagram of second embodiment of method of the present invention;
Fig. 3 is the process flow diagram of the 3rd embodiment of method of the present invention;
Fig. 4 is the data recording piece synoptic diagram of method of the present invention, device and instrument that can record data;
Fig. 5 is the data storage area of method of the present invention, device and instrument that can record data and a kind of corresponding relation figure in index stores district;
Fig. 6 is the data storage area of method of the present invention, device and instrument that can record data and a kind of corresponding relation figure in index stores district;
Fig. 7 is the structured flowchart of first embodiment of device of the present invention;
Fig. 8 is the structured flowchart of second embodiment of device of the present invention;
Fig. 9 is the structured flowchart of the 3rd embodiment of device of the present invention;
Figure 10 is the structured flowchart of the 4th embodiment of device of the present invention;
Figure 11 is the structured flowchart of the 5th embodiment of device of the present invention;
Figure 12 is the structured flowchart of instrument of the present invention.
Embodiment
Below in conjunction with accompanying drawing the embodiment of the embodiment of the invention is done further and to be elaborated.
As shown in Figure 1, be first embodiment of method for recording data in instrument of the present invention, comprise the steps:
S101, judge whether register system starts.
When following situation occurring:
1, instrument powers on
2, amendment record at interval
3, change system time
4, send the startup record order
Think that register system starts, automatically write down startup in the time of can being set in advance in instrument and powering on by register system, also can start record order from the outside by the user, when amendment record interval and change system time, register system all will restart, when these four kinds of situations occurred, the beginning data recording entered step S102; Otherwise, do not carry out data recording.
S102, generation index and the data recording piece corresponding with described index.
In the instrument memory block, generate index, and generate the data recording piece corresponding simultaneously with described index.
Described index comprises start-of-record time, logging interval and the corresponding interior record number of data recording piece thereof; Described index is deposited according to time sequencing, and the time sequencing of described index is consistent with the time sequencing of record data; The corresponding index of each described data recording piece can have several described data recording pieces in the instrument memory block.In each described data recording piece, the described logging interval of each data is identical, and described each data are deposited in chronological order, and each record data in the data recording piece are continuous by the time interval.Described logging interval is the time interval of writing down under current index, and the logging interval of the data recording piece internal data that each are different can be identical, also can be different.The start-of-record time of each data recording piece is different.
S103, judge whether logging interval point arrives.
Described logging interval in each data recording piece is identical, and wherein Ji Lu data are to deposit in chronological order.Logging interval has reflected the time density that data are write down.If logging interval arrives, then carry out step S104; If logging interval does not arrive, just return step S103.
S104, record data.
Every logging interval time point is just noted new record data in the data recording piece of current index correspondence.
Owing to adopted this technical scheme, can bring following advantage:
Owing to generated index and corresponding data recording piece thereof, in index, deposited contents such as start-of-record time, logging interval, record number.Make by the logging interval in the index is set, can in the data recording piece, come record data targetedly with different density.And can realize, for the different logging interval of data recording piece use of different index correspondence.The start-of-record time with the record number also with each data recording piece start-of-record time, the record number different and different, can be so that in the process of data recording, change logging interval according to need of work, and owing to comprise logging interval in the described index of described data recording piece correspondence, can find relevant data according to index, can't cause recorded data to discern because of the difference of logging interval.The more important thing is that power on, write down startup, amendment record in instrument at interval the time and during the change system time, system will generate a new index and corresponding data recording piece thereof, record data in the data recording piece of new index correspondence.Having overcome in the prior art can only be with a logging interval record data, more arbitrarily the technical matters of start-stop record.Can be so that in the process of data recording, change logging interval according to need of work, and because the index of data recording piece correspondence comprises logging interval, can find relevant data according to the content of index, can't cause record data to discern because of the difference of logging interval.
As shown in Figure 2, be second embodiment of method for recording data in instrument of the present invention, below in conjunction with Fig. 2, describe performing step of the present invention in detail:
Instrument enters the record data state after starting,
S201, amendment record are at interval.
According to customer requirements, amendment record makes the data of noting can reflect the specific requirement of instrument actual state or work at interval.
S202, in the instrument memory block, generate an index, and generate the data recording piece of described index correspondence simultaneously.
Described index comprises start-of-record time, logging interval and the corresponding interior record number of data recording piece thereof; Each index is deposited according to time sequencing, and the time sequencing of index is consistent with the time sequencing of record data; The corresponding index of each data recording piece, several number can be arranged according to record block in the instrument memory block, identical and the record data of logging interval in described each data recording piece are deposited in chronological order, and the data in the data recording piece are continuous by the time interval.Data recording in each data recording piece can have nothing in common with each other at interval or be identical.
S203, judge that whether the number of index surpasses predetermined value.
The storage space of instrument has certain limit, according to the size of storage space, distribute recording areas and index area, and distributed the summation of the record number that described recording areas and described index area can hold and the number of index, the data recording piece leaves recording areas in, and index leaves the index area in; If the number of described index surpasses described predetermined value, enter step S204; The number of described index does not surpass described predetermined value, enters step S205.
S204, delete index and data recording piece thereof the earliest.
When the number of described index reaches predetermined value, and the space in index stores district is certain, in order to increase an index newly, continues record data in the data recording piece of new index correspondence, must delete an index of noting the earliest.Correspondingly, the record data in deleted index this moment are also deleted.
S205, judge whether logging interval point arrives.
Logging interval in each data recording piece is identical, and data are to deposit in chronological order.Logging interval has reflected the time density that data are write down.If described logging interval arrives, then carry out step S206; If described logging interval does not arrive, just return step S205.
S206, record data, the described record number in the described index adds 1.
Every logging interval time point just increases new record data in the data recording piece of described index correspondence.At this moment, correspondingly, the described record number in the described index of this data recording piece correspondence also adds 1.Record number information is all arranged in the content of each index, reflection be record number in each self-corresponding data recording piece.
S207, calculate the summation of the described record number in each index.
The record number that its corresponding data recording piece is arranged respectively in each index with the addition of described record number, has just obtained the summation of the described record number in the data storage area.
S208, judge whether the summation of described record number reaches predetermined value.
The storage space of instrument has certain limit, according to the size of storage space, distributes the number of recording areas and index area, and the data recording piece leaves described recording areas in, and index leaves described index area in; The summation of described record number surpasses described predetermined value, enters step 209; The summation of described record number does not surpass described predetermined value, enters step S205.
S209, deletion be record data the earliest, and the record number in the index subtracts 1 the earliest.
Because the summation of described record number reaches described predetermined value, will delete record data the earliest.Record data are in the data recording piece of index correspondence the earliest the earliest, are first data in the described data recording piece.After deleting these described record data the earliest, correspondingly, one of the corresponding minimizing of described record number in the described index the earliest of first data recording piece correspondence.
S210, judge described the earliest described in the index record number whether be 0.
If record number 0 then enters step S211 in the described index the earliest; If the described number of record described in the index the earliest is not 0, then enter step S212.
S211, the described index the earliest of deletion.
Index deletion the earliest in the index stores district, the record data in the deleted described index the earliest are also deleted at this moment.
S212, judge whether to stop record.
If the user does not require to stop record, then enter step S205; If customer requirements stops record, end record data then.
By the disclosed described a kind of method for recording data in instrument of the foregoing description, in the time of can being further implemented in the amendment record interval, generate a new index and corresponding data recording piece thereof, proceed the line data record, having realized can only be with the technical matters of fixing logging interval record data in the prior art.And, even in the process of record data, also can realize the variation of logging interval, the logging interval data of needs are recorded in the data recording piece of new index correspondence.
As shown in Figure 3, be the 3rd embodiment of method for recording data in instrument of the present invention, comprise step:
Instrument enters the record data state after starting,
S301, startup record.
According to user instruction, start record.
S302, in the instrument memory block, generate an index, and generate the data recording piece of described index correspondence simultaneously.
Described index comprises start-of-record time, logging interval and the corresponding interior record number of data recording piece thereof; Each index is deposited according to time sequencing, and the time sequencing of index is consistent with the time sequencing of record data; The corresponding index of each data recording piece, several number can be arranged according to record block in the instrument memory block, identical and the record data of logging interval in described each data recording piece between data are deposited in chronological order, and the data in the data recording piece are continuous by the time interval.Data recording in each data recording piece can have nothing in common with each other at interval or be identical.
S303, judge that whether the number of index surpasses predetermined value.
The storage space of instrument has certain limit, according to the size of storage space, distribute recording areas and index area, and distributed the summation of the record number that described recording areas and index area can hold and the number of index, the data recording piece leaves recording areas in, and index leaves the index area in; If the number of described index surpasses described predetermined value, enter step S204; The number of described index does not surpass described predetermined value, enters step S205.
S304, delete index and data recording piece thereof the earliest.
When the number of described index reaches predetermined value, and the space in index stores district is certain, in order to increase an index newly, continues record data in the data recording piece of new index correspondence, must delete an index of noting the earliest.Correspondingly, the record data in deleted index this moment are also deleted.
S305, judge whether logging interval point arrives.
Logging interval in each data recording piece is identical, and data are to deposit in chronological order.Logging interval has reflected the time density that data are write down.If described logging interval arrives, then carry out step S206; If described logging interval does not arrive, just return step S205.
S306, record data, the described record number in the described index adds 1.
Every logging interval time point just increases new record data in the data recording piece of described index correspondence.At this moment, correspondingly, the described record number in the described index of this data recording piece correspondence also adds 1.Record number information is all arranged in the content of each index, reflection be record number in each self-corresponding data recording piece.
S307, calculate the summation of the described record number in each index.
The record number that its corresponding data recording piece is arranged respectively in each index with the addition of described record number, has just obtained the summation of the described record number in the data storage area.
S308, judge whether the summation of described record number reaches predetermined value.
The storage space of instrument has certain limit, according to the size of storage space, distributes the number of recording areas and index area, and the data recording piece leaves described recording areas in, and index leaves described index area in; The summation of described record number surpasses described predetermined value, enters step 209; The summation of described record number does not surpass described predetermined value, enters step S205.
S309, deletion be record data the earliest, and the record number in the index subtracts 1 the earliest.
Because the summation of described record number reaches described predetermined value, will delete record data the earliest.Record data are in the data recording piece of index correspondence the earliest the earliest, are first data in the described data recording piece.After deleting these described record data the earliest, correspondingly, one of the corresponding minimizing of described record number in the described index the earliest of first data recording piece correspondence.
S310, judge described the earliest described in the index record number whether be 0.
If record number 0 then enters step S211 in the described index the earliest; If the described number of record described in the index the earliest is not 0, then enter step S212.
S311, the described index the earliest of deletion.
Index deletion the earliest in the index stores district, the record data in the deleted described index the earliest are also deleted at this moment.
S312, judge whether to stop record.
If the user does not require to stop record, then enter step S205; If customer requirements stops record, end record data then.
Further, similar with second and third embodiment, different with the system condition of S201 and S301, after instrument occurring and powering on or revise the condition of system time, also can generate an index and corresponding data recording piece thereof.Constituted the 4th, the 5th embodiment, its flow process and second embodiment and the 3rd embodiment are basic identical.
Fig. 4 is the synoptic diagram of interior data of data recording piece and corresponding time relationship.In the drawings, represent K data with data K.Logging interval is identical between the data in each data recording piece, and these data are by time interval continuous recording, deposit.As shown in Figure 4, if the data in data record block from first data of time T 1 opening entry, logging interval is T, then are T1 the writing times of first data, are T+T1 the writing times of second data, and by that analogy, are T1+T (K-1) writing times of K data.Record number in the data recording piece is not more than record number maximal value in the data storage area.
In second and third and four embodiment of method for recording data in instrument of the present invention, calculate the summation of record number in all data recording pieces, when the summation of described record number surpasses predetermined value, deletion the earliest record data and the earliest the record number in the index subtract 1.Its process is such as shown in Figure 4, if T1 is writing time the earliest, then the data recording piece among Fig. 4 is the piece of data recording the earliest of the described correspondence of index the earliest, and then record data are data 1 the earliest.At this moment, data 1 are with deleted, and the record number also subtracts 1 in the index of the correspondingly described piece of data recording the earliest correspondence.
If the record number in the described piece of data recording the earliest reduces to 0, represent that all data are all deleted in the described piece of data recording the earliest.At this moment, will delete the described index the earliest of the described piece of data recording the earliest correspondence.
In actual applications, described predetermined value can be defaulted as the dominant record number of memory block, also can be other values that the user sets, and the size of described predetermined value depends on the needs of real work.This does not exceed core concept of the present invention, still within protection scope of the present invention.
Shown in Figure 5 be second and third and four embodiment of method for recording data in instrument of the present invention when described index number reaches maximal value, index and data recording piece synoptic diagram in the instrument memory block.Suppose that the largest index number that described index stores district can write down is N, the data dominant record number that described data storage area can write down is M.When having write down N index, N data record block is arranged accordingly so.If work as conditions being possessed, start (amendment record interval, instrument power on, write down startup) as register system, generate new index, so, difference execution in step S204 and S304 delete described index the earliest and data recording piece thereof in embodiment 2 and embodiment 3.Corresponding step is also arranged among the embodiment 4.The data recording piece and the index in so described data storage area and described index stores district just become as shown in Figure 6.Index 1 and corresponding data recording piece 1 thereof are all deleted the earliest, replace the time N+1 index and correspondence thereof the data recording piece.Similarly, if need to generate N+2 index again, then the data recording piece 2 of Ci Shi index the earliest 2 and correspondence thereof is with deleted.
In actual applications, described index number predetermined value is an index stores district index number maximal value, also can be other values that the user sets, and the size of described predetermined value depends on the needs of real work.This does not exceed core concept of the present invention, still within protection scope of the present invention.
Below in conjunction with accompanying drawing, with specific embodiment, the device for recording data in instrument provided by the invention is elaborated.
As shown in Figure 7, be first embodiment of the device of recording data in instrument of the present invention, comprising:
Index management unit 701, be used for starting in register system, after receiving enabling signal, generate index, and start-of-record time and logging interval delivered to logging interval point monitor unit 703, when following situation occurring: instrument powers on, amendment record at interval, the change system time, send the startup record order, device all will restart, when these four kinds of situations occur, think that register system starts, automatically write down startup in the time of can being set in advance in instrument and powering on by pen recorder, also can start record order from the outside by the user, when amendment record interval and change system time, pen recorder all will restart, when these four kinds of situations occur, the beginning data recording, described index comprises the described start-of-record time, described logging interval, the record number;
Data recording piece administrative unit 702 is used for after receiving described enabling signal, generates the data recording piece of described index correspondence;
Described logging interval point monitor unit 703, be used to receive described start-of-record time and described logging interval after, whether the monitor record spaced points arrives, and when described logging interval point arrives, sends out 704 to data record unit and send recording instruction;
Described data record unit 704 is used for after receiving described recording instruction, and data are deposited in the described data recording piece.
Utilize device of the present invention, can be implemented in random time and begin data recording with the logging interval of setting, and needn't continuous recording, more need after startup, not fill the data that write down when not working.Also can retrieve any record data of noting easily by the corresponding relation of the index data recording piece corresponding with it.
Further, as shown in Figure 8, be second embodiment of the device of recording data in instrument of the present invention, be on the basis of the embodiment of device shown in Figure 7, by increasing register system start unit 705, be used for powering on, writing down startup, amendment record at interval or during the change system time, enabling signal is delivered to described index management unit 701 and described data recording piece administrative unit 702 in instrument.
Further, as shown in Figure 9, be the 3rd embodiment of the device of recording data in instrument of the present invention, be on the basis of the embodiment of device shown in Figure 8, increase index number judging unit 706, after being used to receive the index number of index number statistic unit 707, judge whether described index number surpasses predetermined value, if judged result is delivered to index management unit 701, data recording piece administrative unit 702; Increase described index number statistic unit 707, be used for the index number that statistical index administrative unit 701 generates, and described index number is delivered to described index number judging unit 706; Described index management unit 701 also is used for deleting index the earliest when receiving the judged result that index number judging unit 706 is sent here; Described data recording piece administrative unit 702 also is used in the data recording piece of the described correspondence of index the earliest of deletion when receiving the judged result that index number judging unit 706 sends here.
As shown in figure 10, be the 4th embodiment of the device of recording data in instrument of the present invention, be on the basis of the embodiment of device shown in Figure 9, increased the connection diagram that logging interval is provided with unit 708, described logging interval is provided with unit 708, be used for setting, amendment record at interval, and the described logging interval that will be provided with is delivered to described index management unit 701;
Described index management unit 701 also is used for after receiving described logging interval, generates the index data recording piece corresponding with described index.
As shown in figure 11, be the 5th embodiment of the device of recording data in instrument of the present invention, be on the basis of the embodiment of device shown in Figure 10, increased record number statistic unit 709 and record number judging unit 710.Described record number statistic unit is used for adding up the summation of the record number of all index, and the summation of described record number is delivered to described record number judging unit 710; After described record number judging unit 710 is received and is used to receive the summation of described record number, judge that whether the summation of described record number surpasses predetermined value, if data are completely instructed deliver to described data record unit 704 and described index management unit 701;
Described data record unit 704, also be used in receive that described data are completely instructed after, deletion record data the earliest;
Described index management unit 701 also is used for after receiving that described data are completely instructed, and the described record number in the index is the earliest subtracted 1.
Present embodiment can be implemented in before the record or changes the logging interval of data in the recording process arbitrarily.
As shown in figure 12, be a kind of instrument that can record data of the present invention, comprise record data device 700, record data device 700 comprises:
Index management unit 701, be used for after the register system startup, receiving enabling signal, generate index, when following situation occurring: instrument powers on, amendment record at interval, change system time, send the startup record order, pen recorder all will restart, when these four kinds of situations occur, think that register system starts, the beginning data recording, described index comprises start-of-record time, logging interval and record number, and described start-of-record time and described logging interval are delivered to logging interval point monitor unit 703;
Data recording piece administrative unit 702 is used for after receiving described enabling signal, generates the data recording piece corresponding with described index;
Logging interval point monitor unit 703, be used to receive described start-of-record time and described logging interval after, whether the monitor record spaced points arrives, and when described logging interval point arrives, sends recording instructions to data record unit 704;
Described data record unit 704 is used for after receiving described recording instruction data being deposited in the data recording piece.
Utilize instrument provided by the invention, make instrument can be implemented in to start any time and stop record data.
Above-described embodiment of the present invention does not constitute the qualification to protection domain of the present invention.Any modification of being done within the spirit and principles in the present invention, be equal to and replace and improvement etc., all should be included within protection scope of the present invention.

Claims (15)

1, a kind of method for recording data in instrument is characterized in that, comprising:
After register system starts, generate the index data recording piece corresponding with described index, described index comprises start-of-record time, logging interval and record number;
Judge whether logging interval point arrives;
When described logging interval point arrives, deposit data in described data recording piece, described record number is added 1.
2, method for recording data in instrument as claimed in claim 1 is characterized in that, after the described data recording piece of described index and described index correspondence generated, described logging interval point also comprised before arriving:
Calculate the number of described index;
Whether the number of judging described index surpasses predetermined value, if delete index and data recording piece the earliest the earliest.
3, method for recording data in instrument as claimed in claim 1 is characterized in that, also comprises:
Calculate the summation of the described record number of each described data recording piece;
Judge whether described summation surpasses predetermined value, if deletion record data the earliest also subtracts 1 with the described record number in the described index content the earliest.
4, method for recording data in instrument as claimed in claim 3 is characterized in that, deletion record data the earliest also subtracts the described record number in the described index the earliest after 1, also comprises:
Judge whether the described record number in the described index the earliest is 0;
If then delete described index the earliest.
5, as the described any method for recording data in instrument of claim 1-4, it is characterized in that, also comprise:
Receive the instruction that customer requirements stops to write down, end record data.
6, method for recording data in instrument as claimed in claim 1 is characterized in that, described register system starts and comprises: instrument powers on, amendment record at interval, change system time or start record.
7, method for recording data in instrument as claimed in claim 1 is characterized in that, described index, described data recording piece are deposited in chronological order.
8, a kind of device of recording data in instrument is characterized in that, comprising:
Index management unit is used for after receiving the register system enabling signal, generates index, and described index comprises start-of-record time, logging interval and record number, and described start-of-record time and described logging interval are delivered to logging interval point monitor unit;
Data recording piece administrative unit is used for after receiving described enabling signal, generates the data recording piece corresponding with described index;
Described logging interval point monitor unit, be used to receive described start-of-record time and described logging interval after, monitor whether described logging interval point arrives, and when logging interval point arrives, send recording instruction to data record unit;
Described data record unit is used for after receiving described recording instruction, and data are deposited in the described data recording piece.
9, the device of recording data in instrument as claimed in claim 8 is characterized in that, also comprises:
Logging interval is provided with the unit, be used for being provided with, revising described logging interval, and the described logging interval that will be provided with, revise is delivered to index management unit;
Described index management unit is used for after receiving described logging interval, generates index.
10, the device of recording data in instrument as claimed in claim 8 is characterized in that, also comprises:
Index number statistic unit be used to add up the index number that described index management unit generates, and the described index number that will add up is delivered to index number judging unit;
Index number judging unit, after being used to receive the number of described index of described index number statistic unit, whether the number of judging described index surpasses predetermined value, if then index is completely instructed and deliver to described index management unit and described data recording piece administrative unit;
Described index management unit also is used in the index of receiving that described index completely instructs the back deletion to write down the earliest;
Described data recording piece administrative unit also is used in receives that described index completely instructs the back to delete the described data recording piece of the index correspondence of record the earliest.
11, as the device of claim 8,9 or 10 described recording data in instrument, it is characterized in that, also comprise:
Write down the number statistic unit, be used to add up the summation of described record number, and the summation of described record number is delivered to record number sum judging unit;
Described record number sum judging unit after being used to receive the summation of described record number, judges that whether the summation of described record number surpasses predetermined value, if data are completely instructed deliver to described data record unit and described index management unit;
Described data record unit, also be used in receive that described data are completely instructed after, deletion record data the earliest;
Described index management unit also is used for after receiving that described data are completely instructed, and the described record number in the index is the earliest subtracted 1.
12, the device of recording data in instrument as claimed in claim 11 is characterized in that, also comprises:
Write down the number monitor unit, be used for monitoring the described record number of described data recording piece,, the data dummy instruction is delivered to described index management unit if described record number is 0;
Described index management unit after also can be used for receiving the data dummy instruction, is deleted described index the earliest.
13, the device of recording data in instrument as claimed in claim 12 is characterized in that, also comprises:
Stop record cell, be used to receive the instruction that the user stops to write down after, instruct above-mentioned any one unit to quit work.
14, the device of record data as claimed in claim 8 is characterized in that, also comprises:
Described register system start unit, be used for powering in instrument, amendment record at interval, change system time or when starting record, enabling signal is delivered to described index management unit and described data recording piece administrative unit.
15, a kind of instrument that can record data is characterized in that comprise the record data device, described record data device comprises:
Index management unit, be used for after the register system startup, receiving enabling signal, generate index, described index comprises start-of-record time, logging interval and record number, and described start-of-record time and described logging interval are delivered to logging interval point monitor unit;
Data recording piece administrative unit is used for after receiving described enabling signal, generates the data recording piece corresponding with described index;
Described logging interval point monitor unit, be used to receive described start-of-record time and described logging interval after, monitor whether described logging interval point arrives, and when logging interval point arrives, send recording instruction to data record unit;
Described data record unit is used for after receiving described recording instruction, and data are deposited in the described data recording piece.
CNB200710110774XA 2007-06-13 2007-06-13 Method and device for recording data and instrument capable of recording data Expired - Fee Related CN100507456C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB200710110774XA CN100507456C (en) 2007-06-13 2007-06-13 Method and device for recording data and instrument capable of recording data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB200710110774XA CN100507456C (en) 2007-06-13 2007-06-13 Method and device for recording data and instrument capable of recording data

Publications (2)

Publication Number Publication Date
CN101055199A true CN101055199A (en) 2007-10-17
CN100507456C CN100507456C (en) 2009-07-01

Family

ID=38795150

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB200710110774XA Expired - Fee Related CN100507456C (en) 2007-06-13 2007-06-13 Method and device for recording data and instrument capable of recording data

Country Status (1)

Country Link
CN (1) CN100507456C (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103988137A (en) * 2012-06-26 2014-08-13 东芝三菱电机产业系统株式会社 Data collection system, data collection device, data collection system program, and data collection program
CN106970935A (en) * 2017-01-20 2017-07-21 朗坤智慧科技股份有限公司 Real-time data memory structure, method for writing data and method for reading data
CN107844110A (en) * 2016-09-21 2018-03-27 中车株洲电力机车研究所有限公司 A kind of fault data recorder system for current transformer

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103988137A (en) * 2012-06-26 2014-08-13 东芝三菱电机产业系统株式会社 Data collection system, data collection device, data collection system program, and data collection program
CN107844110A (en) * 2016-09-21 2018-03-27 中车株洲电力机车研究所有限公司 A kind of fault data recorder system for current transformer
CN107844110B (en) * 2016-09-21 2020-05-22 中车株洲电力机车研究所有限公司 Fault data recording system for current transformer
CN106970935A (en) * 2017-01-20 2017-07-21 朗坤智慧科技股份有限公司 Real-time data memory structure, method for writing data and method for reading data
CN106970935B (en) * 2017-01-20 2021-02-02 朗坤智慧科技股份有限公司 Real-time data storage structure, data writing method and data reading method

Also Published As

Publication number Publication date
CN100507456C (en) 2009-07-01

Similar Documents

Publication Publication Date Title
CN1141655C (en) File management system of image data
CN1256732C (en) Flash memory and control method
CN1160629C (en) Device, method and system for read/write data and medium for providing data read/write program
CN1696888A (en) Recording medium, hoster and data processing method
CN1099678C (en) Nonvolatile semiconductor disk device
CN1517947A (en) Nonvolatile memory
CN101060412A (en) Ethernet power supply system, control unit, master control module and Ethernet power supply method
CN1493026A (en) Memory device and record regenerator using it
CN1689116A (en) Flash memory and memory control method
CN101042546A (en) Image forming apparatus allowing setting item to be changed in power-saving mode
CN101055199A (en) Method and device for recording data and instrument capable of recording data
CN1728047A (en) Image processing apparatus and control method and program thereof
CN1889069A (en) Media content long-distance dynamic dumping method
CN1652088A (en) Data management apparatus and method used for flash memory
CN1538456A (en) Flash memory access apparatus and method
CN1835454A (en) Event notification management program and event notification management apparatus
CN1658194A (en) File system control apparatus and file system control method
CN101079722A (en) A reporting method, system and device of network living broadcast advertisement
CN1749887A (en) Method for realizing multipoint alarm clock in electronic equipment
CN1870660A (en) Method and node equipment for updating address analytic protocol table entry
CN1863085A (en) Method and system for ensuring network managment and element configuration data consistency
CN1790177A (en) Image forming device, customer replaceable unit host device, and controlling methods thereof
CN1503181A (en) Method for poblishing address and system for realizing same
CN1677946A (en) Buffer distribution method and apparatus
CN1082308C (en) Voice announcement device and method of electronic exchange system

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
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20090701

Termination date: 20180613