CN-121984634-A - Network switch synchronization method and system suitable for multiple scenes and network switch
Abstract
The invention discloses a network switch synchronization method and system suitable for multiple scenes and a network switch, and belongs to the technical field of network switches. The invention judges whether the current data flow accords with the high time sensitivity condition according to the judging model by the first type network switch, if so, the current data flow is kept in the high time sensitivity synchronous network, otherwise, the high time sensitivity synchronous network is exited, and the second type network switch judges whether the current data service accords with the high time sensitivity condition according to the judging model, if so, the current data flow is added in the high time sensitivity synchronous network, otherwise, the current data flow is kept in the low time sensitivity synchronous network, thereby realizing the synchronization of data lines with different time sensitivities according to the matched time sensitivity synchronous mode under the condition of not migrating the data flow or additionally deploying network exchange, and realizing the switching among different time sensitivity synchronous modes, and further reducing the cost.
Inventors
- WANG JIANJIAN
Assignees
- 杭州程宇智能科技有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20260323
Claims (10)
- 1. A network switch synchronization method adapted to multiple scenarios, comprising: Setting a high-time-sensitivity synchronous network, wherein the high-time-sensitivity synchronous network comprises a clock source and a plurality of first-type network switches, and the plurality of first-type network switches perform time synchronization through the clock source; setting a low-time-sensitivity synchronous network, wherein the low-time-sensitivity network comprises a plurality of second-type network switches and a single first-type network switch, and the plurality of second-type network switches perform time synchronization through the single first-type network switch; Configuring a judgment model corresponding to a current scene, wherein the judgment model is set through a wide neural network, the judgment model corresponds to a network switch, and the current scene is used for indicating the type of a data stream and the type of a service corresponding to equipment connected with the network switch; Judging whether the current data flow meets the high time sensitivity condition according to the judging model by the first type network switch, if so, continuously remaining in the high time sensitivity synchronous network, otherwise, exiting the high time sensitivity synchronous network; Judging whether the current data service meets the high time sensitivity condition according to the judging model by the second type network switch, if so, adding the second type network switch into the high time sensitivity synchronous network, otherwise, continuously storing the second type network switch in the low time sensitivity synchronous network; The determining whether the current data stream meets the high time sensitivity condition comprises: inputting the service type parameter, the data type parameter and other parameters corresponding to the data flow into the judging model to obtain a real-time grade value; The high time sensitivity condition includes that the high time sensitivity is satisfied if the real-time class value is greater than or equal to a preset threshold.
- 2. The method of claim 1, wherein the network switch configures an NTP protocol and a PTP protocol, wherein the high time sensitivity synchronization network performs time synchronization via the PTP protocol, and wherein the low time sensitivity synchronization network performs time synchronization via the NTP protocol.
- 3. The method of claim 2, further comprising setting a range of the plurality of first-type network switches and the plurality of second-type network switches, comprising: calculating a network delay between a network switch and the clock source; acquiring the number of devices between a network switch and the clock source; And if the network delay is less than or equal to a time threshold and the number of the devices is less than or equal to n, setting the network switch as the first type network switch or the second type network switch, wherein n is less than or equal to three.
- 4. A method according to claim 3, characterized in that the method further comprises: Setting a range updating period; and updating the range of the plurality of first-type network switches and the plurality of second-type network switches after the update period is satisfied.
- 5. A method according to claim 3, wherein said setting up a high time sensitivity synchronization network comprises: After a preset time interval, the network switch judges whether the current data flow accords with a high time sensitivity condition according to the judging model, if so, the network switch marks itself as a first type network switch, and initiates a first request to the clock source; And the clock source records the first type network switches according to the first request until all the first type network switches are exhausted, performs time synchronization with the plurality of first type network switches, and broadcasts all the first type network switches.
- 6. The method of claim 5, wherein said setting a low time sensitivity synchronization network comprises: after a preset time interval, the network switch judges whether the current data flow accords with a high time sensitivity condition according to the judging model, if not, the network switch marks itself as a second type network switch, and initiates a second request to the adjacent first type network switch according to all the first type network switches broadcasted by the clock source; and the first type network switch records the second type network switch according to the second request until all the second type network switches are exhausted, and then performs time synchronization with the plurality of first type network switches.
- 7. The method of claim 1, wherein configuring the judgment model corresponding to the current scene comprises: Setting description parameters corresponding to the current scene, and identifying the type of the data stream and the service type corresponding to equipment connected with the network switch; Setting the input of the width neural network as a user setting request, the service type parameter, the data type parameter and the other parameters, and outputting as a real-time grade value; The training sample at least comprises user setting requests, service type parameters, data type parameters and other parameters corresponding to different real-time grade values; And training the width neural network through the training sample to obtain the judging model corresponding to the current scene.
- 8. The method of claim 7, wherein the method further comprises: and if the current scene is detected to change, reconfiguring the judging model.
- 9. A network switch synchronization system adapted for multiple scenarios, the system comprising a clock source and a plurality of network switches, the plurality of network switches being divided into a first type of network switch and a second type of network switch, wherein: The clock source is used for setting a high-time-sensitivity synchronous network, the high-time-sensitivity synchronous network comprises a clock source and a plurality of first-type network switches, and the plurality of first-type network switches perform time synchronization through the clock source; the first-type network switch is used for setting a low-time-sensitivity synchronous network, and the low-time-sensitivity network comprises a plurality of second-type network switches and a single first-type network switch, and the plurality of second-type network switches perform time synchronization through the single first-type network switch; The network switch is used for configuring a judging model corresponding to a current scene, the judging model is set through a wide neural network, the judging model corresponds to the network switch, and the current scene is used for indicating the type of a data stream and the service type corresponding to equipment connected with the network switch; The first-class network switch is used for judging whether the current data flow accords with the high time sensitivity condition according to the judging model, if so, the current data flow is kept in the high time sensitivity synchronous network, and if not, the current data flow exits the high time sensitivity synchronous network; The second-class network switch is used for judging whether the current data service accords with the high time sensitivity condition according to the judging model, if so, the second-class network switch is added into the high time sensitivity synchronous network, otherwise, the second-class network switch is continuously reserved in the low time sensitivity synchronous network; wherein the network switch is configured to: inputting the service type parameter, the data type parameter and other parameters corresponding to the data flow into the judging model to obtain a real-time grade value; The high time sensitivity condition includes that the high time sensitivity is satisfied if the real-time class value is greater than or equal to a preset threshold.
- 10. A network switch, wherein the network switch configures an NTP protocol and a PTP protocol, further comprising: the configuration module is used for configuring a judgment model corresponding to the current scene; The judging module is used for inputting the service type parameter, the data type parameter and other parameters corresponding to the data stream into the judging model to obtain a real-time grade value, and if the real-time grade value is greater than or equal to a preset threshold value, the high time sensitivity is met; The networking module is used for setting a low-time-sensitivity synchronous network, wherein the low-time-sensitivity network comprises a plurality of second-type network switches and a single first-type network switch, and the plurality of second-type network switches are used for time synchronization through the single first-type network switch.
Description
Network switch synchronization method and system suitable for multiple scenes and network switch Technical Field The present invention relates to the field of network switches, and in particular, to a network switch synchronization method, system and network switch adapted to multiple scenarios. Background The time sensitive network is used as a real-time communication network based on the Ethernet technology, and has the core advantages of meeting the requirements of low time delay, low jitter and high reliability for data transmission in the scenes of industrial automation, intelligent driving, telemedicine and the like through accurate clock synchronization, flow scheduling and other mechanisms. In a time sensitive network, a master clock end system is a reference for clock synchronization of the whole network, and all slave clock devices (such as a network end system and a network switch) need to keep synchronization with the master clock so as to ensure consistency of the whole network time. The clock synchronization scheme of the existing time sensitive network has the following technical defects: In the conventional scheme, the high-time-sensitivity synchronization and the low-time-sensitivity synchronization are usually fixed by configuring an NTP protocol or a PTP protocol after the network switch and other devices are installed, but in practical application, the network switch with the low-time-sensitivity synchronization may transmit high-time-sensitivity service data, after the network switch configures the NTP protocol or the PTP protocol, the devices cannot migrate or change, only the high-time-sensitivity service data flow can be transferred to the network switch configured with the PTP protocol, or additional high-time-sensitivity synchronous network switches are configured for the service, so that the first mode increases the workload and the cost in the data transfer process, and the second mode increases the deployment cost of the network switch. Disclosure of Invention In order to solve the problems in the prior art, an embodiment of the present invention provides a network switch synchronization method, system and network switch adapted to multiple scenarios, including: In one aspect, a network switch synchronization method adapted to multiple scenarios is provided, including: Setting a high-time-sensitivity synchronous network, wherein the high-time-sensitivity synchronous network comprises a clock source and a plurality of first-type network switches, and the plurality of first-type network switches perform time synchronization through the clock source; setting a low-time-sensitivity synchronous network, wherein the low-time-sensitivity network comprises a plurality of second-type network switches and a single first-type network switch, and the plurality of second-type network switches perform time synchronization through the single first-type network switch; Configuring a judgment model corresponding to a current scene, wherein the judgment model is set through a wide neural network, the judgment model corresponds to a network switch, and the current scene is used for indicating the type of a data stream and the type of a service corresponding to equipment connected with the network switch; Judging whether the current data flow meets the high time sensitivity condition according to the judging model by the first type network switch, if so, continuously remaining in the high time sensitivity synchronous network, otherwise, exiting the high time sensitivity synchronous network; Judging whether the current data service meets the high time sensitivity condition according to the judging model by the second type network switch, if so, adding the second type network switch into the high time sensitivity synchronous network, otherwise, continuously storing the second type network switch in the low time sensitivity synchronous network; The determining whether the current data stream meets the high time sensitivity condition comprises: inputting the service type parameter, the data type parameter and other parameters corresponding to the data flow into the judging model to obtain a real-time grade value; The high time sensitivity condition includes that the high time sensitivity is satisfied if the real-time class value is greater than or equal to a preset threshold. Optionally, the network switch configures an NTP protocol and a PTP protocol, the high-time-sensitivity synchronous network performs time synchronization through the PTP protocol, and the low-time-sensitivity synchronous network performs time synchronization through the NTP protocol. Optionally, the method further includes setting ranges of the plurality of first-type network switches and the plurality of second-type network switches, including: calculating a network delay between a network switch and the clock source; acquiring the number of devices between a network switch and the clock source; And if the network delay is less t