Signal processing method based on double-pointer annular high-speed buffer area

By adopting a double-pointer ring-shaped cache and multi-threaded synchronization mechanism in signal processing, the problems of data loss and delay in traditional signal processing methods are solved, and efficient and reliable signal data management is achieved to prevent buffer overflow and data loss. Improved system performance.

CN119271572APending Publication Date: 2025-01-07SITEWEI (SUZHOU) TECH CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411292939.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-14
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

When traditional signal processing methods face high-speed and large amounts of signal data, data loss and processing delay are prone to problems, especially in real-time monitoring systems, where the lack of a suitable buffering mechanism may result in data loss due to untimely processing.

Method used

Using signal processing method based on double-pointer ring-shaped high-speed buffers, the data is efficient read and write operations are achieved by creating ring buffers and setting double-pointers, and thread safety is ensured through multi-thread synchronization mechanism. The data overflow processing mechanism is used to prevent buffer overflow , adjust the acquisition frequency or send a flow control signal to reduce the data input speed.

Benefits of technology

Effectively manage signal data, improve the efficiency and reliability of signal processing, prevent data loss and buffer overflow, ensure the security and stability of read and write operations, reduce waste of storage space, and improve system performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure BDA0005045140840000031
    Figure BDA0005045140840000031
  • Figure BDA0005045140840000032
    Figure BDA0005045140840000032
  • Figure BDA0005045140840000033
    Figure BDA0005045140840000033
Patent Text Reader

Abstract

The invention discloses a signal processing method based on a double-pointer annular high-speed buffer area, and relates to the technical field of signal processing, and the method comprises a high-speed annular buffer area: an array with a fixed length is created, so that data can circulate at the tail end of the array to return to the starting end, and an annular structure is formed; the double pointers are provided with a writing pointer and a reading pointer, the writing pointer indicates the current position where the data can be written, new data are always written into the position pointed by the writing pointer, the reading pointer indicates the current position where the data can be read, and after the data are read, the reading pointer moves to the next position. According to the signal processing method based on the double-pointer annular high-speed buffer, the partition utilization rate is evaluated regularly, and the partition size is adjusted, so that too high or too low free space of the partition can be avoided, and storage resources can be utilized more sufficiently.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of signal processing, in particular to a signal processing method based on a double-pointer ring high-speed buffer. Background Art

[0002] In today's signal processing field, efficiently and accurately processing large amounts of real-time signal data is a key task. With the continuous development of science and technology, the amount of data generated by various signal sources has increased dramatically, which has put forward higher requirements on the speed and reliability of signal processing.

[0003] Traditional signal processing methods often suffer from data loss and processing delays when faced with high-speed, large amounts of signal data. For example, in some real-time monitoring systems, sensors continuously generate signal data, but if there is no appropriate buffering mechanism, the data may be lost due to untimely processing.

[0004] In order to solve these problems, a signal processing method based on a double-pointer ring high-speed buffer came into being. This method effectively manages the read and write operations of signal data by creating a ring buffer and setting double pointers, thereby improving the efficiency and reliability of signal processing. At the same time, a multi-threaded synchronization mechanism is adopted to ensure the thread safety of read and write operations and prevent data access conflicts. Through the data overflow processing mechanism, corresponding measures can be taken when an overflow is detected, reducing the data input speed and avoiding buffer overflow. Summary of the invention

[0005] To achieve the above objectives, the present invention is implemented through the following technical solutions: a signal processing method based on a double-pointer ring high-speed buffer, comprising:

[0006] High-speed ring buffer: Create an array of fixed length so that data can loop back to the beginning at the end of the array, forming a ring structure;

[0007] Dual pointers: A write pointer and a read pointer are set. The write pointer indicates the location where data can be written at present. New data is always written to the location pointed by the write pointer. The read pointer indicates the location where data can be read at present. After the data is read, the read pointer moves to the next location.

[0008] Data writing process: When new data is generated, first check whether the space of the ring buffer is sufficient to store the new data, that is, ensure that the write pointer does not catch up with the read pointer, write the data to the array position currently pointed by the write pointer, and then move the write pointer forward one position. When the write pointer reaches the end of the array, it automatically returns to the beginning of the array;

