CN106504402A - Log information recording method and device - Google Patents

Log information recording method and device Download PDF

Info

Publication number
CN106504402A
CN106504402A CN201610980141.3A CN201610980141A CN106504402A CN 106504402 A CN106504402 A CN 106504402A CN 201610980141 A CN201610980141 A CN 201610980141A CN 106504402 A CN106504402 A CN 106504402A
Authority
CN
China
Prior art keywords
log information
log
stored
buffer
currency examination
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
Application number
CN201610980141.3A
Other languages
Chinese (zh)
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.)
Shenzhen Yihua Computer Co Ltd
Shenzhen Yihua Time Technology Co Ltd
Shenzhen Yihua Financial Intelligent Research Institute
Original Assignee
Shenzhen Yihua Computer Co Ltd
Shenzhen Yihua Time Technology Co Ltd
Shenzhen Yihua Financial Intelligent Research Institute
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 Shenzhen Yihua Computer Co Ltd, Shenzhen Yihua Time Technology Co Ltd, Shenzhen Yihua Financial Intelligent Research Institute filed Critical Shenzhen Yihua Computer Co Ltd
Priority to CN201610980141.3A priority Critical patent/CN106504402A/en
Publication of CN106504402A publication Critical patent/CN106504402A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07DHANDLING OF COINS OR VALUABLE PAPERS, e.g. TESTING, SORTING BY DENOMINATIONS, COUNTING, DISPENSING, CHANGING OR DEPOSITING
    • G07D7/00Testing specially adapted to determine the identity or genuineness of valuable papers or for segregating those which are unacceptable, e.g. banknotes that are alien to a currency
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1805Append-only file systems, e.g. using logs or journals to store data
    • G06F16/1815Journaling file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0643Management of files

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the invention discloses a kind of log information recording method and device.The method includes:According to the size that log information has been deposited in log buffer, the log information in journal queue is stored in log buffer one by one;According to the instantaneous operating conditions of currency examination device, the log information stored in the log buffer is read and records to physical storage device.The embodiment of the present invention solves existing currency examination device during currency examination, need constantly to be written and read operation to the journal file being stored in physical storage device, and then affect the problem of currency examination real-time, it is achieved that during avoiding currency examination, the record of daily record affects the effect of currency examination real-time.

Description

