A data processing method of a multi-protocol fusion monitoring terminal based on edge computing

By using automatic identification of port electrical characteristics and timestamp backtracking interpolation technology, the problems of device identification and data timing alignment in multi-protocol fusion monitoring terminals are solved, ensuring high system reliability and device health status monitoring, and realizing continuous visibility of key information and low-cost deployment.

CN122293489APending Publication Date: 2026-06-26LONGKUN (WUXI) SMART TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
LONGKUN (WUXI) SMART TECH CO LTD
Filing Date
2026-03-16
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing multi-protocol fusion monitoring terminals suffer from complexity and reliability issues in device identification, data fusion timing alignment, and device health status monitoring, leading to difficulties in system deployment and maintenance and making it difficult to meet the needs of high-reliability application scenarios.

Method used

The system automatically identifies connected devices by utilizing port electrical characteristics, generates unique identifiers, and achieves high-precision spatiotemporal alignment and fusion of video and sensor data based on timestamp backtracking and interpolation. In the event of link anomalies, an independent control unit ensures alarm display output, while the system also monitors and isolates device health status through port surge current characteristic analysis.

Benefits of technology

It enables accurate device identification in multi-protocol mixed-connection scenarios, improves the system's adaptability and reliability, ensures the continuous visibility of key information, and reduces system deployment and maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122293489A_ABST
    Figure CN122293489A_ABST
Patent Text Reader

Abstract

This invention relates to the field of network protocol technology, specifically to a data processing method for a multi-protocol fusion monitoring terminal based on edge computing. The method includes: acquiring port static level signals and outputting test pulses; calculating the RC time constant; matching communication parameters to generate a port device identifier; based on the exposure time of video frames, backtracking and linearly interpolating in a circular buffer to generate synchronous sensor values; generating a spatiotemporally aligned fusion data stream and uploading it to the main processor; monitoring heartbeat signals sent by the main processor during the transmission of the fusion data stream; if the heartbeat interval exceeds a preset threshold, determining a data transmission link failure, blocking the normal display path of the fusion data stream, and outputting a preset alarm display interface; simultaneously performing data processing and transmission, capturing port surge current waveforms, extracting energy integral characteristic parameters, and comparing them with a benchmark fingerprint; if the device health status is determined to be abnormal, performing port isolation operations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of network protocol technology, specifically to a data processing method for a multi-protocol fusion monitoring terminal based on edge computing. Background Technology

[0002] With the development of edge computing technology, multi-protocol fusion monitoring terminals are widely used in industrial monitoring, security systems, and smart device management. These terminals typically need to simultaneously connect to peripheral devices using multiple communication protocols and process and transmit sensor and video data from different ports in a unified manner. In practical applications, due to differences in electrical characteristics, communication parameters, and data arrival times among devices using different protocols, the identification and configuration of port devices often rely on manual settings or upper-layer communication interactions, increasing the complexity of system deployment and maintenance.

[0003] On the other hand, video data and sensor data are usually acquired independently by different acquisition modules. Differences in sampling frequency and transmission path between the two can easily lead to insufficient time alignment accuracy, thus affecting the analysis and application of fused data. Furthermore, existing monitoring terminals mostly use a main processor as the core for data processing and display output. When the main processor fails or the data transmission link is abnormal, the display and alarm functions often fail completely, making it difficult to meet the requirements of high-reliability application scenarios.

[0004] Meanwhile, port peripherals may experience performance degradation during operation due to aging, abnormal loads, or electrical shocks. Existing technologies have relatively limited means of monitoring the health status of port devices, making it difficult to detect potential fault risks in a timely manner. Therefore, how to achieve automatic identification of multi-protocol devices, spatiotemporal consistency of data fusion, and status monitoring of port devices while ensuring system reliability remains a technical problem that needs to be solved in this field.

[0005] To address this, a data processing method for a multi-protocol fusion monitoring terminal based on edge computing is proposed. Summary of the Invention

[0006] The purpose of this invention is to provide a data processing method for a multi-protocol fusion monitoring terminal based on edge computing. It automatically identifies access devices and generates unique identifiers through port electrical characteristics, achieves high-precision spatiotemporal alignment and fusion of video and sensor data based on timestamp backtracking and interpolation, ensures alarm display output by an independent control unit when the link is abnormal, and realizes device health status monitoring and isolation through port surge current characteristic analysis.

[0007] To achieve the above objectives, the present invention provides the following technical solution: A data processing method for a multi-protocol fusion monitoring terminal based on edge computing includes: Acquire the static level signal of the port and output test pulses. Calculate the RC time constant based on the voltage decay curve and match the communication parameters to generate the port device identifier. Based on the exposure time of the video frame, the synchronous sensor value is generated by backtracking and linear interpolation in the circular buffer. The port device identifier and the synchronous sensor value are embedded into the video bitstream to generate a spatiotemporally aligned fused data stream and upload it to the main processor. During the transmission of the fused data stream, the heartbeat signal sent by the main processor is monitored; if the heartbeat interval exceeds the preset threshold, the data transmission link is determined to be faulty, a soft reset command is sent to the video output unit to block the normal display path of the fused data stream, and the display layer base address pointer is redirected to the physically isolated escape memory area, and a preset alarm display interface is output. While performing data processing and transmission, the system captures the port surge current waveform, extracts energy integral characteristic parameters, and compares them with the benchmark fingerprint. If the device health status is determined to be abnormal, the system performs port isolation operation.

[0008] Preferably, calculating the RC time constant based on the voltage decay curve includes: configuring the port pin to output mode and outputting a test pulse of a preset level; switching the port pin to high impedance input mode after the pulse ends; continuously sampling the port voltage through an analog-to-digital converter to obtain a voltage decay curve data sequence containing multiple sampling points; detecting the sampling time corresponding to when the voltage value decays from the initial value to a preset decay ratio in the voltage decay curve data sequence; and determining the time difference between the sampling time and the pulse end time as the RC time constant.

