Embedded data forwarding method and system based on adaptive token scheduling

Through the adaptive token scheduling method, the problems of high bandwidth usage, high power consumption and traffic conflict of multiple analog data in embedded systems are solved, real-time forwarding and resource optimization of key data are realized, and are suitable for IoT sensors, medical monitoring and multi-device testing scenarios.

CN120474985APending Publication Date: 2025-08-12GUILIN UNIV OF ELECTRONIC TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510585329.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-08
Publication Date
2025-08-12

AI Technical Summary

Technical Problem

When processing high-frequency multi-channel analog data, existing embedded data acquisition and forwarding systems have problems such as high bandwidth usage, high power consumption and traffic conflict, especially in multi-device testing scenarios. It is difficult for the existing technology to effectively distinguish key data from redundant data, resulting in waste of resources and delays.

Method used

Adaptive token scheduling method is adopted to optimize data forwarding strategies by maintaining a single data sequence for each channel of data, combining adaptive token bucket flow control, data change prediction and distributed token arbitration, ensuring real-timeness of key data and reducing power consumption.

Benefits of technology

It significantly reduces data forwarding and parsing overhead, reduces power consumption, optimizes bandwidth utilization, ensures real-time performance of critical data, and is suitable for resource-constrained embedded environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120474985A_ABST
    Figure CN120474985A_ABST
Patent Text Reader

Abstract

The invention discloses an embedded data forwarding method and system based on adaptive token scheduling, and aims to solve the problems of high-frequency redundancy and flow conflict of analog quantity data in an embedded system. The method comprises the following steps: collecting multiple paths of analog quantity data, and storing the analog quantity data into each path of FIFO circular queue; key data and non-key data are distinguished through slope prediction, and the token generation rate is adjusted in a self-adaptive mode; the short-period tasks preferentially forward key data, and the long-period tasks summarize non-key data; and the real-time performance of key data is ensured by distributed arbitration. The system achieves the effect of data flow control through the cooperation of acquisition, sequence management, prediction, token control, arbitration, scheduling and forwarding modules.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of embedded system data acquisition and forwarding, and specifically to an embedded data forwarding method and system based on adaptive token scheduling. Through a single FIFO circular queue, adaptive token bucket flow control, slope prediction, and distributed token arbitration, the method optimizes the upload efficiency of multi-channel analog data (such as voltage, current, and temperature), alleviates traffic conflicts, and reduces bandwidth usage, power consumption, and parsing overhead. The method is suitable for resource-constrained scenarios such as GPMI (General Purpose Multimedia Interface, a new type of digital audio and video transmission interface) fast charging protocol testing, Internet of Things sensors, medical monitoring, and multi-device testing. Background Art

[0002] Embedded data acquisition and forwarding systems are widely used in power supply protocol testing, IoT sensors, medical monitoring, and multi-device testing. They require processing high-frequency, multi-channel analog data. High-frequency acquisition generates large data streams, resulting in high communication bandwidth usage, high host computer analysis overhead, and high device power consumption. For example, in power supply protocol testing, critical transient data must be captured in real time. However, stable data only occurs 70% of the time, with minimal fluctuations. Repeated forwarding increases system burden.

[0003] Existing technologies typically use fixed-frequency sampling, differential encoding, or periodic forwarding to manage data flows, but these methods have limitations. Fixed sampling cannot distinguish between critical data and redundant data, resulting in wasted bandwidth. Differential encoding reduces some data volume, but still requires frequent forwarding, resulting in minimal power consumption reduction. Periodic forwarding fails to consider data importance, making it difficult to balance real-time performance with efficiency. Furthermore, multiple data paths competing for bandwidth often cause traffic conflicts, increasing the risk of forwarding delays or packet loss, particularly in multi-device testing scenarios.

[0004] The existing technology lacks a lightweight and efficient embedded data forwarding method. Through adaptive token bucket flow control and a single data sequence, combined with data change prediction and distributed token arbitration, it solves the problems of redundant data uploaded by analog quantities and conflicts of multi-channel data traffic, and adapts to resource-constrained embedded environments. Summary of the Invention

[0005] To address the high bandwidth usage, high forwarding delays, and power consumption issues caused by high-frequency redundancy and traffic conflicts associated with multi-channel analog data uploads in embedded systems, this paper proposes a multi-channel data forwarding method and system based on adaptive token scheduling. By maintaining a single data sequence for each data channel, combined with adaptive token bucket flow control, data change prediction, distributed token arbitration, and long-term data analysis, this method significantly reduces redundant data forwarding, alleviates multi-channel data contention, optimizes bandwidth utilization, ensures the real-time performance of critical data, and reduces power consumption. This method is suitable for resource-constrained embedded environments and is applicable to IoT sensors, medical monitoring, and multi-device data acquisition scenarios.

