Event-driven coal mine intelligent gateway edge security data hierarchical preprocessing scheduling method

CN122802209APending Publication Date: 2026-09-22HUANENG COAL TECH RES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610917215.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-24
Publication Date
2026-09-22

AI Technical Summary

Technical Problem

若对所有数据帧均采用统一的深度安全预处理方式,容易造成安全协处理器和处理器算力被普通数据过度占用,降低关键安全数据的实时处理能力;若对所有数据帧均采用轻量化处理方式,则可能导致高安全等级数据缺少必要的加密保护和完整性保障

Benefits of technology

1、本发明根据待处理数据帧携带的数据安全等级标识和事件时限等级标识确定预处理等级编码,并结合不同预处理等级编码对应的数据帧到达速率、时效剩余量、缓存队列长度以及智能网关的处理器负载、内存空闲率、安全协处理器可用加密吞吐量和上行网络有效带宽形成多维决策输入矩阵,再由深度强化学习推理模型输出动态预处理深度调整策略和动态调度权重因子。由此,智能网关能够根据不同数据帧的安全等级、时效要求和当前资源状态,自适应选择深度安全预处理流程或轻量化安全预处理流程,既保证瓦斯浓度超限、突水预警、顶板压力突变等关键安全数据获得数字签名、加密封装、前向纠错和完整性校验保护,又避免普通状态轮询数据过度占用处理器算力、安全协处理器和上行带宽,提高边缘资源利用效率和关键安全数据处理实时性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122802209A_ABST
    Figure CN122802209A_ABST
Patent Text Reader

Abstract

The present application relates to event-driven coal mine intelligent gateway edge security data hierarchical preprocessing scheduling method, receives the data frame to be processed uploaded by the underground equipment of coal mine, determines the preprocessing level code according to the data security level identifier and event time limit level identifier, forms a multidimensional decision input matrix in combination with the data frame arrival rate, time limit remaining amount, cache queue length and intelligent gateway resource state;Its input deep reinforcement learning inference model outputs dynamic preprocessing depth adjustment strategy and dynamic scheduling weight factor, and determines the intelligent gateway operating condition category based on the current state hidden layer feature vector matching working condition category prototype vector table;According to the dynamic preprocessing depth adjustment strategy, generate the package to be scheduled, and output according to the comprehensive priority index preemptive scheduling;The decision quadruplet is stored in the experience storage partition according to the working condition category and is subjected to online incremental update;The present application can take into account the safety data processing intensity, real-time performance and edge resource utilization efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to an event-driven method for hierarchical preprocessing and scheduling of edge security data for smart gateways in coal mines, belonging to the field of edge computing data processing technology. Background Technology

[0002] With the advancement of intelligent coal mine construction, the number of gas concentration sensors, roof pressure sensors, water level sensors, wind speed sensors, monitoring substations, and video equipment deployed underground is constantly increasing. A large amount of safety monitoring data, equipment operation data, and video event data needs to be aggregated by the coal mine intelligent gateway before being uploaded to the ground monitoring platform. Due to the complex underground environment of coal mines, characterized by high humidity, high dust, strong electromagnetic interference, and limited and fluctuating communication link bandwidth, the intelligent gateway, when performing data preprocessing and uplink transmission scheduling, must not only consider the limitations of edge resources such as processors, memory, security coprocessors, and network bandwidth, but also take into account the differences in security levels and timeliness requirements of different data frames.

[0003] In practical applications, data related to safety events such as excessive gas concentration, water inrush warnings, and sudden changes in roof pressure typically have high data security levels and short processing timeframes. These require deep security preprocessing, including digital signatures, encrypted encapsulation, error correction and redundancy coding, and integrity verification, and need to be prioritized in the uplink transmission queue. In contrast, data from ordinary equipment status polling and routine environmental parameter collection usually have lower requirements for security processing intensity and timeliness, and lightweight verification or compression can meet transmission needs. Applying a uniform, deep security preprocessing method to all data frames can easily lead to excessive consumption of security coprocessor and processor computing power by ordinary data, reducing the real-time processing capability of critical security data. Conversely, using lightweight processing for all data frames may result in high-security-level data lacking necessary encryption protection and integrity guarantees. Summary of the Invention

[0004] To address the problems existing in the prior art, this invention proposes an event-driven method for hierarchical preprocessing and scheduling of edge security data for smart gateways in coal mines.

[0005] The technical solution of the present invention is as follows: This invention provides an event-driven method for hierarchical preprocessing and scheduling of edge security data in coal mine smart gateways, comprising the following steps: Receive data frames to be processed uploaded by underground coal mine equipment, determine the preprocessing level code based on the data security level identifier and event time limit level identifier carried by the frame, and form a preprocessing requirement description frame. Based on the data frame arrival rate, remaining time, and buffer queue length corresponding to different preprocessing levels, a preprocessing load state vector is constructed, and combined with the processor load, memory idle rate, available encryption throughput of the security coprocessor, and effective uplink network bandwidth of the smart gateway to form a multi-dimensional decision input matrix. The multidimensional decision input matrix is ​​input into the deep reinforcement learning inference model, and the output is a dynamic preprocessing depth adjustment strategy and a dynamic scheduling weight factor. At the same time, the hidden layer output of the deep reinforcement learning model is extracted as the current state hidden layer feature vector, and matched with the pre-constructed working condition category prototype vector table to determine the current smart gateway operating condition category. The preprocessing process is selected and a package to be scheduled is generated based on the dynamic preprocessing depth adjustment strategy. The comprehensive priority index is determined based on the dynamic scheduling weight factor, the remaining time, and the channel congestion status, and preemptive scheduling is performed according to the comprehensive priority index. The decision quadruple, consisting of the state, action, reward, and next state generated by the deep reinforcement learning inference model, is stored in the working condition category experience storage partition according to the current smart gateway operating condition category. The deep reinforcement learning model is then updated online based on the working condition category experience storage partition.

[0006] Preferably, the preprocessing level code is determined based on the data security level identifier and event time limit level identifier carried in the data frame to be processed, and a preprocessing requirement description frame is formed, including: Receive data frames to be processed generated by underground sensors, monitoring substations and video equipment in coal mines after protocol parsing; Read the data security level identifier and event time limit level identifier carried in the data frame to be processed. The data security level identifier is used to indicate the importance level of the safety monitoring data corresponding to the data frame to be processed, and the event time limit level identifier is used to indicate the processing time limit level of the downhole event corresponding to the data frame to be processed. Based on the data security level identifier and the event time limit level identifier, the corresponding preprocessing level code is obtained by querying the preset mapping table; The preprocessing level code is appended to the data frame to be processed to form a preprocessing requirement description frame, and the preprocessing requirement description frame is output to the cluster buffer.

[0007] Preferably, the specific steps for constructing the multidimensional decision input matrix are as follows: Using the hardware timestamp counter built into the smart gateway as the time reference, the arrival time of preprocessing requirement description frames with the same preprocessing level encoding in the clustered buffer is recorded. Based on the sliding time window, the average arrival rate, average remaining time, and buffer queue length of the data frames corresponding to each preprocessing level are calculated respectively. The preprocessing level coding, average data frame arrival rate, average time remaining, and buffer queue length are combined to form a preprocessing load state vector. Real-time acquisition of current smart gateway processor load rate, memory idle rate, real-time available encrypted throughput of security coprocessor, and effective uplink network bandwidth, forming a resource status vector; The preprocessed load state vector and resource state vector are concatenated to form a multidimensional decision input matrix.

