An NPU-based edge data stream acceleration processing method for an internet of things device

CN122718166APending Publication Date: 2026-09-08SICHUAN XINWEITONG TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610690751.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-19
Publication Date
2026-09-08

AI Technical Summary

Technical Problem

由于无法感知该抖动,无法消除到达时间抖动的影响,NPU依然按照固定样本数的滑动窗口处理数据流,导致滑动窗口内的实际时间跨度偏离所述标称发包间隔对应的标称时间长度,使得滑动窗口内的采样点个数无法真实反映固定的物理时间窗口,最终导致心率等统计量出现虚假峰值

Benefits of technology

本申请通过根据数据包的物理层前导码去估计瞬时多普勒频移,并记录数据包的硬件时间戳,根据相邻数据包的硬件时间戳之差和标称发包间隔生成到达时间抖动序列,根据瞬时多普勒频移的时间变化率,通过检测该时间变化率的零交叉点生成运动相位标志,以运动相位标志动态调整每个数据包的观测噪声强度,使得在运动相位标志指示匀速时减小观测噪声强度,在运动相位标志指示加速或减速时增大观测噪声强度,通过逐数据包输出校正后的逻辑到达时刻,从而以逻辑到达时刻作为插值节点,对原始传感器数据流中的采样值进行三次样条插值,生成时间间隔等于标称发包间隔的等间隔重采样数据流,此设计实现了对多普勒抖动引起的数据包到达时间间隔紊乱的物理感知与量化补偿,从而降低了基于固定时间窗口聚合时因时间跨度不均而产生的统计量偏差,有效缓解了现有NPU边缘数据流处理方法在大型活动中人群相对运动场景下产生虚假峰值的时序扭曲问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122718166A_ABST
    Figure CN122718166A_ABST
Patent Text Reader

Abstract

The application discloses an NPU-based edge data stream acceleration processing method for Internet of Things devices, and relates to the technical field of neural network processing.The application estimates the instantaneous Doppler frequency shift according to the physical layer preamble of a data packet, generates an arrival time jitter sequence according to the difference between the hardware time stamps of adjacent data packets and the nominal packet sending interval, generates a motion phase flag by detecting the zero-crossing point of the time variation rate of the instantaneous Doppler frequency shift according to the time variation rate of the instantaneous Doppler frequency shift, dynamically adjusts the observation noise intensity of each data packet with the motion phase flag, reduces the observation noise intensity when the motion phase flag indicates uniform speed, increases the observation noise intensity when the motion phase flag indicates acceleration or deceleration, outputs the corrected logical arrival time point by data packet, generates an equal-interval resampling data stream with a time interval equal to the nominal packet sending interval, and realizes physical sensing and quantitative compensation of the arrival time interval disorder of data packets caused by Doppler jitter.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of neural network processing technology, and in particular to a method for accelerating edge data stream processing of IoT devices based on an NPU. Background Technology

[0002] Existing methods for accelerating edge data stream processing in IoT devices based on NPUs typically assume that each data packet uploaded by the IoT device arrives at a fixed nominal packet interval. Within the NPU, a sliding window with a fixed number of samples is used to aggregate and calculate the sampled values ​​in the original sensor data stream, outputting statistical quantities of physiological indicators such as heart rate. This method relies on the uniformity of the data packet arrival time intervals, with a fixed number of samples within the sliding window corresponding to a fixed physical time length.

[0003] Currently, in large-scale events such as stadiums, music festivals, and marathons, the rapid relative movements of crowds jumping or swinging their arms can cause time-varying Doppler shifts in UWB or millimeter-wave communication channels, leading to periodic jitter in the data packet arrival time interval. Since this jitter cannot be detected or eliminated, the NPU still processes the data stream using a sliding window with a fixed number of samples. This causes the actual time span within the sliding window to deviate from the nominal time length corresponding to the nominal packet interval, resulting in the number of sampling points within the sliding window failing to accurately reflect the fixed physical time window. Ultimately, this leads to false peaks in statistics such as heart rate. Summary of the Invention

[0004] To address the technical problems existing in the background art, this invention proposes a method for accelerating edge data stream processing of IoT devices based on NPU.

[0005] This invention proposes an NPU-based method for accelerating edge data stream processing in IoT devices, comprising the following steps: S1. Obtain the nominal packet transmission interval of the IoT device; For clarification, the nominal packet transmission interval is equal to the sampling time interval of the sensors in the IoT device; where the sampling time interval of the sensors in the IoT device is pre-stored in the IoT device as a device configuration parameter, the nominal packet transmission interval can be obtained by reading the device configuration parameter of the IoT device; Acquire multiple data packets uploaded by IoT devices, including physical layer preamble sequences and sampled values ​​from the raw sensor data stream; S2. Process the physical layer preamble sequence in each data packet to obtain the instantaneous Doppler shift corresponding to each data packet; S3. Obtain the hardware timestamp corresponding to each data packet, and generate an arrival time jitter sequence based on the hardware timestamp and the nominal packet sending interval. S4. Generate the motion phase flag for each data packet based on the instantaneous Doppler frequency shift; S5. Generate process noise intensity based on arrival time jitter sequence, and generate observation noise intensity for each data packet based on motion phase flag; S6. Generate the logical arrival time corresponding to each data packet based on the process noise intensity, observation noise intensity, hardware timestamp, and nominal packet sending interval; S7. Generate an equally spaced resampled data stream based on the logical arrival time of each data packet and the sampled values ​​in the original sensor data stream of each data packet; S8. Input the equally spaced resampled data stream into the NPU for inference processing to obtain the target data processing result.

