CN103544097A - Journal storing method, journal storing system, journal reading method and journal reading system of embedded system - Google Patents

Journal storing method, journal storing system, journal reading method and journal reading system of embedded system Download PDF

Info

Publication number
CN103544097A
CN103544097A CN201310496989.5A CN201310496989A CN103544097A CN 103544097 A CN103544097 A CN 103544097A CN 201310496989 A CN201310496989 A CN 201310496989A CN 103544097 A CN103544097 A CN 103544097A
Authority
CN
China
Prior art keywords
daily record
record data
random access
access memory
writing
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
CN201310496989.5A
Other languages
Chinese (zh)
Other versions
CN103544097B (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.)
Vtron Group Co Ltd
Original Assignee
Vtron Technologies Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vtron Technologies Ltd filed Critical Vtron Technologies Ltd
Priority to CN201310496989.5A priority Critical patent/CN103544097B/en
Publication of CN103544097A publication Critical patent/CN103544097A/en
Application granted granted Critical
Publication of CN103544097B publication Critical patent/CN103544097B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a journal storing method, a journal storing system, a journal reading method and a journal reading system of an embedded system. The journal storing method includes acquiring log data of the embedded system, writing the log data into a random access memory and copying the log data written in the random access memory to an external memory. With the journal storing method, the journal storing system, the journal reading method and the journal reading system of the embedded system, the log data is stored in the random access memory firstly and then copied to the external memory from the random access memory. In an embedded software system, all tasks can be ensured to operate normally, and the log data can be rapidly stored with low memory use ratio and log data copied from the random access memory to the external memory is not lost when power down; the log data can be rapidly read from the random access memory, and log data lost from the random access memory can be timely read from the external memory.

Description

