Unlock instant, AI-driven research and patent intelligence for your innovation.

File reading and writing method and system based on buffering alignment

A method of reading and writing, buffer pair technology, applied in the field of network information security, to achieve the effect of reducing complexity, increasing difficulty, reducing times and time

Inactive Publication Date: 2016-04-13
HARBIN ANTIY TECH
View PDF4 Cites 4 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] The present invention provides a file reading and writing method and system based on buffer alignment. By realizing the internal buffer area inside the program, before calling the system API to obtain data, it is judged whether there is data to be read in the internal buffer area, and if so, directly Return to avoid the problem of frequent calls to system APIs, which consume too much time

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
  • File reading and writing method and system based on buffering alignment
  • File reading and writing method and system based on buffering alignment

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0021] The present invention provides an embodiment of a file reading and writing method and system based on buffer alignment, in order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, and to make the above-mentioned purpose and characteristics of the present invention And advantage can be more obvious and easy to understand, below in conjunction with accompanying drawing technical scheme in the present invention is described in further detail:

[0022] The present invention firstly provides an embodiment of a file reading and writing method based on buffer alignment, such as figure 1 shown, including:

[0023] S101 If there is a program read and write request, then judge whether the internal buffer contains the data to be read, if so, execute S104, otherwise execute S102;

[0024] S102 After aligning according to the preset unit of the file, calculate the position and size to be read, and the size is...

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 discloses a file reading and writing method based on buffering alignment. The method comprises the following steps: if a program reading and writing request is in the presence, judging whether an internal buffer contains data to be read or not, if the internal buffer contains the data to be read, directly returning the data to be read, and otherwise, calculating a position and a size which need to be read after align is carried out according to a preset unit of a file, wherein the size is the integral multiple of the preset unit; on the basis of the position and the size which need to be read, calling a system API (Application Programming Interface) to read the data and cache the data to the internal buffer; and according to practical requirements, returning the data to be read. The invention also discloses a file reading and writing system based on the buffering alignment. The technical scheme of the invention can effectively reduce system API calling frequencies and time and improve file reading and writing performance.

Description

technical field [0001] The invention relates to the field of network information security, in particular to a method and system for reading and writing files based on buffer alignment. Background technique [0002] Traditional file reading and writing methods usually call the system API (Application Programming Interface) to operate the disk to obtain the data of the specified location and size of the file. [0003] Traditional file reading and writing methods have some disadvantages in certain application scenarios. For example, when files need to be frequently fragmented to read and write, the application system will frequently call system APIs to obtain data, which increases the number of times and time spent calling system APIs, and reduces file read and write performance. Contents of the invention [0004] The present invention provides a file reading and writing method and system based on buffer alignment. By realizing the internal buffer area inside the program, be...

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
IPC IPC(8): G06F3/06
Inventor 何公道沈长伟
Owner HARBIN ANTIY TECH
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More