[0009] Preferably, the generation of the port device identifier includes: attenuating and sampling the port line voltage using a voltage divider circuit located on the line side of the serial transceiver to obtain a voltage-divided level signal; performing level offset processing on the voltage-divided level signal to convert it to the effective positive voltage input range of the analog-to-digital converter; determining the communication protocol type accessed by the port based on the preset interval into which the amplitude of the offset level signal falls; and combining the communication protocol type with the cable impedance characteristics corresponding to the RC time constant, along with the port physical number, to generate a unique port device identifier.

[0010] Preferably, the process of backtracking and linearly interpolating to generate synchronous sensor values ​​in the circular buffer includes: when sensor data arrives at the serial port receiver, reading the current count value of the monotonic clock as a first timestamp, combining the first timestamp with the sensor data value to form a data packet and writing it into the circular buffer; at the start of video frame exposure, reading the current count value of the monotonic clock as a second timestamp; using the second timestamp as the target time, retrieving the nearest data packet with a timestamp less than the target time in the circular buffer as the preceding data point, and retrieving the nearest data packet with a timestamp greater than the target time as the following data point; calculating the first time difference between the target time and the timestamp of the preceding data point, and the second time difference between the timestamp of the following data point and the timestamp of the preceding data point; and weighted summing the sensor data values ​​of the preceding and following data points according to the ratio of the first time difference to the second time difference to obtain the synchronous sensor value corresponding to the video frame exposure time.

[0011] Preferably, generating a spatiotemporally aligned fused data stream includes: encapsulating a port device identifier, a second timestamp, a synchronization sensor value, and a data type identifier to form a sensor data payload; calculating a data integrity check code on the sensor data payload and appending it to the payload tail; inserting a supplementary enhancement information unit containing the sensor data payload and the check code into the frame header of the video stream before the video encoder encodes the current video frame; and outputting an encoded video frame carrying the supplementary enhancement information unit from the video encoder to form a spatiotemporally aligned fused data stream.

[0012] Preferably, determining a data transmission link failure includes: a microcontroller subsystem operating independently of the main processor reads the heartbeat count value updated by the main processor in the shared storage area at a preset period; compares the currently read heartbeat count value with the previous heartbeat count value stored locally; if the heartbeat count value changes, updates the previous heartbeat count value stored locally and resets the timeout counter to zero; if the heartbeat count value does not change, increments the timeout counter; when the accumulated value of the timeout counter reaches a preset number of failure determinations, it is determined that a data transmission link between the main processor and the microcontroller subsystem has failed.

[0013] Preferably, the preset alarm display interface includes: the microcontroller subsystem writes the reset enable value of the video output unit to the soft reset control register of the clock reset unit through an independent peripheral bus channel; after waiting for the clock reset unit to return the reset completion flag, it writes the physical base address of the escape display memory area to the layer configuration register of the video output unit; the escape display memory area pre-stores alarm background image data and bitmap font data; the microcontroller subsystem reads the most recent synchronization sensor value from the fused data stream buffer, uses the bitmap font data to render the alarm text and sensor value to the synthesis buffer of the escape display memory area, forms the alarm display interface, and outputs it to the display device.

[0014] Preferably, capturing the port surge current waveform includes: starting the continuous sampling mode of the analog-to-digital converter at the instant the power switch of the port power supply path is closed; continuously writing the current sampling data output by the analog-to-digital converter into the waveform buffer through direct memory access; stopping the continuous sampling of the analog-to-digital converter after the sampling duration reaches the preset sampling window duration; and reading the complete current sampling data sequence from the waveform buffer as the port surge current waveform data.

[0015] Preferably, determining an abnormal device health status includes: traversing the port surge current waveform data and detecting the maximum value of the current sample as the peak current; detecting the first sampling moment when the current value first rises to half of the peak current and the second sampling moment when the current value first falls to half of the peak current, and calculating the difference between the first sampling moment and the second sampling moment as the half-width at half-maximum (WHM); accumulating the product of each current sample value in the waveform buffer with the supply voltage and the sampling interval to obtain the energy integral value; comparing the peak current, WHM, and energy integral value with the corresponding parameters in the reference fingerprint of the same model of equipment; if the deviation of any parameter from the reference value exceeds the preset tolerance range, the device health status is determined to be abnormal.

[0016] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. This invention uses test pulses to excite the static level signal at the port, calculates the RC time constant based on the voltage decay curve, and determines the communication protocol type by combining the level amplitude range obtained from voltage divider sampling on the line side. It further combines the protocol type, cable impedance characteristics, and port physical number to generate a unique port device identifier. Device identification is achieved using the inherent electrical characteristics of the port and connecting cables, without relying on active device reporting or additional communication interaction. This allows for accurate differentiation of different types of peripherals even in multi-protocol mixed-connection scenarios. This reduces system deployment and subsequent maintenance costs, and improves the adaptability and reliability of multi-protocol fusion monitoring terminals in complex field environments.

[0017] 2. This invention records a first timestamp when sensor data arrives and writes it to a circular buffer, and records a second timestamp at the start of video frame exposure. Using the second timestamp as the target time, it backtracks and retrieves preceding and subsequent sensor data points in the circular buffer, and calculates the synchronous sensor value that precisely corresponds to the video frame exposure time using linear interpolation. Time alignment is performed from the physical exposure time of video imaging, rather than solely based on encoding or transmission time, effectively eliminating uncertain delays caused by caching and scheduling. This ensures that the sensor data embedded in the video stream strictly corresponds to the image content in the time dimension, thereby significantly improving the reliability and practical value of fused data in applications such as event backtracking, situational analysis, and intelligent recognition.

[0018] 3. This invention monitors the main processor's heartbeat signal through an independently operating microcontroller subsystem. Upon determining a data transmission link failure, it performs a soft reset on the video output unit and redirects the display layer's base address to a physically isolated escape memory area. The microcontroller then directly generates and outputs a preset alarm display interface. This decouples the alarm display path from the main processor and the regular video data stream, ensuring that even if the main processor completely fails, the system can still output an alarm interface containing real-time sensor values ​​to the display device via an independent control link, thus guaranteeing the continuous visibility of critical safety information. Attached Figure Description

[0019] Figure 1 A flowchart of a data processing method for a multi-protocol fusion monitoring terminal based on edge computing provided by the present invention; Figure 2 This is a schematic diagram of the synchronous sensor value generation process provided by the present invention; Figure 3 This is a schematic diagram for determining data transmission link failures provided by the present invention. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the invention.

[0021] This embodiment provides a data processing method for a multi-protocol fusion monitoring terminal based on edge computing, applied to a monitoring terminal configured with a high-performance edge computing SoC. The terminal includes a main processor, a microcontroller subsystem, a multi-channel serial port interface module, a video encoding unit, and a video output unit. The main processor adopts a multi-core heterogeneous architecture, including a high-performance core cluster and an energy-efficient core cluster. The microcontroller subsystem operates independently of the main processor and is connected to the clock reset unit through an independent peripheral bus channel.

[0022] Please see Figure 1The technical solution is as follows: Acquire the static level signal of the port and output a test pulse; calculate the RC time constant based on the voltage decay curve; match communication parameters to generate a port device identifier; based on the exposure time of the video frame, backtrack and linearly interpolate in the circular buffer to generate a synchronization sensor value; embed the port device identifier and synchronization sensor value into the video stream to generate a spatiotemporally aligned fused data stream and upload it to the main processor; during the transmission of the fused data stream, monitor the heartbeat signal sent by the main processor; if the heartbeat interval exceeds a preset threshold, determine that the data transmission link is faulty, send a soft reset command to the video output unit, block the normal display path of the fused data stream, redirect the display layer base address pointer to the physically isolated escape memory area, and output a preset alarm display interface; while performing data processing and transmission, capture the port surge current waveform, extract energy integral characteristic parameters and compare them with the benchmark fingerprint; if the device health status is determined to be abnormal, perform port isolation operation.

[0023] When a port device is connected, a port protocol identification process is executed. Specifically, the port's static level signal is acquired, and the port line voltage is attenuated and sampled using a voltage divider circuit located on the serial transceiver's line side. The voltage divider circuit uses high-resistance resistors connected in series to avoid interference with normal communication. Since the static level of the RS232 protocol is a negative voltage, while the static level of the RS485 protocol is a differential positive voltage bias, the communication protocol type of the port connection is determined based on the acquired level amplitude range.

[0024] Further, calculating the RC time constant based on the voltage decay curve includes: configuring the port pin to output mode and outputting a test pulse of a preset level; switching the port pin to high impedance input mode after the pulse ends; continuously sampling the port voltage through an analog-to-digital converter to obtain a voltage decay curve data sequence containing multiple sampling points; detecting the sampling time corresponding to when the voltage value decays from the initial value to a preset decay ratio in the voltage decay curve data sequence; and determining the time difference between the sampling time and the pulse end time as the RC time constant.

[0025] After completing static level acquisition, a test pulse is output to measure the line impedance characteristics. The port pin is configured to output mode and outputs a test pulse with a preset level. After the pulse ends, the port pin is switched to high-impedance input mode. At this time, the line's distributed capacitance discharges through the line resistance, forming a voltage decay curve. The system continuously samples the port voltage through an analog-to-digital converter, recording multiple sampling points during the voltage decay process. When the voltage value decays from the initial value to a preset decay ratio of the initial value (e.g., decaying to approximately one-third of the initial value), the corresponding sampling time is recorded. The time difference between this sampling time and the pulse end time is determined as the RC time constant.

[0026] Furthermore, the generated port device identifier includes: The voltage of the port line is attenuated and sampled by a voltage divider circuit set on the line side of the serial transceiver to obtain the voltage-divided level signal; the voltage-divided level signal is then subjected to level offset processing to convert it into the effective positive voltage input range of the analog-to-digital converter; the communication protocol type of the port is determined according to the preset interval into which the amplitude of the offset level signal falls; the communication protocol type is combined with the cable impedance characteristics corresponding to the RC time constant, and combined with the port physical number to generate a unique port device identifier.

[0027] Based on the magnitude of the RC time constant, the impedance characteristics of the line are determined and corresponding communication parameters are matched. A smaller time constant indicates lower line impedance, suitable for short-distance communication scenarios; a larger time constant indicates higher line impedance, requiring the use of a terminal matching resistor to improve signal integrity. The communication protocol type is combined with the cable impedance characteristics and the port physical number to generate a unique port device identifier. This port device identifier is used for device traceability during subsequent data fusion.

[0028] Because the RS232 protocol specifies a static voltage range of -3V to -15V, the signal level after attenuation by the voltage divider circuit is still a negative voltage. However, the input voltage range of a general analog-to-digital converter is usually from zeroV to the power supply voltage, making it impossible to directly acquire negative voltage signals.

[0029] To address the aforementioned issues, a level offset circuit is incorporated at the output of the voltage divider circuit. This level offset circuit elevates the overall voltage level of the divided signal to within the effective positive input voltage range of the analog-to-digital converter by superimposing a DC bias. Specifically, the level offset circuit comprises a bias voltage source and an adder. The bias voltage source outputs a fixed positive voltage, and the adder adds the divided voltage level to the bias voltage, outputting the offset level signal.

