Substation TSN flow optimization scheduling method and system based on near-end strategy optimization algorithm, and medium

By combining near-end policy optimization algorithms and reinforcement learning, adaptive scheduling of TSN traffic in substations is achieved, solving the adaptability and demand matching problems of static scheduling schemes, improving communication reliability and resource utilization, and is suitable for multi-service traffic scenarios in smart substations.

CN121567663APending Publication Date: 2026-02-24STATE GRID HUBEI ELECTRIC POWER RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511485467.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-17
Publication Date
2026-02-24

AI Technical Summary

Technical Problem

Existing substation TSN dispatching schemes suffer from poor static adaptability, inaccurate matching of service demands, and a lack of adaptiveness in dispatching decisions, making them unable to effectively cope with dynamic changes in multi-service traffic and low resource utilization.

Method used

By employing a near-end policy optimization algorithm combined with reinforcement learning, adaptive scheduling of TSN traffic in substations is achieved through time-series feature extraction, traffic modeling, and dynamic decision-making. This includes dynamic time slot allocation, adaptive priority adjustment, and dynamic bandwidth adaptation. The AI ​​model and TSN protocol stack are combined and executed in real time on the FPGA smart network card.

Benefits of technology

It improves the protection signal delay satisfaction rate to over 99.9%, increases bandwidth utilization by 20%-30%, reduces manual operation and maintenance costs, and is suitable for multi-service, high-dynamic communication scenarios in smart substations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121567663A_ABST
    Figure CN121567663A_ABST
Patent Text Reader

Abstract

The invention relates to a substation TSN flow optimization scheduling method and system based on a near-end strategy optimization algorithm and a medium. The method comprises the following steps: environment deployment: deploying a TSN protocol stack and an AI scheduling engine in an embedded real-time operating system of a substation, and establishing a flow data acquisition and analysis environment; traffic modeling: performing feature extraction and demand modeling on multiple types of service traffic (such as telemetering, remote control and protection signals) of the transformer substation through a near-end strategy optimization algorithm, and generating a traffic priority and time delay constraint model; dynamic scheduling: based on AI model output, combining a QBV / QCI scheduling mechanism of a TSN to realize dynamic time slot allocation and priority adjustment of traffic; and hardware adaptation: designing a TSN intelligent network card based on the FPGA, integrating an AI lightweight reasoning module, and realizing real-time execution of a scheduling strategy. Through the adaptive decision-making capability of the near-end strategy optimization algorithm, the scheduling adaptability of the TSN to the complex dynamic flow of the transformer substation is improved, the deterministic transmission requirements of different services are met, and high reliability and low time delay of communication of a power system of the transformer substation are guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power system communication and intelligent dispatching, and in particular to a substation TSN traffic optimization dispatching method, system and medium based on a near-end strategy optimization algorithm, which is applicable to deterministic communication assurance in substation multi-service traffic scenarios. Background Technology

[0002] As a core node in the power system, substations require communication networks to carry various types of services, including telemetry (such as current and voltage data acquisition), remote control (such as switch operation commands), and protection signals (such as fault trip signals). These different services have significantly different requirements for communication latency and reliability—for example, protection signals require millisecond-level latency and zero packet loss, while telemetry data allows for some latency fluctuations. With the development of smart substations, the volume of service traffic continues to grow, and the traditional "best-effort" transmission mechanism of Ethernet cannot meet these diverse needs. Time-Sensitive Networking (TSN) technology, with its deterministic latency and bandwidth guarantee capabilities, has become the core solution for substation communication. However, the following key issues exist in existing substation TSN dispatching schemes:

[0003] (1) Poor adaptability of static scheduling: Traditional TSN adopts a pre-configured QBV time slot allocation strategy, which cannot dynamically respond to sudden changes in substation traffic (such as a surge in protection signals during a fault), which can easily lead to insufficient time slots for high-priority traffic or wasted bandwidth for low-priority traffic.