[0009] Data reading process: Check the position relationship between the read pointer and the write pointer, confirm whether there is readable data in the buffer, read the data from the current position of the read pointer, and then move the read pointer forward one position. When the read pointer reaches the end of the array, it automatically returns to the starting position of the array.

[0010] Data overflow processing: Before data is written, the distance between the write pointer and the read pointer is calculated to prevent buffer overflow. When overflow is detected, that is, when the write pointer is close to the read pointer, the data input speed is reduced by adjusting the acquisition frequency or sending a flow control signal upstream;

[0011] Multi-thread synchronization: A multi-thread synchronization mechanism is used to ensure the thread safety of read and write operations and prevent data access conflicts.

[0012] Preferably, the high-speed ring buffer comprises the following components:

[0013] Partition model: used to partition the high-speed ring buffer, set the buffer, and set partition strategy and partition index in each partition;

[0014] Management algorithm: Set the data writing algorithm to manage the input data items and size, set the data reading algorithm to manage the data type and characteristics of the requested read, and set the partition adjustment algorithm to minimize the adjustment frequency and data migration cost.

[0015] Preferably, the partition model setting sets the total buffer size as a fixed value and divides the buffer into several equal or unequal partitions, each partition can be dynamically resized to adapt to different types of data requirements; the partition strategy is configured with static partitions of a fixed size allocated to each partition at initialization, and dynamic partitions of which the size of each partition is dynamically adjusted according to the needs of the actual data flow, and each partition is provided with dual pointers, a read pointer and a write pointer.

[0016] Preferably, when the data writing algorithm inputs a data item, it determines, based on the data type, when the data is stored in a specific partition, checks the free space of the partition, and when the free space of the partition is sufficient, writes the data to the selected partition and updates the write pointer; when the space is insufficient, adjusts the space from other partitions to write the data to the selected partition and updates the write pointer; the data reading algorithm inputs the data type requested to be read, determines the partition containing the required data, checks the positions of the read pointer and the write pointer, determines whether the data is readable, reads the data from the partition and moves the read pointer; the partition adjustment algorithm evaluates the usage rate of each partition as needed, and automatically adjusts the partition size and the boundaries between partitions if a partition is too crowded and there is a large amount of unused space in other partitions, and performs data migration processing.

[0017] Preferably, the partition adjustment algorithm periodically evaluates the utilization of each partition, and the partition adjustment algorithm is executed every 3600 seconds, the utilization of each partition is calculated, and a high idle threshold and a low idle threshold are defined in the system, and the size of each partition is adjusted according to the set threshold and formula. Based on the adjustment results, the data is migrated to adapt to the new partition layout.

[0018] By regularly evaluating partition usage and adjusting partition sizes, you can avoid partitions with too much or too little free space and make better use of storage resources.

[0019] When a partition originally has a large amount of free space, after adjustment the excess space can be allocated to other partitions that need it more, thus reducing the overall waste of storage space.

[0020] Preferably, the specific formula of the partition adjustment algorithm is:

[0021]

[0022] The total number of partitions is n, The size of the partition is Used space is

[0023] Let the high idle threshold be T h , the low idle threshold is T l ;

[0024] when When shrinking a partition, the new partition size is:

[0025]

[0026] Where α is the reduction ratio coefficient;

[0027] when When the partition is expanded, the new partition size is:

[0028]

[0029] Where β is the reduction ratio coefficient.

[0030] The load conditions of different partitions may be different. By adjusting the partition size, data can be distributed more reasonably among the partitions, thereby balancing the system load and improving the overall performance of the system.

[0031] Preferably, the data overflow processing includes the following strategies:

[0032] Prevention strategy: Before each data write, check whether there is enough remaining space in the buffer using the double pointer algorithm;

[0033] Dynamic adjustment strategy: Set the extended buffer to dynamically adjust the buffer size;

[0034] Data overwrite strategy: When the dual pointer algorithm detects that old data has not been processed in time, it directly overwrites the oldest data, that is, the data at the read pointer position, and moves the read pointer accordingly.