[0008] Preferably, the deep reinforcement learning inference model includes a shared feature extraction network, a policy output head, a value output head, and a weight generation head; The shared feature extraction network is used to extract features from the multidimensional decision input matrix and output the current state hidden layer feature vector; The policy output header is used to receive the current state hidden layer vector and output the dynamic preprocessing depth adjustment policy for each preprocessing level encoding. The value output head is used to receive the hidden layer feature vector of the current state and output the state value of the current state; The weight generation head is used to receive the current state hidden layer feature vector, output continuous weight values, and then map the continuous weight values ​​to a preset scheduling weight range to generate dynamic scheduling weight factors.

[0009] Preferably, the current gateway operating condition category is determined by matching it with a pre-built prototype vector table of operating condition categories, including: Extract the current state hidden layer feature vector from the preset number of hidden layers in the deep reinforcement learning inference model; Multiple working condition category prototype vectors are read from the working condition category prototype vector table. Each working condition category prototype vector corresponds to a gateway operating working condition category defined by the coal mine safety regulations. The gateway cloud working condition categories include at least periodic disturbance category, equipment failure precursor category, safety event escalation category, and normal operation category. Calculate the cosine similarity between the current state hidden layer feature vector and the prototype vector of each working condition category to obtain multiple similarity scores; The prototype vector of the working condition category with the highest similarity score is selected as the candidate prototype vector of the working condition category. When the maximum similarity score is greater than the similarity judgment threshold, the current gateway operating status is determined as the gateway operating condition category corresponding to the candidate operating condition category prototype vector; When the similarity score between pairs is not greater than the similarity judgment threshold, the current gateway operation status will be judged as the unregistered working condition category, or temporarily assigned to the preset normal operation category.

[0010] Preferably, the construction steps of the working condition category prototype vector table are as follows: Obtain typical working condition samples marked by coal mine safety regulations. The typical working condition samples include periodic disturbance samples, equipment failure precursor samples, safety event escalation samples, and normal operation samples. The typical working condition samples are input into the prototype to construct the network, and the initial hidden layer feature vectors corresponding to each typical working condition sample are extracted. The initial hidden layer feature vectors are aggregated according to the gateway operating condition category to obtain the embedding center vector corresponding to each gateway operating condition category; Write the embedding center vector as the prototype vector of the working condition category into the non-volatile storage space to form the working condition category prototype vector table. The similarity threshold is determined in the initial stage based on the similarity distribution between the hidden layer feature vector of the sample and the prototype vector of the corresponding operating condition category under the same gateway operating condition category.

[0011] Preferably, the dynamic preprocessing depth adjustment strategy includes a first processing action and a second processing action, and a first safe preprocessing process or a second safe preprocessing process is selected to generate a package to be scheduled according to the dynamic preprocessing depth adjustment strategy. When the dynamic preprocessing depth adjustment strategy instructs the corresponding data frame to perform the first processing action, the security coprocessor is invoked to perform a national cryptographic digital signature on the data frame payload, the signature result is appended to the data frame payload, and the data frame payload and signature result are encapsulated using national cryptographic encryption. Perform forward error correction redundancy encoding on the data after it has been encrypted and encapsulated using national cryptographic standards, calculate the integrity verification field, and generate the first packet to be scheduled. When the dynamic preprocessing depth adjustment strategy instructs the corresponding data frame to perform the second processing action, adaptive zero compression is performed on the continuous zero-value data in the data frame payload, and cyclic redundancy check calculation is performed on the compressed data to generate the second packet to be scheduled. When generating the first or second scheduled packet, the dynamic scheduling weight factor, the remaining time of the current data frame, and the processing completion timestamp are written into the extended scheduling description field of the header of the scheduled packet.

[0012] Preferably, a comprehensive priority index is determined based on the dynamic scheduling weight factor, remaining time value, and channel congestion status, and preemptive scheduling output is performed according to the comprehensive priority index, including: The dynamic scheduling weight factor, remaining time, and processing completion timestamp are parsed from the extended scheduling description field in the header of the packet to be scheduled. The urgency coefficient is determined by the reciprocal of the remaining time. Obtain the total number of bytes of buffered data packets in the uplink transmission queue and the maximum capacity of the uplink network interface transmission buffer, and determine the channel congestion status based on the ratio of the two. The comprehensive priority index of the packet to be scheduled is calculated based on the dynamic scheduling weight factor, the timeliness urgency coefficient, and the channel congestion status. The packets to be scheduled are sorted from high to low according to the comprehensive priority index. If the comprehensive priority index is the same, they are sorted in ascending order according to the processing completion timestamp. The sorted packets to be scheduled are injected into a multi-level priority sending queue that supports preemption of high-priority packets, so that packets with higher overall priority index enter the sending queue first and replace the sending position of packets with lower overall priority index.

[0013] Preferably, the decision quadruple consisting of the state, action, reward, and next state generated by the model decision is stored in the working condition category experience storage partition according to the current gateway operating condition category, and the deep reinforcement learning inference model is updated online based on the working condition category experience storage partition, including: Each decision made by the deep reinforcement learning inference model constitutes a decision quadruple: the state, action, reward, and next state. Based on the current gateway operating condition category, the decision quadruple is stored in the corresponding partition of the operating condition category experience storage partition; Configure the capacity of the experience storage partition for each operating condition category according to the operating condition priority preset in the coal mine safety regulations for each gateway operating condition category; During gateway operation, samples are drawn from the experience storage partitions of each working condition category according to a preset ratio to form training batches. The state of each sample in the training batch is re-input into the deep reinforcement learning inference model to extract the hidden layer feature vector of each sample; A total loss function is constructed based on reinforcement learning loss and category prototype margin constraint loss, and the model parameters of the deep reinforcement learning inference model are updated according to the total loss function.

[0014] Preferably, the category prototype interval constraint loss and the working condition category prototype vector table update include: For each sample in the training batch, the hidden layer feature vector of the sample is used as the constrained vector, the prototype vector of the working condition category corresponding to the gateway operating condition category to which the sample belongs is used as the same type prototype vector, and the prototype vector of the working condition category that has the highest similarity to the hidden layer feature vector of the sample but is of a different category is used as the different type prototype vector. The category prototype interval constraint loss reduces the distance between the constrained vector and the same type of prototype vector, and increases the distance between the constrained vector and the different type of prototype vector, so as to distinguish the gateway running states that have similar feature vectors but different corresponding security preprocessing processes. When the smart gateway is idle and meets the preset update interval, it retrieves the cumulative samples corresponding to the operating condition category of each gateway from the operating condition category experience storage partition. The accumulated samples are input into the current deep reinforcement learning inference model to extract the corresponding hidden layer feature vectors and calculate the vector mean under each gateway operating condition category. The prototype vectors of the corresponding working conditions in the prototype vector table are updated by exponential moving average based on the mean of the vectors, and the single moving step size of the prototype vectors of the corresponding working conditions is limited. After updating the prototype vector of the working condition category, the similarity judgment threshold is re-determined based on the updated prototype vector of the working condition category.