[0004] (2) Inaccurate matching of business needs: The personalized needs of multiple services in the substation are not fully considered. The traffic is scheduled by simply prioritizing the traffic, which makes it difficult to balance the "delay guarantee of high priority services" and the "overall bandwidth utilization".

[0005] (3) Lack of adaptability in scheduling decisions: When the status of substation equipment or the type of business changes, the scheduling parameters need to be manually reconfigured, which makes it impossible to automatically optimize the scheduling strategy, increasing operation and maintenance costs and response delays.

[0006] Based on the success of reinforcement learning in fields such as autonomous driving and AlphaGo Zero, researchers have proposed a reinforcement learning-based scheduling algorithm for Transmission Management Networks (TSN). The near-end policy optimization algorithm, as a highly efficient reinforcement learning algorithm, utilizes unsupervised self-learning to solve traffic scheduling problems in TSNs. It possesses powerful feature extraction, dynamic decision-making, and self-learning capabilities, and can generate adaptive TSN scheduling strategies by analyzing substation traffic patterns and service requirements. Therefore, combining the near-end policy optimization algorithm with TSN technology to design an intelligent traffic scheduling scheme suitable for substation scenarios is of great significance for improving substation communication reliability and resource utilization. Summary of the Invention

[0007] The purpose of this invention is to provide a substation TSN traffic optimization scheduling method, system, and medium based on a near-end strategy optimization algorithm, so as to solve the problems of static, poor adaptability, and inaccurate demand matching of existing substation TSN scheduling schemes, and to realize dynamic, accurate, and adaptive scheduling of multi-service traffic in substations.

[0008] To achieve the above objectives,

[0009] In a first aspect, embodiments of this application provide a substation TSN traffic optimization scheduling method based on a near-end strategy optimization algorithm, comprising the following specific steps:

[0010] (1) Environment deployment:

[0011] Deploy the TSN protocol stack (supporting QBV, QCI, PTP, etc.) and AI scheduling engine (integrating LSTM, CNN, and reinforcement learning algorithm modules) in the substation embedded real-time operating system (such as VxWorks, RT-Linux); build a traffic data acquisition module to collect traffic data of various services in the substation through switch mirror ports and network card packet capture tools, including packet length, timestamp, service type identifier, and transmission latency; construct a real-time analysis environment and deploy AI model inference services using edge computing nodes to ensure low-latency output of scheduling decisions;

[0012] (2) Flow modeling:

[0013] Feature extraction and demand modeling of various types of business traffic in substations are performed using a near-end strategy optimization algorithm, specifically including:

[0014] Temporal feature extraction: GAT (Graph Attention Network) is used to process the historical traffic data of the substation into graph structure data, extract the periodic and burst features of different business traffic, generate traffic temporal feature vectors, and use DRL proxy to determine the traffic transmission order to optimize delay.

[0015] Type feature extraction: Feature extraction is performed on the header information of traffic data packets (such as service type identifier, data length, timestamp) through near-end strategy optimization, and a traffic type-feature mapping library is constructed using two neural networks; Traffic scheduling: The QBV scheduling rules of TSN are used to optimize the data transmission of DDS;

[0016] Demand Decision Model Training: Combining reinforcement learning algorithms, the traffic demand decision model is trained with "protection signal delay satisfaction rate ≥ 99.9%", "remote control command packet loss rate ≤ 0.1%" and "overall bandwidth utilization rate ≥ 85%" as reward functions, and "priority of each service traffic, delay threshold, and bandwidth allocation ratio" as decision variables. The model input is a real-time traffic feature vector, and the output is the scheduling parameters of each traffic (priority level 1-5, maximum allowable delay, and bandwidth requirement).

[0017] Incremental model update: Real-time flow data of the substation is collected every 24 hours to incrementally train the AI ​​model, update the model parameters, and adapt to the daily / weekly periodic changes in flow, such as the difference in telemetry data volume between weekdays and holidays.

