A Method of Efficiently Storing Log Files in Single Chip Microcomputer System

A technology of log files and single-chip microcomputers, which is applied in the field of efficient storage of log files, can solve problems such as wrong conclusions, failure of system analysis, unfavorable system analysis, etc., to meet storage requirements, reduce preemption, and improve storage efficiency.

Active Publication Date: 2020-11-27
涵涡智航科技(玉溪)有限公司
View PDF16 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

This is not conducive to a complete analysis of the system afterwards, and even if some key data is discarded, it will make the system analysis impossible or draw wrong conclusions

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A Method of Efficiently Storing Log Files in Single Chip Microcomputer System
  • A Method of Efficiently Storing Log Files in Single Chip Microcomputer System
  • A Method of Efficiently Storing Log Files in Single Chip Microcomputer System

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0072] This embodiment provides a method for efficiently storing log files in a single-chip microcomputer system, including the following steps:

[0073] S1: Preprocessing: Precalculate the required file size and the required cyclic FIFO size;

[0074] Wherein, the required file size in step S1 provided by the present invention is calculated according to the application scenario and log recording requirements; the calculation formula is as follows:

[0075] Required file size = continuous working time × main cycle frequency × data volume recorded in each cycle

[0076] The required circular FIFO size in step S1 is calculated according to the amount of log data, the performance of the single-chip microcomputer and the performance of the memory; the calculation formula is as follows:

[0077] Required loop FIFO size = maximum write time x main loop frequency x amount of data recorded in each loop.

[0078] S2: Pre-allocate continuous file storage area;

[0079] According to t...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention provides a method for efficiently storing log files in a single-chip microcomputer system, and belongs to the technical field of log storage. The method comprises steps of S1, preprocessing; S2, pre-allocating continuous file storage areas; S3, initializing a cyclic FIFO buffer; S4, scaling the data and storing the scaled data into a cyclic FIFO buffer; S5, aligning the log data to an integral multiple N of the size of the sector; if N is greater than or equal to a preset value, entering the step S6, otherwise, returning to the step S4; S6, conducting multi-sector log file storage in an iterative mode. The method provided by the invention can minimize the influence (such as task execution frequency and task execution speed) of a large number of frequent log records and file operations on other tasks in the system, and is beneficial for the system to correctly and accurately complete set tasks.

Description

technical field [0001] The invention relates to the technical field of single-chip microcomputer systems, in particular to a method for efficiently storing log files in the single-chip microcomputer system. Background technique [0002] In some single-chip microcomputer system applications, it is necessary to record some system data (such as parameter values, state quantities, instruction quantities, etc.) in real time in order to observe the system status, analyze system performance or troubleshoot system failures afterwards. . Generally speaking, combined with removable storage media and file systems, logging in the form of files is the best choice, and it is most conducive to the use of advanced analysis software in the host computer for data analysis afterwards. However, for most single-chip microcomputer systems, especially for single-chip microcomputer systems that need to perform high-frequency, high-real-time tasks, a large number of frequent log records and file op...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Patents(China)
IPC IPC(8): G06F16/18G06F3/06
CPCG06F3/061G06F3/0631G06F3/0676G06F16/1815
Inventor 岳欣欣
Owner 涵涡智航科技(玉溪)有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products