CN106919515A - A kind of daily record linked list data reading/writing method in memory - Google Patents

A kind of daily record linked list data reading/writing method in memory Download PDF

Info

Publication number
CN106919515A
CN106919515A CN201510984742.7A CN201510984742A CN106919515A CN 106919515 A CN106919515 A CN 106919515A CN 201510984742 A CN201510984742 A CN 201510984742A CN 106919515 A CN106919515 A CN 106919515A
Authority
CN
China
Prior art keywords
address
warnsave
daily record
write
record
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
CN201510984742.7A
Other languages
Chinese (zh)
Other versions
CN106919515B (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.)
Beijing Aeonmed Co Ltd
Original Assignee
Beijing Aeonmed Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Aeonmed Co Ltd filed Critical Beijing Aeonmed Co Ltd
Priority to CN201510984742.7A priority Critical patent/CN106919515B/en
Publication of CN106919515A publication Critical patent/CN106919515A/en
Application granted granted Critical
Publication of CN106919515B publication Critical patent/CN106919515B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/06Addressing a physical block of locations, e.g. base addressing, module addressing, memory dedication
    • G06F12/0646Configuration or reconfiguration

Landscapes

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

Abstract

The present invention relates to a kind of daily record linked list data write method in memory, including:Initialization write address WarnSave and reading address PageAddr;Wherein, write address WarnSave includes two elements:Addr and num, addr therein represent the storage address of state-of-the-art record, and num represents the record number for storing altogether;When write address WarnSave is initialized, the numerical value of num is for the size of 0, addr:The record number of one record length × to be stored;When daily record data is stored, record number to be stored is given value;Read address PageAddr and only include address element;When there is new log recording, by the new log recording according to the memory that is sequentially written in from high address to low address, write address WarnSave subtracts a length for record, and assigns reading address PageAddr by newest write address WarnSave.

Description