[0035] Flow control management: When it is detected that the buffer is almost full, a signal is sent to the data source to reduce the data sending rate.

[0036] Before each data write, check the remaining space in the buffer to ensure that there is enough space to store the new data. This can effectively prevent data loss caused by a full buffer.

[0037] Preferably, the flow control management is provided with a data state, and sends allocation feedback to the data source according to the data storage state; the flow control management is provided with a normal state, a congested state and an underutilized state;

[0038] The time intervals of the normal state, the congestion state, and the underutilized state are set as Tnormal, Tcongestion, and Tunder-util, respectively.

[0039] Preferably, the flow control management is converted from the normal state to: if the network feedback state N is bad, it is converted to the congestion state for a time interval of Tcongestion; if N is good, it is converted to the underutilized state for a time interval of Tunder-util; if N is normal, it remains in the normal state for a time interval of Tnormal;

[0040] The flow control management switches from the congestion state: if N is bad, it remains in the congestion state for a time interval of Tcongestion; if N is not bad, it switches to the normal state for a time interval of Tnormal;

[0041] The flow control management switches from the underutilized state: if N is good, it remains in the underutilized state for a time interval of Tunder-util; if N is not good, it switches to the normal state for a time interval of Tnormal.

[0042] The present invention provides a signal processing method based on a double pointer ring high-speed buffer.

[0043] Beneficial effects:

[0044] First, the signal processing method based on the dual-pointer ring high-speed buffer can avoid excessive or low free space in the partition by regularly evaluating the partition usage and adjusting the partition size, so that storage resources can be more fully utilized; when a partition originally has a large amount of free space, the excess space can be allocated to other partitions that need it more after adjustment, reducing the overall waste of storage space.

[0045] Second, the signal processing method based on the double-pointer ring high-speed buffer can distribute data more reasonably in each partition by adjusting the partition size, since the load conditions of different partitions may be different, thereby balancing the system load and improving the overall performance of the system.

[0046] Third, the signal processing method based on the double pointer ring high-speed buffer ensures that there is enough space to store new data by checking the remaining space in the buffer before each data writing, which can effectively prevent data loss caused by the buffer being full. DETAILED DESCRIPTION

[0047] The present invention will be further described in detail below in conjunction with specific embodiments. The embodiments of the present invention are provided for the purpose of illustration and description, and are not intended to be exhaustive or to limit the present invention to the disclosed forms. Many modifications and variations will be apparent to those of ordinary skill in the art. The embodiments are selected and described to better illustrate the principles and practical applications of the present invention, and to enable those of ordinary skill in the art to understand the present invention and thereby design various embodiments with various modifications suitable for specific uses.

[0048] In the first embodiment, the present invention provides a technical solution: a signal processing method based on a dual-pointer ring high-speed buffer, comprising:

[0049] High-speed ring buffer: Create an array of fixed length so that data can loop back to the beginning at the end of the array, forming a ring structure;

[0050] Dual pointers: A write pointer and a read pointer are set. The write pointer indicates the location where data can be written at present. New data is always written to the location pointed by the write pointer. The read pointer indicates the location where data can be read at present. After the data is read, the read pointer moves to the next location.

[0051] Data writing process: When new data is generated, first check whether the space of the ring buffer is sufficient to store the new data, that is, ensure that the write pointer does not catch up with the read pointer, write the data to the array position currently pointed by the write pointer, and then move the write pointer forward one position. When the write pointer reaches the end of the array, it automatically returns to the beginning of the array;

[0052] Data reading process: Check the position relationship between the read pointer and the write pointer, confirm whether there is readable data in the buffer, read the data from the current position of the read pointer, and then move the read pointer forward one position. When the read pointer reaches the end of the array, it automatically returns to the starting position of the array.

[0053] Data overflow processing: Before data is written, the distance between the write pointer and the read pointer is calculated to prevent buffer overflow. When overflow is detected, that is, when the write pointer is close to the read pointer, the data input speed is reduced by adjusting the acquisition frequency or sending a flow control signal upstream;

[0054] Multi-thread synchronization: A multi-thread synchronization mechanism is used to ensure the thread safety of read and write operations and prevent data access conflicts.

