The invention discloses a TSN scheduling optimization method and device based on flow sensing autonomous learning, equipment and a medium. The method comprises the following steps: deploying a lightweight flow detection module in a switch or a
router, and after a controller receives a
data request, automatically identifying a newly arrived unknown
service flow by using the lightweight flow detection module, and judging whether the newly arrived unknown
service flow is a periodic TT flow or an unpredictable burst flow; the controller performs classification management on the identified
service flow types, collects
topological information and flow requirements of the whole network and issues the
topological information and the flow requirements to the terminal nodes through a
network management interface; the controller constructs an intelligent
queue scheduling task based on the collected
network topology information and traffic demand and converts the task into a Markov
decision process MDP, network resources,
queue states and priorities are used as a
state space, a scheduling strategy is used as an action space, a reward function is designed in combination with
throughput and
delay indexes, and an intelligent
queue scheduling task is obtained. Driving a dynamic environment through real-
time data and training a DRL model; an enhanced queue scheduling mechanism Pro-CQF is adopted, different priority labels are configured according to classified flow types, and then
mixed flow scheduling is carried out; the controller periodically collects time
delay,
packet loss rate and end-to-end
transmission delay indexes and feeds back the indexes to the DRL model, and a scheduling strategy is updated online. According to the method, the traffic sensing and scheduling efficiency is greatly improved in a network environment in which multiple service flows coexist and end-side equipment functions are different, and the reliability and the expandability of the TSN in
industrial Internet of Things,
edge computing and other high-real-time application scenes are remarkably enhanced.