Traffic self-learning method and device of TSN switch and electronic equipment
By implementing the traffic self-learning method on the TSN switch and using hardware timestamps to create and update the flow table, the problem of the current TSN configuration solution lacking dynamic traffic perception and self-learning capabilities is solved, and it realizes automatic adaptation to network traffic changes and real-time optimization of traffic configuration, improving network efficiency and reliability.
Patent Information
- Application Number
- CN202411881956.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-03-21
AI Technical Summary
The current way of generating TSN configuration schemes lacks dynamic traffic perception and self-learning capabilities, which leads to the inability of the network to automatically optimize the configuration according to actual traffic changes and cannot fully adapt to complex and changeable network environments.
By implementing a traffic self-learning method on a TSN switch, creating and updating a flow table using hardware timestamps, determining the periodicity of the traffic, and sending the flow table to a centralized network configuration to generate and return the TSN configuration scheme.
This enables no manual intervention. The TSN switch can automatically adapt to network traffic changes, automatically generate TSN configuration solutions, optimize traffic configuration in real time, and improve network efficiency and reliability.
Smart Images

Figure CN119676175A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a traffic self-learning method, device and electronic device for a TSN switch. Background Art
[0002] In industrial control systems, real-time requirements are very high. Therefore, traffic management in the network must have efficient and reliable scheduling and optimization capabilities. At present, TSN (Time-Sensitive Networking) resource management technology mainly relies on the centralized user configuration (CUC) method. In this way, users manually configure service flow information and send this information to the centralized network configuration (CNC). CNC runs a specific algorithm according to user needs, generates a suitable TSN configuration plan, and sends the TSN configuration plan to the switch for enabling through the resource reservation protocol or the network management interface of CNC. Although this method can meet certain network performance requirements, it has certain limitations, especially in the dynamic management of service traffic, because this method relies on static configuration and lacks real-time perception and self-learning capabilities of network traffic, which makes the network unable to automatically optimize the configuration according to actual traffic changes and cannot fully adapt to complex and changing network environments. Summary of the invention
[0003] The present application provides a traffic self-learning method, device and electronic device for a TSN switch to solve the technical problem that the current method of generating TSN configuration solutions lacks dynamic traffic perception and self-learning capabilities.
[0004] In a first aspect, the present application provides a traffic self-learning method for a TSN switch, comprising: during an initial learning period, creating a first flow table for initial learning according to a first rule and first message information of a received first traffic message and a first hardware timestamp, wherein the first traffic message is each traffic message received by the TSN switch through a target port during the initial learning period, the first hardware timestamp is the time when the first traffic message enters the target port, the first flow table comprises a plurality of table entries, and a traffic message of a flow corresponds to one of the table entries; at the end of the initial learning time, according to the first learning The first table entry corresponding to the first flow in the first flow table determines the periodicity of the above-mentioned first flow, and inserts the periodicity of the above-mentioned first flow into the above-mentioned first table entry to obtain the second flow table learned for the first time, wherein the above-mentioned first flow is the flow corresponding to each table entry in the above-mentioned first flow table learned for the first time; the above-mentioned second flow table learned for the first time is sent to the centralized network configuration, so that the above-mentioned centralized network configuration generates and returns the first-learned TSN configuration scheme according to the above-mentioned second flow table learned for the first time; the configuration is updated according to the above-mentioned TSN configuration scheme learned for the first time, and after the update is completed, the traffic is processed according to the above-mentioned TSN configuration scheme learned for the first time.
[0005] In a second aspect, the present application provides a traffic self-learning device for a TSN switch, comprising: a creation module, used to create a first flow table for the first learning according to a first rule and the first message information of the first traffic message received and a first hardware timestamp during the first learning period, wherein the first traffic message is each traffic message received by the TSN switch through the target port during the first learning period, the first hardware timestamp is the time when the first traffic message enters the target port, and the first flow table includes multiple table entries, and a traffic message of a flow corresponds to one of the above table entries; a first update module, used to update the first flow table according to the first learning at the end of the first learning time. A first table entry corresponding to a first flow in a flow table determines the periodicity of the first flow, and inserts the periodicity of the first flow into the first table entry to obtain a second flow table learned for the first time, wherein the first flow is the flow corresponding to each table entry in the first flow table learned for the first time; a first sending module is used to send the second flow table learned for the first time to a centralized network configuration, so that the centralized network configuration generates and returns a TSN configuration scheme learned for the first time according to the second flow table learned for the first time; a first learning module is used to update the configuration according to the TSN configuration scheme learned for the first time, and after the update is completed, process the flow according to the TSN configuration scheme learned for the first time.
[0006] As an optional example, the creation module includes: an acquisition unit, which is used to acquire the first hardware timestamp of the first traffic message when the first traffic message is received through the target port, and insert the first hardware timestamp into the first traffic message; a mirroring unit, which is used to mirror the first traffic message to the processor of the TSN switch; a parsing unit, which is used to parse the first traffic message through the processor to obtain the first message information and the first hardware timestamp; a determination unit, which is used to determine whether there is a target table entry corresponding to the traffic of the first traffic message in the first flow table learned for the first time according to the first message information; a creation unit, which is used to create a new target table entry in the first flow table learned for the first time when it is determined that the target table entry does not exist in the first flow table learned for the first time, and add the first message information and the first hardware timestamp to the target table entry; an update unit, which is used to update the first message information and the first hardware timestamp to the target table entry when it is determined that the target table entry exists in the first flow table learned for the first time.
[0007] As an optional example, the above-mentioned first update module includes: a processing unit, used to periodically model all hardware timestamps in the above-mentioned first table item to obtain the periodicity of the above-mentioned first traffic; an insertion unit, used to insert the periodicity of the above-mentioned first traffic into the above-mentioned first table item to obtain the above-mentioned second flow table learned for the first time.
[0008] As an optional example, the above-mentioned device also includes: an acquisition module, which is used to obtain the second flow table of the M-1th learning when the current time point reaches the starting time point of the Mth learning after the first learning according to the TSN configuration scheme learned for the first time, wherein the above-mentioned M is a positive integer greater than 1; a determination module, which is used to determine whether there is a flow corresponding to the above-mentioned second flow message in the second rule when the second flow message is received, wherein the above-mentioned second flow message is each flow message received by the above-mentioned TSN switch through the above-mentioned target port during the above-mentioned Mth learning; a processing module, which is used to pass the above-mentioned second flow message when it is determined that the flow corresponding to the above-mentioned second flow message exists in the above-mentioned second rule; a second update module, which is used to update the second message information and the second hardware of the above-mentioned first rule and the above-mentioned second flow message when it is determined that the flow corresponding to the above-mentioned second flow message does not exist in the above-mentioned second rule. Timestamp, update the second flow table learned for the M-1th time, and obtain the first flow table learned for the Mth time; a third updating module, used for when the current time point reaches the end time point of the Mth learning, according to the second table item corresponding to the second flow in the first flow table learned for the Mth time, determine the periodicity of the second flow, and insert the periodicity of the second flow into the second table item to obtain the second flow table learned for the Mth time, wherein the second flow is the flow corresponding to each table item in the first flow table learned for the Mth time; a second sending module, used for sending the second flow table learned for the Mth time to the centralized network configuration, so that the centralized network configuration generates and returns the TSN configuration scheme learned for the Mth time according to the second flow table learned for the Mth time; a second learning module, used for updating the configuration according to the TSN configuration scheme learned for the Mth time, and after completing the update, processing the flow according to the TSN configuration scheme learned for the Mth time.
[0009] As an optional example, the above-mentioned device also includes: a first setting module, which is used to set the above-mentioned first rule when the current time point reaches the starting time point of the Nth learning, so that when the target traffic message is received through the above-mentioned target port, the hardware timestamp of the above-mentioned target traffic message is inserted into the above-mentioned target traffic message, and the above-mentioned target traffic message is mirrored to the processor, and the above-mentioned processor generates a first flow table for the Nth learning according to the received above-mentioned target traffic message, wherein the above-mentioned N is a positive integer, and the above-mentioned target traffic message is each traffic message received by the above-mentioned TSN switch through the above-mentioned target port; a first deletion module, which is used to delete the above-mentioned first rule when the above-mentioned current time point reaches the end time point of the above-mentioned Nth learning.
[0010] As an optional example, the above-mentioned device also includes: a second setting module, which is used to set the above-mentioned second rule when the above-mentioned current time point reaches the starting time point of the above-mentioned Mth learning, and add the traffic corresponding to all the table entries in the second flow table of the above-mentioned M-1th learning to the above-mentioned second rule, so that when the target traffic message is received through the above-mentioned target port, it is determined whether there is traffic corresponding to the above-mentioned target traffic message in the above-mentioned second rule, and when it is determined that the traffic corresponding to the above-mentioned target traffic message does not exist in the above-mentioned second rule, the above-mentioned target traffic message is passed, wherein the priority of the above-mentioned second rule is greater than the above-mentioned first rule, and the above-mentioned target traffic message is each traffic message received by the above-mentioned TSN switch through the above-mentioned target port; a second deletion module, which is used to delete the above-mentioned second rule when the above-mentioned current time point reaches the end time point of the above-mentioned Mth learning.
[0011] As an optional example, the above-mentioned device also includes: a third deletion module, which is used to delete the above-mentioned third table entry in the second flow table learned for the Mth time after obtaining the second flow table learned for the Mth time and receiving a deletion instruction of the third table entry.
[0012] In a third aspect, the present application provides a storage medium storing a computer program, wherein the computer program executes the above-mentioned traffic self-learning method of the TSN switch when executed by a processor.
[0013] In a fourth aspect, the present application also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the traffic self-learning method of the TSN switch through the computer program.
[0014] The above technical solution provided by the embodiment of the present application has the following advantages compared with the prior art:
[0015] The present application adopts a method of creating a first flow table for first learning according to a first rule and the first message information and a first hardware timestamp of a received first flow message during the first learning period, wherein the first flow message is each flow message received by the TSN switch through the target port during the first learning period, the first hardware timestamp is the time when the first flow message enters the target port, and the first flow table includes multiple table entries, and a flow message of a flow corresponds to one of the above table entries; at the end of the first learning time, according to the first table entry corresponding to the first flow in the first flow table for the first learning, the periodicity of the first flow is determined, and the periodicity of the first flow is inserted into the first table entry to obtain a second flow table for the first learning, wherein the first flow is the flow corresponding to each table entry in the first flow table for the first learning; the second flow table for the first learning is sent to the centralized network configuration, So that the above-mentioned centralized network configuration generates and returns the TSN configuration scheme learned for the first time according to the second flow table learned for the first time; updates the configuration according to the TSN configuration scheme learned for the first time, and after the update is completed, processes the traffic according to the TSN configuration scheme learned for the first time. In the above method, the TSN switch that supports traffic self-learning analyzes the traffic packets received during the learning time and creates a flow table, updates the flow table according to the periodicity of the traffic at the end of the learning time, and finally sends the flow table to the centralized network configuration, generates a TSN configuration scheme, and performs traffic self-learning according to the scheme, thereby achieving the purpose of automatically adapting to network traffic changes and automatically generating TSN configuration schemes without manual intervention, optimizing traffic configuration in real time, and improving network efficiency and reliability, thereby solving the technical problem that the current way of generating TSN configuration schemes lacks dynamic traffic perception and self-learning capabilities. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0017] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0018] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0019] Figure 1 is a flow chart of an optional traffic self-learning method of a TSN switch according to an embodiment of the present application;
[0020] Figure 2 is a structural diagram of an optional traffic self-learning method of a TSN switch according to an embodiment of the present application;
[0021] Figure 3 It is a schematic diagram of table items of a flow table of an optional traffic self-learning method of a TSN switch according to an embodiment of the present application;
[0022] Figure 4 It is a structural schematic diagram of an optional traffic self-learning device of a TSN switch according to an embodiment of the present application;
[0023] Figure 5 is a schematic diagram of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0024] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0025] The disclosure below provides many different embodiments or examples to realize the different structures of the present application. In order to simplify the disclosure of the present application, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present application. In addition, the present application can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.
[0026] Embodiment 1, in order to solve the technical problem that the current method of generating TSN configuration scheme lacks dynamic traffic perception and self-learning ability, according to the first aspect of the embodiment of the present application, a traffic self-learning method of a TSN switch is provided, optionally, as Figure 1 As shown, the above method includes:
[0027] S102, during the first learning period, create a first flow table for the first learning according to the first rule and the first message information and the first hardware timestamp of the received first flow message, wherein the first flow message is each flow message received by the TSN switch through the target port during the first learning period, the first hardware timestamp is the time when the first flow message enters the target port, and the first flow table includes multiple table entries, and a flow message of a flow corresponds to one table entry;
[0028] S104, at the end of the first learning time, determining the periodicity of the first flow according to the first table item corresponding to the first flow in the first flow table learned for the first time, and inserting the periodicity of the first flow into the first table item to obtain the second flow table learned for the first time, wherein the first flow is the flow corresponding to each table item in the first flow table learned for the first time;
[0029] S106, sending the second flow table learned for the first time to the centralized network configuration, so that the centralized network configuration generates and returns the TSN configuration scheme learned for the first time according to the second flow table learned for the first time;
[0030] S108, updating the configuration according to the TSN configuration scheme learned for the first time, and after completing the update, processing the traffic according to the TSN configuration scheme learned for the first time.
[0031] Optionally, in embodiment 1, Figure 2 The structure diagram shown includes terminal devices, TSN switches, and centralized network configuration. The core of the TSN switch supports the self-learning mechanism of traffic. Through the capabilities of network devices, the TSN switch side can collect, extract features, and model traffic sent by terminal devices. The TSN switch can accurately identify the periodicity and other characteristics of traffic, and actively pass the flow table to the centralized network configuration through the Netconf protocol. The centralized network configuration performs scheduling algorithm arrangement, generates a reasonable TSN configuration plan based on traffic characteristics, and sends it to the TSN switch. The TSN switch performs traffic scheduling and bandwidth management according to the TSN configuration plan. The entire process does not require user intervention, but can dynamically perceive business traffic to ensure efficient and reliable operation of the network. Through traffic self-learning, the TSN switch improves network efficiency while ensuring deterministic transmission in application scenarios with high real-time requirements, thereby improving network performance and reliability.
[0032] Optionally, in Embodiment 1, during the first learning time, the TSN switch will analyze the received traffic message according to the first rule. The traffic message is each data packet received by the TSN switch through the target port. The first rule refers to a specific rule used to process traffic messages in the TSN switch, which is usually used for traffic collection, marking and mirroring. Specifically, the first rule is used to process the traffic passing through the target port during the Nth learning cycle, mainly including hardware timestamp insertion, traffic mirroring and flow table generation, etc. The first rule is only valid in each learning cycle. Each traffic message has a hardware timestamp, that is, the precise time when the message enters the target port, which provides a time mark for subsequent traffic analysis and helps identify the characteristics of the traffic. The target port is the configuration port of the TSN switch, which enables the traffic self-learning function and configures the learning time for each time. According to the traffic packets received during the first learning period and their hardware timestamps, the TSN switch will create a first flow table for the first learning. The flow table contains multiple entries, each of which corresponds to all traffic packets of a flow, and records the relevant information of each traffic packet, including but not limited to hardware timestamp, five-tuple information (including source MAC address, destination MAC address, source IP address, destination IP address, protocol type), priority, source port, destination port, etc. At the end of the first learning time, the TSN switch will check the periodicity of each flow according to the flow table. The periodicity of the flow refers to whether the flow presents a repetitive pattern within a specific time, such as periodic data transmission (similar to the data flow of scheduled broadcast). Common methods include Fourier transform, etc., which are used to identify the frequency characteristics of the flow. According to the results of the periodicity analysis, the TSN switch will update the flow table, insert the periodicity information of the flow (if the flow is not periodic, the cycle of the flow entry is 0, if the flow is periodic flow, the cycle of the flow entry is t) into the flow table entry, and generate the second flow table for the first learning. The updated flow table is sent to the centralized network configuration, which generates the corresponding TSN configuration scheme based on the traffic periodicity information in the second flow table. These TSN configuration schemes include parameters such as traffic priority, bandwidth, and latency to optimize network performance. According to the TSN configuration scheme, the TSN switch will be configured so that the network can process traffic more efficiently, especially for time-sensitive traffic. Finally, the TSN switch will adjust its own traffic scheduling strategy according to the generated TSN configuration scheme to meet the requirements of real-time traffic in the network.
[0033] Optionally, in Example 1, through traffic self-learning, the TSN switch can dynamically adjust the network configuration according to the characteristics of the actual traffic (such as periodicity) to adapt to different business needs. The identification and scheduling of periodic traffic can effectively reduce congestion and delay, especially for real-time traffic, and improve the real-time and reliability of the network. By dynamically sensing traffic characteristics, the need for manual configuration is reduced, the risk of human error is reduced, and network management efficiency is improved. It can flexibly respond to changes in network traffic patterns, support application scenarios with high real-time requirements such as industrial automation, and improve the reliability and stability of the network.
[0034] In the second embodiment, creating a first flow table learned for the first time according to the first rule and the first message information of the received first traffic message and the first hardware timestamp includes:
[0035] When the first flow message is received through the target port, a first hardware timestamp of the first flow message is obtained, and the first hardware timestamp is inserted into the first flow message;
[0036] Mirroring the first traffic message to a processor of the TSN switch;
[0037] Parsing the first traffic message through the processor to obtain first message information and a first hardware timestamp;
[0038] Determine, according to the first message information, whether there is a target table entry corresponding to the flow of the first flow message in the first flow table learned for the first time;
[0039] When it is determined that the target table entry does not exist in the first flow table learned for the first time, a new target table entry is created in the first flow table learned for the first time, and the first message information and the first hardware timestamp are added to the target table entry;
[0040] When it is determined that the target entry exists in the first flow table learned for the first time, the first message information and the first hardware timestamp are updated into the target entry.
[0041] Optionally, in the second embodiment, when the target port receives the first flow message, the TSN switch will obtain the hardware timestamp of the message, record the exact time when the message enters the port, and the obtained hardware timestamp will be inserted into the first flow message for subsequent analysis and processing. The TSN switch will mirror the first flow message to the processor, so that the processor can receive the flow data for analysis, and the processor will parse the mirrored message to extract the first message information (such as source / destination MAC address, source / destination IP address, protocol type, etc.) and the inserted first hardware timestamp. The processor then queries the first flow table learned for the first time based on the first message information to confirm whether there is already a table entry corresponding to the flow. The flow table is used to store the characteristic information of the network flow, and each table entry corresponds to the characteristics of a flow. The TSN switch will create a new table entry in the first flow table learned for the first time, and add the first message information and the first hardware timestamp to the table entry. The switch will update the existing table entry and update the first message information and the first hardware timestamp to the table entry. For example, query the flow table based on the five-tuple information. If the five-tuple information is not found in the first flow table, find an available table entry with valid=1 (up to n entries), insert it into this position of the flow table, and set the valid flag to 1. If the five-tuple information is found to exist, directly append a record (up to m entries). Through this process, the TSN switch can gradually build the flow table and accurately capture the characteristics of each flow, including timestamp information, thereby providing a basis for subsequent scheduling of traffic and network optimization.
[0042] Optionally, in Example 2, by inserting hardware timestamps and mirror messages, the TSN switch can accurately capture the time information of the traffic, thereby providing high-precision data for periodic analysis and subsequent processing of the traffic. Automatically generate and update flow tables, so that the TSN switch can dynamically manage network traffic, promptly identify new traffic and update the status of existing traffic, and support flexible scheduling of traffic. By accurately recording traffic characteristics (such as timestamps, five-tuple information, etc.), network resource configuration can be optimized, bandwidth waste can be reduced, delays and congestion can be avoided, and network performance can be improved. The need for manual configuration is reduced, and the TSN switch can autonomously learn traffic characteristics and automatically adjust the configuration according to changes in network traffic, thereby improving the network's adaptability and flexibility.
[0043] Embodiment 3: At the end of the first learning time, the periodicity of the first flow is determined according to the first table item corresponding to the first flow in the first flow table learned for the first time, and the periodicity of the first flow is inserted into the first table item, and the second flow table learned for the first time includes:
[0044] Performing periodic modeling on all hardware timestamps in the first table entry to obtain the periodicity of the first traffic;
[0045] The periodicity of the first flow is inserted into the first table entry to obtain a second flow table learned for the first time.
[0046] Optionally, in Example 3, when the first learning time is over, the TSN switch needs to further analyze the traffic to determine the periodic characteristics of the traffic. Each traffic packet has a hardware timestamp when entering the TSN switch through the target port. These timestamps record the arrival time of each traffic packet. By analyzing the hardware timestamps of all records in the table entries, the TSN switch will use a periodic modeling algorithm (such as Fourier transform) to determine whether these messages show periodic characteristics. The core purpose of periodic modeling is to identify whether the time intervals between the arrival of packets are regular, so as to determine whether the traffic is periodic traffic. During the modeling process, the TSN switch will calculate the periodicity of the traffic, such as the length or frequency of the period, as an important feature of the traffic. Based on the results of the periodic analysis, the TSN switch will insert the periodic characteristics of the traffic into the corresponding table entry to obtain a new flow table, called the second flow table for the first learning. This second flow table contains the periodic information of each flow, thereby providing more decision-making basis for subsequent traffic scheduling, such as Figure 3 The table entry schematic diagram of a flow table is shown, where a table entry includes but is not limited to hardware timestamp, source MAC address, destination MAC address, source IP address, destination IP address, protocol type, priority, source port, destination port, availability, cycle, delay, jitter, etc.
[0047] Optionally, in Example 3, by modeling the periodicity of hardware timestamps, the TSN switch can accurately determine whether the traffic has periodic characteristics. After understanding the periodic characteristics of the traffic, the centralized network configuration can more accurately predict the demand for traffic, thereby reasonably allocating network resources, reducing bandwidth waste and latency, and improving network performance. Through periodic modeling of traffic and automatic updating of flow tables, the switch can adapt to changes in different traffic flows and dynamically adjust the configuration without manual intervention, thereby improving the automation and flexibility of the network. Through periodic analysis, traffic transmission can be better planned and predicted, reducing network bottlenecks and failures caused by overload or uneven traffic distribution, and improving network stability and reliability.
[0048] In the fourth embodiment, after the first learning is performed according to the TSN configuration scheme learned for the first time, the method further includes:
[0049] When the current time point reaches the start time point of the Mth learning, the second flow table of the M-1th learning is obtained, where M is a positive integer greater than 1;
[0050] In the case of a received second traffic message, determining whether there is traffic corresponding to the second traffic message in the second rule, wherein the second traffic message is each traffic message received by the TSN switch through the target port during the Mth learning period;
[0051] If it is determined that the traffic corresponding to the second traffic message exists in the second rule, the second traffic message is passed;
[0052] When it is determined that the traffic corresponding to the second traffic message does not exist in the second rule, the second flow table learned for the M-1th time is updated according to the second message information of the first rule and the second traffic message and the second hardware timestamp to obtain the first flow table learned for the Mth time;
[0053] When the current time point reaches the end time point of the M-th learning, the periodicity of the second flow is determined according to the second table item corresponding to the second flow in the first flow table learned for the M-th time, and the periodicity of the second flow is inserted into the second table item to obtain the second flow table learned for the M-th time, wherein the second flow is the flow corresponding to each table item in the first flow table learned for the M-th time;
[0054] Sending the second flow table learned for the Mth time to the centralized network configuration, so that the centralized network configuration generates and returns the TSN configuration scheme learned for the Mth time according to the second flow table learned for the Mth time;
[0055] The configuration is updated according to the TSN configuration scheme learned for the Mth time, and after the update is completed, the traffic is processed according to the TSN configuration scheme learned for the Mth time.
[0056] Optionally, in Embodiment 4, after the first learning, the TSN switch can continue to learn multiple times, thereby realizing dynamic traffic scheduling and network optimization. Specifically, when the start time of the Mth learning is reached, the TSN switch will obtain the updated second flow table from the M-1th learning, which records the traffic characteristics and periodicity information identified in the previous round of learning. The TSN switch receives a new traffic message (called the second traffic message) during the Mth learning time, and each traffic message will enter the TSN switch through the target port. If the traffic corresponding to the second traffic message already exists in the second rule (that is, it matches the existing flow table entry), it is directly processed through the message. If the second traffic message does not match any flow table entry in the existing flow table, it needs to be processed through the first rule. The TSN switch will obtain the second message information (such as source address, destination address, protocol type, etc.) and the second hardware timestamp (arrival time of the message) of the message, and update the flow table according to this information to generate the first flow table of the Mth learning. When the Mth learning time is over, the TSN switch will perform periodic analysis based on all the traffic (second traffic) in the first flow table learned for the Mth time. By modeling the periodic characteristics of the second traffic, the periodic information is inserted into the flow table to generate the second flow table learned for the Mth time. The TSN switch sends the updated second flow table to the centralized network configuration, which recalculates and returns the Mth-learned TSN configuration scheme that adapts to the current network traffic demand based on the new flow table data. The TSN switch performs corresponding configuration and adjustment based on the returned TSN configuration scheme, thereby completing the Mth traffic self-learning process. After each learning, the traffic characteristics and periodic information of more traffic are continuously transmitted to the centralized network configuration, helping the centralized network configuration to generate a more reasonable TSN configuration scheme based on more traffic data, so that after the Mth traffic self-learning, the TSN switch can dynamically perceive the traffic characteristics in the network and continuously optimize its own traffic processing capabilities. It can adjust the network configuration in time when the network load changes or the traffic pattern changes, ensuring the stability and reliability of the network.
[0057] Optionally, in Example 4, the traffic characteristics of each learning cycle are continuously collected and analyzed. Through multiple iterations, the network can more accurately identify the periodic characteristics of traffic and continuously optimize traffic processing and scheduling. With each round of learning, the network's understanding of traffic becomes more in-depth, and network resources can be more accurately scheduled to avoid bandwidth waste and reduce latency. Through the automated learning process, there is no need to manually configure each traffic rule or adjust the network configuration. Each learning automatically completes traffic feature extraction and configuration updates, improving network management efficiency.
[0058] In embodiment 5, the above method further comprises:
[0059] When the current time point reaches the start time point of the Nth learning, a first rule is set so that when a target flow message is received through the target port, the hardware timestamp of the target flow message is inserted into the target flow message, and the target flow message is mirrored to the processor, and the processor generates a first flow table for the Nth learning according to the received target flow message, wherein N is a positive integer, and the target flow message is each flow message received by the TSN switch through the target port;
[0060] When the current time point reaches the end time point of the Nth learning, the first rule is deleted.
[0061] Optionally, in Embodiment 5, at the start time of each learning cycle, the TSN switch sets a first rule, which may be an ACL (Access Control List) rule, which is a configuration rule used to control access rights in network devices (such as routers, switches, firewalls, etc.). It defines which traffic (usually data packets or messages) can enter or leave a network device or a network interface, and determines whether to allow or deny these traffic based on preset conditions. ACL rules can be based on a variety of different conditions, such as source IP address, destination IP address, port number, protocol type, etc., to determine whether traffic is allowed to pass through the device. The function of the first rule is that when the traffic message passes through the target port of the TSN switch, the first rule will be activated to capture these traffic messages. The TSN switch will insert a hardware timestamp for each traffic message to record the time when the message enters the switch target port. The first rule also requires that the received traffic message be mirrored to the processor. The processor will parse these messages, extract message information, such as source address, destination address, protocol type, etc., and generate flow table entries together with the hardware timestamp. When the end time of each learning period is reached, the TSN switch will delete the first rule that has been set. The purpose of deleting the rule is to avoid continuing to capture traffic packets during non-learning time and prevent waste of resources. By setting capture rules at the beginning of each learning cycle, the traffic packets passing through the target port can be captured in real time, the entry time of each packet can be accurately recorded, and accurate flow table entries can be generated.
[0062] In embodiment 6, the above method further comprises:
[0063] When the current time point reaches the start time point of the Mth learning, the second rule is set, and the traffic corresponding to all the entries in the second flow table learned for the M-1th time is added to the second rule, so that when the target traffic message is received through the target port, it is determined whether there is traffic corresponding to the target traffic message in the second rule, and when it is determined that there is no traffic corresponding to the target traffic message in the second rule, the target traffic message is passed, wherein the priority of the second rule is greater than the first rule, and the target traffic message is each traffic message received by the TSN switch through the target port;
[0064] When the current time point reaches the end time point of the Mth learning, the second rule is deleted.
[0065] Optionally, in Embodiment 6, at the beginning of each learning cycle after the first learning, the TSN switch sets a second rule, which may be an ACL (Access Control List) rule, matching SMAC (Source MAC Address), DMAC (Destination MAC Address), SIP (Source IP Address), DIP (Destination IP Address), and PROTOCOL (protocol type), and the action is to allow passage, and apply it to the learned target port. The function of the second rule is that when the traffic message passes through the target port of the TSN switch, the second rule will be activated to capture these traffic messages, and the rule will check whether the traffic message matches the existing traffic in the second flow table learned last time. If it matches, it means that this is known traffic and no further learning is required. If it does not match, further processing is required. The TSN switch will add the traffic information corresponding to all entries in the second flow table learned last time to the second rule. The priority of the second rule is greater than that of the first rule, which means that in the actual matching process, the second rule will take precedence over the first rule for matching and processing traffic messages. When the target traffic message arrives at the target port, the second rule will check whether the message matches the known traffic (i.e., matches the traffic table entry in the second flow table learned last time). If there is a matching traffic, it means that this is a known traffic, and the TSN switch will pass it directly without learning and updating the flow table. If there is no matching traffic, the TSN switch will learn and update the second flow table. At the end of each learning time, the TSN switch will delete the set second rule to prevent expired rules from continuing to affect subsequent learning and operation processes.
[0066] Optionally, in Example 6, by setting a second rule with a higher priority than the first rule, new, unidentified traffic packets can be captured and effectively learned and processed, thereby achieving dynamic perception and adaptive adjustment of the network.
[0067] Embodiment 7, after obtaining the second flow table learned for the Mth time, the method further includes:
[0068] When a deletion instruction of the third entry is received, the third entry in the second flow table learned for the Mth time is deleted.
[0069] Optionally, in Example 7, the TSN switch will dynamically update the flow table during the learning process. After each learning, a new flow table will be generated. The user can manually delete any item in the flow table. If the TSN switch receives an item deletion instruction, it will delete the item in the flow table according to the instruction, so that the flow table item of the traffic that needs to be learned again can be manually removed.
[0070] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0071] According to another aspect of the embodiment of the present application, a traffic self-learning device of a TSN switch is also provided. Figure 4 As shown, including:
[0072] A creation module 402 is used to create a first flow table for the first learning according to a first rule and first message information and a first hardware timestamp of a received first flow message during the first learning period, wherein the first flow message is each flow message received by the TSN switch through the target port during the first learning period, the first hardware timestamp is the time when the first flow message enters the target port, and the first flow table includes a plurality of table entries, and a flow message of a flow corresponds to one table entry;
[0073] A first updating module 404 is used to determine the periodicity of the first flow according to the first table item corresponding to the first flow in the first flow table learned for the first time at the end of the first learning time, and insert the periodicity of the first flow into the first table item to obtain the second flow table learned for the first time, wherein the first flow is the flow corresponding to each table item in the first flow table learned for the first time;
[0074] A first sending module 406 is used to send the first learned second flow table to the centralized network configuration, so that the centralized network configuration generates and returns the first learned TSN configuration scheme according to the first learned second flow table;
[0075] The first learning module 408 is used to update the configuration according to the TSN configuration scheme learned for the first time, and after completing the update, process the traffic according to the TSN configuration scheme learned for the first time.
[0076] It should be noted that the creation module 402 in this embodiment can be used to execute step S102 in the embodiment of the present application, the first update module 404 in this embodiment can be used to execute step S104 in the embodiment of the present application, the first sending module 406 in this embodiment can be used to execute step S106 in the embodiment of the present application, and the first learning module 408 in this embodiment can be used to execute step S108 in the embodiment of the present application.
[0077] As an optional example, create a module including:
[0078] an acquiring unit, configured to acquire a first hardware timestamp of the first flow message when the first flow message is received through the target port, and insert the first hardware timestamp into the first flow message;
[0079] A mirroring unit, used to mirror the first traffic message to a processor of the TSN switch; a parsing unit, used to parse the first traffic message through the processor to obtain first message information and a first hardware timestamp;
[0080] A determination unit, configured to determine, based on the first message information, whether there is a target table entry corresponding to the flow of the first flow message in the first flow table learned for the first time;
[0081] A creating unit, configured to create a new target table entry in the first flow table learned for the first time, and add the first message information and the first hardware timestamp to the target table entry when it is determined that the target table entry does not exist in the first flow table learned for the first time;
[0082] The updating unit is configured to update the first message information and the first hardware timestamp into the target table entry when it is determined that the target table entry exists in the first flow table learned for the first time.
[0083] As an optional example, the first update module includes:
[0084] A processing unit, configured to perform periodic modeling on all hardware timestamps in the first table entry to obtain the periodicity of the first traffic;
[0085] The inserting unit is used to insert the periodicity of the first flow into the first table entry to obtain a second flow table learned for the first time.
[0086] As an optional example, the above device further includes:
[0087] An acquisition module, used for acquiring the second flow table learned for the M-1th time after the first learning according to the TSN configuration scheme learned for the first time, when the current time point reaches the start time point of the Mth learning, wherein M is a positive integer greater than 1; a determination module, used for determining whether there is a flow corresponding to the second flow message in the second rule in the case of a received second flow message, wherein the second flow message is each flow message received by the TSN switch through the target port during the Mth learning period;
[0088] A processing module, configured to pass the second flow message when it is determined that the flow corresponding to the second flow message exists in the second rule;
[0089] A second updating module is used to update the second flow table learned for the M-1th time according to the first rule and the second message information of the second flow message when it is determined that the flow corresponding to the second flow message does not exist in the second rule, so as to obtain the first flow table learned for the Mth time;
[0090] A third updating module is used for determining the periodicity of the second flow according to the second table item corresponding to the second flow in the first flow table learned for the Mth time when the current time point reaches the end time point of the Mth learning, and inserting the periodicity of the second flow into the second table item to obtain the second flow table learned for the Mth time, wherein the second flow is the flow corresponding to each table item in the first flow table learned for the Mth time;
[0091] A second sending module, used for sending the second flow table learned for the Mth time to the centralized network configuration, so that the centralized network configuration generates and returns the TSN configuration scheme learned for the Mth time according to the second flow table learned for the Mth time;
[0092] The second learning module is used to update the configuration according to the TSN configuration scheme learned for the Mth time, and after completing the update, process the traffic according to the TSN configuration scheme learned for the Mth time.
[0093] As an optional example, the above device further includes:
[0094] A first setting module is used to set a first rule when the current time point reaches the start time point of the Nth learning, so that when a target flow message is received through a target port, a hardware timestamp of the target flow message is inserted into the target flow message, and the target flow message is mirrored to the processor, and the processor generates a first flow table for the Nth learning according to the received target flow message, wherein N is a positive integer, and the target flow message is each flow message received by the TSN switch through the target port;
[0095] The first deleting module is used to delete the first rule when the current time point reaches the end time point of the Nth learning.
[0096] As an optional example, the above device further includes:
[0097] The second setting module is used to set the second rule when the current time point reaches the start time point of the Mth learning, and add the traffic corresponding to all the entries in the second flow table learned for the M-1th time to the second rule, so that when the target traffic message is received through the target port, it is determined whether there is traffic corresponding to the target traffic message in the second rule, and when it is determined that there is no traffic corresponding to the target traffic message in the second rule, the target traffic message is passed, wherein the priority of the second rule is greater than the first rule, and the target traffic message is each traffic message received by the TSN switch through the target port;
[0098] The second deleting module is used to delete the second rule when the current time point reaches the end time point of the Mth learning.
[0099] As an optional example, the above device further includes:
[0100] The third deleting module is used to delete the third table entry in the second flow table learned for the Mth time after obtaining the second flow table learned for the Mth time and receiving a deletion instruction of the third table entry.
[0101] For other examples of this embodiment, please refer to the above examples and will not be repeated here.
[0102] Figure 5 is a schematic diagram of an optional electronic device according to an embodiment of the present application, such as Figure 5 As shown, it includes a processor 502, a communication interface 504, a memory 506 and a communication bus 508, wherein the processor 502, the communication interface 504 and the memory 506 communicate with each other through the communication bus 508, wherein,
[0103] Memory 506, used for storing computer programs;
[0104] The processor 502 is used to execute the computer program stored in the memory 506 to implement the following steps:
[0105] During the first learning period, a first flow table for the first learning is created according to the first rule and the first message information of the received first flow message and the first hardware timestamp, wherein the first flow message is each flow message received by the TSN switch through the target port during the first learning period, the first hardware timestamp is the time when the first flow message enters the target port, and the first flow table includes multiple table entries, and a flow message of a flow corresponds to one table entry;
[0106] At the end of the first learning time, according to the first table item corresponding to the first flow in the first flow table learned for the first time, determine the periodicity of the first flow, and insert the periodicity of the first flow into the first table item to obtain the second flow table learned for the first time, wherein the first flow is the flow corresponding to each table item in the first flow table learned for the first time;
[0107] Sending the first learned second flow table to the centralized network configuration, so that the centralized network configuration generates and returns the first learned TSN configuration scheme according to the first learned second flow table;
[0108] The configuration is updated according to the first learned TSN configuration scheme, and after the update is completed, the traffic is processed according to the first learned TSN configuration scheme.
[0109] Optionally, in this embodiment, the communication bus may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 The communication interface is used for communication between the above electronic device and other devices.
[0110] The memory may include RAM, or may include non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0111] As an example, the memory 506 may include, but is not limited to, the creation module 402, the first update module 404, the first sending module 406, and the first learning module 408 in the traffic self-learning device of the TSN switch. In addition, other module units in the traffic self-learning device of the TSN switch may also be included but are not limited to, which will not be repeated in this example.
[0112] The above-mentioned processor can be a general-purpose processor, which can include but not be limited to: CPU (Central Processing Unit), NP (Network Processor), etc.; it can also be DSP (Digital Signal Processing), ASIC (Application Specific Integrated Circuit), FPGA (Field-Programmable Gate Array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0113] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment will not be described in detail here.
[0114] It can be understood by those skilled in the art that Figure 5 The structure shown is for illustration only. The device for implementing the above-mentioned traffic self-learning method of the TSN switch may be a terminal device, which may be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, and other terminal devices. Figure 5 The structure of the electronic device is not limited. For example, the electronic device may also include Figure 5 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Figure 5 Different configurations shown.
[0115] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, which can include: a flash drive, ROM, RAM, a magnetic disk or an optical disk, etc.
[0116] According to another aspect of an embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program executes the steps in the above-mentioned traffic self-learning method of the TSN switch when executed by a processor.
[0117] Optionally, in this embodiment, a person of ordinary skill in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing hardware related to the terminal device through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.
[0118] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0119] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
[0120] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0121] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0122] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0123] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0124] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A traffic self-learning method for a TSN switch, characterized in that: include: During the first learning period, a first flow table for the first learning is created according to a first rule and first message information and a first hardware timestamp of a received first flow message, wherein the first flow message is each flow message received by the TSN switch through a target port during the first learning period, the first hardware timestamp is the time when the first flow message enters the target port, and the first flow table includes a plurality of table entries, and a flow message of a flow corresponds to one of the table entries; At the end of the first learning time, according to the first table item corresponding to the first flow in the first flow table learned for the first time, determine the periodicity of the first flow, and insert the periodicity of the first flow into the first table item to obtain the second flow table learned for the first time, wherein the first flow is the flow corresponding to each table item in the first flow table learned for the first time; Sending the first learned second flow table to the centralized network configuration, so that the centralized network configuration generates and returns the first learned TSN configuration scheme according to the first learned second flow table; The configuration is updated according to the first learned TSN configuration scheme, and after the update is completed, the traffic is processed according to the first learned TSN configuration scheme.
2. The method according to claim 1, characterized in that The step of creating a first flow table learned for the first time according to the first rule and the first message information of the received first traffic message and the first hardware timestamp includes: When the first traffic message is received through the target port, obtaining a first hardware timestamp of the first traffic message, and inserting the first hardware timestamp into the first traffic message; Mirroring the first traffic message to a processor of the TSN switch; Parsing the first traffic message by the processor to obtain the first message information and the first hardware timestamp; Determine, according to the first message information, whether there is a target table entry corresponding to the flow of the first flow message in the first flow table learned for the first time; When it is determined that the target table entry does not exist in the first flow table learned for the first time, a new target table entry is created in the first flow table learned for the first time, and the first message information and the first hardware timestamp are added to the target table entry; When it is determined that the target table entry exists in the first flow table learned for the first time, the first message information and the first hardware timestamp are updated into the target table entry.
3. The method according to claim 1, characterized in that At the end of the first learning time, according to the first table item corresponding to the first flow in the first flow table learned for the first time, determining the periodicity of the first flow, and inserting the periodicity of the first flow into the first table item, the second flow table learned for the first time includes: Performing periodic modeling on all hardware timestamps in the first table entry to obtain the periodicity of the first traffic; Insert the periodicity of the first flow into the first table entry to obtain the second flow table learned for the first time.
4. The method according to claim 1, characterized in that: After performing the first learning according to the first learned TSN configuration scheme, the method further includes: When the current time point reaches the start time point of the Mth learning, the second flow table of the M-1th learning is obtained, where M is a positive integer greater than 1; In the case of a received second traffic message, determining whether there is traffic corresponding to the second traffic message in the second rule, wherein the second traffic message is each traffic message received by the TSN switch through the target port during the Mth learning period; If it is determined that the traffic corresponding to the second traffic message exists in the second rule, pass the second traffic message; When it is determined that the traffic corresponding to the second traffic message does not exist in the second rule, updating the second flow table learned for the M-1th time according to the first rule and the second message information and the second hardware timestamp of the second traffic message to obtain the first flow table learned for the Mth time; When the current time point reaches the end time point of the M-th learning, determine the periodicity of the second flow according to the second table item corresponding to the second flow in the first flow table of the M-th learning, and insert the periodicity of the second flow into the second table item to obtain the second flow table of the M-th learning, wherein the second flow is the flow corresponding to each table item in the first flow table of the M-th learning; Sending the second flow table learned for the Mth time to the centralized network configuration, so that the centralized network configuration generates and returns the TSN configuration scheme learned for the Mth time according to the second flow table learned for the Mth time; The configuration is updated according to the TSN configuration scheme learned for the Mth time, and after the update is completed, the traffic is processed according to the TSN configuration scheme learned for the Mth time.
5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: When the current time point reaches the start time point of the Nth learning, the first rule is set so that when a target flow message is received through the target port, the hardware timestamp of the target flow message is inserted into the target flow message, and the target flow message is mirrored to the processor, and the processor generates a first flow table for the Nth learning according to the received target flow message, wherein N is a positive integer, and the target flow message is each flow message received by the TSN switch through the target port; When the current time point reaches the end time point of the Nth learning, the first rule is deleted.
6. The method according to claim 4, characterized in that The method further comprises: When the current time point reaches the start time point of the M-th learning, the second rule is set, and the traffic corresponding to all the entries in the second flow table of the M-1-th learning is added to the second rule, so that when the target traffic message is received through the target port, it is determined whether there is traffic corresponding to the target traffic message in the second rule, and when it is determined that there is no traffic corresponding to the target traffic message in the second rule, the target traffic message is passed, wherein the priority of the second rule is greater than the first rule, and the target traffic message is each traffic message received by the TSN switch through the target port; When the current time point reaches the end time point of the Mth learning, the second rule is deleted.
7. The method according to claim 4, characterized in that After obtaining the second flow table learned for the Mth time, the method further includes: When a deletion instruction of the third table entry is received, the third table entry in the second flow table learned for the Mth time is deleted.
8. A traffic self-learning device for a TSN switch, characterized in that: include: A creation module, used to create a first flow table for the first learning according to a first rule and first message information and a first hardware timestamp of a received first flow message during the first learning period, wherein the first flow message is each flow message received by the TSN switch through a target port during the first learning period, the first hardware timestamp is the time when the first flow message enters the target port, and the first flow table includes a plurality of table entries, and a flow message of a flow corresponds to one of the table entries; A first updating module is used to determine the periodicity of the first flow according to the first table item corresponding to the first flow in the first flow table learned for the first time at the end of the first learning time, and insert the periodicity of the first flow into the first table item to obtain a second flow table learned for the first time, wherein the first flow is the flow corresponding to each table item in the first flow table learned for the first time; A first sending module, used for sending the second flow table learned for the first time to the centralized network configuration, so that the centralized network configuration generates and returns the TSN configuration scheme learned for the first time according to the second flow table learned for the first time; The first learning module is used to update the configuration according to the TSN configuration scheme learned for the first time, and after completing the update, process the traffic according to the TSN configuration scheme learned for the first time.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is executed.
10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 7 through the computer program.