[0030] The amplitude of the offset signal corresponds linearly to the original signal. Based on the preset range into which the offset signal falls, the system infers the polarity and amplitude range of the original signal, thereby determining the type of communication protocol accessed to the port. For example, if the offset signal falls into a low-voltage range, corresponding to an original negative voltage, it is determined to be an RS232 protocol; if the offset signal falls into an intermediate voltage range, corresponding to an original zero voltage or a small positive voltage, it is determined to be an RS485 protocol idle state.

[0031] Furthermore, a synchronous sensor numerical reference is generated by backtracking and linear interpolation within the circular buffer. Figure 2 ,include: When sensor data arrives at the serial port receiver, the current count value of the monotonic clock is read as the first timestamp, and the first timestamp is combined with the sensor data value to form a data packet and written into the circular buffer. At the start of the video frame exposure, the current count value of the monotonic clock is read as the second timestamp; Using the second timestamp as the target time, the nearest data packet with a timestamp less than the target time is retrieved in the circular buffer as the preceding data point, and the nearest data packet with a timestamp greater than the target time is retrieved as the following data point; Calculate the first time difference between the target time and the timestamp of the preceding data point, and the second time difference between the timestamp of the subsequent data point and the timestamp of the preceding data point; Based on the ratio of the first time difference to the second time difference, the sensor data values ​​of the preceding and subsequent data points are weighted and summed to obtain the synchronous sensor value corresponding to the exposure time of the video frame.

[0032] During sensor data acquisition, a dual timestamp mechanism is used to achieve precise synchronization between sensor data and video frames. When sensor data arrives through the serial port receiver, the current count value of the monotonic clock is immediately read as the first timestamp. The monotonic clock is implemented using a hardware timer, whose count value increases monotonically and is not affected by system time adjustments, providing nanosecond-level time accuracy. The first timestamp and the sensor data value are combined to form a data packet and written to a circular buffer.

[0033] The circular buffer is implemented using a fixed-size contiguous memory space, and data is managed through write and read pointers. When the write pointer reaches the end of the buffer, it automatically wraps back to the beginning of the buffer, overwriting the earliest data packet. The capacity of the circular buffer is determined based on the sensor data acquisition frequency and video encoding latency, ensuring that the corresponding sensor data can be retrieved back at the time of video frame encoding.

[0034] At the start of video frame exposure, the video acquisition unit triggers an interrupt and reads the current count value of the monotonic clock as the second timestamp. Due to the multi-frame delay in the video encoding pipeline, when the video encoder processes the current frame, it uses the second timestamp as the target time and performs a backtracking search in the circular buffer. Specifically, the most recent data packet with a timestamp less than the target time is retrieved as the preceding data point, and the most recent data packet with a timestamp greater than the target time is retrieved as the following data point.

[0035] To obtain sensor values ​​that precisely correspond to the exposure time of the video frame, the system employs a linear interpolation method. First, it calculates the first time difference between the target time and the timestamp of the preceding data point, and the second time difference between the timestamp of the subsequent data point and the timestamp of the preceding data point. Then, based on the ratio of the first time difference to the second time difference, it performs a weighted sum of the sensor data values ​​of the preceding and subsequent data points to obtain the synchronized sensor value corresponding to the exposure time of the video frame.

[0036] Furthermore, generating a spatiotemporally aligned fused data stream includes: The port device identifier, the second timestamp, the synchronous sensor value, and the data type identifier are encapsulated to form a sensor data payload; Calculate a data integrity check code for the sensor data payload and append it to the end of the payload; Before the video encoder encodes the current video frame, a supplementary enhancement information unit containing the sensor data payload and check code is inserted into the frame header of the video stream. The video encoder outputs encoded video frames carrying the supplementary enhancement information units, forming a spatiotemporally aligned fused data stream.

[0037] After obtaining the synchronous sensor values, the port device identifier, second timestamp, synchronous sensor values, and data type identifier are encapsulated to form a sensor data payload. To ensure data integrity, a data integrity check code is calculated for the sensor data payload and appended to the end of the payload. Before the video encoder encodes the current video frame, a supplementary enhancement information unit containing the sensor data payload and check code is inserted into the frame header of the video stream. The video encoder outputs the encoded video frame carrying the supplementary enhancement information unit, forming a spatiotemporally aligned fused data stream and uploading it to the main processor.

[0038] The circular buffer is implemented using pre-allocated contiguous memory space, the capacity of which is the product of the packet size and the maximum number of buffers. Each packet contains a timestamp field and a sensor data value field. The timestamp field stores the count value of a monotonic clock, and the sensor data value field stores the sensor sample value at the corresponding moment.

[0039] The circular buffer manages the data write position using a write pointer. When new sensor data arrives, the data packet is written to the position pointed to by the write pointer, and then the write pointer is incremented by the size of one data packet. When the write pointer reaches the end of the buffer, it automatically wraps back to the beginning of the buffer. This wraparound mechanism allows new data to automatically overwrite the oldest data, eliminating the need for explicit deletion operations and improving data management efficiency.

[0040] During backtracking retrieval, the process iterates backward from the current position of the write pointer, comparing the timestamps of each data packet with the target time. When a data packet with a timestamp smaller than the target time is found, it is designated as the preceding data point; the process continues forward, and when a data packet with a timestamp larger than the target time is found, it is designated as the following data point; if the write pointer wraps around during the traversal, the process continues from the end of the buffer backward until a complete retrieval cycle is completed.

[0041] Specifically, the supplementary and enhanced information unit includes a unit type identifier, a payload length field, a unique identifier, sensor data payload, and a data integrity check code.

[0042] The unit type identifier indicates that the unit is a user-defined data type. The payload length field indicates the total length of subsequent data in bytes. The unique identifier uses a globally unique identifier format to distinguish custom data for different applications. The receiving end identifies and parses the sensor data payload defined in this invention based on the unique identifier.