The log storing method of embedded system, system and log read method and system
Technical field
The present invention relates to embedded system field, particularly relate to a kind of log storing method, system and log read method and system of embedded system.
Background technology
Aspect the daily record preservation of embedded system, preservation that need to be to the quick out-of-order of file, and according to user's request, daily record data is read.Along with the continuous progress of technology, the demand that operation file is preserved according to assigned address is more and more higher, and reads the different data that need according to demand, should guarantee time high efficiency, also will guarantee the simplification of data.In embedded system, main by journal file being directly stored in to the RAM(random access memory being connected with CPU, random access memory) in.
But journal file is directly stored in RAM, after system power failure, easily loses journal file.
Summary of the invention
Based on this, be necessary in above-mentioned emulation technology, exist hardware resource consumption large, operate complicated problem, a kind of log storing method, system and log read method and system of embedded system is provided.
A log storing method for embedded system, comprises the following steps:
Obtain the daily record data of embedded system;
Described daily record data is write in random access memory;
The daily record data writing in described random access memory is copied in external storage.
A log store system, comprising:
Acquiring unit, for obtaining the daily record data of embedded system;
Writing unit, for writing random access memory by described daily record data;
Unloading unit, for copying to the daily record data that writes described random access memory in external storage.
The log storing method of above-mentioned embedded system and system, be first kept at daily record data in random access memory, then from random access memory, daily record data is copied to external storage.On embedded software system, can guarantee the normal operation of all tasks, can daily record data be preserved fast with lower memory usage again, and the daily record data that copies to external storage from random access memory while there is power down can not lost yet.
A log read method, comprise the following steps:
Detect log read instruction, and from random access memory, read daily record data according to described reading command;
If while there is not described daily record data in described random access memory, read described daily record data from external storage, wherein, the described daily record data in described external storage copies from described random access memory.
A log read system, comprising:
The first reading unit, for detection of log read instruction, and reads daily record data according to described reading command from random access memory;
The second reading unit for when described random access memory does not exist described daily record data, reads described daily record data from external storage, and wherein, the described daily record data in described external storage copies from described random access memory.
The log read method and system of above-mentioned embedded system, can from random access memory, read fast fast daily record data according to log read instruction, and when random access memory is lost the daily record data that need to read due to reasons such as power down, can from external storage, read in time described daily record data.
A log read method, comprise the following steps:
Obtain the daily record data of embedded system;
Described daily record data is write in random access memory;
The daily record data writing in described random access memory is copied in external storage;
Detect log read instruction, and from described random access memory, read described daily record data according to described reading command;
If while there is not described daily record data in described random access memory, read described daily record data from external storage.
A log read system, comprising:
Acquiring unit, for obtaining the daily record data of embedded system;
Writing unit, for writing random access memory by described daily record data;
Unloading unit, for copying to the daily record data that writes described random access memory in external storage;
The first reading unit, for detection of log read instruction, and reads described daily record data according to described reading command from described random access memory;
The second reading unit for when described random access memory does not exist described daily record data, reads described daily record data from external storage.
The log read method and system of above-mentioned embedded system, on embedded software system, can guarantee the normal operation of all tasks, can daily record data be preserved fast with lower memory usage again, and the daily record data that copies to external storage from random access memory while there is power down can not lost yet.Both can from random access memory, read fast fast daily record data, can from external storage, read in time again the daily record data that random access memory is lost simultaneously.
Accompanying drawing explanation
Fig. 1 is the schematic flow sheet of log storing method first embodiment of embedded system of the present invention;
Fig. 2 is the schematic flow sheet of log storing method second embodiment of embedded system of the present invention;
Fig. 3 is the structural representation of log store system first embodiment of embedded system of the present invention;
Fig. 4 is the schematic flow sheet of log read method first embodiment of embedded system of the present invention;
Fig. 5 is the structural representation of log read system first embodiment of embedded system of the present invention;
Fig. 6 is the schematic flow sheet of another log read method the first embodiment of embedded system of the present invention;
Fig. 7 is the structural representation of another log read system the first embodiment of embedded system of the present invention.
Embodiment
Refer to Fig. 1, Fig. 1 is the schematic flow sheet of log storing method first embodiment of embedded system of the present invention.
The log storing method of the described embedded system of present embodiment comprises the following steps:
Step 101, obtains the daily record data of embedded system.
Step 102, writes described daily record data in random access memory.
Step 103, copies to the daily record data writing in described random access memory in external storage.
The log storing method of the embedded system described in present embodiment, is first kept at daily record data in random access memory, then from random access memory, daily record data is copied to external storage.On embedded software system, can guarantee the normal operation of all tasks, can daily record data be preserved fast with lower memory usage again, and the daily record data that copies to external storage from random access memory while there is power down can not lost yet.
Wherein, for step 101, preferably from the CPU kind being connected with random access memory, obtain described daily record data.The number of described daily record data can be many.
For step 102, can daily record data be write to described random access memory by calling the default interface function for data writing.
In one embodiment, the described step that described daily record data is write in random access memory comprises the following steps:
Step 1021, search and in described random access memory, whether have the journal file corresponding with described daily record data, if exist, described daily record data is write in described journal file, and record the relevant informations such as identify label (being ID content), writing position, write time and priority of described daily record data.
Step 1022, if do not exist, in described random access memory, create the journal file corresponding with described daily record data, described daily record data is write in described journal file, and record the relevant informations such as identify label (being ID content), writing position, write time and priority of described daily record data.
The present embodiment writes daily record data in the appointment journal file of random access memory, and records the relevant informations such as identify label (being ID content), writing position, write time and priority of described daily record data, conveniently carries out reading of daily record data.
Wherein, for step 1021, described journal file preferably includes data head and many data contents.Described data head is for recording current document position and the total quantity that writes daily record data, and described data head back location is exactly concrete data content, and the form of each data content and number of words can be identical.Every data content can comprise the priority of data writing position, data writing time, data writing content or the identify label of data writing daily record ID(daily record data) etc. relevant information.
Preferably, journal file and the daily record data of correspondence have common trait mutually.Can judge in described random access memory, whether there be the journal file corresponding with described daily record data by searching common trait.Also can set in advance the corresponding relation of journal file in different daily record datas and random access memory, according to described corresponding relation, search in described random access memory, whether there be the journal file corresponding with told daily record data.
For step 1022, when if described random storage does not have the journal file corresponding with described daily record data not deposit, create the journal file corresponding with described daily record data, and the content of the data head of journal file described in initialization, data head is write in RAM and gone, total quantity (TotalWrite) and the preservable total quantity of file (TotalCount) of the daily record data that the content of data head comprises current document position (CurPos), write.
In other embodiments, also can be by random, unordered being stored in described random access memory of daily record data.
For step 103, can directly the daily record data in described random access memory be copied in described external storage, also can the daily record data in described random access memory be copied to described external storage by copying described journal file.
Preferably, described external storage is Flash storer.
Further, can, in advance according to the operation conditions of embedded system, set period or the time interval of copying described daily record data.
In one embodiment, the described step that the daily record data writing in described random access memory is copied in external storage comprises the following steps:
Step 1031, arranges poll time and mutex.
Step 1032, copies to described daily record data in external storage according to the poll time and the mutex that arrange.
Step 1033, discharges described mutex.
Wherein, for step 1031, is set the poll time, is used for regulating and controlling every Preset Time section, file to be write in external storage and gone from random access memory, according to the practical operation situation of embedded system, can the described time period be set to 30 minutes.
Poll is being set during the time, a rational time period must be set, if the described time period is oversize, once system cut-off, so also not have to such an extent that copy to the journal file in external storage, the preservation of journal file with regard to not obtaining so by losing.If the time is too short, owing to writing the overlong time of external storage, cause taking in a large number CPU, make CPU usage too low, cannot complete faster other business, repeatedly refresh external storage simultaneously, more easily cause the problems such as CPU efficiency is too low, and the external storage life-span is short, loss is serious.
For step 1032, can newly set up a task and be used for copying, do not affect journal file copy RAM task, do not affect other business yet and normally move.
In the present embodiment, if file is too much, the step that can repeatedly repeat that mutex, replication log data are set and discharge mutex, if while daily record data being copied in external storage by replication log file, often copy a journal file and will re-establish mutex amount, can not make like this other tasks always in wait.
Refer to Fig. 2, Fig. 2 is the schematic flow sheet of log storing method second embodiment of embedded system of the present invention.
The difference of the log storing method of the described embedded system of present embodiment and the first embodiment is: the described step that described daily record data is write in random access memory comprises the following steps:
Step 201, the maximum writing position of the writing position of more described daily record data and the journal file of described random access memory, if the writing position of described daily record data is greater than described maximum writing position, returns to error reporting.
Step 202, if the writing position of described daily record data is not more than described maximum writing position, the current document position recording in the writing position of more described daily record data and the file header of described journal file, if the writing position of described daily record data is not more than described current document position, described daily record data is covered to locational data identical with the writing position of described daily record data in described journal file.
Step 203, if the writing position of described daily record data is greater than described current document position, in described journal file, to between the writing position of described daily record data and described current document position, write for identifying the null value of this position no data content, and described daily record data is write to position identical with the writing position of described daily record data in described journal file.
Step 204, upgrades the quantity of the current document position recording in the data head of described journal file and the daily record data having write.
The log storing method of the embedded system described in present embodiment, by daily record data being write to the assigned address of corresponding journal file, on conveniently carrying out, daily record once facilitates reading of daily record data when writing.
Refer to Fig. 3, Fig. 3 is the structural representation of log store system first embodiment of embedded system of the present invention.
The log store system of the described embedded system of present embodiment comprises acquiring unit 100, writing unit 200 and unloading unit 300, wherein:
Acquiring unit 100, for obtaining the daily record data of embedded system.
Writing unit 200, for writing random access memory by described daily record data.
Unloading unit 300, for copying to the daily record data that writes described random access memory in external storage.
The log store system of the embedded system described in present embodiment, is first kept at daily record data in random access memory, then from random access memory, daily record data is copied to external storage.On embedded software system, can guarantee the normal operation of all tasks, can daily record data be preserved fast with lower memory usage again, and the daily record data that copies to external storage from random access memory while there is power down can not lost yet.
Wherein, for acquiring unit, preferably from the CPU kind being connected with random access memory, obtain described daily record data.The number of described daily record data can be many.
For writing unit 200, can daily record data be write to described random access memory by calling the default interface function for data writing.
In one embodiment, writing unit 200 can be used for:
Search and in described random access memory, whether have the journal file corresponding with described daily record data, if exist, described daily record data is write in described journal file, and record the relevant informations such as identify label (being ID content), writing position, write time and priority of described daily record data.
If do not exist, in described random access memory, create the journal file corresponding with described daily record data, described daily record data is write in described journal file, and record the relevant informations such as identify label (being ID content), writing position, write time and priority of described daily record data.
The present embodiment writes daily record data in the appointment journal file of random access memory, and records the relevant informations such as identify label (being ID content), writing position, write time and priority of described daily record data, conveniently carries out reading of daily record data.
Wherein, for writing unit 200, described journal file preferably includes data head and many data contents.Described data head is for recording current document position and the total quantity that writes daily record data, and described data head back location is exactly concrete data content, and the form of each data content and number of words can be identical.Every data content can comprise the priority of data writing position, data writing time, data writing content or the identify label of data writing daily record ID(daily record data) etc. relevant information.
Preferably, journal file and the daily record data of correspondence have common trait mutually.Can judge in described random access memory, whether there be the journal file corresponding with described daily record data by searching common trait.Also can set in advance the corresponding relation of journal file in different daily record datas and random access memory, according to described corresponding relation, search in described random access memory, whether there be the journal file corresponding with told daily record data.
Further, when if described random storage does not have the journal file corresponding with described daily record data not deposit, create the journal file corresponding with described daily record data, and the content of the data head of journal file described in initialization, data head is write in RAM and gone, total quantity (TotalWrite) and the preservable total quantity of file (TotalCount) of the daily record data that the content of data head comprises current document position (CurPos), write.
In other embodiments, writing unit 200 also can be by random, unordered being stored in described random access memory of daily record data.
For unloading unit 300, can directly the daily record data in described random access memory be copied in described external storage, also can the daily record data in described random access memory be copied to described external storage by copying described journal file.
Preferably, described external storage is Flash storer.
Further, can, in advance according to the operation conditions of embedded system, set period or the time interval of copying described daily record data.
In one embodiment, unloading unit 300 can be used for arranging poll time and mutex, according to the poll time and the mutex that arrange, described daily record data is copied in external storage, discharges described mutex.
Wherein, is set the poll time, is used for regulating and controlling every Preset Time section, file to be write in external storage and gone from random access memory, according to the practical operation situation of embedded system, can the described time period be set to 30 minutes.
Preferably, poll is being set during the time, a rational time period must be set, if the described time period is oversize, once system cut-off, so also not have to such an extent that copy to the journal file in external storage, the preservation of journal file with regard to not obtaining so by losing.If the time is too short, owing to writing the overlong time of external storage, cause taking in a large number CPU, make CPU usage too low, cannot complete faster other business, repeatedly refresh external storage simultaneously, more easily cause the problems such as CPU efficiency is too low, and the external storage life-span is short, loss is serious.
Further, can newly set up a task and be used for copying, not affect journal file copy RAM task, also not affect other business and normally move.
In the present embodiment, if file is too much, the step that can repeatedly repeat that mutex, replication log data are set and discharge mutex, if while daily record data being copied in external storage by replication log file, often copy a journal file and will re-establish mutex amount, can not make like this other tasks always in wait.
The following stated is log store system second embodiment of embedded system of the present invention.
The log store system of the described embedded system of present embodiment and the difference of the first embodiment are: writing unit 200 also can be further used for:
The maximum writing position of the writing position of more described daily record data and the journal file of described random access memory, if the writing position of described daily record data is greater than described maximum writing position, returns to error reporting.
If the writing position of described daily record data is not more than described maximum writing position, the current document position recording in the writing position of more described daily record data and the file header of described journal file, if the writing position of described daily record data is not more than described current document position, described daily record data is covered to locational data identical with the writing position of described daily record data in described journal file.
If the writing position of described daily record data is greater than described current document position, in described journal file, to between the writing position of described daily record data and described current document position, write for identifying the null value of this position no data content, and described daily record data is write to position identical with the writing position of described daily record data in described journal file.
Upgrade the quantity of the current document position recording in the data head of described journal file and the daily record data having write.
The log store system of the embedded system described in present embodiment, by daily record data being write to the assigned address of corresponding journal file, on conveniently carrying out, daily record once facilitates reading of daily record data when writing.
Refer to Fig. 4, Fig. 4 is the schematic flow sheet of log read method first embodiment of embedded system of the present invention.
The log read method of the described embedded system of present embodiment comprises the following steps:
Step 401, detects log read instruction, and from random access memory, reads daily record data according to described reading command.
Step 402, if while there is not described daily record data in described random access memory, read described daily record data from external storage, wherein, the described daily record data in described external storage copies from described random access memory.
The log read method of above-mentioned embedded system, can from random access memory, read fast fast daily record data according to log read instruction, and when random access memory is lost the daily record data that need to read due to reasons such as power down, can further from external storage, read described daily record data.
Wherein, for step 401 and step 402, when reading daily record data, preferentially from random access memory, read, can improve the speed that reads daily record data.Described log read instruction can be set reading conditions (this condition refers in chronological order, ID content etc. reads daily record data).If do not set reading conditions in described log read instruction, can directly the daily record data of out-of-order or journal file be read out.
In one embodiment, the step that reads daily record data from described random access memory or described external storage also can comprise the following steps:
If read according to time sequencing, according to the time interocclusal record in journal file, the daily record of out-of-order, according to time-sequencing, is derived to daily record by the journal file according to time sequencing.
If read according to the ID of daily record data, read the relevant journal file of a certain type I D searching to needs, after reading, set up an internal memory, by this journal file one by one according to the type ID by the data write memory of needs.
In the present embodiment, according to the content record of the data head of journal file, the current record content of locating file, facilitates for searching data content fast, has saved the time.While reading journal file, according to different demands, different pieces of information information can be read, problem can be better investigated.
Refer to Fig. 5, Fig. 5 is the structural representation of log read system first embodiment of embedded system of the present invention.
The log read system of the described embedded system of present embodiment comprises the first reading unit 400 and the second reading unit 500, wherein:
The first reading unit 400, for detection of log read instruction, and reads daily record data according to described reading command from random access memory.
The second reading unit 500 for when described random access memory does not exist described daily record data, reads described daily record data from external storage, and wherein, the described daily record data in described external storage copies from described random access memory.
The log read system of above-mentioned embedded system, can from random access memory, read fast fast daily record data according to log read instruction, and when random access memory is lost the daily record data that need to read due to reasons such as power down, can further from external storage, read described daily record data.
Wherein, for the first reading unit 400 and the second reading unit 500, when reading daily record data, preferentially from random access memory, read, can improve the speed that reads daily record data.Described log read instruction can be set reading conditions (this condition refers in chronological order, ID content etc. reads daily record data).If do not set reading conditions in described log read instruction, can directly the daily record data of out-of-order or journal file be read out.
In one embodiment, the first reading unit 400 or the second storage unit 500 also can be used for:
When reading daily record data according to time sequencing, according to the time interocclusal record in journal file, the daily record of out-of-order, according to time-sequencing, is derived to daily record by the journal file according to time sequencing.
When reading daily record data according to the ID of daily record data, read the relevant journal file of a certain type I D searching to needs, after reading, set up an internal memory, by this journal file one by one according to the type ID by the data write memory of needs.
In the present embodiment, according to the content record of the data head of journal file, the current record content of locating file, facilitates for searching data content fast, has saved the time.While reading journal file, according to different demands, different pieces of information information can be read, problem can be better investigated.
Refer to Fig. 6, Fig. 6 is the schematic flow sheet of log read method first embodiment of another embedded system of the present invention.
The log read method of the embedded system described in present embodiment, comprises the following steps:
Step 601, obtains the daily record data of embedded system.
Step 602, writes described daily record data in random access memory.
Step 603, copies to the daily record data writing in described random access memory in external storage.
Step 604, detects log read instruction, and from described random access memory, reads described daily record data according to described reading command.
Step 605, if while there is not described daily record data in described random access memory, read described daily record data from external storage.
The log read method of the embedded system described in present embodiment, on embedded software system, can guarantee the normal operation of all tasks, can daily record data be preserved fast with lower memory usage again, and the daily record data that copies to external storage from random access memory while there is power down can not lost yet.Both can from random access memory, read fast fast daily record data, can from external storage, read in time again the daily record data that random access memory is lost simultaneously.
Wherein, step 601, step 601 and step 603 respectively with the log storing method of embedded system described in Fig. 1 in step 101, step 102 and step 103 be equal to.Step 604 and step 605 are equal to step 401 and step 402 described in Fig. 4 respectively.
Refer to Fig. 7, Fig. 7 is the structural representation of log read system first embodiment of another embedded system of the present invention.
The log read system of the embedded system described in present embodiment comprises acquiring unit 100, writing unit 200, unloading unit 300, the first reading unit 400 and the second reading unit 500, wherein:
Acquiring unit 100, for obtaining the daily record data of embedded system.
Writing unit 200, for writing random access memory by described daily record data.
Unloading unit 300, for copying to the daily record data that writes described random access memory in external storage.
The first reading unit 400, for detection of log read instruction, and reads described daily record data according to described reading command from described random access memory.
The second reading unit 500 for when described random access memory does not exist described daily record data, reads described daily record data from external storage.
The log read system of the embedded system described in present embodiment, on embedded software system, can guarantee the normal operation of all tasks, can daily record data be preserved fast with lower memory usage again, and the daily record data that copies to external storage from random access memory while there is power down can not lost yet.Both can from random access memory, read fast fast daily record data, can from external storage, read in time again the daily record data that random access memory is lost simultaneously.
Wherein, acquiring unit 100, writing unit 200, unloading unit 300, the first reading unit 400 and the second reading unit 500 are equal to respectively the corresponding unit described in Fig. 3 and Fig. 5.
The above embodiment has only expressed several embodiment of the present invention, and it describes comparatively concrete and detailed, but can not therefore be interpreted as the restriction to the scope of the claims of the present invention.It should be pointed out that for the person of ordinary skill of the art, without departing from the inventive concept of the premise, can also make some distortion and improvement, these all belong to protection scope of the present invention.Therefore, the protection domain of patent of the present invention should be as the criterion with claims.