Log information recording method and device
Technical field
The present embodiments relate to daily record Techniques of preserving, more particularly to a kind of log information recording method and device.
Background technology
During currency examination, currency examination device constantly will be recorded to log information, to form journal file and be stored in In the physical storage device of currency examination device.Above-mentioned log information specifically may include currency examination flow control information, currency examination result feedback letter Breath, command response information and information etc..
Current currency examination device needs the daily record constantly to being stored in currency examination device physical storage device during currency examination File is written and read operation.However, with the continuous increase of currency examination device log information amount, existing log information recording method gesture The real-time that banknote is checked must be impacted.
Content of the invention
The embodiment of the present invention provides a kind of log information recording method and device, during avoiding currency examination, log recording Impact to currency examination real-time.
In a first aspect, a kind of log information recording method is embodiments provided, including:
According to the size that log information has been deposited in log buffer, the log information in journal queue is stored in daily record one by one and is delayed Deposit;
According to the instantaneous operating conditions of currency examination device, the log information stored in the log buffer is read and records to physics Storage device.
Further, according to the size for having deposited log information in log buffer, by the log information in journal queue by Before one is stored in log buffer, also include:
The log information of interim storage in physical storage device during original state is read in log buffer.
Further, described according to the size for having deposited log information in log buffer, by the log information in journal queue Log buffer is stored in one by one, including:
When the capacity for having deposited log information in the log buffer is less than given threshold, the daily record in journal queue is believed Breath is stored in log buffer one by one.
Further, the given threshold is 1MB.
Further, the instantaneous operating conditions according to currency examination device, read and record storage in the log buffer Log information, including:
When in currency examination idle condition, the log information stored in the log buffer is read, and the daily record is believed Breath finally writes physical storage device through system library relief area and Installed System Memory relief area;
When completion statuses scanned in single banknote, the log information stored in the log buffer is read, and will The log information writing system storehouse relief area, so that the log information is eventually written physical storage device;
When in reception currency examination coomand mode, the log information for reading and storing in simultaneously log caching is not executed Action.
Second aspect, the embodiment of the present invention additionally provide a kind of log information recording device, the log information recording device Including:
Module is stored in, for according to the size that log information has been deposited in log buffer, by the log information in journal queue Log buffer is stored in one by one;
Logging modle, for the instantaneous operating conditions according to currency examination device, reads and records storage in the log buffer Log information is to physical storage device.
Further, the log information recording device also includes:
Module is read in, is delayed for the log information of interim storage in physical storage device during original state is read in daily record Deposit.
Further, the module that is stored in includes:
Log information is stored in unit, for being less than given threshold when the capacity for having deposited log information in the log buffer When, the log information in journal queue is stored in log buffer one by one.
Further, the given threshold is 1MB.
Further, the logging modle includes:
First writing unit, for when in currency examination idle condition, reading the daily record letter stored in the log buffer Breath, and the log information is finally write physical storage device through system library relief area and Installed System Memory relief area;
Second writing unit, for when completion statuses are scanned in single banknote, reading in the log buffer and depositing The log information of storage, and by the log information writing system storehouse relief area, so that the log information is eventually written physics Storage device;
Forbid performance element, delay for when in reception currency examination coomand mode, not executing the simultaneously log that reads Deposit the action of the log information of middle storage.
The embodiment of the present invention passes through according to the amount of capacity for having deposited log information in log buffer, by the day in journal queue Will information is stored in log buffer one by one;According to the instantaneous operating conditions of currency examination device, storage in the log buffer is read and records Log information to physical storage device, solve existing currency examination device during currency examination, need constantly to being stored in physics Journal file in storage device is written and read operation, and then affects the problem of currency examination real-time, it is achieved that avoid currency examination process In, the record of daily record affects the effect of currency examination real-time.
Description of the drawings
Fig. 1 is a kind of flow chart of the log information recording method in the embodiment of the present invention one;
Fig. 2 is a kind of flow chart of the log information recording method in the embodiment of the present invention two;
Fig. 3 is a kind of structure chart of the log information recording device in the embodiment of the present invention three.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment that states is used only for explaining the present invention, rather than limitation of the invention.It also should be noted that, in order to just Part related to the present invention rather than entire infrastructure is illustrate only in description, accompanying drawing.
Embodiment one
Fig. 1 is a kind of flow chart of log information recording method that the embodiment of the present invention one is provided, and the present embodiment is applicable In the situation for needing to record log information, the method can be executed by log information recording device, wherein the device Can realize that the device can be integrated in currency examination device by software and/or hardware.With reference to the log information that Fig. 1, the present embodiment are provided Recording method specifically may include steps of:
S110, according to the size for having deposited log information in log buffer, the log information in journal queue is stored in one by one Log buffer.
Wherein, described according to the size for having deposited log information in log buffer, by the log information in journal queue one by one Log buffer is stored in, can be included:When the capacity for having deposited log information in the log buffer is less than given threshold, by daily record Log information in queue is stored in log buffer one by one.Further, the preferred 1MB of the given threshold.Specifically, set when described Determine threshold value for 1MB when, if having deposited the capacity of log information in the log buffer less than 1MB, by the daily record in journal queue Information is stored in log buffer one by one;If the capacity for having deposited log information in the log buffer equals or exceeds 1MB, will not Log information in journal queue is stored in log buffer.
S120, the instantaneous operating conditions according to currency examination device, read and record the log information stored in the log buffer To physical storage device.
Wherein, the instantaneous operating conditions according to currency examination device, read and record the daily record stored in the log buffer Information, can include:
When in currency examination idle condition, the log information stored in the log buffer is read, and the daily record is believed Breath finally writes physical storage device through system library relief area and Installed System Memory relief area.
Specifically, when in currency examination idle condition, the log information stored in the log buffer is read, and will be described Log information writing system storehouse relief area first, is then written to Installed System Memory relief area, is ultimately written in physical storage device.
When completion statuses scanned in single banknote, the log information stored in the log buffer is read, and will The log information writing system storehouse relief area, so that the log information is eventually written physical storage device.
Specifically, when completion statuses scanned in single banknote, the daily record letter stored in the log buffer is read Breath, and by the log information writing system storehouse relief area.After the log information is written into system library relief area, according to testing The Linux system file read-write characteristic of paper money device, the log information will be eventually written in physical storage device.
When in reception currency examination coomand mode, the log information for reading and storing in simultaneously log caching is not executed Action.
Specifically, when in reception currency examination coomand mode, storage in the reading log caching is not executed The action of log information, now, in the log buffer store log information will be prohibited write currency examination device physics deposit In storage equipment.
The technical scheme of the present embodiment passes through according to the amount of capacity for having deposited log information in log buffer, by journal queue In log information be stored in log buffer one by one;According to the instantaneous operating conditions of currency examination device, the log buffer is read and records The log information of middle storage, solves existing currency examination device during currency examination, needs constantly to being stored in physical storage device In journal file be written and read operation, and then affect the problem of currency examination real-time, it is achieved that during avoiding currency examination, daily record Record affects the effect of currency examination real-time.
Embodiment two
Fig. 2 is a kind of flow chart of log information recording method that the embodiment of the present invention two is provided, and the present embodiment is above-mentioned The optional technical scheme that the log information of interim storage is read in log buffer is increased on the basis of embodiment one.With reference to Fig. 2, The log information recording method that the present embodiment is provided specifically may include steps of:
S210, by physical storage device during original state interim storage log information read in log buffer.
Specifically, when currency examination device accident power-off, the log information of interim storage may be produced in physical storage device. When currency examination device by accident power-off recovering state to original state when, by physical storage device interim storage log information read in Log buffer, can strengthen the integrity of log information recording.
S220, according to the size for having deposited log information in log buffer, the log information in journal queue is stored in one by one Log buffer.
S230, the instantaneous operating conditions according to currency examination device, read and record the log information stored in the log buffer To physical storage device.
The technical scheme of the present embodiment is by reading in log buffer by the log information of interim storage;According in log buffer The amount of capacity of log information is deposited, the log information in journal queue has been stored in log buffer one by one;Reality according to currency examination device When working condition, read and record in the log buffer store log information, solve existing currency examination device in currency examination process In, need constantly to be written and read the journal file being stored in physical storage device operation, and then affect currency examination real-time Problem, it is achieved that during avoiding currency examination, the record of daily record affects the effect of currency examination real-time, and enhances log information The integrity of record.
Embodiment three
Fig. 3 is a kind of structure chart of the log information recording device in the embodiment of the present invention three, and the present embodiment is applicable to Need the situation recorded by log information.The structure of the log information recording device provided with reference to Fig. 3, the present embodiment is concrete Can be as follows:
Module 310 is stored in, for according to the size that log information has been deposited in log buffer, the daily record in journal queue being believed Breath is stored in log buffer one by one;
Logging modle 320, for the instantaneous operating conditions according to currency examination device, reads and records storage in the log buffer Log information to physical storage device.
Optionally, the log information recording device also includes:
Module is read in, is delayed for the log information of interim storage in physical storage device during original state is read in daily record Deposit.
Optionally, the module that is stored in includes:
Log information is stored in unit, for being less than given threshold when the capacity for having deposited log information in the log buffer When, the log information in journal queue is stored in log buffer one by one.
Optionally, the given threshold is 1MB.
Optionally, the logging modle includes:
First writing unit, for when in currency examination idle condition, reading the daily record letter stored in the log buffer Breath, and the log information is finally write physical storage device through system library relief area and Installed System Memory relief area;
Second writing unit, for when completion statuses are scanned in single banknote, reading in the log buffer and depositing The log information of storage, and by the log information writing system storehouse relief area, so that the log information is eventually written physics Storage device;
Forbid performance element, delay for when in reception currency examination coomand mode, not executing the simultaneously log that reads Deposit the action of the log information of middle storage.
The log information recording device that the present embodiment is provided, the log information recording provided with any embodiment of the present invention Method belongs to same inventive concept, can perform the log information recording method provided by any embodiment of the present invention, possesses execution The corresponding functional module of log information recording method and beneficial effect.Not ins and outs of detailed description in the present embodiment, can Referring to the log information recording method that any embodiment of the present invention is provided.
Note, above are only presently preferred embodiments of the present invention and institute's application technology principle.It will be appreciated by those skilled in the art that The invention is not restricted to specific embodiment described here, can carry out for a person skilled in the art various obvious changes, Readjust and substitute without departing from protection scope of the present invention.Therefore, although the present invention is carried out by above example It is described in further detail, but the present invention is not limited only to above example, without departing from the inventive concept, also Other Equivalent embodiments more can be included, and the scope of the present invention is determined by scope of the appended claims.