[0018] (3) Dynamic scheduling:

[0019] Based on the traffic scheduling parameters output by the AI ​​model, and combined with the TSN's QBV / QCI scheduling mechanism, dynamic optimization scheduling of traffic is achieved, specifically including:

[0020] Dynamic time slot allocation: The AI ​​scheduling engine calculates the load rate of each priority time slot in real time within the current QBV scheduling cycle. If the load rate of a certain priority (such as the level 1 priority corresponding to the protection signal) exceeds 80%, the proportion of time slots for level 2 priority in that cycle is automatically compressed from 30% to 20%, and 10% of time slots are added for level 1 priority. Dynamic time slots are allocated for periodic traffic, and the time slot length is adjusted according to the real-time traffic average to avoid resource waste caused by fixed time slots. Shared time slots are allocated for non-real-time monitoring traffic, and bandwidth is only occupied when high-priority time slots are idle.

[0021] Priority adaptive adjustment: When the substation SCADA system detects a device fault (such as transformer overcurrent), the near-end strategy optimization algorithm analyzes the fault type and related services, triggering a priority adjustment strategy—raising the priority of fault-related protection signals from level 1 to "emergency level" and temporarily preempting low-priority time slots; at the same time, reducing the priority of non-related services (such as telemetry data from non-faulty areas) until the fault is cleared and the default priority is restored.

[0022] Dynamic bandwidth adaptation: The AI ​​model, based on the traffic bandwidth demand prediction results and combined with the TSN bandwidth reservation mechanism, reserves dedicated bandwidth for protection signals and remote control commands; a "bandwidth sharing + flexible adjustment" mechanism is adopted for telemetry data, allowing telemetry data to be transmitted in excess when bandwidth is idle, and limiting its transmission rate when bandwidth is tight, to ensure that high-priority services are not affected.

[0023] (4) Hardware adaptation

[0024] A TSN smart network interface card based on FPGA design integrates a lightweight AI inference module to achieve real-time execution of scheduling strategies, specifically including:

[0025] The TensorRT lightweight inference engine is integrated to convert the policy model output by the AI ​​scheduling engine into FPGA-executable instructions, with inference latency controlled within 100 microseconds.

[0026] The TSN scheduling execution unit is designed to support dynamic updates of the QBV time slot table and QCI priority mapping. Based on the scheduling parameters output by AI, it controls traffic to be sent in the specified time slot, avoiding traffic preemption outside the scheduling window.

[0027] Deploy a PTP clock synchronization unit to synchronize with the substation's global clock source via the IEEE 1588 PTP protocol, ensuring network card time accuracy of ±10 nanoseconds and avoiding time slot alignment errors;

[0028] A traffic monitoring unit is added to collect real-time data on network card transmission and reception latency and packet loss rate, and feed it back to the AI ​​scheduling engine. If the latency of a certain service exceeds the threshold, the model is triggered to recalculate the scheduling parameters.

[0029] Secondly, embodiments of this application provide a substation TSN traffic optimization scheduling system based on a near-end strategy optimization algorithm, comprising:

[0030] The environment deployment module deploys the TSN protocol stack and AI scheduling engine within the substation's embedded real-time operating system, and builds a traffic data acquisition module (including switch mirror ports and packet capture tools) and a real-time analysis environment (edge ​​computing nodes) to achieve full traffic acquisition and low-latency analysis of the substation.

[0031] The traffic modeling module includes a time-series feature extraction unit, a type feature extraction unit, a demand decision unit, and a model update unit.

[0032] Time-series feature extraction unit: GAT (Graph Attention Network) is used to process the historical flow data of substations into graph structure data, analyze the historical flow data of substations, and generate time-series feature vectors;

[0033] Type feature extraction unit: Through near-end strategy optimization, two neural networks are used to extract packet header features from traffic data packets (such as service type identifier, data length, timestamp) and build a traffic type-feature mapping library;