A kind of daily record linked list data reading/writing method in memory
Technical field
The present invention relates to field of data storage, more particularly to a kind of daily record linked list data reading/writing method in memory.
Background technology
The mode of first in first out is generally followed when data are stored in memory, i.e., the data of newer storage store position Put more rearward.Daily record data is no exception in storage.But, it is necessary to show during using UI interface display daily record datas Newest data, i.e., newest daily record data shows, if there is the new daily record data for arriving in display, also needs at first To refresh display in real time.
Data storing order is inconsistent with daily record data display order, causes daily record data speed in display slower, Real-time is not strong.
The content of the invention
It is an object of the invention to overcome existing daily record data storage order inconsistent with daily record data display order, The defect that daily record data display speed is slow, real-time is not strong is caused, so that providing one kind can effectively improve journal displaying The daily record chained list data read-write method of speed.
To achieve these goals, the write method the invention provides a kind of daily record linked list data in memory, bag Include:
Step 101), initialization write address WarnSave and read address PageAddr;Wherein,
The write address WarnSave includes two elements:Addr and num, addr therein represents newest note The storage address of record, num represents the record number for storing altogether;When write address WarnSave is initialized, num Numerical value be for the size of 0, addr:The record number of one record length × to be stored;Wherein, in daily record data During storage, record number to be stored is given value;
The reading address PageAddr only includes address element;
Step 102) when there is new log recording, by the new log recording according to suitable from high address to low address Sequence writes memory, and write address WarnSave subtracts a length for record, and by newest write address WarnSave Assign and read address PageAddr.
In above-mentioned technical proposal, the step 102) further include:
102-1), when there is new daily record to need storage, with the current number of the addr elements in write address WarnSave It is worth initial address of the representative storage address as write operation, then according to the order from high address to low address In one section of storage unit stores data;
Step 102-2), the numerical value of addr elements in modification write address WarnSave, will its numerical value subtract and work as The length of preceding stored log recording, and for the num element values in write address WarnSave add 1;
Step 102-3), the new numerical value of the addr elements in write address WarnSave is assigned and reads address PageAddr。
Present invention also offers a kind of daily record linked list data reading method in memory, for described write method The daily record linked list data for being stored is read out, including:
Step 201), since address PageAddr is read, according to since low address to the order of high address from storage Daily record data is read in device, can judge the size of currently-read daily record data reach the display scale of one page, If it is, performing next step, otherwise, step 203 is performed);
Step 202), the daily record data of display current page, then will read address PageAddr and subtract number of pages and be multiplied by every page Number, then re-execute step 201);
Step 203), display current page daily record data, terminate read operation.
The advantage of the invention is that:
The present invention is real-time in show log data, and display speed is fast.
Brief description of the drawings
Fig. 1 is the schematic diagram for aiming at day being shown on GUI;
Fig. 2 is daily record linked list data storage schematic diagram in memory.
Specific embodiment
In conjunction with accompanying drawing, the invention will be further described.
Fig. 1 is the schematic diagram for aiming at day being shown on GUI, as illustrated, aim at day being shown in the form of page on GUI, Every page has a plurality of record.In machine running process, can there are multiple such pages, possess on turn over, lower page turning etc. Function, and, it is necessary to the content of real-time update page display when having a new daily record.
Reading/writing method with reference to Fig. 2 to daily record linked list data in memory is illustrated.The method includes:
Step 101), initialization write address WarnSave and read address PageAddr.Wherein,
The write address WarnSave includes two elements:Addr and num, addr therein represents newest note The storage address of record, num represents the record number for storing altogether.When write address WarnSave is initialized, num Numerical value be for the size of 0, addr:The record number of one record length × to be stored;Wherein, stored in daily record When, record number to be stored is given value.
The reading address PageAddr only includes address element, and when address PageAddr is read in initialization, its value is The value of newest write address WarnSave.
Step 102) when there is new log recording, by the new log recording according to suitable from high address to low address Sequence writes memory, and WarnSave subtracts a length for record.
By taking the FRAM memory shown in Fig. 2 as an example, the lower section of the memory represents low address, and top represents highland Location.When there is new daily record to need storage, with representated by the current value of the addr elements in write address WarnSave Storage address as the initial address of write operation, then deposited at one section according to the order from high address to low address Storage unit data storage.After completing write operation, the numerical value of the addr elements in write address WarnSave is changed, will Its numerical value subtracts the length of currently stored log recording, and for the num element values in write address WarnSave add 1.In addition it is also necessary to the new numerical value of the addr elements in write address WarnSave is assigned and reads address PageAddr.
After according to method of the present invention storage daily record, when daily record data is read, realize in accordance with the following steps:
Step 201), since address PageAddr is read, according to since low address to the order of high address from storage Daily record data is read in device, can judge the size of currently-read daily record data reach the display scale of one page, If it is, performing next step, otherwise, step 203 is performed);
Step 202), the daily record data of display current page, then will read address PageAddr and subtract number of pages and be multiplied by every page Number, then re-execute step 201);
Step 203), display current page daily record data, terminate read operation.
It should be noted last that, the above embodiments are merely illustrative of the technical solutions of the present invention and it is unrestricted.Although The present invention has been described in detail with reference to embodiment, it will be understood by those within the art that, to the present invention Technical scheme modify or equivalent, without departure from the spirit and scope of technical solution of the present invention, its is equal Should cover in the middle of scope of the presently claimed invention.

Claims (3)

1. a kind of daily record linked list data write method in memory, including:
Step 101), initialization write address WarnSave and read address PageAddr;Wherein,
The write address WarnSave includes two elements:Addr and num, addr therein represents newest note The storage address of record, num represents the record number for storing altogether;When write address WarnSave is initialized, num Numerical value be for the size of 0, addr:The record number of one record length × to be stored;Wherein, in daily record data During storage, record number to be stored is given value;
The reading address PageAddr only includes address element;
Step 102) when there is new log recording, by the new log recording according to suitable from high address to low address Sequence writes memory, and write address WarnSave subtracts a length for record, and by newest write address WarnSave Assign and read address PageAddr.
2. daily record linked list data according to claim 1 write method in memory, it is characterised in that institute State step 102) further include:
102-1), when there is new daily record to need storage, with the current number of the addr elements in write address WarnSave It is worth initial address of the representative storage address as write operation, then according to the order from high address to low address In one section of storage unit stores data;
Step 102-2), the numerical value of addr elements in modification write address WarnSave, will its numerical value subtract and work as The length of preceding stored log recording, and for the num element values in write address WarnSave add 1;
Step 102-3), the new numerical value of the addr elements in write address WarnSave is assigned and reads address PageAddr。
3. a kind of daily record linked list data reading method in memory, for being write to one of claim 1-2 is described The daily record linked list data that method is stored is read out, including:
Step 201), since address PageAddr is read, according to since low address to the order of high address from storage Daily record data is read in device, can judge the size of currently-read daily record data reach the display scale of one page, If it is, performing next step, otherwise, step 203 is performed);
Step 202), the daily record data of display current page, then will read address PageAddr and subtract number of pages and be multiplied by every page Number, then re-execute step 201);
Step 203), display current page daily record data, terminate read operation.
CN201510984742.7A 2015-12-24 2015-12-24 Method for reading and writing log linked list data in memory Active CN106919515B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510984742.7A CN106919515B (en) 2015-12-24 2015-12-24 Method for reading and writing log linked list data in memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510984742.7A CN106919515B (en) 2015-12-24 2015-12-24 Method for reading and writing log linked list data in memory