[0006] For clarification, NPU refers to a neural network processor. An NPU includes a vector processing unit for performing parallel inference operations on equally spaced resampled data streams. This is prior art and therefore will not be described in detail. For example, equally spaced resampled data streams are fed into the vector processing unit of the NPU, which performs sliding window aggregation calculations in parallel using a single instruction multiple data stream approach and outputs the corresponding target data processing results.

[0007] Preferably, in S2, the physical layer preamble sequence in each data packet is processed to obtain the instantaneous Doppler frequency shift corresponding to each data packet, as follows: For any data packet, for the physical layer preamble sequence in the data packet, read the in-phase component value and quadrature component value corresponding to each symbol from the physical layer preamble sequence; for any symbol, take the in-phase component value corresponding to the symbol as the real part and the quadrature component value corresponding to the symbol as the imaginary part, and combine them to form the complex value of the symbol. For any two adjacent symbols in the physical layer preamble sequence, multiply the complex value of the latter symbol by the conjugate of the complex value of the former symbol to obtain the conjugate product. Extract the principal argument of the conjugate product of the two adjacent symbols as the phase difference between the two adjacent symbols; Take two adjacent symbols in the physical layer preamble sequence as adjacent symbol pairs and obtain the total number of all adjacent symbol pairs; The phase difference values ​​of all adjacent symbol pairs are accumulated and then divided by the total number of all adjacent symbol pairs to obtain the average phase difference value. Obtain the time interval between two adjacent symbols in the physical layer preamble sequence; As an explanation, in the physical layer preamble sequence of a standard Internet of Things (IoT) symbol, the time interval between adjacent symbols is strictly equal.

[0008] Dividing the average phase difference by the time interval between two adjacent symbols yields the instantaneous Doppler shift of the data packet.

[0009] Preferably, in S3, the hardware timestamp corresponding to each data packet is obtained, and an arrival time jitter sequence is generated based on the hardware timestamp and the nominal packet transmission interval, as follows: At the moment the data packet is received, a hardware timestamp is generated by the hardware counter at the receiving end, and the hardware timestamp is associated with the data packet to obtain the hardware timestamp of the data packet. For clarity, the hardware counter at the receiving end refers to the hardware of the upstream system that receives data packets sent by IoT devices, such as edge gateways, base stations, or servers, rather than the IoT devices themselves.

[0010] For two adjacent data packets, the hardware timestamp of the preceding data packet is subtracted from the hardware timestamp of the following data packet to obtain the hardware timestamp difference. Subtract the nominal packet transmission interval from the hardware timestamp difference to obtain the arrival time jitter value; Obtain all arrival time jitter values ​​and arrange them in chronological order to form an arrival time jitter sequence.

[0011] Preferably, in S4, a motion phase flag for each data packet is generated based on the instantaneous Doppler frequency shift, as follows: The instantaneous Doppler frequency shift corresponding to each data packet is obtained, and multiple instantaneous Doppler frequency shifts are arranged in chronological order to form an instantaneous Doppler frequency shift sequence; Perform a first-order difference operation on the instantaneous Doppler frequency shift sequence to obtain the instantaneous Doppler frequency shift rate of change sequence; As an explanation, the first-order difference operation refers to calculating the instantaneous Doppler frequency shift of two adjacent data packets in the instantaneous Doppler frequency shift sequence, subtracting the instantaneous Doppler frequency shift of the subsequent data packet from that of the preceding data packet, and obtaining the instantaneous Doppler frequency shift rate of change corresponding to the subsequent data packet. This calculation is performed sequentially on all data packets in the instantaneous Doppler frequency shift sequence to form an instantaneous Doppler frequency shift rate of change sequence. Therefore, the number of instantaneous Doppler frequency shift rates of change in the instantaneous Doppler frequency shift rate of change sequence is one less than the number of instantaneous Doppler frequency shifts in the instantaneous Doppler frequency shift sequence. Detect the zero-crossing points in the instantaneous Doppler frequency shift rate sequence, where: When the time rate of change of the zero crossover point changes from negative to positive, a motion phase flag with a value of -1 is generated to indicate that the corresponding data packet is in the motion acceleration phase. When the time change rate of the zero-crossing point changes from a positive value to a negative value, a motion phase flag with a value of +1 is generated to indicate that the corresponding data packet is in the motion deceleration phase. If no zero-crossing point is detected in the instantaneous Doppler frequency shift rate sequence, when the absolute value of the instantaneous Doppler frequency shift rate in the instantaneous Doppler frequency shift rate sequence is less than the minimum detection threshold, a motion phase flag with a value of 0 is generated to indicate that the corresponding data packet is in a uniform or quasi-stationary phase. The minimum detection threshold is equal to three times the root mean square value of the instantaneous Doppler frequency shift measurement noise; For illustration, the minimum detection threshold is equal to three times the root mean square (RMS) value of the instantaneous Doppler frequency shift measurement noise. Here, the instantaneous Doppler frequency shift measurement noise needs to be performed after the IoT device is powered on and initialized, but before formally starting service transmission, with the IoT device in a stationary state, for example, fixed to a stationary platform. With the IoT device in a stationary state, multiple data packets are continuously received. The instantaneous Doppler frequency shift of each data packet is obtained according to step S11, and the instantaneous Doppler frequency shifts of the data packets are then used to form a calibration sequence. The standard deviation of this calibration sequence, i.e., the RMS value, is obtained. This standard deviation of the calibration sequence is the RMS value of the instantaneous Doppler frequency shift measurement noise.