Claims (10)

1. a kind of log information recording method, it is characterised in that include:
According to the size that log information has been deposited in log buffer, the log information in journal queue is stored in log buffer one by one;
According to the instantaneous operating conditions of currency examination device, the log information stored in the log buffer is read and records to physical store Equipment.
2. method according to claim 1, it is characterised in that according to the size for having deposited log information in log buffer, Before the log information in journal queue is stored in log buffer one by one, also include:
The log information of interim storage in physical storage device during original state is read in log buffer.
3. method according to claim 1, it is characterised in that described according to having deposited the big of log information in log buffer Little, the log information in journal queue is stored in log buffer one by one, including:
When deposited in the log buffer log information capacity be less than given threshold when, by the log information in journal queue by One is stored in log buffer.
4. method according to claim 3, it is characterised in that the given threshold is 1MB.
5. method according to claim 1, it is characterised in that the instantaneous operating conditions according to currency examination device, reads simultaneously The log information stored in the log buffer is recorded, including:
When in currency examination idle condition, the log information stored in the log buffer is read, and the log information is passed through System library relief area and Installed System Memory relief area, finally write physical storage device;
When completion statuses scanned in single banknote, the log information stored in the log buffer is read, and will be described Log information writing system storehouse relief area, so that the log information is eventually written physical storage device;
When in reception currency examination coomand mode, moving for the log information for reading and storing in simultaneously log caching is not executed Make.
6. a kind of log information recording device, it is characterised in that include:
Module is stored in, for according to the size that log information has been deposited in log buffer, by the log information in journal queue one by one It is stored in log buffer;
Logging modle, for the instantaneous operating conditions according to currency examination device, reads and records the daily record stored in the log buffer Information is to physical storage device.
7. device according to claim 6, it is characterised in that also include:
Module is read in, for the log information of interim storage in physical storage device during original state is read in log buffer.
8. device according to claim 6, it is characterised in that the module that is stored in includes:
Log information is stored in unit, during for being less than given threshold when the capacity for having deposited log information in the log buffer, will Log information in journal queue is stored in log buffer one by one.
9. device according to claim 8, it is characterised in that the given threshold is 1MB.
10. device according to claim 6, it is characterised in that the logging modle includes:
First writing unit, for when in currency examination idle condition, reading the log information stored in the log buffer, and By the log information through system library relief area and Installed System Memory relief area, physical storage device is finally write;
Second writing unit, for when completion statuses are scanned in single banknote, reading storage in the log buffer Log information, and by the log information writing system storehouse relief area, so that the log information is eventually written physical store Equipment;
Forbid performance element, for when in reception currency examination coomand mode, not executing described reading in simultaneously log caching The action of the log information of storage.
CN201610980141.3A 2016-11-08 2016-11-08 Log information recording method and device Pending CN106504402A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610980141.3A CN106504402A (en) 2016-11-08 2016-11-08 Log information recording method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610980141.3A CN106504402A (en) 2016-11-08 2016-11-08 Log information recording method and device