[0034] Demand Decision Unit: Trains a traffic demand decision model using reinforcement learning algorithms and outputs scheduling parameters for each traffic flow.

[0035] Model update unit: Regularly collects real-time traffic data, performs incremental training on the AI ​​model, and updates the parameters.

[0036] The dynamic scheduling module, based on AI model output and the TSN scheduling mechanism, enables dynamic allocation of time slots, adaptive priority adjustment, and dynamic bandwidth adaptation, including:

[0037] Time slot allocation unit: calculates time slot load rate in real time and adjusts the proportion of time slots of each priority.

[0038] Priority adjustment unit: Dynamically updates service priorities based on substation fault status and traffic delay feedback;

[0039] Bandwidth adaptation unit: Based on traffic bandwidth demand forecasting, it realizes the flexible adjustment of dedicated bandwidth reservation and shared bandwidth.

[0040] The hardware adaptation module, based on FPGA design for TSN smart network interface cards, includes:

[0041] AI Lightweight Inference Unit: Integrates the TensorRT engine to parse AI scheduling strategies and output execution instructions;

[0042] TSN Scheduling Execution Unit: Implements QBV / QCI scheduling logic and controls traffic transmission timing;

[0043] Clock synchronization unit: Based on the PTP protocol, it synchronizes with the global clock to ensure time accuracy;

[0044] Traffic monitoring unit: Collects network interface card (NIC) traffic data and feeds it back to the AI ​​scheduling engine for policy optimization.

[0045] Thirdly, embodiments of this application provide a computer-readable storage medium storing program code, which, when executed by a processor, implements the steps of the substation TSN traffic optimization scheduling method based on the near-end strategy optimization algorithm as described above.

[0046] The beneficial effects of adopting the above embodiments are as follows: The present invention realizes the closed loop of "precise demand matching - dynamic adjustment - real-time execution" of the substation TSN scheduling strategy through the time series analysis, feature extraction and dynamic decision-making capabilities of the near-end strategy optimization algorithm; compared with the traditional static scheduling scheme, it can improve the protection signal delay satisfaction rate to more than 99.9%, improve the bandwidth utilization rate by 20%-30%, and reduce the cost of manual operation and maintenance. It is suitable for multi-service and highly dynamic communication scenarios in smart substations, and provides a guarantee for the safe and stable operation of the power system. Attached Figure Description

[0047] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0048] Figure 1 This is a diagram showing the overall system architecture of the design of this invention;

[0049] Figure 2 This is a schematic diagram of the traffic modeling process of the present invention;

[0050] Figure 3 This is a flowchart of the dynamic scheduling logic of the present invention;

[0051] Figure 4 This is a schematic diagram of the internal structure of the FPGA smart network card of the present invention. Detailed Implementation

[0052] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without inventive effort are within the scope of protection of this invention.

[0053] It should be noted that the descriptions involving "first," "second," etc., in this invention are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of that feature. Furthermore, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by this invention.

[0054] like Figure 1 As shown, the substation TSN traffic optimization scheduling system based on the near-end strategy optimization algorithm described in this invention is divided into four layers:

[0055] Hardware layer: including substation switches, FPGA smart network cards, PTP clock sources, and edge computing nodes, responsible for traffic acquisition, scheduling execution, and clock synchronization;

[0056] Protocol layer: Deploys the TSN protocol stack (supporting QBV, QCI, PTP, etc.) and AI algorithm runtime environment (such as TensorFlow Lite), providing basic scheduling protocols and algorithm execution capabilities;

[0057] Functional layer: Includes environment deployment module, traffic modeling module, dynamic scheduling module, and hardware adaptation module, realizing traffic analysis, model training, scheduling decision and policy execution;

[0058] Application layer: Connects to the substation's telemetry, remote control, and protection signal systems, receives business data, and provides feedback on scheduling effectiveness.