Claims (10)

1. a log storing method for embedded system, is characterized in that, comprises the following steps:
Obtain the daily record data of embedded system;
Described daily record data is write in random access memory;
The daily record data writing in described random access memory is copied in external storage.
2. the log storing method of embedded system according to claim 1, is characterized in that, the described step that described daily record data is write in random access memory comprises the following steps:
The maximum writing position of the writing position of more described daily record data and the journal file of described random access memory, if the writing position of described daily record data is greater than described maximum writing position, returns to error reporting;
If the writing position of described daily record data is not more than described maximum writing position, the current document position recording in the writing position of more described daily record data and the file header of described journal file, if the writing position of described daily record data is not more than described current document position, described daily record data is covered to locational data identical with the writing position of described daily record data in described journal file;
If the writing position of described daily record data is greater than described current document position, in described journal file, to between the writing position of described daily record data and described current document position, write for identifying the null value of this position no data content, and described daily record data is write to position identical with the writing position of described daily record data in described journal file;
Upgrade the quantity of the current document position recording in the data head of described journal file and the daily record data having write.
3. the log storing method of embedded system according to claim 1 and 2, is characterized in that, the described step that the daily record data writing in described random access memory is copied in external storage comprises the following steps:
Poll time and mutex are set;
According to the poll time and the mutex that arrange, described daily record data is copied in external storage;
Discharge described mutex.
4. a log store system for embedded system, is characterized in that, comprising:
Acquiring unit, for obtaining the daily record data of embedded system;
Writing unit, for writing random access memory by described daily record data;
Unloading unit, for copying to the daily record data that writes described random access memory in external storage.
5. the log store system of embedded system according to claim 4, is characterized in that, said write unit also for:
The maximum writing position of the writing position of more described daily record data and the journal file of described random access memory, if the writing position of described daily record data is greater than described maximum writing position, returns to error reporting;
If the writing position of described daily record data is not more than described maximum writing position, the current document position recording in the writing position of more described daily record data and the file header of described journal file, if the writing position of described daily record data is not more than described current document position, described daily record data is covered to locational data identical with the writing position of described daily record data in described journal file;
If the writing position of described daily record data is greater than described current document position, in described journal file, to between the writing position of described daily record data and described current document position, write for identifying the null value of this position no data content, and described daily record data is write to position identical with the writing position of described daily record data in described journal file;
Upgrade the quantity of the current document position recording in the data head of described journal file and the daily record data having write.
6. according to the log store system of the embedded system described in claim 4 or 5, it is characterized in that, described unloading unit, also for poll time and mutex are set, copies to described daily record data in external storage according to the poll time and the mutex that arrange, discharges described mutex.
7. a log read method for embedded system, is characterized in that, comprises the following steps:
Detect log read instruction, and from random access memory, read daily record data according to described reading command;
If while there is not described daily record data in described random access memory, read described daily record data from external storage, wherein, the described daily record data in described external storage copies from described random access memory.
8. a log read system for embedded system, is characterized in that, comprising:
The first reading unit, for detection of log read instruction, and reads daily record data according to described reading command from random access memory;
The second reading unit for when described random access memory does not exist described daily record data, reads described daily record data from external storage, and wherein, the described daily record data in described external storage copies from described random access memory.
9. a log read method for embedded system, is characterized in that, comprises the following steps:
Obtain the daily record data of embedded system;
Described daily record data is write in random access memory;
The daily record data writing in described random access memory is copied in external storage;
Detect log read instruction, and from described random access memory, read described daily record data according to described reading command;
If while there is not described daily record data in described random access memory, read described daily record data from external storage.
10. a log read system for embedded system, is characterized in that, comprising:
Acquiring unit, for obtaining the daily record data of embedded system;
Writing unit, for writing random access memory by described daily record data;
Unloading unit, for copying to the daily record data that writes described random access memory in external storage;
The first reading unit, for detection of log read instruction, and reads described daily record data according to described reading command from described random access memory;
The second reading unit for when described random access memory does not exist described daily record data, reads described daily record data from external storage.
CN201310496989.5A 2013-10-21 2013-10-21 The log storing method of embedded system, system and log read method and system Active CN103544097B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310496989.5A CN103544097B (en) 2013-10-21 2013-10-21 The log storing method of embedded system, system and log read method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310496989.5A CN103544097B (en) 2013-10-21 2013-10-21 The log storing method of embedded system, system and log read method and system