Publications (1)

Publication Number Publication Date
CN106504402A true CN106504402A (en) 2017-03-15

Family

ID=58323704

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610980141.3A Pending CN106504402A (en) 2016-11-08 2016-11-08 Log information recording method and device

Country Status (1)

Country Link
CN (1) CN106504402A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111858508A (en) * 2020-06-17 2020-10-30 远光软件股份有限公司 Regulation and control method and device of log system, storage medium and electronic equipment
CN114973500A (en) * 2021-02-26 2022-08-30 深圳怡化电脑股份有限公司 Financial terminal core log transmission method and device, electronic equipment and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102075690A (en) * 2009-11-24 2011-05-25 新奥特(北京)视频技术有限公司 Journal monitoring method and device for caption broadcasting machines
CN102447633A (en) * 2011-12-29 2012-05-09 北京亿赞普网络技术有限公司 Log transmission method and system
CN102981944A (en) * 2012-12-12 2013-03-20 青岛海信宽带多媒体技术有限公司 Log storage method based on file system
US8671082B1 (en) * 2009-02-26 2014-03-11 Netapp, Inc. Use of predefined block pointers to reduce duplicate storage of certain data in a storage subsystem of a storage server
CN103793517A (en) * 2014-02-12 2014-05-14 浪潮电子信息产业股份有限公司 File system log dump dynamic capacity-increase method based on monitoring mechanism
CN105183626A (en) * 2015-09-30 2015-12-23 深圳怡化电脑股份有限公司 Log storage method and system of paper currency recognition module

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8671082B1 (en) * 2009-02-26 2014-03-11 Netapp, Inc. Use of predefined block pointers to reduce duplicate storage of certain data in a storage subsystem of a storage server
CN102075690A (en) * 2009-11-24 2011-05-25 新奥特(北京)视频技术有限公司 Journal monitoring method and device for caption broadcasting machines
CN102447633A (en) * 2011-12-29 2012-05-09 北京亿赞普网络技术有限公司 Log transmission method and system
CN102981944A (en) * 2012-12-12 2013-03-20 青岛海信宽带多媒体技术有限公司 Log storage method based on file system
CN103793517A (en) * 2014-02-12 2014-05-14 浪潮电子信息产业股份有限公司 File system log dump dynamic capacity-increase method based on monitoring mechanism
CN105183626A (en) * 2015-09-30 2015-12-23 深圳怡化电脑股份有限公司 Log storage method and system of paper currency recognition module

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111858508A (en) * 2020-06-17 2020-10-30 远光软件股份有限公司 Regulation and control method and device of log system, storage medium and electronic equipment
CN111858508B (en) * 2020-06-17 2023-01-31 远光软件股份有限公司 Regulation and control method and device of log system, storage medium and electronic equipment
CN114973500A (en) * 2021-02-26 2022-08-30 深圳怡化电脑股份有限公司 Financial terminal core log transmission method and device, electronic equipment and medium
CN114973500B (en) * 2021-02-26 2023-12-22 深圳怡化电脑股份有限公司 Financial terminal movement log transmission method, device, electronic equipment and medium