[0059] The system workflow is as follows: application layer business data is analyzed by the traffic modeling module of the functional layer to generate scheduling parameters; the dynamic scheduling module generates scheduling strategies in conjunction with the TSN mechanism; the hardware adaptation module executes the strategies through the FPGA smart network card; and finally, the scheduling effect is fed back through the traffic monitoring unit for model optimization.

[0060] As shown in Figure 2, the specific process of the traffic modeling module is as follows:

[0061] Data input: Collect historical flow data (time series data) and real-time data packets (packet header data) from the substation;

[0062] Feature extraction: GAT analysis of time series data generates time series feature vectors, and near-end strategy optimization combined with neural network units extracts data packet header features to build a mapping library;

[0063] Model training: The reinforcement learning unit uses "latency satisfaction rate and bandwidth utilization rate" as reward functions to train the demand decision model;

[0064] Model output: Outputs the priority, latency constraints, and bandwidth requirements of each service traffic.

[0065] Model update: Regularly collect real-time traffic data, incrementally train the model, and update parameters to adapt to traffic changes.

[0066] As shown in Figure 3, the logical flow of the dynamic scheduling module is as follows:

[0067] Scheduling trigger: Dynamic scheduling is triggered when the AI ​​model outputs new traffic parameters or when the traffic monitoring unit detects that the latency exceeds the threshold.

[0068] Time slot allocation: Calculate the load rate of each priority time slot within the current QBV cycle and adjust the time slot ratio - if the load of high priority exceeds 80%, compress low priority time slots;

[0069] Priority adjustment: Detect the status of substation equipment. If a fault is found, increase the priority of related services and temporarily decrease the priority of unrelated services.

[0070] Bandwidth adaptation: Based on bandwidth demand forecasts, reserve dedicated bandwidth for high-priority services and allocate shared bandwidth for low-priority services;

[0071] Policy execution: The scheduling policy is sent to the FPGA smart network card, and the scheduling parameters and traffic status are recorded at the same time;

[0072] Feedback: The traffic monitoring unit collects the execution results (latency, packet loss rate). If the requirements are not met, the scheduling is retried.

[0073] As shown in Figure 4, the internal structure of the FPGA smart network card includes:

[0074] AI Lightweight Inference Unit: Integrates the TensorRT engine, receives model parameters from the scheduling engine, and parses them into scheduling instructions (such as time slot tables and priority mapping tables).

[0075] Clock synchronization unit: Receives global clock signal via PTP protocol, outputs nanosecond-level precision clock after phase calibration, and is used for time slot alignment;

[0076] Descriptor Extraction Unit: Extracts service type and timestamp information from the data packet descriptor and transmits it to the TSN scheduling and execution unit;

[0077] TSN scheduling execution unit: Executes QBV time slot scheduling and QCI priority control according to AI instructions to ensure that traffic is sent in the specified time slot;

[0078] DMA engine: Enables data packet transfer between the network card and the driver, and supports zero-copy mechanism to reduce latency;

[0079] Traffic monitoring unit: Calculates the latency and packet loss rate of traffic for each service and feeds it back to the AI ​​scheduling engine through the PCIe interface;

[0080] MAC module: Adds a preamble and CRC checksum to the scheduled data packets and sends them from the physical port to the substation network.

[0081] This application provides a substation TSN traffic optimization scheduling system based on a near-end strategy optimization algorithm. The functions of each module correspond one-to-one with the steps of the method described above, and will not be repeated here.

[0082] This application provides a computer-readable storage medium storing program code. When the program code is executed by a processor, it implements the steps of the substation TSN flow optimization scheduling method based on the near-end strategy optimization algorithm as described above.

[0083] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0084] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0085] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0086] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0087] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0088] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0089] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0090] Those skilled in the art can implement the present invention in various variations without departing from its scope and spirit. For example, a feature of one embodiment can be used in another embodiment to obtain yet another embodiment. Any modifications, equivalent substitutions, and improvements made within the scope of the present invention's technical concept should be within the scope of the present invention.