[0012] The minimum detection threshold is set to three times the root mean square (RMS) value of the instantaneous Doppler shift measurement noise because, in typical wireless communication systems, the measurement noise at the receiver front end is usually modeled as zero-mean Gaussian white noise. Based on the statistical characteristics of the Gaussian distribution, the probability that the noise amplitude falls within three times its RMS value exceeds 99.7%. Therefore, setting the threshold to three times the RMS value of the instantaneous Doppler shift measurement noise means that when the absolute value of the observed instantaneous Doppler shift rate of change is less than this minimum detection threshold, the probability that it is caused by measurement noise is extremely high, while the probability that it is caused by the motion of a real object is extremely low. The three-fold factor is a commonly used engineering empirical value familiar to those skilled in the art and can be fine-tuned through calibration experiments in specific scenarios, but the principle lies in setting the detection threshold based on the statistical characteristics of the measurement noise.

[0013] Preferably, in S5, the noise intensity of the process is generated based on the arrival time jitter sequence, and the observation noise intensity of each data packet is generated based on the motion phase flag, as follows: Based on the arrival time jitter sequence, the variance of all arrival time jitter values ​​in the arrival time jitter sequence is obtained as the jitter variance; the jitter variance is used as the process noise intensity. The observation noise intensity for each data packet is dynamically generated based on the motion phase flag, as follows: For any data packet, when the value of the motion phase flag corresponding to the data packet is 0, the observation noise intensity is set to the first value; When the value of the motion phase flag corresponding to the data packet is +1 or -1, the observation noise intensity is set to the second value, and the second value is greater than the first value; For clarification, the first and second values ​​are generated in the following manner: Place the IoT device in a stationary state, for example, fixed on a stationary platform. Acquire multiple data packets uploaded by the IoT device while the IoT device is stationary, record the hardware timestamp of each data packet, and obtain the variance of all hardware timestamps, denoted as R1, as the first value. Place the IoT device in a typical motion state, such as simulating human jumping or running. Under the typical motion state of the IoT device, acquire multiple data packets uploaded by the IoT device, record the hardware timestamp of each data packet, obtain the variance of all hardware timestamps and record it as R2, and obtain the ratio of R2 to R1 as the scaling factor; the second value is equal to the first value multiplied by the scaling factor. Since placing IoT devices in typical motion states inevitably introduces additional time-of-arrival jitter, such as additional time-of-arrival jitter caused by increased Doppler frequency shift and instantaneous changes in channel conditions, R2 must be greater than R1, that is, the proportionality coefficient must be greater than 1.

[0014] Preferably, in step S6, the logical arrival time corresponding to each data packet is generated based on the process noise intensity, the observation noise intensity, the hardware timestamp, and the nominal packet transmission interval, as follows: The data packets are processed sequentially according to their arrival order. For the first data packet, the hardware timestamp of the first data packet is used as the corresponding logical arrival time, and the initial value of the rate of change of the logical arrival time is set to 1. As an explanation, since the interval between two adjacent data packets is equal to the nominal packet sending interval in an ideal situation, the rate of change of the logical arrival time is the difference between the corresponding logical arrival times of two adjacent data packets divided by the nominal interval. Setting the initial value of the rate of change of the logical arrival time to 1 means that the initial assumption is that there is no offset.

[0015] For any data packet after the first data packet, treat that data packet as the current data packet and output the logical arrival time of the current data packet in the following manner: Get the logical arrival time and the rate of change of the logical arrival time corresponding to the previous data packet; Multiply the rate of change of the logical arrival time corresponding to the previous data packet by the nominal packet sending interval, and add it to the logical arrival time corresponding to the previous data packet to obtain the predicted time of the current data packet. Obtain the observed noise intensity of the current data packet; Add the observed noise intensity of the current data packet to the process noise intensity to obtain the noise intensity sum; Divide the process noise intensity by the sum of noise intensities to obtain the weighting coefficients; Get the hardware timestamp corresponding to the current data packet; The dynamic correction value is obtained by subtracting the predicted time of the current data packet from the hardware timestamp corresponding to the current data packet, and then multiplying it by a weighting coefficient. The logical arrival time of the current data packet is obtained by adding the predicted time of the current data packet to the dynamic correction value; The unit interval deviation is obtained by subtracting the predicted time of the current data packet from the hardware timestamp corresponding to the current data packet and then dividing by the nominal packet transmission interval. Multiply the unit interval deviation by a weighting factor, and then add it to the rate of change of the logical arrival time corresponding to the previous data packet to obtain the rate of change of the logical arrival time corresponding to the current data packet. Obtain the logical arrival time and the rate of change of logical arrival time for all data packets.

[0016] Preferably, in S7, based on the logical arrival time corresponding to each data packet and the sampled values ​​in the original sensor data stream of each data packet, an equally spaced resampled data stream is generated, as follows: Using the logical arrival time corresponding to each data packet as the interpolation node, and using the sampled value in the original sensor data stream in each data packet as the node function value, cubic spline interpolation is performed to generate an equally spaced resampled data stream with a time interval equal to the nominal packet sending interval.