Publications (2)

Publication Number Publication Date
CN103544097A true CN103544097A (en) 2014-01-29
CN103544097B CN103544097B (en) 2016-04-13

Family

ID=49967569

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310496989.5A Active CN103544097B (en) 2013-10-21 2013-10-21 The log storing method of embedded system, system and log read method and system

Country Status (1)

Country Link
CN (1) CN103544097B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105183626A (en) * 2015-09-30 2015-12-23 深圳怡化电脑股份有限公司 Log storage method and system of paper currency recognition module
CN105224444A (en) * 2015-10-14 2016-01-06 深圳市金证科技股份有限公司 Daily record generation method and device
CN105930095A (en) * 2015-02-27 2016-09-07 京瓷办公信息系统株式会社 Information processing device and memory management method
CN106033322A (en) * 2015-03-17 2016-10-19 北京元心科技有限公司 Method and device for data storage
CN107562567A (en) * 2016-06-30 2018-01-09 华为技术有限公司 A kind of data processing method and data processing equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060168471A1 (en) * 2005-01-25 2006-07-27 Schulstad Geir O Automatically triggered snapshot data dump for storage unit with embedded system
CN101799783A (en) * 2009-01-19 2010-08-11 中国人民大学 Data storing and processing method, searching method and device thereof
CN102831034A (en) * 2012-08-14 2012-12-19 中国电力科学研究院 Multimode backup and quick recovery method based on embedded Linux device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060168471A1 (en) * 2005-01-25 2006-07-27 Schulstad Geir O Automatically triggered snapshot data dump for storage unit with embedded system
CN101799783A (en) * 2009-01-19 2010-08-11 中国人民大学 Data storing and processing method, searching method and device thereof
CN102831034A (en) * 2012-08-14 2012-12-19 中国电力科学研究院 Multimode backup and quick recovery method based on embedded Linux device

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105930095A (en) * 2015-02-27 2016-09-07 京瓷办公信息系统株式会社 Information processing device and memory management method
CN105930095B (en) * 2015-02-27 2019-01-01 京瓷办公信息系统株式会社 Information processing unit and storage management method
CN106033322A (en) * 2015-03-17 2016-10-19 北京元心科技有限公司 Method and device for data storage
CN106033322B (en) * 2015-03-17 2019-11-01 北京元心科技有限公司 A kind of date storage method and device
CN105183626A (en) * 2015-09-30 2015-12-23 深圳怡化电脑股份有限公司 Log storage method and system of paper currency recognition module
CN105183626B (en) * 2015-09-30 2018-03-02 深圳怡化电脑股份有限公司 The log storing method and system of a kind of module for recognizing paper money
CN105224444A (en) * 2015-10-14 2016-01-06 深圳市金证科技股份有限公司 Daily record generation method and device
CN105224444B (en) * 2015-10-14 2019-02-01 深圳市金证科技股份有限公司 Log generation method and device
CN107562567A (en) * 2016-06-30 2018-01-09 华为技术有限公司 A kind of data processing method and data processing equipment