[0015] The present invention has the following beneficial effects: 1. This invention determines the preprocessing level code based on the data security level identifier and event time limit level identifier carried in the data frame to be processed. It then combines the data frame arrival rate, remaining time limit, buffer queue length, processor load, memory idle rate, available encryption throughput of the security coprocessor, and effective uplink network bandwidth corresponding to different preprocessing level codes to form a multi-dimensional decision input matrix. A deep reinforcement learning inference model then outputs a dynamic preprocessing depth adjustment strategy and a dynamic scheduling weight factor. Thus, the smart gateway can adaptively select a deep security preprocessing process or a lightweight security preprocessing process based on the security level, time limit requirements, and current resource status of different data frames. This ensures that critical safety data such as excessive gas concentration, water inrush warnings, and sudden changes in roof pressure receive digital signatures, encrypted encapsulation, forward error correction, and integrity verification protection, while avoiding excessive consumption of processor computing power, security coprocessor, and uplink bandwidth by ordinary state polling data, thereby improving edge resource utilization efficiency and the real-time performance of critical safety data processing. Attached Figure Description

[0016] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation

[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0018] It should be understood that the step numbers used in the text are for ease of description only and are not intended to limit the order in which the steps are performed.

[0019] It should be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0020] The terms “comprising” and “including” indicate the presence of the described feature, whole, step, operation, element and / or component, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or collections thereof.

[0021] The term “and / or” refers to any combination of one or more of the associated listed items, as well as all possible combinations, and includes these combinations.

[0022] See Figure 1 In some embodiments, an event-driven edge security data hierarchical preprocessing and scheduling method for coal mine smart gateways is proposed, including the following steps: Receive data frames to be processed uploaded by underground coal mine equipment, determine the preprocessing level code based on the data security level identifier and event time limit level identifier carried by the frame, and form a preprocessing requirement description frame. Based on the data frame arrival rate, remaining time, and buffer queue length corresponding to different preprocessing levels, a preprocessing load state vector is constructed, and combined with the processor load, memory idle rate, available encryption throughput of the security coprocessor, and effective uplink network bandwidth of the smart gateway to form a multi-dimensional decision input matrix. The multidimensional decision input matrix is ​​input into the deep reinforcement learning inference model, and the output is a dynamic preprocessing depth adjustment strategy and a dynamic scheduling weight factor. At the same time, the hidden layer output of the deep reinforcement learning model is extracted as the current state hidden layer feature vector, and matched with the pre-constructed working condition category prototype vector table to determine the current smart gateway operating condition category. The preprocessing process is selected and a package to be scheduled is generated based on the dynamic preprocessing depth adjustment strategy. The comprehensive priority index is determined based on the dynamic scheduling weight factor, the remaining time, and the channel congestion status, and preemptive scheduling is performed according to the comprehensive priority index. The decision quadruple, consisting of the state, action, reward, and next state generated by the deep reinforcement learning inference model, is stored in the working condition category experience storage partition according to the current smart gateway operating condition category. The deep reinforcement learning model is then updated online based on the working condition category experience storage partition.

[0023] In one specific embodiment, an event-driven hierarchical preprocessing and scheduling method for edge security data of a coal mine smart gateway is proposed and applied to an underground coal mine smart gateway. The smart gateway is connected to underground coal mine sensors, monitoring substations, video equipment, a security coprocessor, an embedded resource monitoring module, a clustered buffer, and an uplink network communication interface. Underground coal mine sensors may include gas concentration sensors, temperature and humidity sensors, roof pressure sensors, wind speed sensors, water level sensors, dust concentration sensors, etc.; the monitoring substations are used to aggregate, adapt protocols, and perform preliminary parsing of data from multiple underground sensors; and the video equipment is used to upload video frames, video clips, or safety event data obtained from video analysis of key underground areas.

[0024] The intelligent gateway is equipped with a protocol parsing module, a hierarchical identifier parsing module, a clustered cache area, a resource status acquisition module, a deep reinforcement learning inference model, a security preprocessing module, a preemptive scheduling module, and an online incremental update module. The protocol parsing module converts data from different sources and with different protocol formats into a unified format of data frames to be processed; the hierarchical identifier parsing module reads the data security level identifier and event time limit level identifier from the data frames to be processed; the clustered cache area caches the preprocessing requirement description frames according to the preprocessing level encoding; the resource status acquisition module collects processor load, memory idle rate, available encrypted throughput of the security coprocessor, and effective uplink network bandwidth; the deep reinforcement learning inference model outputs a dynamic preprocessing depth adjustment strategy and a dynamic scheduling weight factor, and extracts the current state hidden layer feature vector; the security preprocessing module generates packets to be scheduled according to the dynamic preprocessing depth adjustment strategy; the preemptive scheduling module preemptively schedules packets to be scheduled according to the comprehensive priority index; and the online incremental update module stores the decision quadruples generated by the model decision into the corresponding operating condition experience storage partition according to the current smart gateway operating condition category, and performs online incremental updates to the deep reinforcement learning model based on the operating condition category experience storage partition.

[0025] In a specific embodiment, a method for determining the encoding level of the received and preprocessed data frames is proposed, specifically as follows: The intelligent gateway receives data frames to be processed generated by underground sensors, monitoring substations, and video equipment in the coal mine after protocol parsing. These data frames carry data security level identifiers and event time limit level identifiers.

[0026] Data security level identifiers are used to indicate the importance level of the safety monitoring data corresponding to the data frame to be processed. Data security levels can be preset based on factors such as the importance of the coal mine safety monitoring object, the potential safety impact of data tampering or loss, whether it involves safety early warning, and whether it involves safety supervision data. For example, data such as excessive gas concentration, water inrush warning, sudden changes in roof pressure, and abnormal wind speed can be set to a high security level; periodic equipment operating status and polling data of general environmental parameters can be set to a medium or low security level.

[0027] The event time limit level identifier is used to indicate the processing time limit level of the downhole event corresponding to the data frame to be processed. The event time limit level can be set to urgent, relatively urgent, normal, or low time limit requirements according to the response requirements of the downhole event. For example, gas concentration exceeding the limit data, water inrush early warning data, and roof pressure change data correspond to shorter allowable processing time limits; ordinary equipment status polling data correspond to longer allowable processing time limits.

[0028] The intelligent gateway retrieves the corresponding preprocessing level code from a pre-defined mapping table based on the data security level identifier and the event time limit level identifier. This pre-defined mapping table, stored in the intelligent gateway's non-volatile storage, establishes the correspondence between the data security level identifier, the event time limit level identifier, and the preprocessing level code. The preprocessing level code indicates the required depth of security preprocessing and the level of scheduling concern for the data frame to be processed.

[0029] In one specific implementation, the preset mapping table can be set as a hash mapping table. The intelligent gateway combines the data security level identifier and the event time limit level identifier as a query key, and retrieves the corresponding preprocessing level code from the hash mapping table. For example, high-security-level and urgent data frames correspond to the first preprocessing level code; high-security-level and normal time limit data frames correspond to the second preprocessing level code; medium-security-level and urgent data frames correspond to the third preprocessing level code; and low-security-level and normal or low time limit data frames correspond to the fourth preprocessing level code. The number and mapping relationship of the above preprocessing level codes can be configured according to the coal mine site business rules.

[0030] The intelligent gateway appends the preprocessing level code obtained from the query to the data frame to be processed, forming a preprocessing requirement description frame, and outputs the preprocessing requirement description frame to the clustering buffer. The clustering buffer establishes multiple buffer queues according to the preprocessing level code, so that preprocessing requirement description frames with the same preprocessing level code enter the same buffer queue.

[0031] In a specific embodiment, a method for constructing the preprocessed load state vector and the multidimensional decision input matrix is ​​proposed, specifically as follows: The intelligent gateway uses a built-in hardware timestamp counter as the time base to record the arrival time of preprocessing requirement description frames with the same preprocessing level encoding within the clustered buffer. For each type of preprocessing level encoding, the intelligent gateway calculates the average arrival rate, average remaining time, and buffer queue length of the data frames based on a sliding time window.

[0032] The average arrival rate of data frames can be determined by the following formula: ; in: Indicates the first Average arrival rate of data frames corresponding to class preprocessing level encoding; Indicates the time window that belongs to the first The number of data frames encoded at each class preprocessing level; Indicates the length of the sliding time window; The mean remaining slack time can be determined by the following formula: ; in: Indicates the first Average remaining timeliness corresponding to class preprocessing level coding; Indicates the first The processing deadline for each preprocessing requirement description frame; This indicates the current time corresponding to the current hardware timestamp counter; When there are no data frames for a certain preprocessing level code within the current sliding time window, the average arrival rate, average remaining time, and buffer queue length of the data frames corresponding to that preprocessing level code can be set to preset idle values ​​to avoid calculation errors.

[0033] Cache queue length Read from the clustered cache, indicating the first The preprocessing level code corresponds to the number of data frames in the buffer queue that have not yet been preprocessed. The smart gateway combines the preprocessing level code, average data frame arrival rate, average remaining time, and buffer queue length to form a preprocessing load state vector: ; in: Indicates the first The preprocessing load state vector corresponding to the class preprocessing level encoding; Indicates the first Class preprocessing level coding; The intelligent gateway also uses an embedded resource monitoring module to obtain real-time data on current processor load, memory idle rate, real-time available encrypted throughput of the security coprocessor, and effective uplink network bandwidth, forming a resource status vector. ; in: Represents a resource state vector; Indicates processor load rate; Indicates memory free rate; This indicates the real-time available encrypted throughput of the security coprocessor; Indicates the effective uplink network bandwidth; The intelligent gateway concatenates the preprocessed load state vector with the resource state vector to form a multi-dimensional decision input matrix. Multidimensional decision input matrix It is used to simultaneously describe the data arrival status, timeliness pressure, cache backlog, and the current status of the smart gateway's computing resources, storage resources, security coprocessing resources, and communication resources under different preprocessing level encodings.

[0034] In one specific implementation, when the smart gateway contains When encoding class preprocessing levels, you can Each preprocessed load state vector is concatenated with the same resource state vector to form... row or Group decision input units. Each row or group of decision input units corresponds to a preprocessing level code, enabling the deep reinforcement learning inference model to simultaneously perceive the load differences and resource competition relationships between different preprocessing level codes.

[0035] In a specific embodiment, a deep reinforcement learning inference model structure and a dual-output mechanism are proposed, as follows: The smart gateway will input a multi-dimensional decision matrix. The input is a deep reinforcement learning inference model pre-deployed within a smart gateway. The deep reinforcement learning inference model includes a shared feature extraction network, a policy output head, a value output head, and a weight generation head.

[0036] Shared feature extraction networks are used for multidimensional decision input matrices Perform feature extraction and output the hidden layer feature vector of the current state. Current state hidden layer feature vector It refers to the feature vector output by the preset hidden layer in the forward inference process of the deep reinforcement learning inference model, which is used to represent the data load state, resource state and scheduling context of the current smart gateway.

[0037] In one specific implementation, the deep reinforcement learning inference model employs an Actor-Critic architecture with multiple output heads. The shared feature extraction network consists of three fully connected layers, each with 256 neurons and using the SiLU activation function. A multidimensional decision input matrix is ​​also included. After being input into the model, the data passes through a batch normalization layer, a fully connected hidden layer, a non-linear activation layer, and a residual connection layer in sequence. The output of the penultimate hidden layer serves as the feature vector of the current hidden layer. It should be understood that the number of fully connected layers, the number of neurons, and the type of activation function can be adjusted according to the computing power and data scale of the smart gateway hardware.

[0038] The policy output head receives the current state hidden layer feature vector. The system outputs the probability distribution of a dynamic preprocessing depth adjustment strategy encoded for each preprocessing level through a fully connected layer and a Softmax layer. The dynamic preprocessing depth adjustment strategy includes a first processing action and a second processing action. The first processing action corresponds to a depth-safe preprocessing flow, and the second processing action corresponds to a lightweight-safe preprocessing flow.

[0039] The value output head receives the same hidden layer feature vectors of the current state. The output is a scalar state value estimate through another fully connected layer. The state value estimate is used to evaluate the long-term benefits of model actions in the current state during online incremental updates.

[0040] The weight generator head receives the hidden layer feature vector of the current state. Continuous values ​​are output through fully connected layers and the Sigmoid activation function. ,in Located between 0 and 1. The smart gateway will display continuous values. Linearly mapped to a preset scheduling weight range to generate dynamic scheduling weight factors. For example, it can be Mapped to interval, Corresponding to the lowest scheduling weight, This corresponds to the highest scheduling weight. In one specific implementation, It can be set to 1.0. It can be set to 10.0.

[0041] Before initial deployment, the deep reinforcement learning inference model can be pre-trained offline using historical coal mine operating data. The pre-training reward function comprehensively considers factors such as safety data processing latency, data throughput, data transmission success rate, safety processing matching degree, and misclassification penalty. During the online operation phase, the deep reinforcement learning inference model performs online incremental updates using samples from the subsequent operating condition category experience storage partition. In one specific implementation, each forward inference iteration of the deep reinforcement learning inference model takes less than 2 milliseconds to meet the real-time scheduling requirements of the coal mine edge intelligent gateway.

[0042] In a specific embodiment, a method for determining the operating condition category of a smart gateway based on an operating condition category prototype vector table is proposed, specifically as follows: While the deep reinforcement learning inference model outputs a dynamic preprocessing depth adjustment strategy and a dynamic scheduling weight factor, the intelligent gateway extracts the current state hidden layer feature vector. It then matches the current smart gateway's operating condition category with a pre-built prototype vector table of operating condition categories to determine the current operating condition category.

[0043] The operating condition category prototype vector table includes multiple operating condition category prototype vectors. Each operating condition category prototype vector corresponds to an intelligent gateway operating condition category defined by coal mine safety regulations or coal mine operating experience. The intelligent gateway operating condition categories include at least periodic disturbance categories, equipment failure precursor categories, safety event escalation categories, and normal operation categories.

[0044] Periodic disturbance categories can correspond to states such as periodic start-up and shutdown of downhole equipment, overlapping inspection and data collection cycles, and concentrated occurrence of routine data reporting; equipment failure precursor categories can correspond to states such as abnormal sensor jitter, increased communication link error rate, and abnormal changes in the arrival frequency of certain types of data frames; safety event escalation categories can correspond to states such as excessive gas concentration, water inrush warning, and sudden changes in roof pressure, where related data occur in concentrated amounts; and normal operation categories can correspond to states where data arrival is stable, cache pressure is low, and resource usage is within the normal range.