Publications (2)

Publication Number Publication Date
CN106919515A true CN106919515A (en) 2017-07-04
CN106919515B CN106919515B (en) 2020-09-18

Family

ID=59457178

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510984742.7A Active CN106919515B (en) 2015-12-24 2015-12-24 Method for reading and writing log linked list data in memory

Country Status (1)

Country Link
CN (1) CN106919515B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070214291A1 (en) * 2003-09-15 2007-09-13 Broadcom Corporation Elasticity buffer for streaming data
CN101272276A (en) * 2008-04-22 2008-09-24 深圳国人通信有限公司 Log management implementing method
CN102053923A (en) * 2009-11-05 2011-05-11 北京金山软件有限公司 Storage method and storage device for logbook data
CN102135943A (en) * 2011-03-23 2011-07-27 华为终端有限公司 Storing and accessing method of flash memory data and device thereof
US20120059999A1 (en) * 2010-09-06 2012-03-08 Avinash Kant Raikwar Methods and systems for storing variable width stack elements in a single memory stack
CN102637148A (en) * 2011-07-08 2012-08-15 中国科学院计算技术研究所 DDR SDRAM (double data rate synchronous dynamic random-access memory) based stacked data caching device and method thereof
CN103902434A (en) * 2012-12-29 2014-07-02 北京谊安医疗系统股份有限公司 Alarm log management method and system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070214291A1 (en) * 2003-09-15 2007-09-13 Broadcom Corporation Elasticity buffer for streaming data
CN101272276A (en) * 2008-04-22 2008-09-24 深圳国人通信有限公司 Log management implementing method
CN102053923A (en) * 2009-11-05 2011-05-11 北京金山软件有限公司 Storage method and storage device for logbook data
US20120059999A1 (en) * 2010-09-06 2012-03-08 Avinash Kant Raikwar Methods and systems for storing variable width stack elements in a single memory stack
CN102135943A (en) * 2011-03-23 2011-07-27 华为终端有限公司 Storing and accessing method of flash memory data and device thereof
CN102637148A (en) * 2011-07-08 2012-08-15 中国科学院计算技术研究所 DDR SDRAM (double data rate synchronous dynamic random-access memory) based stacked data caching device and method thereof
CN103902434A (en) * 2012-12-29 2014-07-02 北京谊安医疗系统股份有限公司 Alarm log management method and system

Also Published As

Publication number Publication date
CN106919515B (en) 2020-09-18

Similar Documents

Publication Publication Date Title
CN105242871B (en) A kind of method for writing data and device
CN104731717B (en) Storage arrangement and storage management method
CN104685571B (en) Presence in response to potential interference refreshes storage stack unit
JP2006031696A (en) Flash memory system including bad block management part
CN106873908B (en) Date storage method and device
RU2014123660A (en) PUMP PUMP USING USING A SEQUENTLY ORDERED PUMP FILE
JP2014199583A5 (en)
US9606746B2 (en) Shiftable memory supporting in-memory data structures
JP2015506041A5 (en)
CN104115131B (en) The control method of storage control, data storage device and memory
CN104461384B (en) A kind of method for writing data and storage device
CN106528026B (en) Text display method and device
CN102792381A (en) Protection against data corruption for multi-level memory cell (MLC) flash memory
US10795606B2 (en) Buffer-based update of state data
CN108733318A (en) A kind of wiring method of TLC NAND FLASH solid state disks
CN105260139B (en) A kind of disk management method and system
CN108733324A (en) A kind of data read-write method of solid state disk, device, equipment and storage medium
CN102650972B (en) Date storage method, Apparatus and system
CN104268225B (en) A kind of file system architecture and its generation and access mode of the addressing of the multidimensional free degree
US20120137107A1 (en) Method of decaying hot data
US10684864B2 (en) Data storage device and method for operating non-volatile memory
CN109324980A (en) A kind of L2P table management method, method for reading data, device and equipment
CN106919515A (en) A kind of daily record linked list data reading/writing method in memory
CN108427648A (en) Storage system page internal organ data index method and device
CN106326135B (en) Method and device for translating data of non-volatile memory (NVM)

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant