Determination transmission method for multi-source safety monitoring in coal mine underground based on TSN private network
Patent Information
- Application Number
- CN202611147889.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-30
- Publication Date
- 2026-10-23
AI Technical Summary
为满足高优先级安全数据的低延迟与高可靠性传输需求,基于TSN的确定性通信成为主流方向;然而,受井下布设不均、电磁干扰强、网络拓扑复杂等影响,传统TSN机制难以长期维持各采集设备本地时钟与主TSN时钟的高精度同步,进而导致周期调度误触发、帧冲突或排队时延漂移,影响关键安全数据的及时响应
本发明在TSN专网中引入采集设备本地时钟—主TSN时钟时间误差序列获取与漂移建模机制,利用卡尔曼滤波预测时钟漂移趋势并以漂移方差作为稳定性度量,由TSN域控制器生成包含各时隙时间稳定性等级标签的融合漂移容差时间帧;基于该时间帧,本发明在调度周期到达前对窗口—设备进行适配评估,识别失配窗口并进行起始偏移量修正,使已分配传输窗口避开设备漂移峰值区间,同时保持窗口长度不变并通过门控列表更新落地实施;由此实现漂移风险可量化、时隙稳定性可标注、窗口配置可自适应修正的闭环调度机制,能够在主时钟漂移与井下复杂电磁环境下,降低窗口冲突与排队抖动引入的不确定性,提升高优先级监测业务在TSN网络中的确定性转发可靠性与时延可控性。
Smart Images