[0045] The smart gateway calculates the hidden layer feature vector of the current state respectively. Cosine similarity between the prototype vectors of each working condition category and the prototype vectors of each working condition category: ; in: Represents the hidden layer feature vector of the current state With the Prototype vectors for each working condition category Cosine similarity between them; Represents the hidden layer feature vector of the current state The vector norm; Indicates the first Prototype vectors for each working condition category The vector norm; The intelligent gateway selects the prototype vector of the operating condition category with the highest similarity score as the candidate prototype vector of the operating condition category. When the highest similarity score is greater than the similarity threshold... When the current smart gateway operating status is determined as the smart gateway operating condition category corresponding to the candidate operating condition category prototype vector, the maximum similarity score is not greater than the similarity judgment threshold. When this happens, the current operating status of the smart gateway is determined to be an unregistered operating condition category, or temporarily assigned to a preset normal operating category. An unregistered operating condition category refers to a state where the similarity between the current state's hidden layer feature vector and each prototype vector in the operating condition category prototype vector table does not reach the similarity judgment threshold.

[0046] The prototype vector table of operating conditions can be constructed as follows: Typical operating condition samples labeled by coal mine safety regulations or coal mine operation records are obtained. These typical operating condition samples include periodic disturbance samples, equipment failure precursor samples, safety event escalation samples, and normal operation samples. The typical operating condition samples are input into the prototype network, and the initial hidden layer feature vectors corresponding to each typical operating condition sample are extracted. The initial hidden layer feature vectors are aggregated according to the smart gateway operating condition category to obtain the embedding center vector corresponding to each smart gateway operating condition category. The embedding center vectors are written as operating condition category prototype vectors into non-volatile storage space to form the operating condition category prototype vector table.

[0047] In one specific implementation, the similarity determination threshold During the initialization phase, the minimum cosine similarity between the hidden layer feature vectors of similar samples and the corresponding prototype vectors of the work condition category is determined by analyzing the prototype network training process. This minimum cosine similarity is then adjusted downwards by a preset percentage. For example, a similarity threshold can be determined by adjusting the minimum cosine similarity of similar samples by 5%. Alternatively, the lower quartile of the similarity distribution of similar samples, a preset quartile, or a manually set threshold can be used as the similarity judgment threshold.

[0048] In one specific embodiment, a dynamic preprocessing depth adjustment strategy and a differentiated security preprocessing process are involved, specifically: The intelligent gateway dynamically selects differentiated security preprocessing processes for data frames encoded at corresponding preprocessing levels based on the dynamic preprocessing depth adjustment strategy output by the deep reinforcement learning inference model, and generates packets to be scheduled.

[0049] The dynamic preprocessing depth adjustment strategy includes a first processing action and a second processing action. The first processing action corresponds to the deep security preprocessing workflow, and the second processing action corresponds to the lightweight security preprocessing workflow.

[0050] In one specific implementation, the strategy output header outputs the probabilities of the first and second processing actions corresponding to each preprocessing level code in the current state. For each data frame to be processed corresponding to a preprocessing level code, the smart gateway can use a greedy strategy to select an action. If the probability corresponding to the first processing action is greater than a preset action determination threshold, the first processing action is determined to be executed; otherwise, the second processing action is executed. For example, the preset action determination threshold can be set to 0.5. This threshold can also be adjusted according to the safety requirements of the coal mine site, for example, increasing the selection tendency of the first processing action under the safety event escalation category.

[0051] When the dynamic preprocessing depth adjustment strategy instructs the corresponding data frame to perform the first processing action, the smart gateway calls the security coprocessor to perform a national cryptographic digital signature on the data frame payload, appends the signature result to the data frame payload, and performs national cryptographic encryption and encapsulation on the data frame payload and the signature result as a whole. Subsequently, forward error correction redundancy encoding is performed on the national cryptographically encrypted and encapsulated data, and an integrity verification field is calculated to generate the first scheduled packet. The first scheduled packet is suitable for data frames with high data security levels, high event time limit requirements, or whose current smart gateway operating condition is a security event escalation category.

[0052] In one specific implementation, the deep security preprocessing flow corresponding to the first processing action includes the following steps: First, the security coprocessor is invoked to calculate a digital signature for the data frame payload using the national cryptographic SM2 algorithm, and the signature result is appended to the end of the data frame payload; then, the national cryptographic SM4 algorithm is used to encrypt the data frame payload and the signature result in CBC mode, and the encryption key can be obtained from the session key list pre-set during deployment according to the data security level index; next, forward error correction redundancy encoding is performed on the ciphertext data, for example, using RS(255,223) code, adding 32 bytes of error correction redundancy after every 223 bytes of original data to improve the data recovery capability under the error environment of downhole communication; finally, SHA-256 digest is calculated for the final data block, and a preset length field in the digest is taken as the integrity verification field, for example, the first 16 bytes are taken as the integrity verification field, and the above processing results are encapsulated as the first scheduled packet. The above-mentioned SM2, SM4, RS(255,223) and SHA-256 are only specific implementation methods. Other equivalent signature, encryption, error correction and integrity verification methods can also be selected according to the safety specifications and equipment capabilities of coal mining enterprises.

[0053] When the dynamic preprocessing depth adjustment strategy instructs the corresponding data frame to perform the second processing action, the smart gateway adaptively zero-compresses the continuous zero-value data in the data frame payload and performs cyclic redundancy check calculation on the compressed data to generate a second scheduled packet. The second scheduled packet is applicable to data frames of normal state polling data, low security level data, or data frames whose current smart gateway operating condition category is normal operation category.

[0054] In one specific implementation, the lightweight security preprocessing flow corresponding to the second processing action includes the following steps: First, run-length encoding compression is performed on the consecutive zero-value data in the data frame payload. When the length of the consecutive zero-value sequence in the original data exceeds a preset length threshold, the consecutive zero-value sequence is replaced with a compression marker and a count value. For example, when the length of the consecutive zero-value sequence exceeds 8 bytes, the consecutive zero-value sequence can be replaced with a two-byte compression marker and a count value. Then, a CRC-16 check value is calculated on the compressed data, and the CRC-16 check value is appended to the end of the compressed data to generate a second packet to be scheduled. The aforementioned 8-byte threshold, two-byte field length, and CRC-16 check method can be configured according to the data frame structure and the processing capabilities of the field equipment.

[0055] When generating the first or second packet to be scheduled, the smart gateway will dynamically schedule the weighting factor. The remaining time of the current data frame and processing completion timestamp Write the extended scheduling description field into the header of the packet to be scheduled. Indicates the first The remaining time until the processing deadline of each data frame; Indicates the first The time recorded by the hardware timestamp counter when each data frame completes preprocessing.

[0056] In one specific implementation, the total length of the extended scheduling description field can be 12 bytes, including the dynamic scheduling weight factor. Remaining time quantity is represented using 4-byte floating-point numbers. Use a 4-byte unsigned integer to represent the processing completion timestamp. A 4-byte timestamp is used. The extended schedule description field can also be set to other lengths or other field encoding methods according to the communication protocol format.

[0057] In one specific implementation, a method for calculating the comprehensive priority index and implementing preemptive scheduling output is proposed, specifically as follows: The preemptive scheduling module parses the dynamic scheduling weight factor from the extended scheduling description field in the header of the packet to be scheduled. Remaining effective time and processing completion timestamp .

[0058] The smart gateway is based on the remaining time limit Determine the urgency level: ; in: Indicates the first The urgency coefficient corresponding to each packet to be scheduled; This represents a preset value greater than 0; in one specific implementation, It can be set to Second. It can be measured in seconds.