[0017] An NPU-based edge data stream acceleration processing system for IoT devices includes: Data acquisition module: obtains the nominal packet transmission interval of IoT devices; obtains multiple data packets uploaded by IoT devices, including physical layer preamble sequences and sampled values ​​from the raw sensor data stream; Instantaneous Doppler frequency shift generation module: processes the physical layer preamble sequence in each data packet to obtain the instantaneous Doppler frequency shift corresponding to each data packet; Arrival Time Jitter Sequence Generation Module: Obtains the hardware timestamp corresponding to each data packet, and generates an arrival time jitter sequence based on the hardware timestamp and the nominal packet transmission interval; Data packet motion phase flag generation module: Generates motion phase flags for each data packet based on the instantaneous Doppler frequency shift; Noise intensity generation module: Generates process noise intensity based on arrival time jitter sequence, and generates observation noise intensity for each data packet based on motion phase flag; Logical arrival time generation module: Generates the logical arrival time corresponding to each data packet based on process noise intensity, observed noise intensity, hardware timestamp and nominal packet sending interval; Equal-interval resampled data stream generation module: Generates an equal-interval resampled data stream based on the logical arrival time of each data packet and the sampled value in the original sensor data stream of each data packet; Target data processing result generation module: Inputs the equally spaced resampled data stream into the NPU for inference processing to obtain the target data processing result.

[0018] The proposed NPU-based edge data stream acceleration method for IoT devices has the following beneficial technical effects: This application estimates the instantaneous Doppler frequency shift based on the physical layer preamble of the data packets and records the hardware timestamps of the data packets. It generates an arrival time jitter sequence based on the difference in hardware timestamps between adjacent data packets and the nominal packet transmission interval. Based on the time change rate of the instantaneous Doppler frequency shift, it generates a motion phase flag by detecting the zero-crossing point of this time change rate. The motion phase flag dynamically adjusts the observation noise intensity of each data packet, reducing the observation noise intensity when the motion phase flag indicates uniform speed and increasing it when the motion phase flag indicates acceleration or deceleration. By outputting the corrected logical arrival time for each data packet, and using the logical arrival time as an interpolation node, cubic spline interpolation is performed on the sampled values ​​in the original sensor data stream to generate an equally spaced resampled data stream with a time interval equal to the nominal packet transmission interval. This design achieves physical perception and quantification compensation for the disordered arrival time intervals of data packets caused by Doppler jitter, thereby reducing the statistical bias caused by uneven time spans when aggregating based on a fixed time window. It effectively alleviates the temporal distortion problem of false peaks generated by existing NPU edge data stream processing methods in large-scale events with relative crowd movement. Attached Figure Description

[0019] Figure 1 This is a flowchart of an edge data stream acceleration processing method for IoT devices based on an NPU, according to the present invention. Figure 2 This is a block diagram illustrating the principle of an NPU-based edge data stream acceleration processing system for IoT devices according to the present invention. Detailed Implementation

[0020] Embodiments of the present invention are described in detail below. Examples of these embodiments are illustrated in the accompanying drawings, wherein the same or similar symbols denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0021] like Figure 1 The method for accelerating edge data stream processing of IoT devices based on NPU, as shown, includes the following steps: S1. Obtain the nominal packet transmission interval of the IoT device; For clarification, the nominal packet transmission interval is equal to the sampling time interval of the sensors in the IoT device; where the sampling time interval of the sensors in the IoT device is pre-stored in the IoT device as a device configuration parameter, the nominal packet transmission interval can be obtained by reading the device configuration parameter of the IoT device; Acquire multiple data packets uploaded by IoT devices, including physical layer preamble sequences and sampled values ​​from the raw sensor data stream; S2. Process the physical layer preamble sequence in each data packet to obtain the instantaneous Doppler shift corresponding to each data packet; In an optional embodiment, in S2, the physical layer preamble sequence in each data packet is processed to obtain the instantaneous Doppler frequency shift corresponding to each data packet, as follows: For any data packet, for the physical layer preamble sequence in the data packet, read the in-phase component value and quadrature component value corresponding to each symbol from the physical layer preamble sequence; for any symbol, take the in-phase component value corresponding to the symbol as the real part and the quadrature component value corresponding to the symbol as the imaginary part, and combine them to form the complex value of the symbol. For any two adjacent symbols in the physical layer preamble sequence, multiply the complex value of the latter symbol by the conjugate of the complex value of the former symbol to obtain the conjugate product. Extract the principal argument of the conjugate product of the two adjacent symbols as the phase difference between the two adjacent symbols; Take two adjacent symbols in the physical layer preamble sequence as adjacent symbol pairs and obtain the total number of all adjacent symbol pairs; The phase difference values ​​of all adjacent symbol pairs are accumulated and then divided by the total number of all adjacent symbol pairs to obtain the average phase difference value. Obtain the time interval between two adjacent symbols in the physical layer preamble sequence; As an explanation, in the physical layer preamble sequence of a standard Internet of Things (IoT) symbol, the time interval between adjacent symbols is strictly equal.

[0022] Divide the average phase difference by the time interval between two adjacent symbols to obtain the instantaneous Doppler shift of the data packet. S3. Obtain the hardware timestamp corresponding to each data packet, and generate an arrival time jitter sequence based on the hardware timestamp and the nominal packet sending interval. In an optional embodiment, in S3, the hardware timestamp corresponding to each data packet is obtained, and an arrival time jitter sequence is generated based on the hardware timestamp and the nominal packet transmission interval, as follows: At the moment the data packet is received, a hardware timestamp is generated by the hardware counter at the receiving end, and the hardware timestamp is associated with the data packet to obtain the hardware timestamp of the data packet. For clarity, the hardware counter at the receiving end refers to the hardware of the upstream system that receives data packets sent by IoT devices, such as edge gateways, base stations, or servers, rather than the IoT devices themselves.

