Search

CN-122027655-A - Multi-port data acquisition method

CN122027655ACN 122027655 ACN122027655 ACN 122027655ACN-122027655-A

Abstract

The invention provides a multi-port data acquisition method, which is characterized in that a port configuration table of an adaptive access device is dynamically acquired, independent different-frequency oversampling is carried out on a plurality of physical ports through the port configuration table, physical layer parameters of each physical port are synchronously acquired, the physical layer parameters and sampling time stamps are integrated into physical layer labels, the physical layer labels are added to corresponding sampling data, an original heterogeneous data stream carrying the physical layer labels is generated, the original heterogeneous data stream is analyzed, the sampling time stamps and the transmission delay parameters of each port data are extracted, multiple paths of asynchronous data are mapped to a unified time domain grid, synchronous data frames with strictly aligned time axes are generated, layered entropy coding compression is carried out on the synchronous data frames according to a preset dynamically updated feature library, an acquisition data packet is generated, and the problems that multiple paths of heterogeneous data are asynchronous in time sequence and stiff in port configuration and data abnormality cannot be traced are solved through the multi-port data acquisition method.

Inventors

  • CAI LI
  • JIA JINHONG

Assignees

  • 上海创客科技有限公司

Dates

Publication Date
20260512
Application Date
20260314

Claims (8)

  1. 1. The multi-port data acquisition method is characterized by comprising the following steps of: Dynamically acquiring a port configuration table of the adaptive access equipment, wherein the port configuration table is expressed as acquisition frequency, communication protocol, acquisition precision and signal conditioning mode parameters of a plurality of physical ports; Based on a port configuration table, performing independent different-frequency oversampling on a plurality of physical ports, synchronously acquiring physical layer parameters of each physical port, integrating the physical layer parameters and the sampling time stamp into physical layer labels, and attaching the physical layer labels to corresponding sampling data to generate an original heterogeneous data stream carrying the physical layer labels; Analyzing the original heterogeneous data stream, extracting sampling time stamps and transmission delay parameters of each port data, mapping multiple paths of asynchronous data to a unified time domain grid through time sequence calibration and linear interpolation normalization, and generating synchronous data frames with strictly aligned time axes; based on a preset dynamically updated feature library, carrying out hierarchical entropy coding compression on the synchronous data frames to generate an acquisition data packet; Writing the collected data packet into a high-speed annular buffer area for caching, calculating the data fingerprint of the collected data packet by adopting a hash algorithm, establishing a bidirectional mapping index of the data fingerprint and the real-time state of the physical port of the current collection period, and storing index information into a nonvolatile memory.
  2. 2. The method for multi-port data acquisition according to claim 1, wherein dynamically obtaining the port configuration table of the adaptive access device comprises: The method comprises the steps of monitoring a hot plug identification signal and a port level change signal of each physical port in real time, and automatically identifying the type of access equipment through a level combination of port ID identification pins and an equipment protocol handshake message; and according to the identified type of the access equipment, automatically matching a protocol stack library pre-stored in the system with corresponding driving parameters, dynamically loading an adapted physical layer analysis protocol, a data link layer analysis protocol and acquisition control parameters, and generating a dynamic port configuration table in real time.
  3. 3. The method for multi-port data acquisition according to claim 1, wherein independent different frequency oversampling is performed on a plurality of physical ports based on a port configuration table, physical layer state parameters of each physical port are synchronously acquired, the physical layer state parameters and a sampling time stamp are integrated into physical layer labels, and are added to corresponding sampling data, and an original heterogeneous data stream carrying the physical layer labels is generated, and the method comprises: independently distributing exclusive Direct Memory Access (DMA) channels for each physical port; taking integer times of standard communication baud rate of the corresponding physical port access equipment as the sampling frequency of the port, and carrying out oversampling treatment on the physical layer signal to obtain physical layer state parameters; And integrating and packaging the physical layer parameters and the nanosecond sampling time stamp into a physical layer label, and attaching the physical layer label to the head of a corresponding sampling data block as a data frame head to form a marked data unit so as to generate an original heterogeneous data stream carrying the physical layer label.
  4. 4. A method of multiport data acquisition as in claim 3, further comprising: in the sampling process, the port carrier state, the signal amplitude, the signal to noise ratio and the signal attenuation degree parameters are monitored in real time through the ADC acquisition module and the signal detection circuit and integrated into physical layer state parameters.
  5. 5. The method for multi-port data acquisition according to claim 1, wherein analyzing an original heterogeneous data stream, extracting a sampling time stamp and a transmission delay parameter of each port data, mapping multiple paths of asynchronous data to a unified time domain grid through time sequence calibration and linear interpolation normalization, and generating a synchronous data frame with strictly aligned time axes, comprises: Analyzing an additional physical layer tag in an original heterogeneous data stream by taking a built-in high-precision RTC clock of the system as a unified common time reference, and extracting an original sampling time stamp and a link transmission delay parameter of each port data; calibrating and mapping multipath asynchronously-arrived heterogeneous data into uniformly divided time domain grids through a linear interpolation algorithm and time sequence offset calibration; and synchronously detecting and removing repeated sampling frames, check error frames and redundant filling information in the data stream to generate synchronous data frames with complete alignment and no time sequence deviation of multiple paths of data on a time axis.
  6. 6. The method of claim 1, wherein performing hierarchical entropy encoding compression on the synchronization data frames based on a preset dynamically updated feature library to generate the acquisition data packet comprises: pre-constructing a dynamic feature library containing industrial conventional data modes, bus message standard formats and periodic sensing data features; matching and matching the synchronous data frames field by field with standard data modes in the feature library, and performing data lossless compression based on a double compression strategy to generate a standardized acquisition data packet.
  7. 7. The method of multi-port data acquisition of claim 6 wherein the dual compression strategy comprises: If the data pattern is matched with the feature library, the original data is replaced by the corresponding feature index value to realize compression; if the feature library is not hit, the random heterogeneous data is judged, and run-length encoding compression is carried out.
  8. 8. The method for multi-port data collection according to claim 1, wherein writing collected data packets into a high-speed ring buffer for buffering, calculating data fingerprints of the collected data packets by using a hash algorithm, establishing a bidirectional mapping index of the data fingerprints and a real-time state of a physical port of a current collection period, and storing index information into a nonvolatile memory, comprising: writing the acquired data packet into a high-speed SDRAM annular buffer area for real-time data caching; calculating a unique hash value of the acquired data packet by adopting an MD5 hash algorithm, and taking the unique hash value as a data fingerprint of the corresponding data packet; The data fingerprint is associated and bound with real-time state data of a physical port in a current acquisition period, wherein the real-time state of the physical port comprises port temperature, power supply voltage, link signal-to-noise ratio, port interruption times and signal interference value; And storing the two-way mapping index information after binding to a nonvolatile Flash memory, so that the acquired data corresponds to the port state one by one.