[0059] The smart gateway obtains the total number of bytes of buffered data packets in the uplink transmission queue. Maximum capacity of the uplink network interface transmit buffer The channel congestion status is determined based on the ratio of the two values. : ; in: This indicates the current channel congestion status; to avoid outliers affecting scheduling results, it can be... Limited to between 0 and 1. When A value close to 1 indicates a high level of congestion in the uplink channel; when... When the value is close to 0, it indicates that the uplink channel is relatively idle.

[0060] The intelligent gateway calculates the comprehensive priority index of the packets to be scheduled based on dynamic scheduling weight factors, timeliness urgency coefficients, and channel congestion status. : ; in: Indicates the first The overall priority index of each pending packet; This indicates the adjustment weight corresponding to the timeliness urgency coefficient; This indicates the adjustment weight corresponding to the channel's idle level; In one specific implementation, It can be set to 0.6. It can be set to 0.4. Multiplicative factor. Used to amplify or reduce the base priority; additive part This is used to increase priority when time is critical and network connectivity is good, and decrease priority when time is less critical or network congestion occurs. The above weight values ​​are for illustrative purposes only and can be adjusted according to the network bandwidth, event response requirements, and equipment performance in actual deployments.

[0061] The overall priority index of each packet to be scheduled Once generated, it is bound to the package serial number. The smart gateway uses a comprehensive priority index. The packets to be scheduled are sorted from highest to lowest priority. When two packets have the same overall priority index, they are sorted according to their processing completion timestamp. Sort the packets in ascending order so that packets that have completed preprocessing earlier are sent first.

[0062] The sorted packets to be scheduled are sequentially injected into a multi-level priority transmission queue that supports preemption of high-priority packets. If a packet with a higher overall priority index arrives while there is a packet with a lower overall priority index that has not yet been sent in the transmission queue, the preemptive scheduling module adjusts the transmission order of the two packets, allowing the packet with the higher overall priority index to enter the transmission position first. In one specific implementation, the hardware queue depth of the multi-level priority transmission queue can be set to 512. When a high-priority packet is enqueued, preemption logic is triggered, removing the lowest priority packet already enqueued and re-queuing it to ensure that critical security data is sent first.

[0063] For example, when data on excessive gas concentration and data from regular equipment status polling simultaneously enter the transmission queue, the data on excessive gas concentration typically has a higher data security level, a shorter remaining timeframe, and a higher dynamic scheduling weight factor. Therefore, its overall priority index is higher than that of the data from regular equipment status polling. Based on this, the preemptive scheduling module prioritizes the transmission of data on excessive gas concentration, thereby improving the real-time transmission capability of critical safety data.

[0064] In a specific embodiment, a method for constructing decision quadruples and partitioning the experience storage of working condition categories is proposed, specifically as follows: After each decision is made by the deep reinforcement learning inference model, the intelligent gateway constructs a decision quadruple based on the state, action, reward, and next state generated by the decision.

[0065] Here, the state represents the multidimensional decision input matrix or the state features obtained from it; the action represents the dynamic preprocessing depth adjustment strategy and dynamic scheduling weight factor output by the deep reinforcement learning inference model; the reward represents the evaluation value determined based on the processing latency, transmission success, security processing matching, resource occupancy, and channel congestion changes after this decision; and the next state represents the multidimensional decision input matrix or state features formed at the next decision moment after executing this action.

[0066] In one specific implementation, the reward function can comprehensively consider factors such as security data processing latency, the success rate of scheduled packet transmission, data throughput, whether security preprocessing actions match the data security level and event time limit level, security coprocessor utilization, processor load changes, uplink network congestion changes, and misclassification penalties. For data frames of high security level or security event escalation categories, if the model selects a lightweight security preprocessing process that results in insufficient security protection, a higher penalty is imposed; for ordinary data of normal operation categories, if the model excessively selects a deep security preprocessing process that results in wasted security coprocessor and processor resources, a resource consumption penalty is imposed.

[0067] The gateway stores the decision quadruple into the corresponding partition of the operating condition category experience storage partition based on the current operating condition category of the smart gateway. The operating condition category experience storage partition can include a periodic disturbance partition, a device failure precursor partition, a safety event escalation partition, and a normal operation partition. The capacity of each operating condition category experience storage partition can be configured according to the importance of each smart gateway operating condition category in the coal mine safety regulations.

[0068] In one specific implementation, the capacity of the security event escalation partition and the device failure precursor partition is larger than the capacity of the normal operation partition, in order to increase the proportion of critical safety condition samples in subsequent online incremental updates. The periodic disturbance partition can be set to a medium capacity to ensure that the model can learn the resource contention characteristics under periodic disturbances. The normal operation partition can be set to a smaller but stable capacity to avoid the model shifting towards a single normal strategy due to an excessive number of normal samples.

[0069] In a specific embodiment, an online incremental update method and a category prototype interval constraint loss are proposed, specifically as follows: During the operation of the smart gateway, the online incremental update module extracts samples from the experience storage partitions of each working condition category according to a preset ratio to form training batches. The states of each sample in the training batch are re-inputted into the deep reinforcement learning inference model to extract the hidden layer feature vectors of each sample.

[0070] The smart gateway constructs a total loss function based on a combination of reinforcement learning loss and class prototype margin constraint loss: ; in: Represents the total loss function; This indicates the loss in reinforcement learning; This represents the category prototype interval constraint loss; This represents the balance coefficient of the category prototype margin constraint loss in the total loss function; Reinforcement learning loss It can include policy gradient loss and value loss, used to enable deep reinforcement learning inference models to learn better dynamic preprocessing depth adjustment policies and dynamic scheduling weight factors in different states.

[0071] For each sample in the training batch, the hidden layer feature vector of that sample is used as the constrained vector, the prototype vector of the operating condition category corresponding to the smart gateway's operating condition category to which the sample belongs is used as the same-class prototype vector, and the prototype vector of the operating condition category with the highest similarity to the hidden layer feature vector of that sample but in a different category is used as the out-of-class prototype vector. The class prototype margin constraint loss is used to reduce the distance between the constrained vector and the same-class prototype vector, and to increase the distance between the constrained vector and the out-of-class prototype vector, so as to distinguish the smart gateway operating states with similar feature vectors but different corresponding security preprocessing procedures.

[0072] The category prototype interval constraint loss can be determined by the following formula: ; in: Indicates the number of samples in the training batch; Indicates the first Hidden layer feature vectors of each sample; Indicates the first The prototype vector of the same type corresponding to the smart gateway operating condition category of each sample; Indicates the first The heterogeneous prototype vector with the highest similarity between the hidden layer feature vectors of each sample and a different category; express and The similarity between them; express and The similarity between them; in one implementation, cosine similarity is used as the similarity calculation method; Indicates the interval hyperparameter; In one specific implementation, the interval hyperparameter It can be set to 0.2. Balance coefficient. The initial value can be set to 0.1, and decay exponentially with the number of online training steps to prevent the class prototype interval constraint loss from overpowering the main reinforcement learning task in the later stages of training. For example, It can be attenuated using the following formula: ; in: Indicates the attenuation factor; This indicates the number of steps taken during online training; in one specific implementation, It can be set to 0.99.

[0073] By using the aforementioned category prototype interval constraint loss, the deep reinforcement learning inference model can maintain the feature boundaries between different smart gateway operating condition categories during online incremental updates, reduce gradient interference caused by mixed training of semantically similar but different processing strategies, and reduce the risk of the model shifting towards a single operating condition strategy in the long run.