[0006] Multi-channel data acquisition and FIFO queue configuration. This method collects analog data from the device under test, generating samples (16 bits, 2 bytes) at a 10kHz sampling rate. Each data channel maintains a single data sequence, using a first-in-first-out (FIFO) circular buffer to store 10ms of data (100 samples, 200 bytes of memory per channel). All collected data (both critical and non-critical) is written directly to the end of the queue; older data is overwritten when the queue is full.

[0007] Adaptive token bucket flow control and token usage: Each data channel is configured with a separate token bucket, dynamically generating tokens (at a rate of 50–200 tokens / second). Token usage: Each token allows the sending task to extract one sample from the head of the sequence and construct a data packet for forwarding. Forwarding frequency is determined by the token rate: 200 tokens / second corresponds to a forwarding rate every 5ms, and 50 tokens / second corresponds to a forwarding rate every 20ms. Critical data (e.g., voltage changes >±0.01V) is prioritized for sampling and forwarding by short-period tasks (10ms). Non-critical data, if tokens are insufficient, is retained in the sequence and aggregated and forwarded by long-period tasks (0.5–2 seconds). The token counter memory is less than 100 bytes, reducing forwarding traffic by 80%–90%.

[0008] Data change prediction and slope calculation: Analyze the first 10 samples of the sequence (1ms data) every 10ms and calculate the slope (e.g., voltage slope = (latest sample - sample 10ms ago) / 10ms). Large slopes (>0.01V / ms): For example, a voltage increase from 5.00V to 5.10V marks the data as critical, triggering the token control module to increase the token generation rate to 200 tokens / second (1 token every 5ms). Short-term tasks take samples from the head of the sequence and forward them immediately, ensuring low latency for critical data processing. Small slope (<0.01V / ms): If the current is stable at 1.00A, it is marked as non-critical data, and the token generation rate is reduced to 50 tokens / second (1 token every 20ms). The data remains in the queue and will be aggregated and forwarded by long-term tasks.

[0009] Long-Period Data Analysis: A long-period task (default 1 second, adjustable to 0.5–2 seconds or other values) analyzes sequence header data (e.g., current change <±0.01A). If the change is less than a threshold, the data is retained in the sequence. If sufficient tokens are available, samples are taken from the sequence header, aggregated into a single average data packet, and forwarded. This analysis function uses less than 50 bytes of memory and takes less than 0.05ms. It integrates with the real-time operating system's scheduler, reducing non-critical data forwarding by 80%.

[0010] Dynamic token rate adjustment and rate relationship: The token generation rate is dynamically adjusted based on the frequency of statistical fluctuations every 10ms (e.g., temperature fluctuations >±0.1°C / 10ms). In high-fluctuation scenarios (e.g., voltage slopes >0.01V / ms), the rate is increased to 200 tokens / second, allowing data to be forwarded once every 5ms. In low-fluctuation scenarios (e.g., temperature fluctuations <±0.1°C / 10ms), the rate is reduced to 50 tokens / second, limiting forwarding to once every 20ms. This adjustment logic is based on a lightweight counter (memory size <50 bytes, time consumption <1μs), reducing power consumption by 50% and making it more efficient than a static token bucket.

[0011] Distributed Token Arbitration: When multiple data streams compete for tokens, a round-robin arbitration mechanism is used to dynamically prioritize critical data (e.g., voltage fluctuations) while ensuring transmission fairness. Data packets include a 1-byte flag (to distinguish between critical and non-critical data), a timestamp, and a CRC checksum. This arbitration mechanism reduces packet loss by 90% and is more reliable than traditional priority queues.

[0012] Task Scheduling and Data Retrieval: Tasks are scheduled based on sequence status and token availability. Short-term tasks (10ms) forward a single sample from the head of the sequence when a token is available; long-term tasks (1 second) aggregate and forward data from the head of the sequence. The collection continuously updates the sequence, writing to the tail, overwriting older data regardless of token availability.

[0013] Host computer data processing: The host computer distinguishes between critical data (real-time analysis) and non-critical data (trend monitoring) based on the data packet flag, reducing parsing overhead by 80%.

[0014] Technical Advantages: Low latency for critical data. Adaptive token bucket flow control, single data sequence, data change prediction, and distributed token arbitration effectively mitigate conflicts among multiple data streams and optimize analog upload efficiency. This method supports multiple data streams and multiple devices, offering high universality and suitability for both high-real-time testing and low-power applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 It is a flow chart of sequence configuration and data analysis based on adaptive token scheduling of the present invention;

[0016] Figure 2 It is a flow chart of adaptive token allocation and task scheduling of the present invention; Detailed implementation mode

