TSN function configuration method and device based on NETCONF protocol
By integrating the netconf-server thread with NETCONF function in the SDK of the TSN switch, using the NETCONF protocol and yang file design to realize the remote configuration of the TSN function, the problem that traditional configuration methods cannot meet the iteration of the TSN configuration management standard is solved, and efficient TSN function configuration and CPU resource management are achieved.
Patent Information
- Application Number
- CN202510028151.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-08
- Publication Date
- 2025-05-06
AI Technical Summary
Traditional Ethernet is difficult to meet the real-time and accuracy requirements for network communication in industrial scenarios and automotive fields under high load conditions. The configuration methods of TSN switches are mostly command lines, which cannot meet the iteration of TSN configuration management standards.
By integrating the netconf-server thread that supports NETCONF function in the SDK of the TSN switch, the TSN function is remotely configured using the NETCONF protocol, the yang file is designed to define the TSN function parameters, and the configuration and issuance of the TSN switch through XML format configuration messages.
It realizes the remote configuration of TSN switches, supports NETCONF protocol, meets the configuration requirements of IEEE802.1Qcc protocol, provides TSN function configuration channels other than traditional CLI, and reduces CPU resource usage.
Smart Images

Figure CN119945996A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of time-sensitive network communication technology, and in particular to a TSN function configuration method and device based on the NETCONF protocol. Background Art
[0002] Traditional Ethernet uses a best-effort communication method, which means that there is no strict time guarantee for data transmission. When the network load is high, data packets may be delayed, jittered, or even lost. As the manufacturing industry is moving towards intelligence, automation, and informatization, the real-time and accuracy of network communications in industrial scenarios are becoming increasingly important. Similarly, in the automotive field, modern automotive architectures contain numerous control units that need to communicate quickly and accurately with each other. Against this technical background, TSN (Time Sensitive Network) came into being.
[0003] TSN (Time-Sensitive Networking) technology is developed on the basis of traditional Ethernet. It was originally derived from audio / video bridging (AVB) technology, which is mainly used to solve the real-time transmission problem of audio and video data in Ethernet. Later, IEEE (Institute of Electrical and Electronics Engineers) expanded and deepened AVB to form the TSN standard. TSN uses time synchronization technology with sub-microsecond accuracy, providing a basis for the time determinism of data transmission. TSN includes a variety of traffic scheduling technologies, such as the Time Aware Shaper (TAS) specified by IEEE 802.1Qbv. TAS can allocate specific time windows for traffic of different priorities, ensuring that high-priority real-time data (such as industrial control instructions) can be transmitted within the specified time without being interfered with by low-priority traffic (such as equipment status monitoring data).
[0004] TSN's network resource management function can effectively manage network resources, including bandwidth allocation, queue management, and congestion control. This ensures that the network can still meet the needs of real-time applications under high load conditions. The centralized configuration model in the IEEE802.1Qcc standard, namely the fully centralized model and the centralized network / distributed user model, CNC (Centralized Network Configuration) configures TSN functions for each network device through a remote management protocol. This requires TSN switches to support remote configuration. Currently, TSN is a developing technology, and TSN switch products are also iterating with technical standards. The configuration method is mostly through the command line (CLI). The CLI configuration method can no longer meet the iteration of TSN configuration management standards. Summary of the invention
[0005] In response to the above technical problems, the present invention provides a remote configuration method supporting TSN switches, so that the switches can iteratively support NETCONF protocol remote configuration based on the current SDK command line, so as to facilitate the subsequent support of IEEE802.1Qcc protocol by TSN switches.
[0006] In order to achieve the above-mentioned purpose, the technical solution of the present invention provides a TSN function configuration method based on the NETCONF protocol, which comprises the following steps: S1: integrating the netconf-server thread supporting the NETCONF function into the SDK of the TSN switch, so that the netconf-server thread can be started through the SDK as a server to wait for the client's connection establishment request; S2: for each TSN function, the yang file is designed in accordance with the YANG protocol; S3: after starting the netconf-server thread, the NETCONF function is enabled through the command line to establish a connection with the client, the TSN configuration message sent by the client is received and parsed, and the specific TSN function is distinguished according to the parsed information and the yang file designed in step S2, and then the configuration interface provided by the SDK is used to send the configuration to the TSN switch.
[0007] Further, in step S3, after the client establishes a connection with the server, the client constructs a TSN configuration message according to the parameters of the TSN function designed in the yang file, and sends the TSN configuration message to the server in XML format.
[0008] Furthermore, in step S3, in the process of starting the Netconf-server thread, the initialization work including the following items is completed: installing the yang file designed for each TSN function, and starting the server to wait for the connection to be established.
[0009] Furthermore, in step S3, after receiving the TSN configuration message sent by the client, the server parses it in combination with the yang file to determine whether it is its own TSN function. If so, the corresponding configuration is issued; otherwise, the TSN configuration message is discarded.
[0010] Furthermore, in step S3, when the NETCONF function is not enabled or is enabled but then changed to be disabled through a command line, the CPU is released by making the netconf-server thread sleep periodically.
[0011] The technical solution of the present invention also provides a TSN function configuration device based on the NETCONF protocol, which includes the following modules: a netconf-server thread integration module, which is used to integrate the netconf-server thread supporting the NETCONF function into the SDK of the TSN switch, so that the netconf-server thread can be started through the SDK as a server to wait for the client's connection establishment request; a yang file design module, which is used to design a yang file corresponding to the YANG protocol for each TSN function; a TSN function configuration module, which is used to enable the NETCONF function through the command line after starting the netconf-server thread to establish a connection with the client, receive the TSN configuration message sent by the client and parse it, and distinguish the specific TSN function according to the parsed information and the yang file designed by the yang file design module, and then use the configuration interface provided by the SDK to send the configuration to the TSN switch.
[0012] Furthermore, in the TSN function configuration module, after the client establishes a connection with the server, the client constructs a TSN configuration message according to the parameters of the TSN function designed in the yang file, and sends the TSN configuration message to the server in XML format.
[0013] Furthermore, in the TSN function configuration module, in the process of starting the Netconf-server thread, the initialization work including the following items is completed: installing the yang file designed for each TSN function, and starting the server to wait for the connection to be established.
[0014] Furthermore, in the TSN function configuration module, after receiving the TSN configuration message sent by the client, the server parses it in combination with the yang file to determine whether it is its own TSN function. If so, the corresponding configuration is issued; otherwise, the TSN configuration message is discarded.
[0015] Furthermore, in the TSN function configuration module, when the NETCONF function is not enabled or is enabled but then changed to disabled through the command line, the CPU is released by making the netconf-server thread sleep periodically. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0017] Figure 1 It is a configuration framework diagram of the TSN function configuration method based on the NETCONF protocol of the present invention;
[0018] Figure 2 It is a configuration flow chart of the TSN function configuration method based on the NETCONF protocol of the present invention. DETAILED DESCRIPTION
[0019] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0020] The present application provides a time-sensitive network configuration method based on the NETCONF protocol, including but not limited to the configuration of the following TSN functions: IEEE802.1Qav, IEEE802.1Qci, IEEE802.1Qbv, IEEE802.1Qch, IEEE802.1Qbu and IEEE802.1CB, etc.
[0021] The NETCONF-based configuration method provides a netconf-server thread (103) supporting the NETCONF function integrated into the SDK (104) of the TSN switch, starts the netconf-server thread as a server through the SDK (Software Development Kit), and waits for the remote netconf-client (101) to establish a connection through an interactive message (102).
[0022] The netconf-server thread (103) is taken from open source software and meets the requirements of the NETCONF protocol. The implementation details and functions of the thread are not within the protection scope of this application. This application only uses the server function of the thread to receive the TSN configuration sent by the remote end.
[0023] The SDK (104) of the switch is a software development kit provided by the TSN switch chip equipped with the TSN switch, including an API library, a driver, and development documents. This application is an expansion of the SDK. After adding the netconf-server thread, the TSN configuration sent by the remote end through NETCONF can be received.
[0024] The yang file (105) designed for each TSN function is a yang file designed corresponding to the command line of the current configuration TSN function in accordance with the YANG protocol. Among them, the yang designed for different TSN functions can be a corresponding yang designed for each function, or different TSN functions can be designed into one yang file. The yang file will be loaded during the startup of the netconf-server. After establishing a connection with the server (netconf-server), when the client configures each TSN function, it is necessary to follow the corresponding structure and data type definition in the yang file and send it to the server (netconf-server) in XML format. After receiving the configuration, the server (netconf-server) will also parse it according to the loaded yang file.
[0025] The netconf-server thread parses the TSN configuration sent by the client. This application expands the TSN function of the netconf-server thread. According to the parsed information, the specific TSN function is distinguished in combination with the yang file (105), and then the configuration interface provided by the SDK is used to finally send the configuration to the TSN switch.
[0026] The netconf-server thread can control the running state through configuration commands. When the state is switched to disabled, the thread can sleep to release the CPU and reduce resource usage. Specific embodiment:
[0028] (1) Run the SDK startup script, which includes starting the netconf-server thread.
[0029] (2) During the startup of the Netconf-server thread, some initialization work is completed, such as installing tsn_func.yang designed for the TSN function and starting the server to listen for the connection.
[0030] (3) Enable the NETCONF function through the command line. At this time, the netconf-server thread is in the normal polling state.
[0031] (4) The client requests to establish a connection.
[0032] (5) After the connection is established, the client constructs a TSN configuration message based on the parameters of the TSN function designed in tsn_func.yang and sends it to the server.
[0033] (6) After receiving the message, the server parses it and needs to combine it with tsn_func.yang to parse it. If it is its own tsn function, it will issue the corresponding configuration. If it is not its own tsn function, it will discard the message.
[0034] (7) The server feeds back the result of configuration message processing to the client. This function relies on the NETCONF function of netconf-server. When the server successfully sends the configuration, it feeds back the result of OK to the client. When the server fails to send the configuration (i.e., discards the message), it feeds back the specific error cause (based on the result returned by the SDK) or the specific error message to the client.
[0035] In particular, if the NETCONF function is not enabled in (3) or is enabled but then disabled through the command line, the netconf-server thread will sleep periodically, releasing the CPU. At this time, the client will not be able to establish a connection with the server, and will not be able to send configurations through NETCONF. This will reduce CPU resource usage when there is no need to receive NETCONF configurations.
[0036] In an embodiment of the present invention, a TSN function configuration method based on the NETCONF protocol is provided, which includes the following steps: S1: integrating a netconf-server thread supporting the NETCONF function into the SDK of the TSN switch, so that the netconf-server thread can be started through the SDK as a server to wait for a connection request from a client; S2: for each TSN function, a yang file is designed in accordance with the YANG protocol; S3: after starting the netconf-server thread, the NETCONF function is enabled through the command line to establish a connection with the client, and the TSN configuration message sent by the client is received and parsed, and the specific TSN function is distinguished according to the parsed information and the yang file designed in step S2, and then the configuration interface provided by the SDK is used to send the configuration to the TSN switch.
[0037] Further, in step S3, after the client establishes a connection with the server, the client constructs a TSN configuration message according to the parameters of the TSN function designed in the yang file, and sends the TSN configuration message to the server in XML format.
[0038] Furthermore, in step S3, in the process of starting the Netconf-server thread, the initialization work including the following items is completed: installing the yang file designed for each TSN function, and starting the server to wait for the connection to be established.
[0039] Furthermore, in step S3, after receiving the TSN configuration message sent by the client, the server parses it in combination with the yang file to determine whether it is its own TSN function. If so, the corresponding configuration is issued; otherwise, the TSN configuration message is discarded.
[0040] Furthermore, in step S3, when the NETCONF function is not enabled or is enabled but then changed to be disabled through a command line, the CPU is released by making the netconf-server thread sleep periodically.
[0041] In another embodiment of the present invention, a TSN function configuration device based on the NETCONF protocol is also provided, which includes the following modules: a netconf-server thread integration module, which is used to integrate the netconf-server thread supporting the NETCONF function into the SDK of the TSN switch, so that the netconf-server thread can be started through the SDK as a server to wait for the client's connection establishment request; a yang file design module, which is used to design a yang file corresponding to the YANG protocol for each TSN function; a TSN function configuration module, which is used to enable the NETCONF function through the command line after starting the netconf-server thread to establish a connection with the client, receive the TSN configuration message sent by the client and parse it, and distinguish the specific TSN function according to the parsed information and the yang file designed by the yang file design module, and then use the configuration interface provided by the SDK to send the configuration to the TSN switch.
[0042] Furthermore, in the TSN function configuration module, after the client establishes a connection with the server, the client constructs a TSN configuration message according to the parameters of the TSN function designed in the yang file, and sends the TSN configuration message to the server in XML format.
[0043] Furthermore, in the TSN function configuration module, in the process of starting the Netconf-server thread, the initialization work including the following items is completed: installing the yang file designed for each TSN function, and starting the server to wait for the connection to be established.
[0044] Furthermore, in the TSN function configuration module, after receiving the TSN configuration message sent by the client, the server parses it in combination with the yang file to determine whether it is its own TSN function. If so, the corresponding configuration is issued; otherwise, the TSN configuration message is discarded.
[0045] Furthermore, in the TSN function configuration module, when the NETCONF function is not enabled or is enabled but then changed to disabled through the command line, the CPU is released by making the netconf-server thread sleep periodically.
[0046] Beneficial technical effects of the technical solution of the present invention:
[0047] The solution provided by the present invention enables the netconf-server thread to be started together with the SDK, and adds a TSN function configuration channel to the SDK in addition to the traditional CLI;
[0048] Moreover, the present invention adds a command line to the netconf-server thread to control the enabling state of the NETCONF function. When there is no need to modify the TSN configuration, the command line can be used to configure NETCONF to be disabled, thereby controlling the netconf-server thread to sleep and releasing CPU resources.
[0049] In addition, using the method of the present invention, combined with the design of yang and SDK interfaces for different TSN functions, the TSN configuration can be remotely sent to the TSN chip based on the NETCONF protocol.
[0050] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A TSN function configuration method based on the NETCONF protocol, characterized in that: The steps include: S1: Integrate the netconf-server thread that supports the NETCONF function into the SDK of the TSN switch so that the netconf-server thread can be started as a server through the SDK to wait for the client's connection request; S2: Design the yang file for each TSN function according to the YANG protocol; S3: After starting the netconf-server thread, enable the NETCONF function through the command line to establish a connection with the client, receive and parse the TSN configuration message sent by the client, and distinguish the specific TSN function based on the parsed information and the yang file designed in step S2. Then use the configuration interface provided by the SDK to send the configuration to the TSN switch.
2. The method according to claim 1, characterized in that: In step S3, after the client establishes a connection with the server, the client constructs a TSN configuration message according to the parameters of the TSN function designed in the yang file, and sends the TSN configuration message to the server in XML format.
3. The method according to claim 1, characterized in that In step S3, in the process of starting the Netconf-server thread, the initialization work including the following items is completed: installing the yang files designed for each TSN function, and starting the server to listen for the connection.
4. The method according to claim 1, characterized in that In step S3, after receiving the TSN configuration message sent by the client, the server parses it in combination with the yang file to determine whether it is its own TSN function. If so, the corresponding configuration is issued; otherwise, the TSN configuration message is discarded.
5. The method according to claim 1, characterized in that: In step S3, when the NETCONF function is not enabled or is enabled but then disabled through a command line, the CPU is released by making the netconf-server thread sleep periodically.
6. A TSN function configuration device based on the NETCONF protocol, characterized in that: Includes the following modules: The netconf-server thread integration module is used to integrate the netconf-server thread that supports the NETCONF function into the SDK of the TSN switch, so that the netconf-server thread can be started as a server through the SDK to wait for the client's connection request; The yang file design module is used to design yang files for each TSN function in accordance with the YANG protocol; The TSN function configuration module is used to enable the NETCONF function through the command line after starting the netconf-server thread to establish a connection with the client, receive and parse the TSN configuration message sent by the client, and distinguish the specific TSN functions based on the parsed information and the yang file designed by the yang file design module, and then use the configuration interface provided by the SDK to send the configuration to the TSN switch.
7. The device according to claim 6, characterized in that In the TSN function configuration module, after the client establishes a connection with the server, the client constructs a TSN configuration message according to the parameters of the TSN function designed in the yang file, and sends the TSN configuration message to the server in XML format.
8. The device according to claim 6, characterized in that In the TSN function configuration module, when starting the Netconf-server thread, the following initialization tasks are completed: installing the yang files designed for each TSN function and starting the server to listen for the connection.
9. The device according to claim 6, characterized in that In the TSN function configuration module, after receiving the TSN configuration message sent by the client, the server parses it in combination with the yang file to determine whether it is its own TSN function. If so, the corresponding configuration is issued; otherwise, the TSN configuration message is discarded.
10. The device according to claim 6, characterized in that In the TSN function configuration module, if the NETCONF function is not enabled or is enabled but then disabled through the command line, the netconf-server thread is made to sleep periodically to release the CPU.