[0074] In a specific embodiment, an exponential moving average update method for the prototype vector table of working condition categories is proposed, specifically as follows: When the smart gateway is idle and the preset update interval is met, the smart gateway retrieves the accumulated samples corresponding to each smart gateway operating condition category from the operating condition category experience storage partition. For each smart gateway operating condition category, the accumulated samples under that category are input into the current deep reinforcement learning inference model to extract the corresponding hidden layer feature vectors and calculate the mean vector value under that category.

[0075] In one specific implementation, when the smart gateway is in idle mode and the time interval since the last prototype update exceeds a preset update interval... When this occurs, the process of updating the prototype vector table of the working condition category is triggered. It can be set to 300 seconds. This applies to each smart gateway's operating condition category. Retrieve the most recently accumulated data from the experience storage partition corresponding to the operating condition category. One sample, The upper limit can be set to 128. The states of these samples are input one by one into the current deep reinforcement learning inference model to extract hidden layer feature vectors and calculate the vector mean. : ; in: Indicates the first The mean of the accumulated hidden layer feature vectors of each smart gateway operating condition category; Indicates the use of updating the first The number of samples for each operational condition category prototype vector; Indicates the first Under the category of smart gateway operating conditions, the first Hidden layer feature vectors of each sample; The prototype vector of the working condition category can be updated using an exponential moving average: ; in: Indicates the first The updated prototype vector of the operating condition category for each smart gateway; Indicates the first The prototype vector of the operating condition category of each smart gateway before the update; Represents the momentum factor. A preset value between 0 and 1; in one specific implementation, It can be set to 0.9 to control the degree to which the old prototype vector is retained.

[0076] To prevent drastic shifts in the prototype vectors of different operating conditions due to short-term anomalies, the intelligent gateway limits the single-step movement of the corresponding prototype vector. The prototype movement amount can be determined by the following formula: ; in: Indicates the first The amount of movement of the prototype vector for each work condition category; when Greater than the preset maximum step size At this time, the update magnitude is reduced proportionally to ensure that the movement of the prototype vector of the working condition category does not exceed the preset maximum step size. The scaled update can be expressed as: ; in: This represents the scaled-up, updated prototype vector of the working condition category; in one specific implementation, It can be set to 0.3.

[0077] The updated operating condition category prototype vectors are written back to the operating condition category prototype vector table in non-volatile storage, overwriting the old ones. After updating the operating condition category prototype vectors, the smart gateway redetermines the similarity threshold based on the updated vectors. The similarity threshold can be determined based on the similarity distribution between the hidden layer feature vectors of samples in each operating condition category and the corresponding operating condition category prototype vectors after the update. For example, the lower quartile of the cosine similarity between the hidden layer feature vectors of samples in all operating condition categories and the corresponding operating condition category prototype vectors after the update can be used as the new similarity threshold to ensure that the operating condition category determination boundary matches the current hidden layer feature space.

[0078] If the number of partition samples for a certain smart gateway operating condition category is less than a preset number, the prototype vector for that operating condition category will not be updated temporarily, and the prototype vector for the operating condition category before the update will be used. In one specific implementation, if the number of partition samples for a certain smart gateway operating condition category is less than 10, the prototype vector for the corresponding operating condition category will not be updated temporarily.

[0079] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent the existence of A alone, A and B simultaneously, or B alone. A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of singular or plural items. For example, at least one of a, b, and c can represent: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, and c can be single or multiple.

[0080] Those skilled in the art will recognize that the units and algorithm steps described in the embodiments disclosed herein can be implemented using electronic hardware, computer software, or a combination of electronic hardware and software. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0081] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0082] In the several embodiments provided in this application, any function, if implemented as a software functional unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0083] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.

Claims

1. An event-driven method for hierarchical preprocessing and scheduling of edge security data in coal mine smart gateways, characterized in that, Includes the following steps: Receive data frames to be processed uploaded by underground coal mine equipment, determine the preprocessing level code based on the data security level identifier and event time limit level identifier carried by the frame, and form a preprocessing requirement description frame. Based on the data frame arrival rate, remaining time, and buffer queue length corresponding to different preprocessing levels, a preprocessing load state vector is constructed, and combined with the processor load, memory idle rate, available encryption throughput of the security coprocessor, and effective uplink network bandwidth of the smart gateway to form a multi-dimensional decision input matrix. The multidimensional decision input matrix is ​​input into the deep reinforcement learning inference model, and the output is a dynamic preprocessing depth adjustment strategy and a dynamic scheduling weight factor. At the same time, the output of the hidden layer of the deep reinforcement learning model is extracted as the current state hidden layer feature vector, and matched with the pre-constructed working condition category prototype vector table to determine the current smart gateway operating condition category. The preprocessing process is selected and a package to be scheduled is generated based on the dynamic preprocessing depth adjustment strategy. The comprehensive priority index is determined based on the dynamic scheduling weight factor, the remaining time, and the channel congestion status, and preemptive scheduling is performed according to the comprehensive priority index. The decision quadruple, consisting of the state, action, reward, and next state generated by the deep reinforcement learning inference model, is stored in the working condition category experience storage partition according to the current smart gateway operating condition category. The deep reinforcement learning model is then updated online based on the working condition category experience storage partition.

2. The event-driven coal mine smart gateway edge security data hierarchical preprocessing and scheduling method according to claim 1, characterized in that, The preprocessing level code is determined based on the data security level identifier and event time limit level identifier carried in the data frame to be processed, and a preprocessing requirement description frame is formed, including: Receive data frames to be processed generated by underground sensors, monitoring substations and video equipment in coal mines after protocol parsing; Read the data security level identifier and event time limit level identifier carried in the data frame to be processed. The data security level identifier is used to indicate the importance level of the safety monitoring data corresponding to the data frame to be processed, and the event time limit level identifier is used to indicate the processing time limit level of the downhole event corresponding to the data frame to be processed. Based on the data security level identifier and the event time limit level identifier, the corresponding preprocessing level code is obtained by querying the preset mapping table; The preprocessing level code is appended to the data frame to be processed to form a preprocessing requirement description frame, and the preprocessing requirement description frame is output to the cluster buffer.

3. The event-driven coal mine smart gateway edge security data hierarchical preprocessing and scheduling method according to claim 2, characterized in that, The specific steps for constructing the multidimensional decision input matrix are as follows: Using the hardware timestamp counter built into the smart gateway as the time reference, the arrival time of preprocessing requirement description frames with the same preprocessing level encoding in the clustered buffer is recorded. Based on the sliding time window, the average arrival rate, average remaining time, and buffer queue length of the data frames corresponding to each preprocessing level are calculated respectively. The preprocessing level coding, average data frame arrival rate, average time remaining, and buffer queue length are combined to form a preprocessing load state vector. Real-time acquisition of current smart gateway processor load rate, memory idle rate, real-time available encrypted throughput of security coprocessor, and effective uplink network bandwidth, forming a resource status vector; The preprocessed load state vector and resource state vector are concatenated to form a multidimensional decision input matrix.