[0043] The sensor data payload includes a port device identifier, a timestamp, a sensor count, and a sensor data array. The port device identifier uniquely identifies the port device from which the data originates. The timestamp records the monotonic clock count value at the exposure time of the video frame. The sensor count indicates the number of sensor data points carried in this frame. The sensor data array stores the synchronization values ​​of each sensor sequentially.

[0044] The data integrity check code is calculated using a cyclic redundancy check algorithm, covering all bytes from the unique identifier to the sensor data array. Before parsing the sensor data payload, the receiving end first verifies the data integrity check code. If the verification fails, the unit is discarded to prevent data corruption due to transmission errors.

[0045] Furthermore, to determine if a data transmission link is faulty, refer to... Figure 3 ,include: The microcontroller subsystem, which runs independently of the main processor, reads the heartbeat count value updated by the main processor in the shared memory area at preset intervals; Compare the currently read heartbeat count with the previous heartbeat count stored locally; If the heartbeat count value changes, update the previous heartbeat count value stored locally and reset the timeout counter to zero; If the heartbeat count remains unchanged, the timeout counter will increment. When the accumulated value of the timeout counter reaches the preset number of fault determinations, it is determined that the data transmission link between the main processor and the microcontroller subsystem has failed.

[0046] Furthermore, the preset alarm display interface includes: The microcontroller subsystem writes the reset enable value of the video output unit to the soft reset control register of the clock reset unit through an independent peripheral bus channel. After waiting for the clock reset unit to return the reset completion flag, write the physical base address of the escape video memory area to the layer configuration register of the video output unit; The escape display memory area pre-stores alarm background image data and bitmap character library data; The microcontroller subsystem reads the most recent synchronous sensor values ​​from the fused data stream cache, uses bitmap font data to render the alarm text and sensor values ​​to the composite buffer of the escape display memory area, forms the alarm display interface, and outputs it to the display device.

[0047] During the transmission of the fused data stream, the microcontroller subsystem monitors the operating status of the main processor in real time. When the main processor is running normally, it writes an incrementing heartbeat count to the shared memory area at preset intervals. The microcontroller subsystem operates independently of the main processor, reading the heartbeat count from the shared memory area at preset intervals and comparing it with the previous heartbeat count stored locally.

[0048] If the heartbeat count changes, it indicates that the main processor is operating normally. The microcontroller subsystem updates the previous heartbeat count in local storage and resets the timeout counter to zero. If the heartbeat count does not change, it indicates that the main processor may be malfunctioning. The microcontroller subsystem increments the timeout counter. When the accumulated value of the timeout counter reaches the preset number of fault determinations, the microcontroller subsystem determines that the data transmission link between the main processor and the microcontroller subsystem has failed.

[0049] After determining a data transmission link failure, the microcontroller subsystem executes an escape display switching procedure. Since the main processor deadlock may occupy main system bus resources, the microcontroller subsystem accesses the clock reset unit through a separate peripheral bus channel. Specifically, the microcontroller subsystem writes the reset enable value of the video output unit to the soft reset control register of the clock reset unit, triggering a soft reset operation of the video output unit. The soft reset operation releases the bus resources occupied by the main processor driver for the video output unit, allowing the microcontroller subsystem to take over control of the video output unit.

[0050] After the clock reset unit returns the reset completion flag, the microcontroller subsystem writes the physical base address of the escape video memory area to the layer configuration register of the video output unit. The escape video memory area is a pre-divided physically isolated memory area, which pre-stores alarm background image data and bitmap font data. The alarm background image uses a high-contrast warning color tone, and the bitmap font contains pixel dot matrix data of numbers and commonly used Chinese characters.

[0051] The microcontroller subsystem reads the most recent synchronous sensor values ​​from the fused data stream cache, and uses bitmap font data to render the alarm text and sensor values ​​to the composite buffer of the escape display memory area. The rendering process adopts a direct pixel writing method, which does not require the support of a graphics processor. After rendering is completed, the video output unit reads the image data from the escape display memory area and outputs it to the display device to form an alarm display interface. The entire escape display switching process is completed in milliseconds, ensuring that the monitoring screen is not interrupted when the main processor fails.

[0052] While performing the aforementioned data processing and transmission, the system continuously monitors the health status of the port devices. When the power switch of the port power supply path is closed, the system initiates the surge current waveform capture process. Specifically, at the instant the power switch is closed, the system activates the continuous sampling mode of the analog-to-digital converter. A current-sensing resistor is connected in series in the port power supply path. When the surge current flows through the current-sensing resistor, a voltage drop is generated, which is amplified by the current-sensing amplifier and then input to the analog-to-digital converter.

[0053] Furthermore, capturing the port surge current waveform includes: At the instant the power switch of the port power supply path is closed, the continuous sampling mode of the analog-to-digital converter is activated; The current sampling data output by the analog-to-digital converter is continuously written into the waveform buffer using direct memory access. When the sampling duration reaches the preset sampling window duration, the continuous sampling of the analog-to-digital converter is stopped; Read the complete current sampling data sequence from the waveform buffer as the port surge current waveform data.

[0054] To achieve high-speed continuous sampling, a direct memory access (DMI) method is used to continuously write the current sampling data output by the analog-to-digital converter (ADC) into the waveform buffer. The DMI controller operates independently of the processor core, enabling data transfer without consuming processor resources. Once the sampling duration reaches the preset sampling window, the ADC stops continuous sampling, and the complete current sampling data sequence is read from the waveform buffer as the port surge current waveform data.