[0023] For two adjacent data packets, the hardware timestamp of the preceding data packet is subtracted from the hardware timestamp of the following data packet to obtain the hardware timestamp difference. Subtract the nominal packet transmission interval from the hardware timestamp difference to obtain the arrival time jitter value; Obtain all arrival time jitter values, and arrange multiple arrival time jitter values ​​in chronological order to form an arrival time jitter sequence; S4. Generate the motion phase flag for each data packet based on the instantaneous Doppler frequency shift; In an optional embodiment, in S4, a motion phase flag for each data packet is generated based on the instantaneous Doppler frequency shift, as follows: The instantaneous Doppler frequency shift corresponding to each data packet is obtained, and multiple instantaneous Doppler frequency shifts are arranged in chronological order to form an instantaneous Doppler frequency shift sequence; Perform a first-order difference operation on the instantaneous Doppler frequency shift sequence to obtain the instantaneous Doppler frequency shift rate of change sequence; As an explanation, the first-order difference operation refers to calculating the instantaneous Doppler frequency shift of two adjacent data packets in the instantaneous Doppler frequency shift sequence, subtracting the instantaneous Doppler frequency shift of the subsequent data packet from that of the preceding data packet, and obtaining the instantaneous Doppler frequency shift rate of change corresponding to the subsequent data packet. This calculation is performed sequentially on all data packets in the instantaneous Doppler frequency shift sequence to form an instantaneous Doppler frequency shift rate of change sequence. Therefore, the number of instantaneous Doppler frequency shift rates of change in the instantaneous Doppler frequency shift rate of change sequence is one less than the number of instantaneous Doppler frequency shifts in the instantaneous Doppler frequency shift sequence. Detect the zero-crossing points in the instantaneous Doppler frequency shift rate sequence, where: When the time rate of change of the zero crossover point changes from negative to positive, a motion phase flag with a value of -1 is generated to indicate that the corresponding data packet is in the motion acceleration phase. When the time change rate of the zero-crossing point changes from a positive value to a negative value, a motion phase flag with a value of +1 is generated to indicate that the corresponding data packet is in the motion deceleration phase. If no zero-crossing point is detected in the instantaneous Doppler frequency shift rate sequence, when the absolute value of the instantaneous Doppler frequency shift rate in the instantaneous Doppler frequency shift rate sequence is less than the minimum detection threshold, a motion phase flag with a value of 0 is generated to indicate that the corresponding data packet is in a uniform or quasi-stationary phase. The minimum detection threshold is equal to three times the root mean square value of the instantaneous Doppler frequency shift measurement noise; For illustration, the minimum detection threshold is equal to three times the root mean square (RMS) value of the instantaneous Doppler frequency shift measurement noise. Here, the instantaneous Doppler frequency shift measurement noise needs to be performed after the IoT device is powered on and initialized, but before formally starting service transmission, with the IoT device in a stationary state, for example, fixed to a stationary platform. With the IoT device in a stationary state, multiple data packets are continuously received. The instantaneous Doppler frequency shift of each data packet is obtained according to step S11, and the instantaneous Doppler frequency shifts of the data packets are then used to form a calibration sequence. The standard deviation of this calibration sequence, i.e., the RMS value, is obtained. This standard deviation of the calibration sequence is the RMS value of the instantaneous Doppler frequency shift measurement noise.

[0024] The minimum detection threshold is set to three times the root mean square (RMS) value of the instantaneous Doppler shift measurement noise because, in typical wireless communication systems, the measurement noise at the receiver front end is usually modeled as zero-mean Gaussian white noise. Based on the statistical characteristics of the Gaussian distribution, the probability that the noise amplitude falls within three times its RMS value exceeds 99.7%. Therefore, setting the threshold to three times the RMS value of the instantaneous Doppler shift measurement noise means that when the absolute value of the observed instantaneous Doppler shift rate of change is less than this minimum detection threshold, the probability that it is caused by measurement noise is extremely high, while the probability that it is caused by the motion of a real object is extremely low. The three-fold factor is a commonly used engineering empirical value familiar to those skilled in the art and can be fine-tuned through calibration experiments in specific scenarios, but the principle lies in setting the detection threshold based on the statistical characteristics of the measurement noise.

