CN104598388A - Flash-based SOE (Sequence of Event) storing and sending method - Google Patents
Flash-based SOE (Sequence of Event) storing and sending method Download PDFInfo
- Publication number
- CN104598388A CN104598388A CN201510005021.7A CN201510005021A CN104598388A CN 104598388 A CN104598388 A CN 104598388A CN 201510005021 A CN201510005021 A CN 201510005021A CN 104598388 A CN104598388 A CN 104598388A
- Authority
- CN
- China
- Prior art keywords
- soe
- flash
- soes
- read
- pointer
- 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.)
- Pending
Links
Landscapes
- Techniques For Improving Reliability Of Storages (AREA)
Abstract
The invention discloses a flash-based SOE (Sequence of Event) storing and sending method. SOEs in a flash can be stored and read, and pointers can be returned after a system is reset. The method comprises the following steps: firstly, determining a storage structure of the SOEs stored in the flash, and partitioning the flash into 2N partitions according to the number N of equipment in the system and the number of the SOEs needing to be stored by each piece of equipment, wherein every two adjacent partitions are used for storing the SOEs of the corresponding equipment; when the SOEs are written, searching for the address of the flash into which the SOEs are required to be written according to a writing pointer dwWPtr, adding 1 to dwWPtr, setting dwMask as an effective mark, setting dwRPtr to be unread, setting dwName as a code of the equipment, filling the SOEs of the system, and then writing the SOEs into the flash for storage; when the SOEs are read, searching for the address of the flash out of which the SOEs are required to be read according to a reading pointer dwRPtr, reading the SOEs out, and after the SOEs are completely read, clearing the reading pointer dwRPtr of the SOEs in the flash to represent that the SOEs are read. According to the flash-based SOE storing and sending method, the problem that the storing, reading and writing pointers of the SOEs in a current monitoring device do not have a memory function is solved.
Description
Technical field
The invention belongs to field of electric power automation, be specifically related to a kind of SOE based on flash and store and sending method.
Background technology
The remote signals that intelligent substation monitoring and proterctive equipment gather; the mainly running status warning information of consersion unit and the operational circumstances of equipment; need monitoring and proterctive equipment real-time be transferred to master device, be convenient to yardman or Premium Features software analysis employing.When especially breaking down, SOE is one of important means of analyzing failure cause.
When SOE is band, target remote signalling, belongs to historical data, and monitoring and protection also need the SOE preserving some to local device, also need to be sent to main website in real time.Time monitoring and proterctive equipment transmit SOE, need neither to lose and can not retransmit transmission, therefore need monitoring and proterctive equipment can record the read-write pointer of SOE.
Some equipment, such as communication manager, need the SOE gathering multiple equipment, and may need to be sent to multiple main website, needs supervisor system software to preserve the SOE pointer of multiple equipment like this, realizes the memory function of SOE pointer after system reset.
At present; monitoring or proterctive equipment are all generally be stored in not power down RAM by SOE; its read-write pointer is also assigned in not power down RAM; when can realize like this sending in real time; do not lose and do not repeat to send yet; after system reset, be all be saved in not power down RAM because SOE and SOE reads and writes pointer, the memory function reading and writing pointer can be realized.But; the cost that not power down RAM adds system also increases the size of circuit board; some requires the monitoring of size and proterctive equipment to be had no idea increase not power down RAM; and can SOE be lost when system blackout device battery exhausts, therefore SOE is saved in flash the reliability not only reducing costs but also increase system.
Summary of the invention
The object of this invention is to provide a kind of SOE based on flash to store and sending method, to solve the storage of SOE in current monitor device and read-write pointer memory function.
The technical solution adopted for the present invention to solve the technical problems is: a kind of SOE based on flash stores and sending method, comprises the steps:
Determine the structure of the SOE be saved in flash:
Wherein, dwMask is the effective marker of SOE, for identifying during system reset that whether SOE is effective, is all 0xffff after flash format;
DwWPtr is SOE write pointer, and often write a new SOE, pointer adds 1, and each SOE does not repeat;
DwRPtr is SOE write pointer, is 0xffffffff, is set to 0 after reading when not reading;
SysTimeSoe uses SOE structure in system, preserve concrete SOE content;
The quantity of the SOE preserved according to the number of devices and needs that need to deposit SOE in system divides flash subarea, and be divided into m*2*N subregion, wherein m is integer, and N is equipment number (this method adopt in concrete use be m=1).Two often adjacent subregions for storing the SOE of corresponding equipment, then can store at most
individual SOE, wherein, TFFS_SECTOR_SIZE is flash sector-size (2K, 8K, 64K etc.), SOESIZE is the flash space (this method SOESIZE=64) that each SOE takies.
In time writing SOE, the flash address that should write SOE is found according to write pointer dwWPtr, then dwWPtr adds 1, dwMask is set to effective marker 0x5a5a5a5a, dwRPtr is set to and does not read 0xffffffff, dwName is arranged to the coding of equipment, system SOE is filled, then writes flash and preserve;
In time writing SOE, time the Flash address calculated is just in time the start address of two memory sectors that this equipment is corresponding, just first format this sector, ensure recurrent wrIting and the writing speed of SOE;
In time reading SOE, find the flash address of the SOE that should read according to read pointer dwRPtr, read SOE, run through to finish and the read pointer dwRPtr clearing expression of this SOE in flash is read;
When after system reset, first travel through the SOE structure in flash, find maximum dwWPtr to be the write pointer of SOE, find the dwRPtr that first non-vanishing, be the read pointer of SOE.
Accompanying drawing explanation
Fig. 1 storage organization schematic diagram;
During Fig. 2 system reset, SOE write pointer recovers logical diagram;
During Fig. 3 system reset, SOE read pointer recovers logical diagram.
Embodiment
Below in conjunction with drawings and Examples, the present invention is described in further detail.
Embodiment 1
See Fig. 1-Fig. 3, the SOE based on flash of the present invention stores and sending method, comprises the steps:
Determine the structure of the SOE be saved in flash:
Wherein, dwMask is the effective marker of SOE, for identifying during system reset that whether SOE is effective, is all 0xffff after flash format;
DwWPtr is SOE write pointer, and often write a new SOE, pointer adds 1, and each SOE does not repeat;
DwRPtr is SOE write pointer, is 0xffffffff, is set to 0 after reading when not reading;
SysTimeSoe uses SOE structure in system, preserve concrete SOE content;
The quantity of the SOE preserved according to the number of devices and needs that need to deposit SOE in system divides flash subarea, and be divided into m*2*N subregion, wherein m is integer, and N is equipment number (this method adopt in concrete use be m=1).Two often adjacent subregions for storing the SOE of corresponding equipment, then can store at most
individual SOE, wherein, TFFS_SECTOR_SIZE is flash sector-size (2K, 8K, 64K etc.), SOESIZE is the flash space (this method SOESIZE=64) that each SOE takies.
In time writing SOE, the flash address that should write SOE is found according to write pointer dwWPtr, then dwWPtr adds 1, dwMask is set to effective marker 0x5a5a5a5a, dwRPtr is set to and does not read 0xffffffff, dwName is arranged to the coding of equipment, system SOE is filled, then writes flash and preserve;
In time writing SOE, time the Flash address calculated is just in time the start address of two memory sectors that this equipment is corresponding, just first format this sector, ensure recurrent wrIting and the writing speed of SOE;
In time reading SOE, find the flash address of the SOE that should read according to read pointer dwRPtr, read SOE, run through to finish and the read pointer dwRPtr clearing expression of this SOE in flash is read;
When after system reset, first travel through the SOE structure in flash, find maximum dwWPtr to be the write pointer of SOE, find the dwRPtr that first non-vanishing, be the read pointer of SOE.
Claims (2)
1. the SOE based on flash stores and a sending method, realizes the pointer after the storage of SOE in flash, reading and system reset and recovers, it is characterized in that: comprise the following steps:
1) storage organization of the SOE be saved in flash is determined:
Struct TSysTimeSoeFlash//the be saved in Soe in Flash
{
DWORD dwMask; //SOE effective marker 0x5a5a5a5a
DWORD dwWPtr; // write pointer
DWORD dwName; // device name, so that verification recovers after powering on
DWORD dwRPtr; // read pointer is 0xffffffff when not reading, and is 0 after reading
TSysTimeSoe sysTimeSoe; SOE structure in // system
};
2) according to the quantity of the quantity N of devices in system and the SOE of each equipment needs storage, Flash is divided into 2N subregion, two often adjacent subregions, for storing the SOE of corresponding equipment, calculate the number can depositing SOE;
3) in time writing SOE, the flash address that should write SOE is found according to write pointer dwWPtr, then dwWPtr adds 1, dwMask is set to effective marker 0x5a5a5a5a, dwRPtr is set to and does not read 0xffffffff, dwName is arranged to the coding of equipment, is filled by system SOE, then writes flash and preserves;
4) in time writing SOE, if the start address of two memory sectors that to be just in time this equipment corresponding, the Flash address calculated, then first format this sector, ensure the recurrent wrIting of SOE;
5) in time reading SOE, find the flash address of the SOE that should read according to read pointer dwRPtr, read SOE, run through to finish and the read pointer dwRPtr clearing expression of this SOE in flash is read;
6) when after system reset, first travel through the SOE structure in flash, find maximum dwWPtr to be the write pointer of SOE, find the dwRPtr that first non-vanishing, be the read pointer of SOE.
2. the SOE based on flash according to claim 1 stores and sending method, it is characterized in that: the flash for storing SOE can be divided into m*2*N sector, distribute to each equipment 2m subregion, wherein m is integer, when writing the 1st sector at first, format 1, to m sector, when writing m+1 sector at first, formats m+1 to 2m sector.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510005021.7A CN104598388A (en) | 2015-01-06 | 2015-01-06 | Flash-based SOE (Sequence of Event) storing and sending method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510005021.7A CN104598388A (en) | 2015-01-06 | 2015-01-06 | Flash-based SOE (Sequence of Event) storing and sending method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN104598388A true CN104598388A (en) | 2015-05-06 |
Family
ID=53124196
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510005021.7A Pending CN104598388A (en) | 2015-01-06 | 2015-01-06 | Flash-based SOE (Sequence of Event) storing and sending method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104598388A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108279852A (en) * | 2017-12-27 | 2018-07-13 | 浙江恒业电子有限公司 | Method for improving NORFLASH service lifes in intelligent electric energy meter |
CN113127377A (en) * | 2021-04-08 | 2021-07-16 | 武汉导航与位置服务工业技术研究院有限责任公司 | Wear leveling method for writing and erasing of nonvolatile memory device |
WO2023155531A1 (en) * | 2022-02-18 | 2023-08-24 | 苏州浪潮智能科技有限公司 | Data read-write method and apparatus and related device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101546294A (en) * | 2009-04-30 | 2009-09-30 | 青岛海信宽带多媒体技术有限公司 | Method for storing data in Flash memory |
CN102323941A (en) * | 2011-09-01 | 2012-01-18 | 北京空间飞行器总体设计部 | Telemetry data processing method |
CN102593733A (en) * | 2011-12-31 | 2012-07-18 | 长园深瑞继保自动化有限公司 | Debugging method for transformer substation equipment |
JP2012150621A (en) * | 2011-01-19 | 2012-08-09 | Hitachi Ltd | Control system and soe device |
-
2015
- 2015-01-06 CN CN201510005021.7A patent/CN104598388A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101546294A (en) * | 2009-04-30 | 2009-09-30 | 青岛海信宽带多媒体技术有限公司 | Method for storing data in Flash memory |
JP2012150621A (en) * | 2011-01-19 | 2012-08-09 | Hitachi Ltd | Control system and soe device |
CN102323941A (en) * | 2011-09-01 | 2012-01-18 | 北京空间飞行器总体设计部 | Telemetry data processing method |
CN102593733A (en) * | 2011-12-31 | 2012-07-18 | 长园深瑞继保自动化有限公司 | Debugging method for transformer substation equipment |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108279852A (en) * | 2017-12-27 | 2018-07-13 | 浙江恒业电子有限公司 | Method for improving NORFLASH service lifes in intelligent electric energy meter |
CN113127377A (en) * | 2021-04-08 | 2021-07-16 | 武汉导航与位置服务工业技术研究院有限责任公司 | Wear leveling method for writing and erasing of nonvolatile memory device |
CN113127377B (en) * | 2021-04-08 | 2022-11-25 | 武汉导航与位置服务工业技术研究院有限责任公司 | Wear leveling method for writing and erasing of nonvolatile memory device |
WO2023155531A1 (en) * | 2022-02-18 | 2023-08-24 | 苏州浪潮智能科技有限公司 | Data read-write method and apparatus and related device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106484761B (en) | For improving the method and system of storage log | |
CN110765076B (en) | Data storage method, device, electronic equipment and storage medium | |
CN115292266B (en) | High-reliability log storage method based on memory | |
CN107045531A (en) | A kind of system and method for optimization HDFS small documents access | |
CN105843753A (en) | Logical block address mapping for hard disk drives | |
CN103226965B (en) | Based on the audio/video data access method of time bitmap | |
CN102158349A (en) | Log management device and method thereof | |
CN107608826A (en) | A kind of fault recovery method, device and the medium of the node of storage cluster | |
CN108399050B (en) | Data processing method and device | |
CN101944119B (en) | Real-time event management method for intelligent electronic equipment | |
CN104598388A (en) | Flash-based SOE (Sequence of Event) storing and sending method | |
TW200725298A (en) | System and method for storage management | |
CN111107050B (en) | Distributed wave recording method and device for power distribution network dynamic simulation system | |
CN112346647B (en) | Data storage method, device, equipment and medium | |
CN112835528B (en) | Dirty page refreshing method and device, electronic equipment and storage medium | |
CN107590019A (en) | A kind of method and apparatus of data storage | |
CN107272669A (en) | A kind of airborne Fault Management System | |
CN110147203A (en) | A kind of file management method, device, electronic equipment and storage medium | |
CN112655031A (en) | Flight data processing method and device, recorder, unmanned aerial vehicle and storage medium | |
CN109189724B (en) | Method and device for improving audio and video data storage efficiency of video monitoring system | |
CN105930381A (en) | Global Argo data storage and update method based on mixed database architecture | |
CN110515798B (en) | SD card based storage system with performance life evaluation function and storage method thereof | |
CN103902228A (en) | Variable-length data accessing method | |
CN103136160A (en) | Cache continue transmission method and system for data transmission discontinuity points among railway vehicle devices | |
CN111127700A (en) | System index monitoring system for automatically driving automobile |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
AD01 | Patent right deemed abandoned | ||
AD01 | Patent right deemed abandoned |
Effective date of abandoning: 20190301 |