Node state determination methods, apparatus, devices, and storage media
By obtaining the node's time adjustment value, clock status, or packet loss count, the node status can be determined and corresponding measures can be taken, thus solving the problem of inaccurate node status determination under the 1588V2 standard and ensuring network stability and accuracy.
Patent Information
- Application Number
- CN202010501208.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-04
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2040-06-04
AI Technical Summary
Under the 1588V2 standard, the node status is not accurately determined, which causes the next node to still track incorrect time information when a fault occurs in the network, affecting the stability of the entire network.
By obtaining the current node's time adjustment value, clock status, or packet loss count, the node status is determined based on these parameters. When a node is abnormal, measures are taken, such as triggering the BMC algorithm to reselect a source, modifying message fields, or stopping message transmission, to prevent the fault from being passed downstream.
Effectively identify node anomalies, reduce the impact on the network, and ensure the stability and accuracy of the time synchronization network.
Smart Images

Figure CN113765612B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to methods, apparatus, devices and storage media for determining node status. Background Technology
[0002] The 1588V2 standard is a high-precision time synchronization standard. Since its first version was released in 2008, it has been widely used in aerospace, industry, and other fields. With the advent of the 5G era, the requirements for time synchronization in areas such as indoor positioning and the Internet of Things (IoT) have become increasingly stringent, leading to the development of ultra-high-precision time synchronization technologies based on 1588V2. This has further broadened the application scope of 1588V2. However, despite the increasingly stringent accuracy requirements of 1588, the related OAM (Operation Administration and Maintenance) requirements for 1588 are not yet fully developed. This lack of accurate knowledge of the current node's status can result in situations where, even if a current node fails, the next node continues to track incorrect time information, causing problems for the entire network. Summary of the Invention
[0003] To address the aforementioned technical problems, this application provides a method, apparatus, device, and storage medium for determining node states.
[0004] In a first aspect, embodiments of this application provide a method for determining a node state, including:
[0005] Get the current node's time adjustment value, clock status, or packet loss count;
[0006] The current node's status is determined based on the time adjustment value, clock status, or number of packet losses.
[0007] Secondly, embodiments of this application provide a node state determination device, comprising:
[0008] The acquisition module is used to obtain the current node's time adjustment value, clock status, or number of packet losses.
[0009] The determination module is used to determine the status of the current node based on the time adjustment value, clock status, or number of packet losses.
[0010] Thirdly, this application provides an apparatus comprising:
[0011] One or more processors;
[0012] Storage device for storing one or more programs;
[0013] When the one or more programs are executed by the one or more processors, the one or more processors implement the method provided in the embodiments of the present invention.
[0014] Fourthly, embodiments of this application provide a storage medium storing a computer program, which, when executed by a processor, implements any of the methods described in the embodiments of this application.
[0015] Further details regarding the above embodiments and other aspects of this application, as well as their implementations, are provided in the accompanying drawings, detailed description, and claims. Attached Figure Description
[0016] Figure 1 This application provides a flowchart illustrating a method for determining node states;
[0017] Figure 1a This application provides a PTP time synchronization network diagram;
[0018] Figure 1b This application provides a schematic diagram of the port switching process.
[0019] Figure 1c This application provides a schematic diagram illustrating the offset of the time adjustment value.
[0020] Figure 1d This application provides a schematic diagram illustrating the oscillation of the offset time adjustment value;
[0021] Figure 1e This application provides a diagram illustrating message loss;
[0022] Figure 2 This application provides a schematic diagram of the structure of a node state determination device.
[0023] Figure 3 This is a schematic diagram of the structure of a device provided in this application. Detailed Implementation
[0024] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in detail below with reference to the accompanying drawings. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be arbitrarily combined with each other.
[0025] The steps illustrated in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases the steps shown or described may be performed in a different order than that presented here.
[0026] In one exemplary implementation Figure 1 This is a flowchart illustrating a node state determination method provided in this application. This method is applicable when the current node state is determined. The method can be executed by a node state determination device, which can be implemented in software and / or hardware and integrated into a device. The device can be a computer device.
[0027] like Figure 1 As shown, the node state determination method provided in this application includes S110 and S120.
[0028] S110: Obtain the current node's time adjustment value, clock status, or number of packet losses.
[0029] The time adjustment value is the offset time adjustment value. For the calculation method of the offset time adjustment value, please refer to the 1588V2 standard.
[0030] The clock states include: locked state and unlocked state.
[0031] The number of packet losses refers to event messages, which are messages that carry a time frame.
[0032] Specifically, the offset time adjustment value is calculated, and the clock status or number of packet losses is obtained.
[0033] S120. Determine the current node's status based on the time adjustment value, clock status, or number of packet losses.
[0034] The current node status can include normal and abnormal status.
[0035] Specifically, determining the current node's state based on the time adjustment value, clock status, or number of packet losses can be as follows: If the time adjustment value consistently exceeds a first threshold within a set time range, the current node's state is determined to be abnormal. Alternatively, if the number of times the time adjustment value exceeds the first threshold exceeds a certain threshold within a set time range, the current node's state is determined to be abnormal. Another option is if the sum of the time adjustment values exceeds a second threshold within a set time range. Yet another option is if the clock status remains unlocked within a set time range, or if the number of times the clock status is unlocked exceeds a certain threshold within a set time range, or if continuous packet loss occurs within a set time range, or if the number of packet losses exceeds a certain threshold within a set time range, the current node's state is determined to be abnormal.
[0036] This application provides a node status determination method that obtains the current node's time adjustment value, clock status, or packet loss count; and determines the current node's status based on the time adjustment value, clock status, or packet loss count. This solves the problem of not being able to accurately know the current node's status, which leads to the next node still tracking the incorrect time information transmitted by the current node even when the current node fails. This ensures that technical problems in the entire network are not propagated downstream when the current node is abnormal, reducing the impact on the network.
[0037] Based on the above embodiments, modified embodiments of the above embodiments are proposed. It should be noted that, in order to keep the description brief, only the differences from the above embodiments are described in the modified embodiments.
[0038] In one embodiment, determining the state of the current node based on the time adjustment value includes:
[0039] Within a set time range, if the time adjustment value is consistently greater than the first threshold, the number of times the time adjustment value is greater than the first threshold exceeds the number threshold, or the sum of the time adjustment values is greater than the second threshold, then the current node's state is determined to be abnormal.
[0040] The preset time range can be set by the user or by the system. This embodiment does not limit this. For example, it can be configured by the user using a sliding window T1.
[0041] The first threshold, the second threshold, and the number of times threshold can be set by the user. The first threshold, the second threshold, and the number of times threshold can be the same or different. This embodiment does not impose any restrictions on this.
[0042] Specifically, within a set time range A, if the time adjustment value is continuously greater than a first threshold, the current node's state is determined to be abnormal; within a set time range B, if the number of times the time adjustment value is greater than the first threshold is greater than a number threshold, the current node's state is determined to be abnormal; within a set time range C, if the sum of the time adjustment values is greater than a second threshold, the current node's state is determined to be abnormal. Time ranges A, B, and C can be the same or different, and this embodiment does not impose any restrictions on this.
[0043] Specifically, within a set time range, if the time adjustment value is greater than the first threshold, the current node's state is determined to be abnormal. Within a set time range, if the number of times the time adjustment value exceeds the first threshold exceeds the number threshold, the current node's state is determined to be abnormal. Within a set time range, if the sum of the time adjustment values exceeds the second threshold, the current node's state is determined to be abnormal. For example, this could be a user-configured threshold M for the absolute value of the offset time adjustment value and a duration T1 for the abnormal offset time adjustment value. If the absolute value of the offset time adjustment value continuously exceeds the threshold M within window T1, the current node's state is determined to be abnormal. This process is used to determine if the offset time adjustment value is continuously abnormal. The user configures the threshold M for the absolute value of the offset time adjustment value, the duration T2 for the abnormal offset time adjustment value, and the number N times the offset time adjustment value exceeds the limit. If the absolute value of the offset time adjustment value exceeds the threshold M more than N times within a sliding window T2, it indicates system instability, and the current node's state is determined to be abnormal. Generally, a reasonable design requires T2 to be greater than T1. This process is used to determine if the offset experiences multiple momentary anomalies. The user configures a sliding window T3, an offset time adjustment value accumulation, and a threshold SumM. If the accumulated offset time adjustment value exceeds SumM within the sliding window T3 range, the current node's state is determined to be abnormal. This judgment is used to identify abnormal unidirectional fluctuations in the offset.
[0044] In one embodiment, determining the state of the current node based on the clock state includes:
[0045] If the clock state remains unlocked within a set time range, or if the number of times the clock state remains unlocked exceeds a threshold, then the current node's state is determined to be abnormal.
[0046] The preset time range can be set by the user or by the system. This embodiment does not limit this. For example, it can be configured by the user using a sliding window T1.
[0047] Specifically, within a set time range A, if the clock state remains unlocked, the current node's state is determined to be abnormal; within a set time range B, if the number of times the clock state is unlocked exceeds a threshold, the current node's state is determined to be abnormal. The time ranges A and B can be the same or different, and this embodiment does not impose any restrictions on this.
[0048] Specifically, within a set time range, if the clock state is unlocked, the current node's state is determined to be abnormal. Within the set time range, if the number of times the clock state is unlocked exceeds a threshold, the current node's state is determined to be abnormal. For example: the user configures a time window T1, and the slave checks if the clock is locked normally. If the clock remains unlocked for T1 consecutive times, the current node's state is determined to be abnormal. The user configures a time window T2 and a number of unlock failures N. If the clock remains unlocked more than N times within time window T2, the current node's state is determined to be abnormal. Generally, a reasonable design requires T2 to be greater than T1.
[0049] In one embodiment, determining the current node's state based on the number of packet losses includes:
[0050] If packet loss continues within a set time range, or if the number of packet losses exceeds a threshold, the current node is determined to be in an abnormal state.
[0051] In this context, continuous packet loss refers to the absence of an event message for N consecutive cycles. The event message is a time-carrying message, such as Sync, Follow_Up, and Delay_Resp. This embodiment does not impose any restrictions on this.
[0052] The set time range can be preset by the user or set by the system. This embodiment does not limit this. For example, it can be configured by the user as a sliding window T1.
[0053] Specifically, if packet loss continues within a set time range A, the current node's state is determined to be abnormal; if the number of packet losses exceeds a threshold within a set time range B, the current node's state is determined to be abnormal. The time ranges A and B can be the same or different, and this embodiment does not impose any restrictions on this.
[0054] Specifically, if packet loss continues within a set time range, the current node's state is determined to be abnormal. For example, the user can configure a timeout period N for Sync, Follow_Up, and Delay_Resp. If no Sync, Follow_Up, or Delay_Resp packets are received for N consecutive periods, the current node's state is determined to be abnormal. Within the set time range, if the number of packet losses exceeds a threshold, the current node's state is determined to be abnormal. For example, the user can configure a sliding window T1 and a timeout period M. If M Sync / Follow_Up or Delay_Resp packets are lost cumulatively within the sliding window T1, the current node's state is determined to be abnormal. Generally, the number M needs to be greater than the number N.
[0055] In one embodiment, the current node's abnormal state includes a time synchronization lock failure state.
[0056] In one embodiment, after determining the state of the current node, if the state of the current node is abnormal, one or more of the following steps are performed:
[0057] Trigger the current node's BMC algorithm to reselect a source;
[0058] Modify the trigger field carried in the message to the time parameter of the current node, wherein the trigger field is a field used to trigger the next node to reselect the source;
[0059] Stop sending messages;
[0060] The alarm for lost lock is reported synchronously.
[0061] Specifically, if the current node's state is abnormal, the current node's BMC algorithm is triggered to reselect a source. For example, if the current node's state is abnormal, the current node triggers the BMC algorithm to reselect a source time, selecting a backup PTP port as the Slave port, and the port that failed as the Passive port to continue detecting the aforementioned types of faults. If the corresponding alarm is recovered, a switchback is performed according to the BMC algorithm.
[0062] Specifically, if the current node's state is abnormal, the trigger field carried in the message is modified to the current node's time parameters. For example, if the current node's state is abnormal, the ClockClass, Priority, and other parameters carried in the Announce message are modified to the current node's time parameters instead of the parameters of the time source device defined in the standard. This way, when the next node receives the Announce message, it will consider the quality of the time source received along this path to have degraded, triggering a recalculation of the BMC algorithm. Thus, it will no longer track erroneous time paths.
[0063] Specifically, if the current node's status is abnormal, then sending messages will stop. For example, it could stop sending various PTP messages. If downstream devices do not receive Announce messages, the BMC algorithm will be triggered to reselect a source.
[0064] Specifically, if the current node is in an abnormal state, a time synchronization lock failure alarm will be reported.
[0065] Specifically, due to the incomplete OAM requirements for 1588, some anomaly handling standards have not yet been established when time synchronization problems occur. This creates loopholes in time synchronization fault handling. To address these shortcomings, this embodiment proposes a fault handling method for PTP time synchronization loss of lock. When a node is detected to be in a time synchronization loss state, the corresponding fault handling method limits the time anomaly to a relatively small range, reducing the impact on the time synchronization network. In a PTP time synchronization network, under normal circumstances, each device sends Announce messages to other devices. The BCM algorithm determines the time source and the Master and Slave ends of each device in the network based on the parameters of the Announce message. The Slave ends track the time of the Master end. When the Announce messages on the line are interrupted, or the parameters carried in the Announce message change, the 1588 network will reconstruct, elect a new time source, and re-determine the Master and Slave ends for each device, bringing the entire network back to a normal time synchronization state. However, for certain faults, such as a node experiencing a time synchronization lock-out issue, but still being able to send Announce messages normally, the parameters carried in the Announce messages sent by this node will still be information from the time source device, since the time source device in the network is functioning normally. This prevents downstream devices from knowing that this device has failed, causing them to continue tracking erroneous time information from this device, leading to network-wide problems. The method provided in this implementation performs fault detection at the slave end of the device, and when these faults are detected, it controls the fault to prevent it from propagating downstream at the current faulty node by issuing alerts, not sending messages, or modifying time parameter fields, thereby reducing the impact on the network.
[0066] In a specific example, the ways to determine the state of the current node include:
[0067] 1. Fault diagnosis is achieved by analyzing changes in the offset time adjustment value on the slave side. The calculation method for the offset time adjustment value is detailed in the 1588V2 standard. When time synchronization is stable, the offset time adjustment value calculated on the slave side generally follows a sine curve distribution, with minimal deviation between the upper and lower limits. Taking ultra-high precision synchronization equipment as an example, under stable conditions, the offset time adjustment value typically varies within ±2. When various faults occur in the network, such as abnormal timestamp information in upstream PTP packets, abnormal timestamp information on the local side, or uncertain delays in the line, the absolute value of the calculated offset time adjustment value will increase. Fault diagnosis for this abnormal offset time adjustment value can be handled in the following ways:
[0068] The user configures a threshold value M for the absolute value of the offset time adjustment and a duration T1 for any abnormal offset time adjustment value. If the absolute value of the offset time adjustment continuously exceeds the threshold M within window T1, time synchronization is considered lost. This process is used to determine if the offset time adjustment value is persistently abnormal.
[0069] The user configures the threshold value M for the absolute value of the offset time adjustment, the duration T2 for an abnormal offset time adjustment, and the number N times the offset time adjustment exceeds the limit. If the absolute value of the offset time adjustment exceeds the threshold M more than N times within a sliding window T2, it indicates that the system is unstable and is considered to have lost time synchronization. According to a generally reasonable design, T2 should be greater than T1. This process is used to judge the occurrence of multiple instantaneous anomalies in the offset.
[0070] The user configures a sliding window T3 and an offset accumulation and threshold SumM. If the offset accumulation exceeds SumM within the sliding window T3 range, the time adjustment is considered to have entered an unlocked state. This judgment is used to detect abnormal unidirectional fluctuations in the offset.
[0071] Does the above-mentioned abnormality in the user-designed switch control offset time adjustment value trigger a time synchronization loss alarm? The offset time adjustment value can be the offset time adjustment value calculated when this device is acting as a slave, or it can be the time deviation value fed back to this device by the downstream device.
[0072] 2. Identifying faults by checking the system clock status: PTP time synchronization relies on the stability of clocks throughout the network; high-precision clocks provide the foundation for high-precision timekeeping. When a device's clock is not properly locked, it will also affect time synchronization.
[0073] The user configures a time window T1. The slave determines whether the clock is locked properly. If the clock is not locked for a period of T1, it is considered that the time synchronization has failed.
[0074] The user configures the time window T2 and the number of times the clock fails to lock N. If the clock fails to lock more than N times within the sliding window T2, time synchronization is considered lost. Generally, a reasonable design requires T2 to be greater than T1.
[0075] The user designs a switch to associate the clock and time. When the clock is abnormal, it is sent to the time module, which considers that time synchronization has failed and an alarm has been triggered.
[0076] 3. Determine if the current node can receive PTP event messages normally: Under normal circumstances, the slave will receive Sync, Follow_Up, or Delay_Resp messages according to the configured packet sending interval. When network performance deteriorates, there may be temporary packet loss. Determine if time synchronization is normal by checking whether these messages are received normally, as follows:
[0077] The user configures the timeout period N for Sync, Follow_Up, and Delay_Resp. If no Sync, Follow_Up, or Delay_Resp message is received for N consecutive periods, the time synchronization is considered lost.
[0078] The user configures the sliding window T1 and the timeout period M. If the Sync, Follow_Up, or Delay_Resp packets experience an accumulated M packet loss within the sliding window T1, time synchronization is considered lost. Generally, M needs to be greater than N. This parameter indicates that PTP event packets may experience multiple brief packet losses.
[0079] The user-designed switch controls whether the degradation of PTP received messages triggers a time synchronization lockout fault.
[0080] The handling methods when a node is detected to be in a time synchronization loss state include: modifying the parameter transmission content of the Announce message, stopping the transmission of Announce messages, performing handover processing, and only performing alarm detection. Modifying the parameter transmission content of the Announce message includes: upon detecting that the current node is in a time synchronization loss state, reporting a time synchronization loss alarm, and simultaneously modifying the ClockClass, Priority, and other parameters carried in the Announce message to the local node's time parameters instead of the parameters of the time source device defined in the standard. This way, when a downstream node receives the Announce message, it will consider the quality of the time source received on this path to be degraded, triggering the BMC algorithm to reselect a source time, thus no longer tracking the erroneous time path. Stopping the transmission of Announce messages includes: upon detecting that the current node is in a time synchronization loss state, reporting a time synchronization loss alarm, and simultaneously stopping the transmission of various PTP messages. If downstream devices do not receive Announce messages, it will also trigger the BMC algorithm to reselect a source time. The handover process includes: when a node is detected to be in a time synchronization lockout state, the node triggers the BMC algorithm to reselect a source, choosing a backup PTP port as the slave port, and the faulty port as the passive port to continue detecting the aforementioned types of faults. If the corresponding alarm is resolved, the BMC algorithm performs a handover back. Alarm-only detection includes: when a node is detected to be in a time synchronization lockout state, only an alarm is reported without further propagation. Through these methods, the fault handling problem caused by the lack of a definition in the 1588V2 standard is resolved, preventing the fault from further spreading to downstream devices and ensuring the stability of devices in the network.
[0081] In another specific example, such as Figure 1a as well as Figure 1b As shown, the network consists of six devices BC1-BC6 and a time source GM1. Following the standard 1588V2 BMC algorithm, BC3 tracks the clock information of BC2, with BC2 acting as the Master and BC3 as the Slave. BC2 and BC3 exchange PTP messages. The BC3 Slave performs offset calculation, and the result is used to adjust the local node's time to achieve synchronization with BC2. The Announce message from BC2 to BC3 carries information from the GM1 time source. When BC2 experiences a synchronization failure, such as a large deviation or oscillation in the offset calculation result, the following processing is performed according to the method provided in this embodiment: the user configures the threshold value of the absolute offset to 500ns and the duration of the offset anomaly to T1 to 5s. If the absolute value of the offset continuously exceeds the threshold within the window T1, a time synchronization failure alarm is generated. Figure 1cThe figure shows a graph illustrating the offset anomaly. The user configures a threshold of 500ns for the absolute offset value, a duration of offset anomalies T2 = 20s, and a limit of 5 for offset exceeding the threshold. If the absolute offset value exceeds the 500ns threshold more than 5 times within a sliding window T2, it indicates system instability and generates a time synchronization failure alarm. Figure 1d The graph shown illustrates the offset condition for this anomaly. The user configures a sliding window T3 of 30 seconds and an offset sum threshold of 1000 ns. If the offset sum exceeds 1000 ns within the sliding window T3 range, the time adjustment is considered to be in an abnormal state. This embodiment also enables clock-to-time anomaly correlation processing and PTP event message packet loss handling. For PTP time synchronization lockout faults, the user-configured anomaly handling method is Mode A. After detecting a time synchronization fault, the fault handling module reports a time synchronization lockout alarm and modifies the ClockClass, Priority, and other parameters carried in the Announce message to the local node's time parameters instead of the parameters of the time source device defined in the standard. After receiving the Announce message sent by B, node C calculates based on the ClockClass, Priority, and other information, and then switches the path to receive synchronization information from BC4 for time synchronization. The state after the switch is as follows. Figure 1b This limits the failure of node B to node B itself.
[0082] In another specific embodiment, if network performance deteriorates, causing occasional PTP packet loss, and since the timestamps are normal, there will be no abnormal values for the offset time adjustment. The user enables anomaly detection for Sync, Follow_Up, or Delay_Resp, configuring a PTP event packet loss to occur if no packets are received for five consecutive cycles, thus indicating network performance deterioration. Simultaneously, the user configures a time window T1 = 1 minute; if more than 10 Sync, Follow_Up, or Delay_Resp packet losses accumulate within T1, it is considered a PTP event packet loss, also indicating network performance deterioration. Based on the above configuration, when anomalies occur... Figure 1eWhen the Sync message is lost, the fault detection system will detect a time synchronization loss alarm. The user-configured anomaly handling method is to stop sending PTP messages. After the PTP fault handling module detects the aforementioned PTP event message loss alarm, BC2 will no longer send Announce and Sync PTP messages to the downstream BC3 node. The BC3 node will detect an Announce loss alarm, thereby triggering the BMC algorithm to recalculate, and BC3 will switch to tracking BC4's time. According to the above embodiment, when a PTP time synchronization loss occurs in the network, but the design according to the 1588V2 standard cannot trigger the BMC algorithm to recalculate, the above method can narrow the scope of the fault, limiting the fault to the problematic node itself.
[0083] This application provides a node state determination device. Figure 2 This is a schematic diagram of a node state determination device provided in this application. The device is configured in a communication device. See [link / reference]. Figure 2 The device includes:
[0084] Module 21 is used to obtain the time adjustment value, clock status, or number of packet losses for the current node.
[0085] Module 22 is used to determine the status of the current node based on the time adjustment value, clock status, or number of packet losses.
[0086] The node state determination device provided in this embodiment is used to implement the node state determination method of this application embodiment. The implementation principle and technical effect of the node state determination device provided in this embodiment are similar to those of the node state determination method of this application embodiment, and will not be repeated here.
[0087] Based on the above embodiments, modified embodiments of the above embodiments are proposed. It should be noted that, in order to keep the description brief, only the differences from the above embodiments are described in the modified embodiments.
[0088] In one embodiment, the determining module 21 is specifically used for:
[0089] Within a set time range, if the time adjustment value is consistently greater than the first threshold, the number of times the time adjustment value is greater than the first threshold exceeds the number threshold, or the sum of the time adjustment values is greater than the second threshold, then the current node's state is determined to be abnormal.
[0090] In one embodiment, the determining module 21 is specifically used for:
[0091] If the clock state remains unlocked within a set time range, or if the number of times the clock state remains unlocked exceeds a threshold, then the current node's state is determined to be abnormal.
[0092] In one embodiment, the determining module 21 is specifically used for:
[0093] If packet loss continues within a set time range, or if the number of packet losses exceeds a threshold, the current node's state is determined to be abnormal.
[0094] In one embodiment, the current node's abnormal state includes a time synchronization lock failure state.
[0095] In one embodiment, it further includes at least one of the following modules:
[0096] The trigger module is used to trigger the current node's BMC algorithm to reselect a source.
[0097] The modification module is used to modify the trigger field carried in the message to the time parameter of the current node, wherein the trigger field is a field used to trigger the next node to reselect the source;
[0098] The sending module is used to stop sending messages;
[0099] The reporting module is used to report time synchronization lock failure alarms.
[0100] This application provides a node status determination device, comprising: an acquisition module for acquiring the time adjustment value, clock status, or packet loss count of the current node; and a determination module for determining the status of the current node based on the time adjustment value, clock status, or packet loss count. This solves the technical problem that the node status of the current node cannot be accurately determined, which leads to the next node still tracking the incorrect time information transmitted by the current node when the current node fails, thus preventing the entire network from malfunctioning. In the event of an abnormality in the current node, the problem can be prevented from being transmitted downstream, reducing the impact on the network.
[0101] This application provides a device, Figure 3 This application provides a schematic diagram of the structure of a device, such as... Figure 3 As shown, the device provided in this application includes one or more processors 51 and a storage device 52; the processors 51 in the device may be one or more. Figure 3 Taking a processor 51 as an example; a storage device 52 is used to store one or more programs; the one or more programs are executed by the one or more processors 51, causing the one or more processors 51 to perform as described in the embodiments of this application. Figure 1 The method described.
[0102] The equipment also includes: a communication device 53, an input device 54, and an output device 55.
[0103] The processor 51, storage device 52, communication device 53, input device 54, and output device 55 in the device can be connected via a bus or other means. Figure 3 Taking the example of a connection between China and Israel via a bus.
[0104] Input device 54 can be used to receive input digital or character information, and to generate key signal inputs related to user settings and function control of the device. Output device 55 may include display devices such as a display screen.
[0105] The communication device 53 may include a receiver and a transmitter. The communication device 53 is configured to perform information transmission and reception communication under the control of the processor 51. The information includes, but is not limited to, uplink authorization information.
[0106] Storage device 52, as a computer-readable storage medium, can be configured to store software programs, computer-executable programs, and modules, as described in the embodiments of this application. Figure 1 The program instructions / modules corresponding to the node state determination method (e.g., the acquisition module 21 and determination module 22 in the node state determination device). The storage device 52 may include a program storage area and a data storage area, wherein the program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on device usage, etc. Furthermore, the storage device 52 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some instances, the storage device 52 may further include memory remotely located relative to the processor 51, and these remote memories can be connected to the device via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0107] This application embodiment also provides a storage medium storing a computer program, which, when executed by a processor, implements the node state determination method described in this application embodiment, the method comprising:
[0108] Get the current node's time adjustment value, clock status, or packet loss count;
[0109] The current node's status is determined based on the time adjustment value, clock status, or number of packet losses.
[0110] The computer storage medium in this application embodiment can be any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. For example, a computer-readable storage medium can be—but is not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable CD-ROM, optical storage device, magnetic storage device, or any suitable combination thereof. The computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0111] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit programs for use by or in connection with an instruction execution system, apparatus, or device.
[0112] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, radio frequency (RF), etc., or any suitable combination thereof.
[0113] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0114] The above description is merely an exemplary embodiment of this application and is not intended to limit the scope of protection of this application.
[0115] Those skilled in the art will understand that the term user equipment covers any suitable type of wireless user equipment, such as mobile phones, portable data processing devices, portable web browsers, or vehicle-mounted mobile stations.
[0116] Generally, the various embodiments of this application can be implemented in hardware or dedicated circuitry, software, logic, or any combination thereof. For example, some aspects can be implemented in hardware, while others can be implemented in firmware or software that can be executed by a controller, microprocessor, or other computing device, although this application is not limited thereto.
[0117] Embodiments of this application can be implemented by executing computer program instructions through the data processor of a mobile device, for example, in a processor entity, or through hardware, or through a combination of software and hardware. The computer program instructions can be assembly instructions, Instruction Set Architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages.
[0118] Any block diagram of logical flow in the accompanying drawings of this application may represent program steps, or may represent interconnected logic circuits, modules, and functions, or may represent a combination of program steps and logic circuits, modules, and functions. The computer program may be stored on memory. Memory may be of any type suitable to the local technical environment and may be implemented using any suitable data storage technology, such as, but not limited to, read-only memory (ROM), random access memory (RAM), optical storage devices and systems (Digital Video Disc (DVD) or Compact Disk (CD)), etc. Computer-readable media may include non-transitory storage media. The data processor may be of any type suitable to the local technical environment, such as, but not limited to, general-purpose computers, special-purpose computers, microprocessors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), and processors based on multi-core processor architectures.
[0119] A detailed description of exemplary embodiments of this application has been provided above through exemplary and non-limiting examples. However, various modifications and adjustments to the above embodiments will be apparent to those skilled in the art when considered in conjunction with the accompanying drawings and claims, without departing from the scope of this application. Therefore, the proper scope of this application will be determined by the claims.
Claims
1. A method for determining node states, characterized in that, include: Get the time adjustment value for the current node; The state of the current node is determined based on the time adjustment value, wherein the state of the current node includes a normal state and an abnormal state; the abnormal state includes a time synchronization lockout state. The determination of the current node's state based on the time adjustment value includes: in response to a target abnormal event occurring in the time adjustment value, determining the current node's state as time synchronization lost; wherein the target abnormal event includes at least one of the following: continuous abnormality, multiple instantaneous abnormalities; the user configures a threshold value M for the absolute value of the offset time adjustment value and a duration T1 for the abnormal offset time adjustment value; if the absolute value of the offset time adjustment value continuously exceeds the threshold M within window T1, then it is determined that the offset time adjustment value has a continuous abnormality; the user configures a threshold value M for the absolute value of the offset time adjustment value, a duration T2 for the abnormal offset time adjustment value, and N times the offset time adjustment value exceeds the threshold M more than N times within a sliding window T2, then it is determined that the offset time adjustment value has multiple instantaneous abnormalities.
2. The method according to claim 1, characterized in that, After determining the state of the current node, if the state of the current node is abnormal, perform one or more of the following steps: Trigger the current node's BMC algorithm to reselect a source; Modify the trigger field carried in the message to the time parameter of the current node, wherein the trigger field is a field used to trigger the next node to reselect the source; Stop sending messages; Report time synchronization loss alarm.
3. A node state determination device, characterized in that, include: The acquisition module is used to obtain the time adjustment value of the current node; The determination module is used to determine the state of the current node based on the time adjustment value, wherein the state of the current node includes a normal state and an abnormal state; the abnormal state includes a time synchronization lockout state. The determining module is specifically configured to: in response to a target abnormal event occurring in the time adjustment value, determine that the current node's state is time synchronization lost; wherein the target abnormal event includes at least one of the following: continuous abnormality, multiple instantaneous abnormalities; the user configures a threshold value M for the absolute value of the offset time adjustment value and a duration T1 for the abnormality of the offset time adjustment value; if the absolute value of the offset time adjustment value continuously exceeds the threshold M within window T1, then it is determined that the offset time adjustment value has a continuous abnormality; the user configures a threshold value M for the absolute value of the offset time adjustment value, a duration T2 for the abnormality of the offset time adjustment value, and a number N for the offset time adjustment value to exceed the threshold M more than N times within a sliding window T2, then it is determined that the offset time adjustment value has multiple instantaneous abnormalities.
4. A node state determination device, characterized in that, include: One or more processors; Storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-2.
5. A storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the method described in any one of claims 1-2.
Citation Information
Patent Citations
Clock source selection processing method, device and system
CN102035638A
Timestamp filtering method and device
CN106603183A
Clock synchronization method, mobile network system, network controller and network switch
US20170257836A1
Clock synchronization method and system in 1588-2008 protocol
WO2013056575A1