Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

A data processing method and device based on dynamically adjusted ring buffer

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

Active Publication Date: 2022-03-11
CHENGDU ZHONGQIAN AUTOMATION ENG
View PDF0 Cites 0 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
  • A data processing method and device based on dynamically adjusted ring buffer
  • A data processing method and device based on dynamically adjusted ring buffer
  • A data processing method and device based on dynamically adjusted ring buffer

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0028] The invention will be further described below with reference to the accompanying drawings.

[0029] The present invention provides a method based on a dynamically adjusted annular buffer data processing method, which performs normal read and write data based on the fixed length annular buffer; acquisition of the remaining operation of the ring buffer, when the data buffer When it is not possible to write data, the data to be written to the dynamically established data buffer unit is written. To facilitate management of these data buffers, the contents of the dynamic buffer unit are copied into the ring buffer when the data in the ring buffer is read, and the buffer unit is released in order.

[0030] In one embodiment, if Figure 4 As shown, the annular buffer length is 8, where the readpointr and WritePointer are read, respectively, and the read-write pointer moves in a clockwest direction, and the speed of reading data and reading data is written. When matching, the ring b...

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 based on a dynamically adjusted ring buffer, which includes the following steps: the ring buffer performs normal reading and writing of data; obtains the remaining writable units of the ring buffer; when there is no remaining writable unit in the ring buffer When entering the unit, the data buffer is dynamically opened according to the number of data to be written; if there is multiple data to be written, multiple data buffers are opened in sequence, and each data buffer is connected through a linked list, and at the same time, the data buffer to be written is opened Data is written to the data buffer. The technical solution of the present invention is used to dynamically open a data buffer, which is flexible and feasible in application. The dynamically established buffer will be released by the system after use, and will not occupy system memory in an invalid manner.

Description

Technical field [0001] The invention relates to the field of data processing, and 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 first, and in physical storage it is a one-dimensional continuous linear structure with a fixed length, such as figure 1 As shown, in applications, the size of the ring buffer is usually fixed ( figure 1 The medium length is 8), and the read pointer and the read-write pointer are defined to point to the current readable and writable data locations respectively; in the initial state, the read-write pointers point to the same location, and the number of data stored in the current ring buffer is N is 0; when writing a piece of data, N+1, the write pointer moves to the next writable position; when reading a piece of data, N-1, the read pointer moves to the next readable position; when writing data When ...

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): G06F3/06
CPCG06F3/0608G06F3/0656
Inventor 唐东明李驹光刘湛
Owner CHENGDU ZHONGQIAN AUTOMATION ENG
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products