[0017] The present invention will be further described in detail below in conjunction with specific embodiments, but the implementation mode of the present invention is not limited thereto.

[0018] Use case for implementation: Power supply protocol test

[0019] Scenario description: The lower computer collects the voltage, current, and temperature data of the device to be tested and forwards it to the upper computer for GPMI fast charging protocol test. It is necessary to capture key transient data (such as voltage mutation > ±0.01V, delay < tACKReceive = 100ms), and at the same time reduce redundant data transmission. The method supports Internet of Things sensors, medical monitoring, and multi-device test scenarios and has universality.

[0020] Sequence configuration and data analysis: Configure a single data sequence for each channel of data through initialization, directly store all collected data, and there is no need to determine the attribution. Ordinary tasks run at a 1-second cycle, and the analysis function checks the latest collected data (such as voltage change > ±0.01V) to decide whether to forward or buffer. The data change frequency is statistically analyzed every 10ms (such as temperature change > ±0.1°C / 10ms), and the token generation rate is dynamically adjusted (increased to 200 tokens / second when the fluctuation is large, and decreased to 50 tokens / second when the fluctuation is small). The storage occupancy of the sequence list and counter is less than 200 bytes, and the configuration and analysis take microseconds. The real-time operating system schedules configuration tasks.

[0021] Adaptive token allocation and task scheduling: The token bucket generates tokens at a rate of 50–200 tokens / second. Short-cycle tasks (10ms) preferentially forward key data; non-critical data is summarized and forwarded by ordinary tasks (1-second cycle) when tokens are insufficient. After the analysis function is completed, check the sequence status and token availability, and schedule short-cycle tasks or ordinary tasks. The token counting and scheduling take less than 0.05ms, and the memory occupancy is less than 150 bytes.

[0022] Token arbitration and data forwarding: Forwarding key data requires consuming tokens. When multiple channels of data compete, tokens are allocated through a polling arbitration mechanism to ensure fairness. Non-critical data is summarized and forwarded by ordinary tasks (every 1 second). A flag bit (1 byte) is added to the data packet, and the upper computer distinguishes the data type according to the flag. The arbitration and forwarding take less than 0.05ms, the memory occupancy is less than 100 bytes, the delay of key data is less than 10ms, and the parsing overhead is reduced by 80%.

[0023] Effectiveness and Ubiquity: This method significantly reduces forwarding volume (by 80%), parsing overhead (by 80%), and power consumption (by 80%), with critical data forwarding latency less than 10ms. Through adaptive token bucket flow control, single data sequencing, data change prediction, and distributed token arbitration, it mitigates multi-channel data traffic conflicts and optimizes analog upload efficiency. The method supports multi-channel data (voltage, current, temperature) and multi-device scenarios (power supply protocol testing, IoT, medical monitoring, and multi-node testing), and is compatible with various communication protocols and host computer interfaces.

Claims

1. An embedded data forwarding method and system based on adaptive token scheduling, characterized in that: The following steps are involved: ● Collect analog data, all data are directly written to the end of each channel's first-in-first-out (FIFO) circular queue, and old data is overwritten when the queue is full; ● Predict data types based on data slope. Data with a slope greater than a preset threshold is marked as critical data, while data with a slope less than the threshold is marked as non-critical data. ●Control forwarding rate through adaptive token bucket, increase token generation rate and reserve tokens for critical data, reduce rate for non-critical data, and consume one token for each forwarded data packet; ●Schedule short-cycle tasks to forward critical data from the head of the queue, and long-cycle tasks to summarize non-critical data and forward it.

2. The method according to claim 1, characterized in that The capacity of the FIFO circular queue is a fixed number of samples; the capacity is preset according to the analog data acquisition frequency and forwarding requirements. The acquisition device continuously updates the queue, and the oldest data is overwritten when the queue is full. It cooperates with the adaptive token scheduling to ensure low-latency access to key data and real-time data, reducing the risk of queue overflow.

3. The method according to claim 1, characterized in that The slope prediction is based on data analysis within a fixed time window, and the length of the time window is adaptively adjusted according to the application scenario; the slope prediction result is linked to the token generation rate of the adaptive token bucket, dynamically marking key data and non-key data to ensure efficient identification and priority forwarding of key data.

4. The token generation rate of the adaptive token bucket is dynamically adjusted according to the frequency of data fluctuations. The token generation rate increases in high-fluctuation scenarios and decreases in low-fluctuation scenarios.

5. The method according to claim 1, wherein The data packet includes single sample data and a flag bit (for distinguishing between critical and non-critical data), wherein the flag bit corresponds to the slope prediction result and is used to distinguish between critical data and non-critical data.