[0025] S5. Generate process noise intensity based on arrival time jitter sequence, and generate observation noise intensity for each data packet based on motion phase flag; In an optional embodiment, in S5, the process noise intensity is generated based on the arrival time jitter sequence, and the observation noise intensity of each data packet is generated based on the motion phase flag, as follows: Based on the arrival time jitter sequence, the variance of all arrival time jitter values ​​in the arrival time jitter sequence is obtained as the jitter variance; the jitter variance is used as the process noise intensity. The observation noise intensity for each data packet is dynamically generated based on the motion phase flag, as follows: For any data packet, when the value of the motion phase flag corresponding to the data packet is 0, the observation noise intensity is set to the first value; When the value of the motion phase flag corresponding to the data packet is +1 or -1, the observation noise intensity is set to the second value, and the second value is greater than the first value; For clarification, the first and second values ​​are generated in the following manner: Place the IoT device in a stationary state, for example, fixed on a stationary platform. Acquire multiple data packets uploaded by the IoT device while the IoT device is stationary, record the hardware timestamp of each data packet, and obtain the variance of all hardware timestamps, denoted as R1, as the first value. Place the IoT device in a typical motion state, such as simulating human jumping or running. Under the typical motion state of the IoT device, acquire multiple data packets uploaded by the IoT device, record the hardware timestamp of each data packet, obtain the variance of all hardware timestamps and record it as R2, and obtain the ratio of R2 to R1 as the scaling factor; the second value is equal to the first value multiplied by the scaling factor. Since placing IoT devices in typical motion states inevitably introduces additional time-of-arrival jitter, such as additional time-of-arrival jitter caused by increased Doppler frequency shift and instantaneous changes in channel conditions, R2 must be greater than R1, that is, the proportionality coefficient must be greater than 1. S6. Generate the logical arrival time corresponding to each data packet based on the process noise intensity, observation noise intensity, hardware timestamp, and nominal packet sending interval; In an optional embodiment, in S6, the logical arrival time corresponding to each data packet is generated based on the process noise intensity, observation noise intensity, hardware timestamp, and nominal packet transmission interval, as follows: The data packets are processed sequentially according to their arrival order. For the first data packet, the hardware timestamp of the first data packet is used as the corresponding logical arrival time, and the initial value of the rate of change of the logical arrival time is set to 1. As an explanation, since the interval between two adjacent data packets is equal to the nominal packet sending interval in an ideal situation, the rate of change of the logical arrival time is the difference between the corresponding logical arrival times of two adjacent data packets divided by the nominal interval. Setting the initial value of the rate of change of the logical arrival time to 1 means that the initial assumption is that there is no offset.

[0026] For any data packet after the first data packet, treat that data packet as the current data packet and output the logical arrival time of the current data packet in the following manner: Get the logical arrival time and the rate of change of the logical arrival time corresponding to the previous data packet; Multiply the rate of change of the logical arrival time corresponding to the previous data packet by the nominal packet sending interval, and add it to the logical arrival time corresponding to the previous data packet to obtain the predicted time of the current data packet. Obtain the observed noise intensity of the current data packet; Add the observed noise intensity of the current data packet to the process noise intensity to obtain the noise intensity sum; Divide the process noise intensity by the sum of noise intensities to obtain the weighting coefficients; Get the hardware timestamp corresponding to the current data packet; The dynamic correction value is obtained by subtracting the predicted time of the current data packet from the hardware timestamp corresponding to the current data packet, and then multiplying it by a weighting coefficient. The logical arrival time of the current data packet is obtained by adding the predicted time of the current data packet to the dynamic correction value; The unit interval deviation is obtained by subtracting the predicted time of the current data packet from the hardware timestamp corresponding to the current data packet and then dividing by the nominal packet transmission interval. Multiply the unit interval deviation by a weighting factor, and then add it to the rate of change of the logical arrival time corresponding to the previous data packet to obtain the rate of change of the logical arrival time corresponding to the current data packet. Obtain the logical arrival time and the rate of change of logical arrival time for all data packets; S7. Generate an equally spaced resampled data stream based on the logical arrival time of each data packet and the sampled values ​​in the original sensor data stream of each data packet; In an optional embodiment, in S7, based on the logical arrival time corresponding to each data packet and the sampled values ​​in the original sensor data stream of each data packet, an equally spaced resampled data stream is generated, as follows: Using the logical arrival time corresponding to each data packet as the interpolation node, and using the sampled value in the original sensor data stream in each data packet as the node function value, cubic spline interpolation is performed to generate an equally spaced resampled data stream with a time interval equal to the nominal packet sending interval. S8. Input the equally spaced resampled data stream into the NPU for inference processing to obtain the target data processing result; For clarification, NPU refers to a neural network processor. An NPU includes a vector processing unit for performing parallel inference operations on equally spaced resampled data streams. This is prior art and therefore will not be described in detail. For example, equally spaced resampled data streams are fed into the vector processing unit of the NPU, which performs sliding window aggregation calculations in parallel using a single instruction multiple data stream approach and outputs the corresponding target data processing results.

[0027] This application estimates the instantaneous Doppler frequency shift based on the physical layer preamble of the data packets and records the hardware timestamps of the data packets. It generates an arrival time jitter sequence based on the difference in hardware timestamps between adjacent data packets and the nominal packet transmission interval. Based on the time change rate of the instantaneous Doppler frequency shift, it generates a motion phase flag by detecting the zero-crossing point of this time change rate. The motion phase flag dynamically adjusts the observation noise intensity of each data packet, reducing the observation noise intensity when the motion phase flag indicates uniform speed and increasing it when the motion phase flag indicates acceleration or deceleration. By outputting the corrected logical arrival time for each data packet, and using the logical arrival time as an interpolation node, cubic spline interpolation is performed on the sampled values ​​in the original sensor data stream to generate an equally spaced resampled data stream with a time interval equal to the nominal packet transmission interval. This design achieves physical perception and quantification compensation for the disordered arrival time intervals of data packets caused by Doppler jitter, thereby reducing the statistical bias caused by uneven time spans when aggregating based on a fixed time window. It effectively alleviates the temporal distortion problem of false peaks generated by existing NPU edge data stream processing methods in large-scale events with relative crowd movement.