Claims

1. A substation TSN flow optimization scheduling method based on a near-end strategy optimization algorithm, characterized in that, The specific steps include the following: Environment Deployment: Deploy the TSN protocol stack and AI scheduling engine in the embedded real-time operating system of the substation, build a traffic data acquisition module and real-time analysis environment to realize the full acquisition of substation business traffic; Traffic modeling: Feature extraction of various types of business traffic in substations is performed using a near-end policy optimization algorithm to construct a traffic-demand mapping model and output the priority level, maximum allowable delay, and bandwidth requirement parameters for each type of traffic. Dynamic scheduling: Based on the output of the AI ​​model, combined with the time-based virtual scheduling (QBV) and service quality level identifier (QCI) mechanism of TSN, time slot resources are dynamically allocated, traffic transmission priority is adjusted, and bandwidth utilization is optimized. Hardware adaptation: The TSN smart network card, based on FPGA design and integrating a lightweight AI inference module, enables real-time parsing and execution of AI scheduling strategies, ensuring low-latency response to traffic scheduling commands.

2. The substation TSN flow optimization scheduling method based on the near-end strategy optimization algorithm according to claim 1, characterized in that, The traffic modeling involves extracting features from various types of substation service traffic using a near-end policy optimization algorithm to construct a traffic-demand mapping model, specifically including: A graph attention network (GAT) is used to process historical traffic data from substations using graph structure data, extracting the periodic and burst characteristics of different service traffic, generating traffic time-series feature vectors, and using a DRL agent to determine the traffic transmission order and optimize latency. Feature extraction of traffic data packet header information for various types of business traffic in substations is performed through near-end policy optimization. A traffic type-feature mapping library is constructed using two neural networks: an actor network and a critic network. The critic network takes the state vector aggregated by GAT as input and outputs a scalar. The actor network generates a policy function representing the probability distribution of actions. By combining the near-end policy optimization algorithm with "maximizing service latency satisfaction rate" and "maximizing bandwidth utilization rate" as reward functions, the traffic demand decision model is trained and outputs the priority, latency constraints and bandwidth allocation thresholds of each traffic flow. Regularly collect real-time flow data from substations, incrementally train the AI ​​model, and update the model parameters to adapt to dynamic changes in flow.

3. The substation TSN flow optimization scheduling method based on the near-end strategy optimization algorithm according to claim 1, characterized in that, The AI ​​model output, combined with TSN's time-based virtual scheduling (QBV) and Quality of Service (QCI) mechanism, dynamically allocates time slot resources, adjusts traffic transmission priorities, and optimizes bandwidth utilization. Specifically, this includes: Dynamic time slot allocation: The AI ​​scheduling engine adjusts the TSN QBV scheduling cycle and the proportion of time slots for each priority based on the real-time traffic demand model. Fixed time slots are allocated to ultra-high priority traffic, dynamic time slots are allocated to periodic traffic, and shared time slots are allocated to non-real-time monitoring traffic. Priority adaptive adjustment: When a fault occurs in a substation, the AI ​​algorithm identifies the fault type in real time and triggers a priority adjustment strategy to increase the priority of fault-related protection signals and emergency remote control traffic, while temporarily reducing the priority of non-critical monitoring traffic. Dynamic bandwidth adaptation: By using AI models to predict traffic bandwidth demand at different times, combined with the TSN bandwidth reservation mechanism, dedicated bandwidth is reserved for high latency-sensitive traffic, while a bandwidth sharing mechanism is used for low-sensitivity traffic to avoid bandwidth waste.