[0055] The high-speed ring buffer includes the following components:

[0056] Partition model: used to partition the high-speed ring buffer, set the buffer, and set partition strategy and partition index in each partition;

[0057] Management algorithm: Set the data writing algorithm to manage the input data items and size, set the data reading algorithm to manage the data type and characteristics of the requested read, and set the partition adjustment algorithm to minimize the adjustment frequency and data migration cost.

[0058] The partition model setting sets the total buffer size as a fixed value and divides the buffer into several equal or unequal partitions. Each partition can be dynamically resized to adapt to different types of data requirements; the partition strategy is set to allocate a static partition of a fixed size to each partition during initialization, and a dynamic partition in which each partition is dynamically resized according to the actual data flow requirements. Each partition is provided with dual pointers, a read pointer and a write pointer.

[0059] When the data writing algorithm inputs a data item, it determines the data to be stored in a specific partition based on the data type, checks the free space of the partition, and when the free space of the partition is sufficient, writes the data to the selected partition and updates the write pointer. When the space is insufficient, adjusts the space from other partitions to write the data to the selected partition and updates the write pointer; the data reading algorithm inputs the data type requested to be read, determines the partition containing the required data, checks the positions of the read pointer and the write pointer, determines whether the data is readable, reads the data from the partition and moves the read pointer; the partition adjustment algorithm evaluates the usage rate of each partition as needed, and automatically adjusts the partition size and the boundaries between partitions if a partition is too crowded and there is a large amount of unused space in other partitions, and performs data migration processing.

[0060] The partition adjustment algorithm adopts a regular evaluation of the utilization rate of each partition, and the period is set to execute the partition adjustment algorithm every 3600 seconds, calculate the utilization rate of each partition, and define a high idle threshold and a low idle threshold in the system, adjust the size of each partition according to the set threshold and formula, and migrate the data according to the adjustment result to adapt to the new partition layout.

[0061] By regularly evaluating partition usage and adjusting partition sizes, you can avoid partitions with too much or too little free space and make better use of storage resources.

[0062] When a partition originally has a large amount of free space, after adjustment the excess space can be allocated to other partitions that need it more, thus reducing the overall waste of storage space.

[0063] The specific formula of the partition adjustment algorithm is:

[0064]

[0065] The total number of partitions is n, The size of the partition is Used space is

[0066] Let the high idle threshold be T h , the low idle threshold is T l ;

[0067] Shrink the partition, the new partition size is:

[0068]

[0069] Where α is the reduction ratio coefficient;

[0070] The load conditions of different partitions may be different. By adjusting the partition size, data can be distributed more reasonably among the partitions, thereby balancing the system load and improving the overall performance of the system.

[0071] The data overflow processing includes the following strategies:

[0072] Prevention strategy: Before each data write, check whether there is enough remaining space in the buffer using the double pointer algorithm;

[0073] Dynamic adjustment strategy: Set the extended buffer to dynamically adjust the buffer size;

[0074] Data overwrite strategy: When the dual pointer algorithm detects that old data has not been processed in time, it directly overwrites the oldest data, that is, the data at the read pointer position, and moves the read pointer accordingly.

[0075] Flow control management: When it is detected that the buffer is almost full, a signal is sent to the data source to reduce the data sending rate.

[0076] Before each data write, check the remaining space in the buffer to ensure that there is enough space to store the new data. This can effectively prevent data loss caused by a full buffer.

[0077] The flow control management is provided with a data state, and sends allocation feedback to the data source according to the data storage state; the flow control management is provided with a normal state, a congested state and an underutilized state;

[0078] The time intervals of the normal state, the congestion state, and the underutilized state are set as Tnormal, Tcongestion, and Tunder-util, respectively.

[0079] The flow control management is converted from the normal state to: if the network feedback state N is bad, it is converted to the congestion state for a time interval of Tcongestion; if N is good, it is converted to the underutilized state for a time interval of Tunder-util; if N is normal, it remains in the normal state for a time interval of Tnormal;

[0080] The flow control management switches from the congestion state: if N is bad, it remains in the congestion state for a time interval of Tcongestion; if N is not bad, it switches to the normal state for a time interval of Tnormal;