[0055] After obtaining surge current waveform data, multi-dimensional feature parameters are extracted for health status assessment. First, the waveform data is traversed, and the maximum value of the current sample is taken as the peak current. Then, the first sampling moment when the current value first rises to half of the peak current, and the second sampling moment when the current value first drops to half of the peak current, are detected. The difference between the first and second sampling moments is calculated as the full width at half maximum (HWHM). The HWHM reflects the duration of the surge current pulse and is related to the equivalent series resistance of the internal capacitors of the device.

[0056] The energy integral value of the surge process is also calculated. Specifically, the product of each current sample value in the waveform buffer and the supply voltage and sampling interval is accumulated to obtain the energy integral value. The energy integral value reflects the total energy consumed during the equipment startup process and is related to the capacitance and charging state of the internal capacitors of the equipment.

[0057] Further, determining an abnormal device health status includes: traversing the surge current waveform data of the port, detecting the maximum value of the current sample value as the peak current; detecting the first sampling moment when the current value first rises to half of the peak current, and the second sampling moment when the current value first drops to half of the peak current, calculating the difference between the first sampling moment and the second sampling moment as the half-width at half-maximum (WHM); accumulating the product of each current sample value in the waveform buffer with the supply voltage and the sampling interval to obtain the energy integral value; comparing the peak current, WHM, and energy integral value with the corresponding parameters in the reference fingerprint of the same model of equipment; if the deviation of any parameter from the reference value exceeds the preset tolerance range, the device health status is determined to be abnormal.

[0058] The peak current, half-width at half-maximum (HWHM), and energy integral value are compared with the corresponding parameters in the reference fingerprint of the same model of equipment. The reference fingerprint is collected during the initial connection or maintenance calibration of the equipment and stored in the system configuration database. If the deviation of any parameter from the reference value exceeds the preset tolerance range, the equipment is determined to be in an abnormal health state. For example, a significant increase in HWHM may indicate an increase in the equivalent series resistance of the electrolytic capacitors inside the equipment, posing a risk of electrolyte drying and aging; a significant decrease in peak current may indicate a decrease in the capacitance of the capacitors inside the equipment.

[0059] Upon determining that a device's health status is abnormal, a port isolation operation is performed, cutting off the power supply to that port to protect the source of the fused data stream from the faulty device. Simultaneously, the system generates a health status anomaly alarm, which is uploaded to the main processor via the fused data stream for recording and push notifications.

[0060] When determining the health status of equipment, the deviations of three characteristic parameters—peak current, half-width at half-maximum (HWHM), and energy integral value—from the reference values ​​are comprehensively considered. Each characteristic parameter corresponds to an independent tolerance range, which is determined based on the statistical characteristics of equipment of the same model.

[0061] The tolerance range of peak current reflects the normal fluctuation range of the equipment's starting current. If the measured peak current is lower than the reference value minus the lower tolerance limit, it may indicate that the efficiency of the power conversion circuit inside the equipment has decreased or the input capacitor capacity has decayed. If the measured peak current is higher than the reference value plus the upper tolerance limit, it may indicate that there is an abnormal low impedance path inside the equipment.

[0062] The tolerance range of the half-width at half-maximum (WHM) reflects the normal fluctuation range of the surge current pulse duration. The WHM is mainly affected by the equivalent series resistance of the capacitors inside the equipment. As the electrolytic capacitors age, the electrolyte gradually dries up, the equivalent series resistance increases, which leads to an increase in the charging time constant and a corresponding increase in the WHM. If the measured WHM exceeds the reference value plus the upper limit of the tolerance, it is determined that the equipment has a risk of capacitor aging.

[0063] The tolerance range of the energy integral value reflects the normal fluctuation range of the energy consumption during equipment startup; the energy integral value comprehensively reflects the amplitude and duration of the surge current; if the measured energy integral value deviates significantly from the reference value, it may indicate that the operating status of the equipment has changed and further inspection is required.

[0064] A strategy of determining an anomaly by any parameter exceeding its limit can be adopted to improve the sensitivity of fault detection. In practical applications, a strategy of joint determination of multiple parameters can also be adopted according to the equipment type and reliability requirements to reduce the false alarm rate.

[0065] Example 2: This embodiment, based on Embodiment 1, further illustrates the core affinity configuration of the data acquisition task, the real-time scheduling strategy settings, and the data mapping processing of the protocol-driven abstraction layer.

[0066] The monitoring terminal described in this embodiment uses a high-performance edge computing SoC as its main processor. This SoC contains eight processing cores, four of which are high-performance cores and four are energy-efficient cores. The main processor runs a real-time operating system based on the Linux kernel, supporting core affinity configuration and real-time scheduling strategies.

[0067] To address the issue of jitter in the acquisition cycle caused by competition for processor resources between high-frequency acquisition tasks and user interface rendering tasks, the system divides the processing core into functional parts during the initialization phase.

[0068] The data processing method also includes a core affinity configuration for the data acquisition task: The main processor's multiple processing cores are divided into real-time task core clusters and regular task core clusters. The acquisition threads that perform port protocol identification, ring buffer data writing, and surge current waveform capture are bound to the real-time task core cluster through the core affinity interface of the operating system. The regular threads that perform user interface rendering and network data transmission are assigned to the regular task core cluster; By physically isolating the core cluster, the acquisition thread can exclusively use the computing resources of the real-time task core cluster, avoiding competition with regular threads for processor time slices.

[0069] The main processor's eight processing cores are divided into two core clusters; four high-performance cores are divided into a real-time task core cluster, which is dedicated to performing time-sensitive acquisition tasks; and four energy-efficient cores are divided into a regular task core cluster, which is used to perform regular tasks with lower real-time requirements, such as user interface rendering and network data transmission.

[0070] When the data acquisition service starts, the acquisition threads responsible for port protocol identification, ring buffer data writing, and surge current waveform capture are bound to the real-time task core cluster via the core affinity interface provided by the operating system. The core affinity interface allows specified threads to run only on specific processing cores, and the operating system scheduler adheres to this constraint when scheduling tasks.