[0028] like Figure 2 The illustrated NPU-based edge data stream acceleration processing system for IoT devices includes: Data acquisition module: obtains the nominal packet transmission interval of IoT devices; obtains multiple data packets uploaded by IoT devices, including physical layer preamble sequences and sampled values ​​from the raw sensor data stream; Instantaneous Doppler frequency shift generation module: processes the physical layer preamble sequence in each data packet to obtain the instantaneous Doppler frequency shift corresponding to each data packet; Arrival Time Jitter Sequence Generation Module: Obtains the hardware timestamp corresponding to each data packet, and generates an arrival time jitter sequence based on the hardware timestamp and the nominal packet transmission interval; Data packet motion phase flag generation module: Generates motion phase flags for each data packet based on the instantaneous Doppler frequency shift; Noise intensity generation module: Generates process noise intensity based on arrival time jitter sequence, and generates observation noise intensity for each data packet based on motion phase flag; Logical arrival time generation module: Generates the logical arrival time corresponding to each data packet based on process noise intensity, observed noise intensity, hardware timestamp and nominal packet sending interval; Equal-interval resampled data stream generation module: Generates an equal-interval resampled data stream based on the logical arrival time of each data packet and the sampled value in the original sensor data stream of each data packet; Target data processing result generation module: Inputs the equally spaced resampled data stream into the NPU for inference processing to obtain the target data processing result.

[0029] For clarification, "acquisition" in this application refers to obtaining the required content or data using existing technical means.

[0030] Furthermore, any content not described in detail in this specification is existing technology known to those skilled in the art.

[0031] In the embodiments provided by this invention, it should be understood that the disclosed system or method can be implemented in other ways. For example, the embodiments of the invention described above are merely illustrative; for instance, the division of modules is only a logical functional division, and there may be other division methods in actual implementation.

[0032] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0033] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated module can be implemented in hardware or in the form of hardware plus software functional modules.

[0034] For those skilled in the art, it is obvious that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the basic characteristics of the present invention.

[0035] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A method for accelerating edge data stream processing in IoT devices based on an NPU, characterized in that, Includes the following steps: S1. Obtain the nominal packet transmission interval of the IoT device; obtain multiple data packets uploaded by the IoT device, including the physical layer preamble sequence and sampled values ​​in the original sensor data stream; S2. Process the physical layer preamble sequence in each data packet to obtain the instantaneous Doppler shift corresponding to each data packet; S3. Obtain the hardware timestamp corresponding to each data packet, and generate an arrival time jitter sequence based on the hardware timestamp and the nominal packet sending interval. S4. Generate the motion phase flag for each data packet based on the instantaneous Doppler frequency shift; S5. Generate process noise intensity based on arrival time jitter sequence, and generate observation noise intensity for each data packet based on motion phase flag; S6. Generate the logical arrival time corresponding to each data packet based on the process noise intensity, observation noise intensity, hardware timestamp, and nominal packet sending interval; S7. Generate an equally spaced resampled data stream based on the logical arrival time of each data packet and the sampled values ​​in the original sensor data stream of each data packet; S8. Input the equally spaced resampled data stream into the NPU for inference processing to obtain the target data processing result.

2. The method for accelerating edge data stream processing of IoT devices based on NPU according to claim 1, characterized in that, In S2, the physical layer preamble sequence in each data packet is processed to obtain the instantaneous Doppler frequency shift corresponding to each data packet, as follows: For any data packet, for the physical layer preamble sequence in the data packet, read the in-phase component value and quadrature component value corresponding to each symbol from the physical layer preamble sequence; for any symbol, take the in-phase component value corresponding to the symbol as the real part and the quadrature component value corresponding to the symbol as the imaginary part, and combine them to form the complex value of the symbol. For any two adjacent symbols in the physical layer preamble sequence, multiply the complex value of the latter symbol by the conjugate of the complex value of the former symbol to obtain the conjugate product. Extract the principal argument of the conjugate product of the two adjacent symbols as the phase difference between the two adjacent symbols; Take two adjacent symbols in the physical layer preamble sequence as adjacent symbol pairs and obtain the total number of all adjacent symbol pairs; The phase difference values ​​of all adjacent symbol pairs are accumulated and then divided by the total number of all adjacent symbol pairs to obtain the average phase difference value. Obtain the time interval between two adjacent symbols in the physical layer preamble sequence; Dividing the average phase difference by the time interval between two adjacent symbols yields the instantaneous Doppler shift of the data packet.

3. The method for accelerating edge data stream processing of IoT devices based on NPU according to claim 1, characterized in that, In S3, the hardware timestamp corresponding to each data packet is obtained, and an arrival time jitter sequence is generated based on the hardware timestamp and the nominal packet transmission interval, as follows: At the moment the data packet is received, a hardware timestamp is generated by the hardware counter at the receiving end, and the hardware timestamp is associated with the data packet to obtain the hardware timestamp of the data packet. For two adjacent data packets, the hardware timestamp of the preceding data packet is subtracted from the hardware timestamp of the following data packet to obtain the hardware timestamp difference. Subtract the nominal packet transmission interval from the hardware timestamp difference to obtain the arrival time jitter value; Obtain all arrival time jitter values ​​and arrange them in chronological order to form an arrival time jitter sequence.