[0081] The flow control management switches from the underutilized state: if N is good, it remains in the underutilized state for a time interval of Tunder-util; if N is not good, it switches to the normal state for a time interval of Tnormal.

[0082] The second embodiment, based on the first embodiment, is a signal processing method based on a double-pointer ring high-speed buffer, comprising:

[0083] High-speed ring buffer: Create an array of fixed length so that data can loop back to the beginning at the end of the array, forming a ring structure;

[0084] Dual pointers: A write pointer and a read pointer are set. The write pointer indicates the location where data can be written at present. New data is always written to the location pointed by the write pointer. The read pointer indicates the location where data can be read at present. After the data is read, the read pointer moves to the next location.

[0085] Data writing process: When new data is generated, first check whether the space of the ring buffer is sufficient to store the new data, that is, ensure that the write pointer does not catch up with the read pointer, write the data to the array position currently pointed by the write pointer, and then move the write pointer forward one position. When the write pointer reaches the end of the array, it automatically returns to the beginning of the array;

[0086] Data reading process: Check the position relationship between the read pointer and the write pointer, confirm whether there is readable data in the buffer, read the data from the current position of the read pointer, and then move the read pointer forward one position. When the read pointer reaches the end of the array, it automatically returns to the starting position of the array.

[0087] Data overflow processing: Before data is written, the distance between the write pointer and the read pointer is calculated to prevent buffer overflow. When overflow is detected, that is, when the write pointer is close to the read pointer, the data input speed is reduced by adjusting the acquisition frequency or sending a flow control signal upstream;

[0088] Multi-thread synchronization: A multi-thread synchronization mechanism is used to ensure the thread safety of read and write operations and prevent data access conflicts.

[0089] The high-speed ring buffer includes the following components:

[0090] Partition model: used to partition the high-speed ring buffer, set the buffer, and set partition strategy and partition index in each partition;

[0091] Management algorithm: Set the data writing algorithm to manage the input data items and size, set the data reading algorithm to manage the data type and characteristics of the requested read, and set the partition adjustment algorithm to minimize the adjustment frequency and data migration cost.

[0092] The partition model setting sets the total buffer size as a fixed value and divides the buffer into several equal or unequal partitions. Each partition can be dynamically resized to adapt to different types of data requirements; the partition strategy is set to allocate a static partition of a fixed size to each partition during initialization, and a dynamic partition in which each partition is dynamically resized according to the actual data flow requirements. Each partition is provided with dual pointers, a read pointer and a write pointer.

[0093] When the data writing algorithm inputs a data item, it determines the data to be stored in a specific partition based on the data type, checks the free space of the partition, and when the free space of the partition is sufficient, writes the data to the selected partition and updates the write pointer. When the space is insufficient, adjusts the space from other partitions to write the data to the selected partition and updates the write pointer; the data reading algorithm inputs the data type requested to be read, determines the partition containing the required data, checks the positions of the read pointer and the write pointer, determines whether the data is readable, reads the data from the partition and moves the read pointer; the partition adjustment algorithm evaluates the usage rate of each partition as needed, and automatically adjusts the partition size and the boundaries between partitions if a partition is too crowded and there is a large amount of unused space in other partitions, and performs data migration processing.

[0094] The partition adjustment algorithm adopts a regular evaluation of the utilization rate of each partition, and the period is set to execute the partition adjustment algorithm every 3600 seconds, calculate the utilization rate of each partition, and define a high idle threshold and a low idle threshold in the system, adjust the size of each partition according to the set threshold and formula, and migrate the data according to the adjustment result to adapt to the new partition layout.

[0095] By regularly evaluating partition usage and adjusting partition sizes, you can avoid partitions with too much or too little free space and make better use of storage resources.

[0096] When a partition originally has a large amount of free space, after adjustment the excess space can be allocated to other partitions that need it more, thus reducing the overall waste of storage space.

[0097] The specific formula of the partition adjustment algorithm is:

[0098]

[0099] The total number of partitions is n, The size of the partition is Used space is