Similar Documents

Publication Publication Date Title
US9798472B1 (en) Extent level cache destaging
US9177670B1 (en) Method and apparatus for flash cache management
CN109213817B (en) Incremental data abstracting method, device and server
CN108319543A (en) A kind of asynchronous processing method and its medium, system of computer log data
US20170255556A1 (en) Workload detection and media cache management
CN108763508B (en) Data page access method, storage engines and computer readable storage medium
CN102541691B (en) Log check point recovery method applied to memory data base OLTP (online transaction processing)
CN111400204B (en) Solid-state disk caching method, system and related equipment
CN108431783A (en) Access request processing method, device and computer system
CN112799595B (en) Data processing method, device and storage medium
CN108959118B (en) Data writing method and device
CN107168651A (en) A kind of small documents polymerize storage processing method
CN111177105B (en) Mass file writing method, device, system and medium of distributed file system
CN103729149A (en) Data storage method
CN105393228A (en) Method, device and user equipment for reading/writing data in nand flash
CN106504402A (en) Log information recording method and device
CN104239231B (en) A kind of method and device for accelerating L2 cache preheating
CN105260139B (en) A kind of disk management method and system
CN111414320A (en) Method and system for constructing disk cache based on nonvolatile memory of log file system
CN113608695A (en) Data processing method, system, device and medium
CN109508782A (en) Accelerating circuit and method based on neural network deep learning
CN103399783A (en) Storage method and device of mirror image documents of virtual machines
CN104731526B (en) The method and device that a kind of discontented band is write
CN105589912A (en) Method and storage structure for processing frequently written document with MRAM (Magnetic Random Access Memory)
CN206431605U (en) A kind of device of online read-write network interface card Nonvolatile memory

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170315