[0071] Meanwhile, regular threads responsible for user interface rendering and network data transmission are allocated to the regular task core cluster. Since the real-time task core cluster and the regular task core cluster are physically independent, the acquisition threads and regular threads do not compete for time slices on the same processing core. Through this physical isolation configuration of the core clusters, the acquisition threads exclusively utilize the computing resources of the real-time task core cluster, avoiding cache invalidation and scheduling delays caused by task switching, thereby ensuring the stability of the acquisition cycle.

[0072] Building upon the core affinity configuration, a real-time scheduling strategy is further applied to the acquisition threads to achieve higher execution priority and more deterministic scheduling behavior. The core affinity configuration for acquisition tasks also includes real-time scheduling strategy settings: Configure the acquisition thread bound to the real-time task core cluster to a first-in-first-out real-time scheduling strategy; Set a real-time priority value for the acquisition thread that is higher than the system default value; When the acquisition thread starts, the memory locking system interface is called to lock the code segment and data segment of the acquisition thread in physical memory, preventing the operating system from swapping them to external storage space; By combining real-time scheduling strategies and memory locking, the acquisition thread is granted preemptive execution privileges, eliminating execution delays caused by page faults.

[0073] Configure the acquisition threads bound to the real-time task core cluster with a first-in, first-out (FIFO) real-time scheduling strategy. Under this strategy, once an acquisition thread acquires processor resources and begins execution, it will not be forcibly switched to another thread by the operating system unless it voluntarily relinquishes the processor or is preempted by a higher-priority real-time task. This scheduling behavior ensures that the acquisition threads can continuously complete a full acquisition cycle.

[0074] Set a real-time priority value for the acquisition thread that is higher than the system default value to ensure that it receives processor resources before other real-time tasks in the system.

[0075] Furthermore, when the acquisition thread starts, the memory locking system interface is invoked to lock the code and data segments of the acquisition thread in physical memory, preventing the operating system from swapping them to external storage. When the acquisition thread accesses its code or data, a page fault will not be triggered due to the page not being in physical memory, thus eliminating the uncertainty and delay caused by page fault handling.

[0076] By combining real-time scheduling strategies and memory locking, the acquisition thread obtains preemptive execution rights and eliminates execution delays caused by page faults, thus ensuring the hard real-time requirements of the acquisition task.

[0077] After generating the port device identifier, the heterogeneous communication protocols are uniformly managed through the protocol driver abstraction layer. Following the generation of the port device identifier, the data processing method also includes data mapping processing by the protocol driver abstraction layer. Read the protocol type and device metadata of the port device from the configuration database; Select the corresponding protocol parsing module according to the protocol type. The protocol parsing module includes a serial communication protocol parsing module and a network management protocol parsing module. Convert the physical address parameters of the port device into standardized logical data point identifiers, wherein the physical address parameters include slave address, function code, register address or object identifier node; Establish a bidirectional mapping table between logical data point identifiers and physical address parameters; During data acquisition, the bidirectional mapping table is queried based on the logical data point identifier to obtain the corresponding physical address parameters, and the corresponding protocol parsing module is called to generate a data request message that conforms to the target protocol format.

[0078] During the protocol initialization phase, the protocol type and device metadata of the port device are read from the configuration database. The protocol type indicates the communication protocol used by the port device, and the device metadata contains the device's communication parameters and data point definitions.

[0079] Select the corresponding protocol parsing module based on the protocol type. The protocol parsing modules include a serial communication protocol parsing module and a network management protocol parsing module. The serial communication protocol parsing module handles serial communication-based protocols and can parse slave addresses, function codes, and register addresses. The network management protocol parsing module handles network communication-based management protocols and can parse object identifier nodes.

[0080] The protocol-driven abstraction layer converts the physical address parameters of port devices into standardized logical data point identifiers. The physical address parameters have different forms depending on the protocol type: for serial communication protocols, physical address parameters include slave address, function code, and register address; for network management protocols, physical address parameters include an object identifier node. Logical data point identifiers use a unified naming convention and consist of device type, data point name, and port number.

[0081] Establish a bidirectional mapping table between logical data point identifiers and physical address parameters; forward mapping supports querying the corresponding physical address parameter based on the logical data point identifier; reverse mapping supports querying the corresponding logical data point identifier based on the physical address parameter.

[0082] During data acquisition, the upper-layer business module initiates an acquisition request using a logical data point identifier. The protocol-driven abstraction layer queries the bidirectional mapping table based on the logical data point identifier to obtain the corresponding physical address parameters and protocol type, and then calls the corresponding protocol parsing module to generate a data request message conforming to the target protocol format.

[0083] By using protocol-driven data mapping processing in the abstract layer, upper-layer business modules do not need to concern themselves with the specific differences in the underlying communication protocols. When support for a new communication protocol is required, only the corresponding protocol parsing module and mapping rules need to be added, without modifying the upper-layer business logic, thus improving the system's protocol scalability and maintainability.

[0084] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A data processing method for a multi-protocol fusion monitoring terminal based on edge computing, characterized in that, include: Acquire the static level signal of the port and output test pulses. Calculate the RC time constant based on the voltage decay curve and match the communication parameters to generate the port device identifier. Based on the exposure time of the video frame, the synchronous sensor value is generated by backtracking and linear interpolation in the circular buffer. The port device identifier and the synchronous sensor value are embedded into the video bitstream to generate a spatiotemporally aligned fused data stream and upload it to the main processor. During the transmission of the fused data stream, the heartbeat signal sent by the main processor is monitored; If the heartbeat interval exceeds a preset threshold, a data transmission link failure is determined, a soft reset command is sent to the video output unit to block the normal display path of the fused data stream, and the display layer base address pointer is redirected to the physically isolated escape memory area, and a preset alarm display interface is output. While performing data processing and transmission, the system captures the port surge current waveform, extracts energy integral characteristic parameters, and compares them with the benchmark fingerprint. If the device health status is determined to be abnormal, the system performs port isolation operation.