[0100] Let the high idle threshold be T h , the low idle threshold is T l ;

[0101] Expand the partition. The new partition size is:

[0102]

[0103] Where β is the reduction ratio coefficient.

[0104] The load conditions of different partitions may be different. By adjusting the partition size, data can be distributed more reasonably among the partitions, thereby balancing the system load and improving the overall performance of the system.

[0105] The data overflow processing includes the following strategies:

[0106] Prevention strategy: Before each data write, check whether there is enough remaining space in the buffer using the double pointer algorithm;

[0107] Dynamic adjustment strategy: Set the extended buffer to dynamically adjust the buffer size;

[0108] Data overwrite strategy: When the dual pointer algorithm detects that old data has not been processed in time, it directly overwrites the oldest data, that is, the data at the read pointer position, and moves the read pointer accordingly.

[0109] Flow control management: When it is detected that the buffer is almost full, a signal is sent to the data source to reduce the data sending rate.

[0110] Before each data write, check the remaining space in the buffer to ensure that there is enough space to store the new data. This can effectively prevent data loss caused by a full buffer.

[0111] The flow control management is provided with a data state, and sends allocation feedback to the data source according to the data storage state; the flow control management is provided with a normal state, a congested state and an underutilized state;

[0112] The time intervals of the normal state, the congestion state, and the underutilized state are set as Tnormal, Tcongestion, and Tunder-util, respectively.

[0113] The flow control management is converted from the normal state to: if the network feedback state N is bad, it is converted to the congestion state for a time interval of Tcongestion; if N is good, it is converted to the underutilized state for a time interval of Tunder-util; if N is normal, it remains in the normal state for a time interval of Tnormal;

[0114] The flow control management switches from the congestion state: if N is bad, it remains in the congestion state for a time interval of Tcongestion; if N is not bad, it switches to the normal state for a time interval of Tnormal;

[0115] The flow control management switches from the underutilized state: if N is good, it remains in the underutilized state for a time interval of Tunder-util; if N is not good, it switches to the normal state for a time interval of Tnormal.

[0116] Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field and related fields without creative work should fall within the scope of protection of the present invention. The structures, devices and operating methods not specifically described and explained in the present invention are implemented according to the conventional means in the field unless otherwise specified and limited.

Claims

1. A signal processing method based on a double-pointer ring high-speed buffer, characterized in that: include: High-speed ring buffer: Create an array of fixed length so that data can loop back to the beginning at the end of the array, forming a ring structure; Dual pointers: A write pointer and a read pointer are set. The write pointer indicates the location where data can be written at present. New data is always written to the location pointed by the write pointer. The read pointer indicates the location where data can be read at present. After the data is read, the read pointer moves to the next location. Data writing process: When new data is generated, first check whether the space of the ring buffer is sufficient to store the new data, that is, ensure that the write pointer does not catch up with the read pointer, write the data to the array position currently pointed by the write pointer, and then move the write pointer forward one position. When the write pointer reaches the end of the array, it automatically returns to the beginning of the array; Data reading process: Check the position relationship between the read pointer and the write pointer, confirm whether there is readable data in the buffer, read the data from the current position of the read pointer, and then move the read pointer forward one position. When the read pointer reaches the end of the array, it automatically returns to the starting position of the array. Data overflow processing: Before data is written, the distance between the write pointer and the read pointer is calculated to prevent buffer overflow. When overflow is detected, that is, when the write pointer is close to the read pointer, the data input speed is reduced by adjusting the acquisition frequency or sending a flow control signal upstream; Multi-thread synchronization: A multi-thread synchronization mechanism is used to ensure the thread safety of read and write operations and prevent data access conflicts.

2. The signal processing method based on a double-pointer ring high-speed buffer according to claim 1, characterized in that: The high-speed ring buffer includes the following components: Partition model: used to partition the high-speed ring buffer, set the buffer, and set partition strategy and partition index in each partition; Management algorithm: Set the data writing algorithm to manage the input data items and size, set the data reading algorithm to manage the data type and characteristics of the requested read, and set the partition adjustment algorithm to minimize the adjustment frequency and data migration cost.