4. The substation TSN flow optimization scheduling method based on the near-end strategy optimization algorithm according to claim 3, characterized in that, The dynamic allocation of time slots is specifically as follows: The AI ​​scheduling engine receives the demand parameters of each business traffic in real time and calculates the load rate of each time slot within the current QBV scheduling cycle. If the load rate of a certain priority time slot exceeds the threshold, then the traffic of that priority will be migrated to an idle time slot within the same period, or the scheduling period will be extended and the time slot ratio will be redistributed. If a high-priority traffic surge occurs, the time slot preemption mechanism is triggered. The algorithm will temporarily compress the duration of low-priority time slots and allocate temporary time slots for the surge traffic to ensure that the fault response delay is ≤1ms.

5. The substation TSN flow optimization scheduling method based on the near-end strategy optimization algorithm according to claim 3, characterized in that, The priority adaptive adjustment specifically includes: A substation fault-flow priority mapping table is constructed. The AI ​​algorithm analyzes the fault signals of the substation SCADA system and matches the priority adjustment rules of the corresponding flow. When traffic latency exceeds the limit, the AI ​​algorithm traces back to the type of service that exceeds the latency limit, adjusts the priority level and time slot allocation strategy of that type of traffic, until the latency is restored to within the constraint range; Regularly evaluate the effectiveness of priority adjustments, using "number of latency violations" and "traffic drop rate" as evaluation indicators, and optimize the adjustment rules accordingly.

6. A substation TSN flow optimization scheduling system based on a near-end strategy optimization algorithm, characterized in that, include: Environment Deployment Module: Deploy the TSN protocol stack and AI scheduling engine in the substation embedded real-time operating system to build a traffic data acquisition module and a real-time analysis environment; Traffic modeling module: Extracts features and models requirements for various types of business traffic in substations using a near-end policy optimization algorithm, generating traffic priority and delay constraint models; Dynamic scheduling module: Based on AI model output and combined with TSN's QBV / QCI scheduling mechanism, it realizes dynamic time slot allocation and priority adjustment of traffic; Hardware adaptation module: Based on FPGA design, a TSN smart network card integrating a lightweight AI inference module is designed to realize the real-time execution of scheduling strategies.

7. The substation TSN flow optimization scheduling system based on the near-end strategy optimization algorithm according to claim 6, characterized in that, The traffic modeling module includes: Temporal Feature Extraction Unit: The graph attention network (GAT) is used to process the historical traffic data of the substation into graph structure data, extract the periodic and burst features of different business traffic, generate traffic temporal feature vectors, and use DRL proxy to determine the traffic transmission order and optimize the delay. Type Feature Extraction Unit: Through near-end strategy optimization, feature extraction is performed on the header information of traffic data packets of various types of business traffic in substations, a traffic type-feature mapping library is constructed, and two neural networks are used; Demand Decision Unit: Combines reinforcement learning algorithms to train a traffic demand decision model, and outputs the priority, latency constraints and bandwidth allocation thresholds for each traffic flow. Model update unit: Regularly collects real-time traffic data, performs incremental training on the AI ​​model, and updates the model parameters.

8. The substation TSN flow optimization scheduling system based on the near-end strategy optimization algorithm according to claim 6, characterized in that, The hardware adaptation module includes: AI Lightweight Inference Unit: Integrates the TensorRT lightweight inference engine to perform real-time analysis and calculation of AI scheduling strategies and output scheduling instructions; TSN Scheduling Execution Unit: Implements QBV / QCI scheduling logic, and controls the timing of traffic transmission based on the time slot allocation and priority parameters output by AI; Clock synchronization unit: Based on the Precision Time Protocol (PTP), it achieves synchronization with the substation's global clock, ensuring that the time accuracy of the scheduling time slots reaches the nanosecond level; Traffic monitoring unit: Collects network interface card (NIC) transmit and receive traffic data in real time and feeds it back to the AI ​​scheduling engine for scheduling strategy optimization.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program code, which, when executed by a processor, implements the steps of the substation TSN flow optimization scheduling method based on the near-end strategy optimization algorithm as described in any one of claims 1-5.