2. The data processing method for a multi-protocol fusion monitoring terminal based on edge computing according to claim 1, characterized in that, Calculating the RC time constant based on the voltage decay curve includes: configuring the port pin to output mode and outputting a test pulse of a preset level; switching the port pin to high impedance input mode after the pulse ends; continuously sampling the port voltage through an analog-to-digital converter to obtain a voltage decay curve data sequence containing multiple sampling points; detecting the sampling time corresponding to when the voltage value decays from the initial value to a preset decay ratio in the voltage decay curve data sequence; and determining the time difference between the sampling time and the pulse end time as the RC time constant.

3. The data processing method for a multi-protocol fusion monitoring terminal based on edge computing according to claim 1, characterized in that, The process of generating a port device identifier includes: attenuating and sampling the port line voltage using a voltage divider circuit located on the line side of the serial transceiver to obtain a voltage-divided level signal; performing level offset processing on the voltage-divided level signal to convert it to the effective positive voltage input range of the analog-to-digital converter; determining the communication protocol type accessed by the port based on the preset interval into which the amplitude of the offset level signal falls; and combining the communication protocol type with the cable impedance characteristics corresponding to the RC time constant, along with the port physical number, to generate a unique port device identifier.

4. The data processing method for a multi-protocol fusion monitoring terminal based on edge computing according to claim 1, characterized in that, The process of backtracking and linearly interpolating to generate synchronous sensor values ​​in a circular buffer includes: when sensor data arrives at the serial port receiver, reading the current count value of the monotonic clock as the first timestamp, combining the first timestamp with the sensor data value to form a data packet and writing it into the circular buffer; at the start of video frame exposure, reading the current count value of the monotonic clock as the second timestamp; using the second timestamp as the target time, searching the circular buffer for the nearest data packet with a timestamp less than the target time as the preceding data point, and searching for the nearest data packet with a timestamp greater than the target time as the following data point; calculating the first time difference between the target time and the timestamp of the preceding data point, and the second time difference between the timestamp of the following data point and the timestamp of the preceding data point; and weighted summing the sensor data values ​​of the preceding and following data points according to the ratio of the first time difference to the second time difference to obtain the synchronous sensor value corresponding to the video frame exposure time.

5. The data processing method for a multi-protocol fusion monitoring terminal based on edge computing according to claim 1, characterized in that, The process of generating a spatiotemporally aligned fused data stream includes: encapsulating a port device identifier, a second timestamp, synchronous sensor values, and a data type identifier to form a sensor data payload; calculating a data integrity check code on the sensor data payload and appending it to the payload tail; inserting a supplementary enhancement information unit containing the sensor data payload and the check code into the frame header of the video stream before the video encoder encodes the current video frame; and outputting an encoded video frame carrying the supplementary enhancement information unit from the video encoder to form a spatiotemporally aligned fused data stream.

6. The data processing method for a multi-protocol fusion monitoring terminal based on edge computing according to claim 1, characterized in that, Determining a data transmission link failure involves: a microcontroller subsystem operating independently of the main processor reading the heartbeat count value updated by the main processor in the shared storage area at preset intervals; comparing the currently read heartbeat count value with the previous heartbeat count value stored locally; if the heartbeat count value has changed, updating the previous heartbeat count value stored locally and resetting the timeout counter to zero; if the heartbeat count value has not changed, incrementing the timeout counter; and determining that the data transmission link between the main processor and the microcontroller subsystem has failed when the accumulated value of the timeout counter reaches a preset number of failure determinations.

7. The data processing method for a multi-protocol fusion monitoring terminal based on edge computing according to claim 1, characterized in that, The preset alarm display interface includes: the microcontroller subsystem writes the reset enable value of the video output unit to the soft reset control register of the clock reset unit through an independent peripheral bus channel; after waiting for the clock reset unit to return the reset completion flag, it writes the physical base address of the escape display memory area to the layer configuration register of the video output unit; the escape display memory area pre-stores alarm background image data and bitmap font data; the microcontroller subsystem reads the most recent synchronization sensor value from the fused data stream buffer, uses the bitmap font data to render the alarm text and sensor value to the synthesis buffer of the escape display memory area, forms the alarm display interface, and outputs it to the display device.

8. The data processing method for a multi-protocol fusion monitoring terminal based on edge computing according to claim 1, characterized in that, Capturing the port surge current waveform includes: starting the continuous sampling mode of the analog-to-digital converter at the instant the power switch of the port power supply path is closed; continuously writing the current sampling data output by the analog-to-digital converter into the waveform buffer through direct memory access; stopping the continuous sampling of the analog-to-digital converter after the sampling duration reaches the preset sampling window duration; and reading the complete current sampling data sequence from the waveform buffer as the port surge current waveform data.

9. The data processing method for a multi-protocol fusion monitoring terminal based on edge computing according to claim 1, characterized in that, Determining abnormal equipment health status includes: traversing the port surge current waveform data and detecting the maximum value of the current sample as the peak current; detecting the first sampling moment when the current value first rises to half of the peak current and the second sampling moment when the current value first drops to half of the peak current, and calculating the difference between the first and second sampling moments as the half-width at half-maximum (WHM); accumulating the product of each current sample value in the waveform buffer with the supply voltage and sampling interval to obtain the energy integral value; comparing the peak current, WHM, and energy integral value with the corresponding parameters in the reference fingerprint of the same model of equipment; if the deviation of any parameter from the reference value exceeds the preset tolerance range, the equipment health status is determined to be abnormal.