Figure CN122969699A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of deterministic transmission technology, and in particular to a deterministic transmission method for multi-source safety monitoring in coal mines based on a TSN private network. Background Technology
[0002] In high-risk working environments such as underground coal mines, distributed sensor nodes need to collect multi-source monitoring information in real time, including gas concentration, temperature and humidity, equipment vibration, and power status, and transmit it back uniformly via industrial Ethernet. To meet the requirements of low-latency and high-reliability transmission of high-priority safety data, deterministic communication based on TSN has become the mainstream approach. However, due to uneven deployment underground, strong electromagnetic interference, and complex network topology, traditional TSN mechanisms struggle to maintain high-precision synchronization between the local clocks of each acquisition device and the master TSN clock over long periods. This leads to erroneous triggering of periodic scheduling, frame conflicts, or queuing delay drift, affecting the timely response to critical safety data.
[0003] On the other hand, when signs of an accident appear in the mine, the safety situation is often accompanied by the sudden synchronous reporting of data from multiple heterogeneous devices. These sudden data streams usually arrive in a concentrated manner within a very short time window, which can easily form a chain congestion effect and pose a serious challenge to TSN scheduling. Existing solutions are mostly based on static priority scheduling and lack the ability to identify and disperse the spatial-temporal-behavioral correlation patterns between sudden frames, and cannot effectively avoid high-density time slot competition. Summary of the Invention
[0004] This invention provides a deterministic transmission method for multi-source safety monitoring in coal mines based on TSN private networks. It can achieve highly reliable, conflict-free, and hierarchical forwarding of critical safety monitoring data in coal mines under drift interference and sudden loads by using a time-division tagging mechanism based on stability level of clock drift perception, a burst frame decentralization and shaping mechanism driven by spatial correlation, and a transmission window dynamic adjustment mechanism based on mismatch identification and drift avoidance.
[0005] A deterministic transmission method for multi-source safety monitoring in coal mines based on TSN private networks includes the following steps: S1: Obtain the time error sequence between the local clocks of multiple acquisition devices deployed underground and the main TSN clock, and perform clock drift modeling for each acquisition device; the TSN domain controller generates a fused drift tolerance time frame for each acquisition device based on the error distribution; the fused drift tolerance time frame includes a time stability level label for each time slot in the future scheduling cycle; S2: Collect real-time data frame streams reported by downhole monitoring nodes. Based on the frame arrival interval and historical flow baseline, identify monitoring data frames with burst attributes as candidate burst frames. Perform spatial association rule mining based on device ID and timestamp on the candidate burst frames. Mark the candidate burst frames within the same time window, from different devices, and with similar historical triggering patterns as a set of associated burst frames. Perform time window decentralized shaping on the set of associated burst frames according to the fused drift tolerance time frame to generate a shaped burst queue structure. S3: Before the current scheduling cycle arrives, the TSN domain controller dynamically adjusts the starting offset and frame selection order of the allocated TSN transmission windows according to the fused drift tolerance time frame and the shaping burst queue structure; for windows with a time stability level lower than the set stability threshold, priority channel switching is performed, and high-priority data is mapped to the backup scheduling channel or compensation time slot, so as to realize the collision-free deterministic forwarding of high-priority monitoring frames in coal mines under the condition of master clock drift.
[0006] Optionally, the time window decentralization shaping specifically includes: according to the time stability level label of each time slot in the fused drift tolerance time frame, splitting the candidate burst frames with high spatial correlation according to priority and time sensitivity threshold, allocating them to non-overlapping sub-time window queues within the same scheduling period, and generating a shaping burst queue structure for the next scheduling period.
[0007] Optionally, S1 specifically includes: S11: Collect IEEE 1588 synchronization messages reported by each acquisition device at fixed intervals, extract time error values, and form a time error sequence; S12: Based on the time error sequence, the clock drift curve of each acquisition device is constructed using the Kalman filter method, and the clock error change trend in the next scheduling cycle is predicted; the clock drift variance of each acquisition device is calculated based on the fluctuation amplitude of the historical error sequence as a time stability metric. S13: Divide the scheduling cycle into multiple time slots of equal or variable length. For all devices to be scheduled in each time slot, calculate the comprehensive clock instability risk coefficient of the time slot by weighting the predicted clock drift value and the drift variance. Divide the time slot into multiple time stability levels according to the comprehensive clock instability risk coefficient and generate corresponding time stability level labels.
[0008] Optionally, the fusion drift tolerance time frame includes the start time, duration, assigned candidate device set, and time stability level label for each time slot.
[0009] Optionally, the Kalman filtering method for constructing the clock drift curves of each acquisition device specifically includes: The clock offset state of the acquisition device is constructed into a state vector including time error and drift rate, which is used to describe the dynamic change process of the device's local clock relative to the master clock; Based on the linear dynamic assumption, a transition model for clock drift state is constructed, process noise is introduced to describe the inherent uncertainty of the system, and future states are predicted. The time error collected by the equipment during the synchronization period is used as the observation. An observation model is constructed and observation noise is introduced to establish a mapping relationship between the observation value and the state. Based on the statistical results of historical error data, the covariance parameter of process noise and observation noise is set to control the sensitivity of the filtering model to drift changes and measurement errors. At each synchronization moment, two sub-steps are executed: state prediction and state update. The current state and covariance are predicted based on the previous state estimate, the state is corrected by combining the current observation, and the current clock drift estimate is dynamically output. After each round of filtering calculations, the current time error estimate and drift velocity prediction index are output.
[0010] Optionally, S2 specifically includes: S21: Capture the data frames reported by each monitoring node using a sliding time window method, record the arrival timestamp and device ID of each frame, and construct a real-time traffic feature vector; S22: Establish a historical traffic baseline model for each monitoring node. The historical traffic baseline model includes the average frame arrival interval and standard deviation of the monitoring node within the historical synchronous window. Compare the interval between the current arrival frame and the previous frame with the baseline model. Frames that meet the set conditions are marked as candidate burst frames. S23: Set the length of the association mining time window, traverse all candidate burst frames within the association mining time window; use device ID as itemset element and timestamp alignment degree as association metric, and use the frequent itemset mining algorithm to extract device combinations whose co-occurrence frequency exceeds the support threshold; calculate the historical trigger time phase difference of each candidate burst frame in the same combination; if the historical trigger time phase difference is lower than the similarity threshold, it is determined that the historical triggering patterns are similar, and all candidate burst frames in the combination are marked as an associated burst frame set; S24: Read the time stability level label of each time slot in the fusion drift tolerance time frame, sort the frames in the same associated burst frame set according to the stability level of the target time slot, and prioritize the allocation of time slots with high stability levels; apply time offsets to the remaining frames in sequence to perform offset adjustment; repackage the associated burst frames after offset adjustment into a shaped burst queue structure, the shaped burst queue structure including frame identifier, shaped scheduling time, original associated set identifier and time stability level adaptation identifier.
[0011] Optionally, the frequent itemset mining algorithm specifically includes: Within the set association mining time window, the identified candidate burst frames are merged in time, and all device identifiers that report candidate burst frames within the same time window are combined into a transaction item set. Through the sliding time window mechanism, the transaction item sets formed in multiple time windows are aggregated to build a transaction database. Based on the transaction database, the frequency of each device identifier in all transactions is counted, and device identifiers that do not meet the minimum support requirement are filtered out to obtain an initial frequent itemset. Using a bottom-up iterative approach, the retained initial frequent itemsets are combined and expanded to generate higher-order candidate device combinations. The co-occurrence frequency of each candidate combination in the transaction database is counted, and device combinations that meet the minimum support condition are retained. If no new device combination that meets the condition is generated at a certain order, the iteration process is terminated. All frequent items obtained from each level of screening are combined to form a frequent device combination set; each device combination in the frequent device combination set represents a set of monitoring nodes that repeatedly co-occur within multiple associated mining time windows.
[0012] Optionally, S3 specifically includes: At the preset decision time point before the current scheduling cycle arrives, the TSN domain controller reads the fusion drift tolerance time frame of the next scheduling cycle, extracts the time stability level label of each time slot and the transmission window information allocated to each time slot; at the same time, it reads the shaping burst queue structure to obtain the target time slot requirement and priority identifier of the frame to be scheduled after decentralized shaping. The clock drift prediction value of the acquisition device set currently bound to the window is matched with the time stability level of the time slot where the window is located. If the device drift variance exceeds the upper limit of the tolerance corresponding to the stability level of the time slot where the window is located, it is determined to be a window-device mismatch and the window adjustment is triggered.
[0013] Optionally, the dynamic adjustment of the starting offset and frame selection order of the allocated TSN transmission window includes: For transmission windows that are determined to be mismatched, keep the window length unchanged, calculate the starting offset correction value that makes the window avoid the peak range of device clock drift, and update the opening time of the corresponding window. When there are multiple frames to be scheduled in the same time slot, the frame selection order is dynamically adjusted according to the frame priority, the remaining time of the delay budget, and the time slot stability level, and the frame with the highest stability level requirement is scheduled to be sent at the front of the window.
[0014] Optionally, performing priority channel switching for windows with a time stability level lower than a set stability threshold includes: At least one backup scheduling channel and a compensation time slot pool are pre-configured. The backup scheduling channel is a redundant path independent of the main TSN transmission link, and the compensation time slot pool is a reserved flexible time slot resource that is not occupied by periodic scheduling. When the time stability level of the time slot where the transmission window is located is lower than the set stability threshold, and the transmission window includes high-priority monitoring frames, the TSN domain controller triggers a channel switching decision. The channel switching decision includes stripping the high-priority monitoring frames from the current low-stability window and remapping them to the backup scheduling channel. After the mapping is completed, the flow reservation table and gating schedule table in the TSN domain controller are updated synchronously. When the synchronization deviation exceeds the limit due to the drift of the main TSN clock, the high-priority monitoring frames in the original window are carried by the backup channel or the compensation time slot, so as to realize the collision-free deterministic forwarding of high-priority monitoring frames in coal mines under the condition of main clock drift.
[0015] The beneficial effects of this invention are: This invention introduces a mechanism for acquiring and modeling the time error sequence between the local clock of the acquisition device and the main TSN clock in a TSN private network. It utilizes Kalman filtering to predict clock drift trends and uses drift variance as a stability metric. The TSN domain controller generates a fused drift tolerance time frame containing time stability level labels for each time slot. Based on this time frame, the invention performs a window-device adaptation assessment before the scheduling cycle arrives, identifies mismatched windows, and corrects the initial offset to ensure that the allocated transmission windows avoid the device drift peak range. Simultaneously, it maintains the window length and updates the implementation through a gating list. This achieves a closed-loop scheduling mechanism where drift risk is quantifiable, time slot stability is labelable, and window configuration is adaptively correctable. This reduces the uncertainty introduced by window conflicts and queuing jitter in the context of main clock drift and complex electromagnetic environments underground, improving the deterministic forwarding reliability and latency controllability of high-priority monitoring services in the TSN network.
[0016] This invention addresses the issue of multiple monitoring nodes in downhole systems frequently reporting simultaneous bursts of data under accident signs or abnormal operating conditions. First, candidate burst frames are identified based on frame arrival intervals and historical flow baselines. Then, Apriori frequent itemset mining is used to extract co-occurrence combinations of devices that meet minimum support, and historical trigger phase similarity is combined to form a set of associated burst frames. Based on the stability level of the fused drift tolerance time frames, time window decentralization shaping is performed on the associated set, splitting and mapping highly spatially correlated burst frames into non-overlapping sub-time window queues within the same scheduling cycle. This generates a shaped burst queue structure for the next scheduling cycle. Furthermore, when multiple frames compete in the same time slot, the frame selection order is dynamically adjusted by considering priority, latency urgency, and stability compatibility, enhancing the downhole safety monitoring system's rapid response capability and critical operational capabilities to emergencies. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only for this invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a schematic diagram of the method flow according to an embodiment of the present invention; Figure 2 This is a schematic diagram of stability modeling in an embodiment of the present invention. Detailed Implementation
[0019] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. Those skilled in the art may employ other alternative methods to implement some well-known technologies; moreover, the accompanying drawings are only for more specific description of the embodiments and are not intended to specifically limit the present invention.
[0020] like Figures 1-2 As shown, the deterministic transmission method for multi-source safety monitoring in coal mines based on TSN private networks includes the following steps: S1: Obtain the time error sequence between the local clocks of multiple acquisition devices deployed underground and the main TSN clock, and perform clock drift modeling for each acquisition device; the TSN domain controller generates a fused drift tolerance time frame for each acquisition device based on the error distribution; the fused drift tolerance time frame includes the time stability level label of each time slot in the future scheduling cycle.
[0021] S1 specifically includes: S11, Obtain the time error sequence between the acquisition device and the main TSN clock: within a fixed period Internally, the system collects IEEE 1588 synchronization messages reported by each acquisition device, extracts the time error values between the local clock and the master clock, and forms an error time series, represented as follows: ; ; in, This is the IEEE 1588 synchronization message acquisition cycle. For the first Each data acquisition device number For the first Next synchronization moment. For equipment Local clock time, This is the master clock time of the TSN. This represents the time error value at that moment.
[0022] S12, Clock Drift Modeling and Stability Measurement: This involves modeling the evolution of errors over time to predict clock drift during future scheduling cycles and measuring the time stability of each device. By establishing a clock drift prediction model and statistical error variance, the clock offset behavior of the acquisition devices is quantitatively modeled and its stability measured. Specifically, this includes: S121, Drift Curve Modeling: Based on Error Sequence The device is constructed using Kalman filtering. The clock drift prediction model is expressed as: ; in, For equipment In time Clock error prediction value, The construction process for the Kalman filter prediction function specifically includes: (1) Setting state variables: setting the device The clock offset state is modeled as a one-dimensional or two-dimensional state variable, represented as: ; in, Indicates the time error at the current moment. This represents the drift rate, which is the first derivative of the offset. (2) State transition model: Assuming that the clock drift follows a linear dynamic evolution in a short time, the state transition equation is defined as follows: ; ; in, Here is the state transition matrix. This is process noise; (3) Observation model construction: The observables of the system are the error values collected in each synchronization period. The observation equation is: ; in, , To observe noise; (4) Noise covariance setting: Based on historical data statistics, set the process noise covariance matrix. Covariance of observation noise This is used to control the sensitivity of the filter to drift velocity and observation error; (5) Prediction-update loop execution: Through the standard Kalman filter process, for each synchronization time point Perform the prediction and update steps: Prediction steps: Based on the previous state, predict the current state estimate. With covariance , is represented as: ; Update steps: Import current observations Calculate Kalman gain The corrected state estimate and covariance are expressed as: ; ; ; in, This is the corrected state estimation vector. This is the corrected state covariance matrix. It is the identity matrix; (6) Drift trend prediction output: After each filtering is completed, the local clock drift prediction value and drift rate estimate value are extracted from the updated state estimate and used as the time offset trend and change rate indicators of the current device, respectively, to generate the drift prediction function in the subsequent scheduling cycle. .
[0023] S122, Drift stability assessment: The variance of the error sequence is calculated as a drift stability index, expressed as: ; in, For equipment clock drift variance For equipment The mean of all error values ranges from ±0.005 to ±10. The number of error samples ranges from 10 to 1000, controlling the balance between modeling time and accuracy.
[0024] S13, Generation of the Fusion Drift Tolerance Time Frame: To achieve deterministic scheduling of downhole multi-source monitoring data in the TSN network, the transmission window within the future scheduling cycle is reasonably divided and labeled according to the clock drift and stability characteristics of each device; based on the aforementioned modeling results, the TSN domain controller constructs a scheduling reference frame that fuses drift predictions and stability metrics, specifically including: S131, Scheduling cycle time-slot division: The next scheduling cycle... Divided into several time slots The duration of each time slot is ; in, This is the TSN scheduling period length, ranging from 10 to 1000, ensuring deterministic scheduling completion within the period. For the first Each time slot number, , For the first The duration of each time slot.
[0025] S132, Drift risk assessment for each time slot: For each time slot Candidate scheduling devices within Based on its prediction error and drift stability, the comprehensive clock misalignment risk coefficient for this time slot is calculated and expressed as: ; in, For the first The inaccuracy risk coefficient for each time slot The set of candidate devices for the current time slot. For equipment At the center time of this time slot Error prediction, For equipment The drift variance These are the weighting coefficients for drift prediction and drift fluctuation. It can be adjusted to match the sensitivity requirements of different scenarios for predicted drift and stability.
[0026] S133, Risk Classification and Label Generation: Based on all time slots Values are set to determine the grading threshold. Each moment is divided into multiple time stability levels, and each level is assigned a label, represented as follows: ; in, Thresholds for classifying risk levels, This is a label for time stability level.
[0027] S134, Constructing the Fusion Drift Tolerance Time Frame: The final generated fusion drift tolerance time frame is represented as follows: ; in, For time slot numbering, This is the start time of the time slot. For the duration of the time slot, This is the set of candidate devices corresponding to this time slot. For time stability level labels, To fuse drift tolerance time frames.
[0028] S2: Collect real-time data frame streams reported by downhole monitoring nodes. Based on the frame arrival interval and historical flow baseline, identify monitoring data frames with burst attributes as candidate burst frames. Perform spatial association rule mining on candidate burst frames based on device ID and timestamp. Mark candidate burst frames from different devices within the same time window and with similar historical triggering patterns as a set of associated burst frames. Perform time window decentralized shaping on the set of associated burst frames according to the fused drift tolerance time frame to generate a shaped burst queue structure.
[0029] S2 specifically includes: S21, Real-time data frame stream capture and flow characteristic construction: The data frame stream reported by each monitoring node downhole is captured using a sliding time window method, and the arrival timestamp of each frame is recorded. Equipment identification Construct a data frame traffic feature vector, represented as: ; in, This is the feature vector of data frame traffic.
[0030] S22, Identification of candidate bursts: based on the timestamp field in the constructed data frame traffic feature vector. Calculate the inter-frame arrival interval (ILA) and construct a historical traffic baseline model using a sliding time window, including the average IIA. with standard deviation For the current frame If the conditions for determining suddenness are met And the cumulative number of frames within the current time window satisfy If so, the frame is marked as a candidate burst frame; in, The arrival time interval between the current frame and the previous frame. For monitoring device nodes The average frame interval within the historical reporting window, statistically derived from the historical window, reflects the normal reporting frequency and serves as a criterion. To correspond to the standard deviation, which measures the degree of fluctuation in the frame arrival interval, a larger standard deviation indicates that the frame arrival behavior is more unstable. This is the burst sensitivity coefficient, ranging from 1.0 to 3.0, set as a multiple of the standard deviation, used to control the sensitivity of burst detection. A smaller value indicates greater sensitivity, while a larger value indicates greater conservatism. This is the number of frames within the current window, calculated based on the sliding window size and the device's reporting frequency, used to determine if there is a surge in traffic. The average number of frames within the historical window represents the normal historical frame count of this monitoring device node, used for comparison to determine whether the current situation is a sudden event. The frame rate increase factor threshold, ranging from 1.2 to 3.0, controls the sensitivity of determining whether the current frame rate exceeds the historical average. The larger the value, the more conservative the judgment.
[0031] S23, Spatial association rule mining generates a set of associated burst frames: based on a fixed association mining time window length. The process involves iterating through all candidate burst frames within the time window and performing a two-stage correlation assessment, specifically including: S231, Frequent Co-occurrence Mining of Device Itemsets: Construct an itemset element set using the device IDs of candidate burst frames, and use a frequent itemset mining algorithm to extract itemsets that satisfy the minimum support. Equipment combination ,include: (1) Transaction construction: associate mining time window A candidate burst report occurring within a given timeframe is considered a transaction, and each transaction contains elements... To report the device IDs in the burst table within this time window, a transaction database is constructed using a sliding window mechanism. The format is as follows: ; Each set represents the set of device items corresponding to the candidate burst table within a certain time window. The associated mining time window length, with a value range of 100-5000, is used to capture sudden co-occurrence behaviors among multiple devices in a short period of time. Too small a value may miss cross-device responses, while too large a value will introduce non-associated interference frames.
[0032] (2) Minimum support setting: Set the support threshold. This indicates that a certain combination of devices must appear in at least all transactions. Only those combinations meeting the above criteria are considered frequent. The minimum support threshold, ranging from 0.1 to 0.5, controls the recognition sensitivity for frequent device combinations; the larger the value, the stricter the screening.
[0033] (3) Apriori algorithm mining process: The Apriori algorithm is used to extract frequent itemsets, including: 1) Initial Frequent 1-Itemset Generation: Count the frequency of each device ID in all transactions, and delete items with a frequency lower than [a certain value]. The device ID yields a frequent 1-item set. ; 2) Frequent Itemset Iterative Generation ( ): From frequent - Itemset Connect each pair of elements to generate candidate elements. Itemset For each Itemsets are counted in the transaction database, and support is filtered. The itemset is ,like If the value is empty, the iteration terminates; 3) Output: All frequent itemsets Combined into a frequent device combination set, represented as: ; Each element represents a combination of devices that co-occur repeatedly within multiple time windows, i.e., an output device combination. , For frequently co-occurring device itemsets.
[0034] S232, Historical Phase Difference Determination: For each combination Extract the historical trigger time sequence from the candidate frames. Calculate its average trigger phase difference, expressed as: ; like Then, the group of candidate frames is marked as a set of associated burst frames. .
[0035] in, For monitoring device nodes In history The timestamp of the next trigger. For monitoring device nodes In history The timestamp of the next trigger. For monitoring device nodes and The historical trigger phase difference is used to measure the synchronization of the triggering behavior of two devices. The smaller the value, the more similar the patterns. The similarity threshold is 10-300. Values less than this threshold are considered to be similar to historical patterns. The smaller the value, the stricter the matching.
[0036] S24, Decentralized Time Window Shaping and Burst Queue Construction: Based on the aforementioned generated fused drift tolerance time frame, decentralized scheduling and shaping of the associated burst frame set is performed, including the following operations: S241, Time Slot Stability Level Reading and Initial Mapping Sorting: Read the stability level labels of all time slots in the fused drift tolerance time frame. For the associated burst frame set Each frame in Frames are sorted according to their latency sensitivity or priority, and high-priority frames are mapped to high-stability time slots first. S242, Decentralized Adjustment and Time Offset Application: For the remaining frames in the set, apply the scheduling time offset one by one according to the load of the remaining stable time slots. Ensure that the data is allocated to different time slots or time slots with similar low load levels, while simultaneously satisfying: ; in, The minimum burst dispersion interval is set, with a value ranging from 10 to 500. It is used to ensure that the associated frames have a clear temporal distribution, preventing multiple frames from concentrating in the same scheduling window under small time differences and causing resource contention. If the value is too small, the shaping effect will be ineffective; if the value is too large, it may cause resource waste or scheduling delays. To associate burst frames, To associate burst frame sets, For the first burst frame in the associated burst frame set The scheduling time after frame reshaping. For the first burst frame in the associated burst frame set The scheduling time after frame reshaping. This represents the frame scheduling time offset applied to avoid congestion. The value ranges from 5 to 500, and it controls the distribution of frames in different time slots to avoid frame stacking or collisions.
[0037] S243, Integer Burst Queue Structure Generation: Encapsulate the adjusted frame into an integer burst queue structure. Its element format is represented as: ; This queue serves as the input structure for the TSN controller to perform frame scheduling, sorting, and offset adjustment in the next cycle.
[0038] S3: Before the current scheduling cycle arrives, the TSN domain controller dynamically adjusts the starting offset and frame selection order of the allocated TSN transmission windows based on the fused drift tolerance time frame and the shaping burst queue structure; for windows with a time stability level lower than the set stability threshold, priority channel switching is performed, and high-priority data is mapped to the backup scheduling channel or compensation time slot, so as to achieve conflict-free deterministic forwarding of high-priority monitoring frames in coal mines under master clock drift conditions.
[0039] S3 specifically includes: S31, Joint reading of drift-tolerant time frames and shaping burst queues, and window fit assessment: To ensure deterministic forwarding in the next scheduling cycle under master clock drift, the TSN domain controller pre-assesses and pre-screens the scheduling resources for the next scheduling cycle at a preset decision time point, performs window-device fit assessment on each transmission window, and identifies mismatched windows that do not match the time slot stability level, specifically including: S311, Read the fusion drift tolerance time frame for the next scheduling cycle and extract the time slot information: The TSN domain controller reads the fusion drift tolerance time frame for the next scheduling cycle. The start time, duration, candidate device set, and time stability level label of each time slot are extracted and represented as follows: ; in, For time slot index, For the first Each time slot number, This is the start time of the time slot. For the duration of the time slot, This is the set of candidate devices for this time slot. This is the time stability level label for this time slot.
[0040] S312, extract the allocated transmission window information for each time slot and form a window set: for each time slot The TSN domain controller reads the allocated TSN transmission windows within this time slot and forms a window set, represented as follows: ; and for each transmission window Extract its window start time, window length, and currently bound set of acquisition devices, and represent it as follows: ; in, For time slots The set of TSN transmission windows already allocated within, the set size is , The value range is 1-100. For window indexing, For time slots Inner One TSN transmission window, For window Start time, For window Length, A collection of acquisition devices bound to a window. For time slots The set of candidate devices.
[0041] S313, Read the shaped burst queue structure and extract the scheduling frame demand information: The TSN domain controller reads the shaped burst queue structure. Obtain the target time slot requirement and priority / stability requirement of the frame to be scheduled after decentralized shaping, represented as: ; in, This is a burst queue structure for shaping. For burst frame identification, The target scheduling time after reshaping. This is the identifier of the original associated burst frame set. This indicates the level of time stability required for this frame.
[0042] S314, Perform window fit assessment and determine if window-device mismatch: The TSN domain controller performs a window fit assessment for each transmission window. Perform a window adaptation assessment and set the collection of acquisition devices currently bound to the window. The drift variance index and the time stability level of the time slot in which the window is located. To perform matching, set the upper limit of the drift variance tolerance corresponding to each stability level as follows: Then window-device matching is represented as: ; If the conditions are not met, it is determined to be a window-device mismatch and a window adjustment is triggered, as shown below: ; in, To match the time stability level The corresponding upper limit of the drift variance tolerance has a range of values. High-stability time slots are used to carry more sensitive services and require stricter tolerances, while low-stability time slots allow for greater device drift, but will trigger subsequent offset correction / channel switching strategies to ensure high-priority frames. For equipment The clock drift variance.
[0043] S32, Mismatch Window Start Offset Correction and Dynamic Adjustment of Frame Selection Order: While maintaining the transmission window length, the TSN domain controller performs start time offset correction on the mismatch window to avoid high-risk intervals caused by clock drift in the acquisition equipment, and simultaneously updates the gating scheduling configuration. Simultaneously, for cases of multiple frames concurrently transmitted within the same time slot, the frame selection order is dynamically adjusted based on the target time slot requirements in the shaping burst queue structure, according to the frame priority, latency urgency, and time stability level adaptation relationship. This ensures the orderly transmission of high-priority and high-stability monitoring frames in the next scheduling cycle. Specifically, this includes: S321, Correct the starting offset of the mismatch window and update the gating list: For transmission windows determined to be mismatched... While maintaining window length Under the premise of remaining unchanged, the TSN domain controller calculation window start offset is corrected. And update the window start time to: ; in, The original start time of the window. This is a window start offset correction value, used to ensure the window avoids the peak range of device clock drift. This is the corrected window start time; To achieve the goal of avoiding the drift peak range, This can be determined by minimizing the device drift prediction intensity within the window, as follows: ; in, A collection of acquisition devices bound to a window. For equipment The clock drift prediction function is calculated to obtain Then, the TSN domain controller updates the opening time of the corresponding window in the gating list.
[0044] S322, Frame selection order of multiple frames within the same time slot is dynamically adjusted: When there are multiple frames waiting to be scheduled in memory, the TSN domain controller retrieves them from the shaping burst queue. The set of frames to be scheduled corresponding to this time slot is selected and represented as follows: ; in, For frames The target scheduling time after reshaping These are the start time and duration of the time slot, respectively. Based on this, the TSN domain controller uses the frame priority identifier, remaining delay budget time, and time stability level label for that time slot. The frame selection order is dynamically determined, and a comprehensive ranking score is constructed, represented as follows: ; in, For frames The overall ranking score For frames The priority indicator; a larger value indicates a higher priority. For frames The smaller the remaining time in the delay budget, the more urgent the situation. For time slots Time stability level label, For frames The stability level requirement equivalent identifier, These are weighting coefficients used to balance priorities, latency urgency, and stability adaptability. ; This represents the stability level adaptation function, which solidifies the level matching relationship into a computable quantity in functional form. This facilitates its use in sorting along with priority and latency urgency, specifically including: Level unification and coding: The TSN domain controller first maps the time stability level label of the time slot and the time stability requirement level identifier of the frame to the same level system; Basic matching judgment: The controller makes a judgment based on whether the time slot stability meets the frame stability requirements. If the time slot stability level is not lower than the frame's requirement level, it is considered to meet the requirements and is given a higher adaptation score. If the time slot stability level is lower than the frame's requirement level, it is considered to not meet the requirements and is given a lower adaptation score. It can also be marked as a risky adaptation state for reference in subsequent sorting or channel switching strategies. Differential quantization and segmented scoring: Based on whether the requirement is met or not, further quantization is performed according to the difference between the two levels. When the slot level just meets the requirement, the adaptation score is set to medium-high level; when the slot level is higher than the requirement, the adaptation score is further increased to encourage keyframes to be placed in more stable slots; when the slot level is lower than the requirement, the adaptation score drops rapidly according to the size of the difference; the larger the difference, the lower the score, which is used to suppress the sorting priority of "high-demand frames falling into low-stability slots" when multiple frames compete in the same slot. Configurable Strategy: To adapt to different mine network loads and synchronization qualities, the adaptor function provides configurable modes, including: Strict matching mode: If the stability level of a time slot is lower than the required level, an extremely low score will be given directly, and the candidate flag for priority entry into the backup scheduling channel or compensation time slot will be triggered. Relaxed matching mode: Allows minor mismatches, but lowers the score and requires subsequent decisions to be made in conjunction with the urgency of latency budget and business priorities to avoid excessive migration leading to resource waste; Output and usage: The output serves as a quantification of the stability matching degree and directly participates in the dynamic sorting of the frame selection order: the higher the adaptation score, the more likely the frame should be sent to the front end of the window in the current time slot; the lower the adaptation score, the later it will be sorted, or stripped by subsequent mechanisms and remapped to the backup scheduling channel or compensation time slot pool when the triggering conditions are met.
[0045] S33, Priority Channel Switching and Compensation Time Slot Bearing: The TSN domain controller introduces a dual mechanism of backup scheduling channel + compensation time slot pool in the next scheduling cycle to avoid window conflicts and queuing uncertainties caused by drift risk. Specifically, this includes: S331, Pre-configuration of backup scheduling channels and compensation time slot pools: The TSN domain controller is pre-configured with at least one backup scheduling channel. With a compensation time slot pool ;in, This is a redundant path independent of the main TSN transmission link; This represents a set of flexible time slot resources that are reserved and not periodically scheduled, used to carry high-priority monitoring frames in emergency situations.
[0046] S332, Determination of Low-Stability Time Slots and Triggering Conditions for Channel Switching: To determine whether the time slot stability meets the deterministic forwarding requirements of high-priority monitoring frames, the time stability level label is... Mapped to numerical stability index And set a stability threshold. When the transmission window The time slot satisfies Furthermore, when a high-priority monitoring frame exists within this window, the TSN domain controller triggers a channel switching decision; in, This represents a numerical mapping function for stability levels, using a single survey / segmented mapping to transform level labels into comparable numerical values; the higher the level, the larger the mapped value. This is a stability threshold; slots smaller than this threshold are considered low-stability slots. .
[0047] S333, High-priority monitoring frame stripping, remapping, and entry synchronization update: For high-priority monitoring frames that meet the triggering conditions, the TSN domain controller strips them from the current low-stability window and remaps them to the backup scheduling channel or compensation time slot, as shown below: ; in, High-priority monitoring frame identifier, As a backup dispatch channel, To compensate for time slots, The execution flow of the frame-to-scheduled resource mapping function specifically includes: 1) Trigger input: The controller receives the frame to be processed. It also obtains the key attributes of the frame, including priority identifier, remaining latency budget, time stability requirement level, and time stability level of the current time slot.
[0048] 2) Selecting the mapping target: The controller selects the target based on the principle of prioritizing reliability, followed by resource availability. Prioritize the backup scheduling channel: When the backup scheduling channel still has available flow reserved resources / insertable windows, map the frame to the backup scheduling channel to obtain stronger deterministic isolation and redundancy protection; Otherwise, the compensation time slot pool is selected: when the backup channel resources are insufficient or a suitable window cannot be inserted in the current period, the frame is mapped to an available compensation time slot in the compensation time slot pool to carry it, thus achieving a fallback in the time dimension; 3) Generate a new scheduling landing point: Once the mapping is determined, the controller will generate a new bearer landing point for the frame. If it is mapped to the backup scheduling channel: determine the transmission queue / window position on the backup channel; if it is mapped to the compensation time slot pool: select an idle compensation time slot from the compensation time slot pool that meets the delay constraint of the frame, and give the transmission time or order of the frame in the compensation time slot. 4) Synchronously update control table entries: The controller writes the mapping results back to the scheduling configuration, including at least: Stream reservation table: Switches the resource reservation relationship of the stream to which the high-priority frame belongs to the corresponding resource of the backup channel or compensation time slot; Gating schedule: Update the gating start time / window ownership so that the frame is sent according to the new landing point; At the same time, delete or empty the transmission plan for this frame in the original low-stability window to avoid duplicate transmissions and conflicts. After mapping is complete, the TSN domain controller synchronously updates the flow reservation table and the gating scheduling table; when the primary TSN clock drifts and causes the synchronization deviation to exceed the limit, the backup scheduling channel will take over. Or compensate time slot It carries the high-priority monitoring frames in the original window, enabling conflict-free deterministic forwarding of high-priority monitoring frames in coal mines under master clock drift conditions.
[0049] This invention encompasses any substitutions, modifications, equivalent methods, and solutions made within the spirit and scope of this invention. To provide the public with a thorough understanding of this invention, specific details are described in detail in the following preferred embodiments; however, those skilled in the art will fully understand the invention even without these details. Furthermore, to avoid unnecessary misunderstanding of the essence of this invention, well-known methods, processes, procedures, components, and circuits are not described in detail.
[0050] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A deterministic transmission method for multi-source safety monitoring in coal mines based on a TSN private network, characterized in that, Includes the following steps: S1: Obtain the time error sequence between the local clock and the main TSN clock of multiple acquisition devices deployed underground, and perform clock drift modeling for each acquisition device; The TSN domain controller generates a fusion drift tolerance time frame for each acquisition device based on the error distribution; the fusion drift tolerance time frame includes a time stability level label for each time slot in the future scheduling cycle; S2: Collect real-time data frame streams reported by downhole monitoring nodes. Based on the frame arrival interval and historical flow baseline, identify monitoring data frames with burst attributes as candidate burst frames. Perform spatial association rule mining based on device ID and timestamp on the candidate burst frames. Mark the candidate burst frames within the same time window, from different devices, and with similar historical triggering patterns as a set of associated burst frames. Perform time window decentralized shaping on the set of associated burst frames according to the fused drift tolerance time frame to generate a shaped burst queue structure. S3: Before the current scheduling cycle arrives, the TSN domain controller dynamically adjusts the starting offset and frame selection order of the allocated TSN transmission windows according to the fused drift tolerance time frame and the shaping burst queue structure; for windows with a time stability level lower than the set stability threshold, priority channel switching is performed, and high-priority data is mapped to the backup scheduling channel or compensation time slot, so as to realize the collision-free deterministic forwarding of high-priority monitoring frames in coal mines under the condition of master clock drift.
2. The deterministic transmission method for multi-source safety monitoring in coal mines based on a TSN private network according to claim 1, characterized in that, The time window decentralization shaping specifically includes: according to the time stability level label of each time slot in the fused drift tolerance time frame, splitting the candidate burst frames with high spatial correlation according to priority and time sensitivity threshold, allocating them to non-overlapping sub-time window queues within the same scheduling period, and generating a shaping burst queue structure for the next scheduling period.
3. The deterministic transmission method for multi-source safety monitoring in coal mines based on a TSN private network according to claim 1, characterized in that, S1 specifically includes: S11: Collect IEEE 1588 synchronization messages reported by each acquisition device at fixed intervals, extract time error values, and form a time error sequence; S12: Based on the time error sequence, the clock drift curve of each acquisition device is constructed using the Kalman filter method, and the clock error change trend in the next scheduling cycle is predicted; the clock drift variance of each acquisition device is calculated based on the fluctuation amplitude of the historical error sequence as a time stability metric. S13: Divide the scheduling cycle into multiple time slots of equal or variable length. For all devices to be scheduled in each time slot, calculate the comprehensive clock instability risk coefficient of the time slot by weighting the predicted clock drift value and the drift variance. Divide the time slot into multiple time stability levels according to the comprehensive clock instability risk coefficient and generate corresponding time stability level labels.
4. The deterministic transmission method for multi-source safety monitoring in coal mines based on a TSN private network according to claim 3, characterized in that, The fusion drift tolerance time frame includes the start time, duration, assigned candidate device set, and time stability level label for each time slot.
5. The deterministic transmission method for multi-source safety monitoring in coal mines based on a TSN private network according to claim 3, characterized in that, The Kalman filtering method for constructing the clock drift curves of each acquisition device specifically includes: The clock offset state of the acquisition device is constructed into a state vector including time error and drift rate, which is used to describe the dynamic change process of the device's local clock relative to the master clock; Based on the linear dynamic assumption, a transition model for clock drift state is constructed, process noise is introduced to describe the inherent uncertainty of the system, and future states are predicted. The time error collected by the equipment during the synchronization period is used as the observation. An observation model is constructed and observation noise is introduced to establish a mapping relationship between the observation value and the state. Based on the statistical results of historical error data, the covariance parameter of process noise and observation noise is set to control the sensitivity of the filtering model to drift changes and measurement errors. At each synchronization moment, two sub-steps are executed: state prediction and state update. The current state and covariance are predicted based on the previous state estimate, the state is corrected by combining the current observation, and the current clock drift estimate is dynamically output. After each round of filtering calculations, the current time error estimate and drift velocity prediction index are output.
6. The deterministic transmission method for multi-source safety monitoring in coal mines based on TSN private network according to claim 1, characterized in that, S2 specifically includes: S21: Capture the data frames reported by each monitoring node using a sliding time window method, record the arrival timestamp and device ID of each frame, and construct a real-time traffic feature vector; S22: Establish a historical traffic baseline model for each monitoring node. The historical traffic baseline model includes the average frame arrival interval and standard deviation of the monitoring node within the historical synchronous window. Compare the interval between the current arrival frame and the previous frame with the baseline model. Frames that meet the set conditions are marked as candidate burst frames. S23: Set the length of the association mining time window, traverse all candidate burst frames within the association mining time window; use device ID as itemset element and timestamp alignment degree as association metric, and use the frequent itemset mining algorithm to extract device combinations whose co-occurrence frequency exceeds the support threshold; calculate the historical trigger time phase difference of each candidate burst frame in the same combination; if the historical trigger time phase difference is lower than the similarity threshold, it is determined that the historical triggering patterns are similar, and all candidate burst frames in the combination are marked as an associated burst frame set; S24: Read the time stability level label of each time slot in the fusion drift tolerance time frame, sort the frames in the same associated burst frame set according to the stability level of the target time slot, and prioritize the allocation of time slots with high stability levels; apply time offsets to the remaining frames in sequence to perform offset adjustment; repackage the associated burst frames after offset adjustment into a shaped burst queue structure, the shaped burst queue structure including frame identifier, shaped scheduling time, original associated set identifier and time stability level adaptation identifier.
7. The deterministic transmission method for multi-source safety monitoring in coal mines based on a TSN private network according to claim 6, characterized in that, The frequent itemset mining algorithm specifically includes: Within the set association mining time window, the identified candidate burst frames are merged in time, and all device identifiers that report candidate burst frames within the same time window are combined into a transaction item set. Through the sliding time window mechanism, the transaction item sets formed in multiple time windows are aggregated to build a transaction database. Based on the transaction database, the frequency of each device identifier in all transactions is counted, and device identifiers that do not meet the minimum support requirement are filtered out to obtain an initial frequent itemset. Using a bottom-up iterative approach, the retained initial frequent itemsets are combined and expanded to generate higher-order candidate device combinations. The co-occurrence frequency of each candidate combination in the transaction database is counted, and device combinations that meet the minimum support condition are retained. If no new device combination that meets the condition is generated at a certain order, the iteration process is terminated. All frequent items obtained from each level of screening are combined to form a frequent device combination set; each device combination in the frequent device combination set represents a set of monitoring nodes that repeatedly co-occur within multiple associated mining time windows.
8. The deterministic transmission method for multi-source safety monitoring in coal mines based on TSN private network according to claim 1, characterized in that, S3 specifically includes: At the preset decision time point before the current scheduling cycle arrives, the TSN domain controller reads the fusion drift tolerance time frame of the next scheduling cycle, extracts the time stability level label of each time slot and the transmission window information allocated to each time slot; at the same time, it reads the shaping burst queue structure to obtain the target time slot requirement and priority identifier of the frame to be scheduled after decentralized shaping. The clock drift prediction value of the acquisition device set currently bound to the window is matched with the time stability level of the time slot where the window is located. If the device drift variance exceeds the upper limit of the tolerance corresponding to the stability level of the time slot where the window is located, it is determined to be a window-device mismatch and the window adjustment is triggered.
9. The deterministic transmission method for multi-source safety monitoring in coal mines based on a TSN private network according to claim 8, characterized in that, The dynamic adjustment of the starting offset and frame selection order of the allocated TSN transmission window includes: For transmission windows that are determined to be mismatched, keep the window length unchanged, calculate the starting offset correction value that makes the window avoid the peak range of device clock drift, and update the opening time of the corresponding window. When there are multiple frames to be scheduled in the same time slot, the frame selection order is dynamically adjusted according to the frame priority, the remaining time of the delay budget, and the time slot stability level, and the frame with the highest stability level requirement is scheduled to be sent at the front of the window.
10. The deterministic transmission method for multi-source safety monitoring in coal mines based on a TSN private network according to claim 9, characterized in that, The step of performing priority channel switching for windows with a time stability level lower than a set stability threshold includes: At least one backup scheduling channel and a compensation time slot pool are pre-configured. The backup scheduling channel is a redundant path independent of the main TSN transmission link, and the compensation time slot pool is a reserved flexible time slot resource that is not occupied by periodic scheduling. When the time stability level of the time slot where the transmission window is located is lower than the set stability threshold, and the transmission window includes high-priority monitoring frames, the TSN domain controller triggers a channel switching decision. The channel switching decision includes stripping the high-priority monitoring frames from the current low-stability window and remapping them to the backup scheduling channel. After the mapping is completed, the flow reservation table and gating schedule table in the TSN domain controller are updated synchronously. When the synchronization deviation exceeds the limit due to the drift of the main TSN clock, the high-priority monitoring frames in the original window are carried by the backup channel or the compensation time slot, so as to realize the collision-free deterministic forwarding of high-priority monitoring frames in coal mines under the condition of main clock drift.