3. The signal processing method based on a double-pointer ring high-speed buffer according to claim 2, characterized in that: The partition model setting sets the total buffer size as a fixed value and divides the buffer into several equal or unequal partitions. Each partition can be dynamically resized to adapt to different types of data requirements; the partition strategy is set to allocate a static partition of a fixed size to each partition during initialization, and a dynamic partition in which each partition is dynamically resized according to the actual data flow requirements. Each partition is provided with dual pointers, a read pointer and a write pointer.

4. The signal processing method based on a double-pointer ring high-speed buffer according to claim 2, characterized in that: When the data writing algorithm inputs a data item, it determines the data to be stored in a specific partition based on the data type, checks the free space of the partition, and when the free space of the partition is sufficient, writes the data to the selected partition and updates the write pointer. When the space is insufficient, adjusts the space from other partitions to write the data to the selected partition and updates the write pointer; the data reading algorithm inputs the data type requested to be read, determines the partition containing the required data, checks the positions of the read pointer and the write pointer, determines whether the data is readable, reads the data from the partition and moves the read pointer; the partition adjustment algorithm evaluates the usage rate of each partition as needed, and automatically adjusts the partition size and the boundaries between partitions if a partition is too crowded and there is a large amount of unused space in other partitions, and performs data migration processing.

5. The signal processing method based on a double-pointer ring high-speed buffer according to claim 4, characterized in that: The partition adjustment algorithm adopts a regular evaluation of the utilization rate of each partition, and the period is set to execute the partition adjustment algorithm every 3600 seconds, calculate the utilization rate of each partition, and define a high idle threshold and a low idle threshold in the system, adjust the size of each partition according to the set threshold and formula, and migrate the data according to the adjustment result to adapt to the new partition layout.

6. The signal processing method based on a double-pointer ring high-speed buffer according to claim 5, characterized in that: The specific formula of the partition adjustment algorithm is: Among them, the total number of partitions is n, and the size of the i-th partition is S i , the used space is U i ; Let the high idle threshold be T h , the low idle threshold is T l ; when When shrinking a partition, the new partition size is: Where α is the reduction ratio coefficient; when When the partition is expanded, the new partition size is: Where β is the reduction ratio coefficient.

7. The signal processing method based on a double-pointer ring high-speed buffer according to claim 1, characterized in that: The data overflow processing includes the following strategies: Prevention strategy: Before each data write, check whether there is enough remaining space in the buffer using the double pointer algorithm; Dynamic adjustment strategy: Set the extended buffer to dynamically adjust the buffer size; Data overwriting strategy: When the dual pointer algorithm detects that old data has not been processed in time, it directly overwrites the oldest data, that is, the data at the read pointer position and moves the read pointer accordingly; Flow control management: When it is detected that the buffer is almost full, a signal is sent to the data source to reduce the data sending rate.

8. The signal processing method based on a double-pointer ring high-speed buffer according to claim 6, characterized in that: The flow control management is provided with a data state, and sends allocation feedback to the data source according to the data storage state; the flow control management is provided with a normal state, a congested state and an underutilized state; The time intervals of the normal state, the congestion state, and the underutilized state are set as Tnormal, Tcongestion, and Tunder-util, respectively.

9. The signal processing method based on a double-pointer ring high-speed buffer according to claim 7, characterized in that: The flow control management is converted from the normal state to: if the network feedback state N is bad, it is converted to the congestion state for a time interval of Tcongestion; if N is good, it is converted to the underutilized state for a time interval of Tunder-util; if N is normal, it remains in the normal state for a time interval of Tnormal; The flow control management switches from the congestion state: if N is bad, it remains in the congestion state for a time interval of Tcongestion; if N is not bad, it switches to the normal state for a time interval of Tnormal; The flow control management switches from the underutilized state: if N is good, it remains in the underutilized state for a time interval of Tunder-util; if N is not good, it switches to the normal state for a time interval of Tnormal.

Citation Information

Cited By

  • Data processing method and electronic equipment

    CN120892375A

  • Data processing method and electronic device

    CN120892375B

  • Chip inter-core heterogeneous information communication method of two-stage RingBuffer structure

    CN121579409A