Data processing method and device of annular buffer based on dynamic adjustment

A ring buffer and data processing technology, applied in the field of data processing, can solve problems such as inability to change dynamically, complicated movement of read and write pointers, and poor method flexibility

Active Publication Date: 2020-06-16
CHENGDU ZHONGQIAN AUTOMATION ENG
View PDF3 Cites 7 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The disadvantages of this method are: the size of the newly added buffer must be determined and cannot be changed dynamically; there is an overhead of data copying, which may affect system performance if the number is large; the original buffer is not released, effectively occupying system memory resources
The disadvantage of this method is that: the size of the newly added buffer must be determined and cannot be changed dynamically; the movement of the read and write pointer becomes complicated, and the readable and writable positions are closely related to the expansion point of the buffer
[0007] In the existing methods, the size of the new buffer cannot be determined because the amount of data to be written is uncertain, and the flexibility of the method is poor; in addition, because the current buffer is statically established, when not operating Failure to release it in system memory will result in invalid use of memory space

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
  • Data processing method and device of annular buffer based on dynamic adjustment
  • Data processing method and device of annular buffer based on dynamic adjustment
  • Data processing method and device of annular buffer based on dynamic adjustment

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0028] The present invention will be further described below in conjunction with the accompanying drawings.

[0029] The invention provides a ring buffer data processing method based on dynamic adjustment. The method is based on a fixed-length ring buffer, and the ring buffer performs normal reading and writing of data; the remaining writable units of the ring buffer are obtained, and when the data buffer When it is full and no more data can be written, the pending data is written into the dynamically established data buffer unit. In order to facilitate the management of these data buffer units, they are connected in the form of a linked list. When the data in the ring buffer is read out, the contents of the dynamic buffer units are copied to the ring buffer in order, and the buffer units are released.

[0030] In one embodiment, such as Figure 4 As shown, the length of the ring buffer is 8, where readPointer and writePointer are the read pointer and write pointer respective...

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 data processing method of an annular buffer area based on dynamic adjustment. The data processing method comprises the following steps of normally reading and writing data bythe annular buffer area; obtaining residual writable units of the annular buffer area; when no residual writable unit exists in the annular buffer area, dynamically opening up a data buffer area according to the number of to-be-written data; and if a plurality of to-be-written data exist, sequentially opening up a plurality of data buffer areas, connecting each data buffer area through a linked list, and writing the to-be-written data into the data buffer areas at the same time. By adopting the technical scheme, the data buffer area is dynamically developed, the application is flexible and feasible, the dynamically established buffer area is released by the system after being used, and the memory of the system is not occupied invalidly.

Description

technical field [0001] The invention relates to the field of data processing, in particular to a data reading and writing method and device based on a dynamically adjusted ring buffer. Background technique [0002] The storage space of the ring buffer is logically connected at the first place, and it is a one-dimensional continuous linear structure with a fixed length in physical storage, such as figure 1 As shown in the application, the size of the ring buffer is usually fixed ( figure 1 The middle length is 8), define the read pointer and the read and write pointer to point to the current readable and writable data positions respectively; in the initial state, the read and write pointers point to the same position, and the number of data stored in the current ring buffer is N is 0; when writing a data, N+1, the write pointer moves to the next writable position; when reading a data, N-1, the read pointer moves to the next readable position; when writing data When the numb...

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 Applications(China)
IPC IPC(8): G06F3/06
CPCG06F3/0608G06F3/0656
Inventor 唐东明李驹光刘湛
Owner CHENGDU ZHONGQIAN AUTOMATION ENG
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