4. The method for accelerating edge data stream processing of IoT devices based on NPU according to claim 1, characterized in that, In S4, a motion phase flag for each data packet is generated based on the instantaneous Doppler frequency shift, as follows: The instantaneous Doppler frequency shift corresponding to each data packet is obtained, and multiple instantaneous Doppler frequency shifts are arranged in chronological order to form an instantaneous Doppler frequency shift sequence; Perform a first-order difference operation on the instantaneous Doppler frequency shift sequence to obtain the instantaneous Doppler frequency shift rate of change sequence; Detect the zero-crossing points in the instantaneous Doppler frequency shift rate sequence, where: When the time rate of change of the zero crossover point changes from negative to positive, a motion phase flag with a value of -1 is generated to indicate that the corresponding data packet is in the motion acceleration phase. When the time change rate of the zero-crossing point changes from a positive value to a negative value, a motion phase flag with a value of +1 is generated to indicate that the corresponding data packet is in the motion deceleration phase. If no zero-crossing point is detected in the instantaneous Doppler frequency shift rate sequence, when the absolute value of the instantaneous Doppler frequency shift rate in the instantaneous Doppler frequency shift rate sequence is less than the minimum detection threshold, a motion phase flag with a value of 0 is generated to indicate that the corresponding data packet is in a uniform or quasi-stationary phase. The minimum detection threshold is equal to three times the root mean square value of the instantaneous Doppler frequency shift measurement noise.

5. The method for accelerating edge data stream processing of IoT devices based on NPU according to claim 4, characterized in that, In S5, the process noise intensity is generated based on the arrival time jitter sequence, and the observation noise intensity of each data packet is generated based on the motion phase flag, as follows: Based on the arrival time jitter sequence, the variance of all arrival time jitter values ​​in the arrival time jitter sequence is obtained as the jitter variance; the jitter variance is used as the process noise intensity. The observation noise intensity for each data packet is dynamically generated based on the motion phase flag, as follows: For any data packet, when the value of the motion phase flag corresponding to the data packet is 0, the observation noise intensity is set to the first value; When the value of the motion phase flag corresponding to the data packet is +1 or -1, the observation noise intensity is set to the second value, and the second value is greater than the first value.

6. The method for accelerating edge data stream processing of IoT devices based on NPU according to claim 5, characterized in that, In S6, the logical arrival time of each data packet is generated based on the process noise intensity, observation noise intensity, hardware timestamp, and nominal packet transmission interval, as follows: The data packets are processed sequentially according to their arrival order. For the first data packet, the hardware timestamp of the first data packet is used as the corresponding logical arrival time, and the initial value of the rate of change of the logical arrival time is set to 1. For any data packet after the first data packet, treat that data packet as the current data packet and output the logical arrival time of the current data packet in the following manner: Get the logical arrival time and the rate of change of the logical arrival time corresponding to the previous data packet; Multiply the rate of change of the logical arrival time corresponding to the previous data packet by the nominal packet transmission interval, and add it to the logical arrival time corresponding to the previous data packet to obtain the predicted time of the current data packet. Obtain the observed noise intensity of the current data packet; Add the observed noise intensity of the current data packet to the process noise intensity to obtain the noise intensity sum; Divide the process noise intensity by the sum of noise intensities to obtain the weighting coefficients; Get the hardware timestamp corresponding to the current data packet; The dynamic correction value is obtained by subtracting the predicted time of the current data packet from the hardware timestamp corresponding to the current data packet, and then multiplying it by a weighting coefficient. The logical arrival time of the current data packet is obtained by adding the predicted time of the current data packet to the dynamic correction value; The unit interval deviation is obtained by subtracting the predicted time of the current data packet from the hardware timestamp corresponding to the current data packet and then dividing by the nominal packet transmission interval. Multiply the unit interval deviation by a weighting factor, and then add it to the rate of change of the logical arrival time corresponding to the previous data packet to obtain the rate of change of the logical arrival time corresponding to the current data packet. Obtain the logical arrival time and the rate of change of logical arrival time for all data packets.

7. The method for accelerating edge data stream processing of IoT devices based on NPU according to claim 6, characterized in that, In S7, based on the logical arrival time of each data packet and the sampled values ​​in the original sensor data stream of each data packet, an equally spaced resampled data stream is generated, as follows: Using the logical arrival time corresponding to each data packet as the interpolation node, and using the sampled value in the original sensor data stream in each data packet as the node function value, cubic spline interpolation is performed to generate an equally spaced resampled data stream with a time interval equal to the nominal packet sending interval.

8. An NPU-based edge data stream acceleration processing system for IoT devices, used in accordance with any one of claims 1 to 7, characterized in that, include: Data acquisition module: Obtains the nominal packet transmission interval of IoT devices; Acquire multiple data packets uploaded by IoT devices, including physical layer preamble sequences and sampled values ​​from the raw sensor data stream; Instantaneous Doppler frequency shift generation module: processes the physical layer preamble sequence in each data packet to obtain the instantaneous Doppler frequency shift corresponding to each data packet; Arrival Time Jitter Sequence Generation Module: Obtains the hardware timestamp corresponding to each data packet, and generates an arrival time jitter sequence based on the hardware timestamp and the nominal packet transmission interval; Data packet motion phase flag generation module: Generates motion phase flags for each data packet based on the instantaneous Doppler frequency shift; Noise intensity generation module: Generates process noise intensity based on arrival time jitter sequence, and generates observation noise intensity for each data packet based on motion phase flag; Logical arrival time generation module: Generates the logical arrival time corresponding to each data packet based on process noise intensity, observed noise intensity, hardware timestamp and nominal packet sending interval; Equal-interval resampled data stream generation module: Generates an equal-interval resampled data stream based on the logical arrival time of each data packet and the sampled value in the original sensor data stream of each data packet; Target data processing result generation module: Inputs the equally spaced resampled data stream into the NPU for inference processing to obtain the target data processing result.