Also Published As

Publication number Publication date
CN103544097B (en) 2016-04-13

Similar Documents

Publication Publication Date Title
US20230138736A1 (en) Cluster file system-based data backup method and apparatus, and readable storage medium
CN103577121B (en) A kind of highly reliable linear file access method based on Nand Flash
CN103544097B (en) The log storing method of embedded system, system and log read method and system
CN101136825B (en) Asynchronous configuration information management method and system for client terminal/server structure
CN104969168A (en) Persistent storage device with NVRAM for staging writes
US10824362B2 (en) File migration to persistent memory
CN102831069B (en) Internal memory processing method, memory management equipment
CN103049396B (en) The method of writing with a brush dipped in Chinese ink of data and device
CN102331949A (en) Methods for generating and restoring memory snapshot of virtual machine, device and system
CN101582076A (en) Data de-duplication method based on data base
CN103577574A (en) High-reliability linear file system based on nand flash
CN103544110A (en) Block-level continuous data protection method based on solid-state disc
CN109598156A (en) Engine snapshot stream method is redirected when one kind is write
CN109558335A (en) A kind of file memory format of the embedded system based on Nor flash storage
CN108614876A (en) A kind of system and data processing method based on Redis databases
CN105393228A (en) Method, device and user equipment for reading/writing data in nand flash
CN102622281A (en) Intelligent terminal and method of data backup and restore thereof
US9098396B2 (en) Enhancement of efficiency in power failure handling in flash memory
CN102981975A (en) Management method of flash data and system thereof
US10437784B2 (en) Method and system for endurance enhancing, deferred deduplication with hardware-hash-enabled storage device
CN113641446A (en) Memory snapshot creating method, device and equipment and readable storage medium
CN102521146A (en) Data addressing storage method of flash memory block subdivision
CN103714179A (en) Multi-language supporting method and system for system blog
CN110262980A (en) High-speed memory system based on finite lifetime storage medium
CN114138424B (en) Virtual machine memory snapshot generation method and device and electronic equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP03 Change of name, title or address

Address after: 510670 Guangdong Province, Guangzhou high tech Industrial Development Zone Kezhu Road No. 233

Patentee after: Wei Chong group Limited by Share Ltd

Address before: 510663 Guangzhou province high tech Industrial Development Zone, Guangdong, Cai road, No. 6, No.

Patentee before: Guangdong Weichuangshixun Science and Technology Co., Ltd.

CP03 Change of name, title or address