4. The event-driven coal mine smart gateway edge security data hierarchical preprocessing and scheduling method according to claim 1, characterized in that, The deep reinforcement learning inference model includes a shared feature extraction network, a policy output head, a value output head, and a weight generation head. The shared feature extraction network is used to extract features from the multidimensional decision input matrix and output the current state hidden layer feature vector; The policy output header is used to receive the current state hidden layer vector and output the dynamic preprocessing depth adjustment policy for each preprocessing level encoding. The value output head is used to receive the hidden layer feature vector of the current state and output the state value of the current state; The weight generation head is used to receive the current state hidden layer feature vector, output continuous weight values, and then map the continuous weight values ​​to a preset scheduling weight range to generate dynamic scheduling weight factors.

5. The event-driven coal mine smart gateway edge security data hierarchical preprocessing and scheduling method according to claim 4, characterized in that, The current gateway operating condition category is determined by matching against a pre-built prototype vector table of operating condition categories, including: Extract the current state hidden layer feature vector from the preset number of hidden layers in the deep reinforcement learning inference model; Multiple working condition category prototype vectors are read from the working condition category prototype vector table. Each working condition category prototype vector corresponds to a gateway operating working condition category defined by the coal mine safety regulations. The gateway cloud working condition categories include at least periodic disturbance category, equipment failure precursor category, safety event escalation category, and normal operation category. Calculate the cosine similarity between the current state hidden layer feature vector and the prototype vector of each working condition category to obtain multiple similarity scores; The prototype vector of the working condition category with the highest similarity score is selected as the candidate prototype vector of the working condition category. When the maximum similarity score is greater than the similarity judgment threshold, the current gateway operating status is determined as the gateway operating condition category corresponding to the candidate operating condition category prototype vector; When the similarity score between pairs is not greater than the similarity judgment threshold, the current gateway operation status will be judged as the unregistered working condition category, or temporarily assigned to the preset normal operation category.

6. The event-driven coal mine smart gateway edge security data hierarchical preprocessing and scheduling method according to claim 5, characterized in that, The steps for constructing the prototype vector table of the working condition categories are as follows: Obtain typical working condition samples marked by coal mine safety regulations. The typical working condition samples include periodic disturbance samples, equipment failure precursor samples, safety event escalation samples, and normal operation samples. The typical working condition samples are input into the prototype to construct the network, and the initial hidden layer feature vectors corresponding to each typical working condition sample are extracted. The initial hidden layer feature vectors are aggregated according to the gateway operating condition category to obtain the embedding center vector corresponding to each gateway operating condition category; Write the embedding center vector as the prototype vector of the working condition category into the non-volatile storage space to form the working condition category prototype vector table. The similarity threshold is determined in the initial stage based on the similarity distribution between the hidden layer feature vector of the sample and the prototype vector of the corresponding operating condition category under the same gateway operating condition category.

7. The event-driven coal mine smart gateway edge security data hierarchical preprocessing and scheduling method according to claim 1, characterized in that, The dynamic preprocessing depth adjustment strategy includes a first processing action and a second processing action. The first safe preprocessing process or the second safe preprocessing process is selected to generate the scheduled packet according to the dynamic preprocessing depth adjustment strategy. When the dynamic preprocessing depth adjustment strategy instructs the corresponding data frame to perform the first processing action, the security coprocessor is invoked to perform a national cryptographic digital signature on the data frame payload, the signature result is appended to the data frame payload, and the data frame payload and signature result are encapsulated using national cryptographic encryption. Perform forward error correction redundancy encoding on the data after it has been encrypted and encapsulated using national cryptographic standards, calculate the integrity verification field, and generate the first packet to be scheduled. When the dynamic preprocessing depth adjustment strategy instructs the corresponding data frame to perform the second processing action, adaptive zero compression is performed on the continuous zero-value data in the data frame payload, and cyclic redundancy check calculation is performed on the compressed data to generate the second packet to be scheduled. When generating the first or second scheduled packet, the dynamic scheduling weight factor, the remaining time of the current data frame, and the processing completion timestamp are written into the extended scheduling description field of the header of the scheduled packet.

8. The event-driven coal mine smart gateway edge security data hierarchical preprocessing and scheduling method according to claim 7, characterized in that, The comprehensive priority index is determined based on the dynamic scheduling weight factor, remaining time value, and channel congestion status. Preemptive scheduling is then performed according to this comprehensive priority index, including: The dynamic scheduling weight factor, remaining time, and processing completion timestamp are parsed from the extended scheduling description field in the header of the packet to be scheduled. The urgency coefficient is determined by the reciprocal of the remaining time. Obtain the total number of bytes of buffered data packets in the uplink transmission queue and the maximum capacity of the uplink network interface transmission buffer, and determine the channel congestion status based on the ratio of the two. The comprehensive priority index of the packet to be scheduled is calculated based on the dynamic scheduling weight factor, the timeliness urgency coefficient, and the channel congestion status. The packets to be scheduled are sorted from high to low according to the comprehensive priority index. If the comprehensive priority index is the same, they are sorted in ascending order according to the processing completion timestamp. The sorted packets to be scheduled are injected into a multi-level priority sending queue that supports preemption of high-priority packets, so that packets with higher overall priority index enter the sending queue first and replace the sending position of packets with lower overall priority index.

9. The event-driven coal mine smart gateway edge security data hierarchical preprocessing and scheduling method according to claim 1, characterized in that, The decision quadruple, consisting of the state, action, reward, and next state generated by the model decision, is stored in the task category experience storage partition according to the current gateway operating condition category. The deep reinforcement learning inference model is then incrementally updated online based on the task category experience storage partition, including: Each decision made by the deep reinforcement learning inference model constitutes a decision quadruple: the state, action, reward, and next state. Based on the current gateway operating condition category, the decision quadruple is stored in the corresponding partition of the operating condition category experience storage partition; Configure the capacity of the experience storage partition for each operating condition category according to the operating condition priority preset in the coal mine safety regulations for each gateway operating condition category; During gateway operation, samples are drawn from the experience storage partitions of each working condition category according to a preset ratio to form training batches. The state of each sample in the training batch is re-input into the deep reinforcement learning inference model to extract the hidden layer feature vector of each sample; A total loss function is constructed based on reinforcement learning loss and category prototype margin constraint loss, and the model parameters of the deep reinforcement learning inference model are updated according to the total loss function.

10. The event-driven coal mine smart gateway edge security data hierarchical preprocessing and scheduling method according to claim 9, characterized in that, The category prototype interval constraint loss and the update of the working condition category prototype vector table include: For each sample in the training batch, the hidden layer feature vector of the sample is used as the constrained vector, the prototype vector of the working condition category corresponding to the gateway operating condition category to which the sample belongs is used as the same type prototype vector, and the prototype vector of the working condition category that has the highest similarity to the hidden layer feature vector of the sample but is of a different category is used as the different type prototype vector. The category prototype interval constraint loss reduces the distance between the constrained vector and the same type of prototype vector, and increases the distance between the constrained vector and the different type of prototype vector, so as to distinguish the gateway running states that have similar feature vectors but different corresponding security preprocessing processes. When the smart gateway is idle and meets the preset update interval, it retrieves the cumulative samples corresponding to the operating condition category of each gateway from the operating condition category experience storage partition. The accumulated samples are input into the current deep reinforcement learning inference model to extract the corresponding hidden layer feature vectors and calculate the vector mean under each gateway operating condition category. The prototype vectors of the corresponding working conditions in the prototype vector table are updated by exponential moving average based on the mean of the vectors, and the single moving step size of the prototype vectors of the corresponding working conditions is limited. After updating the prototype vector of the working condition category, the similarity judgment threshold is re-determined based on the updated prototype vector of the working condition category.