Description

Multi-port data acquisition method Technical Field The invention relates to the technical field of data acquisition, in particular to a multi-port data acquisition method. Background The existing multiport data acquisition technology mostly only uses basic hardware channels or single protocol adaptation as acquisition basis, transmission characteristics of multiport heterogeneous data in an industrial scene are not fully considered, the differential characteristics of conventional acquisition data, abnormal interference data and periodic sensing data are not distinguished, multi-channel data dislocation and effective information deviation are caused by time sequence calibration missing in the acquisition and preprocessing process, scene suitability is poor and operation and maintenance are complicated due to configuration and solidification, or abnormality cannot be traced due to disconnection of data and port states, and high-precision and high-reliability industrial acquisition requirements are difficult to meet. Therefore, a multi-port data acquisition method suitable for industrial multi-scenario is needed to solve the problems of asynchronous multi-path heterogeneous data time sequence, stiff port configuration and incapability of tracing data abnormality. Disclosure of Invention In view of the above-mentioned problems, in combination with the first aspect of the present invention, an embodiment of the present invention provides a multi-port data acquisition method, including: Dynamically acquiring a port configuration table of the adaptive access equipment, wherein the port configuration table is expressed as acquisition frequency, communication protocol, acquisition precision and signal conditioning mode parameters of a plurality of physical ports; Based on a port configuration table, performing independent different-frequency oversampling on a plurality of physical ports, synchronously acquiring physical layer parameters of each physical port, integrating the physical layer parameters and the sampling time stamp into physical layer labels, and attaching the physical layer labels to corresponding sampling data to generate an original heterogeneous data stream carrying the physical layer labels; Analyzing the original heterogeneous data stream, extracting sampling time stamps and transmission delay parameters of each port data, mapping multiple paths of asynchronous data to a unified time domain grid through time sequence calibration and linear interpolation normalization, and generating synchronous data frames with strictly aligned time axes; based on a preset dynamically updated feature library, carrying out hierarchical entropy coding compression on the synchronous data frames to generate an acquisition data packet; Writing the collected data packet into a high-speed annular buffer area for caching, calculating the data fingerprint of the collected data packet by adopting a hash algorithm, establishing a bidirectional mapping index of the data fingerprint and the real-time state of the physical port of the current collection period, and storing index information into a nonvolatile memory. As a further aspect of the present invention, dynamically obtaining a port configuration table of an adaptive access device includes: The method comprises the steps of monitoring a hot plug identification signal and a port level change signal of each physical port in real time, and automatically identifying the type of access equipment through a level combination of port ID identification pins and an equipment protocol handshake message; and according to the identified type of the access equipment, automatically matching a protocol stack library pre-stored in the system with corresponding driving parameters, dynamically loading an adapted physical layer analysis protocol, a data link layer analysis protocol and acquisition control parameters, and generating a dynamic port configuration table in real time. As a further aspect of the present invention, based on a port configuration table, performing independent different frequency oversampling on a plurality of physical ports, synchronously collecting physical layer parameters of each physical port, integrating the physical layer parameters and a sampling timestamp into physical layer labels, and attaching the physical layer labels to corresponding sampling data, generating an original heterogeneous data stream carrying the physical layer labels, including: independently distributing exclusive Direct Memory Access (DMA) channels for each physical port; taking integer times of standard communication baud rate of the corresponding physical port access equipment as the sampling frequency of the port, and carrying out oversampling treatment on the physical layer signal to obtain physical layer state parameters; And integrating and packaging the physical layer parameters and the nanosecond sampling time stamp into a physical layer label, and attaching the physical layer