Time hopping processing method, system, device and readable storage medium

By acquiring and determining the magnitude and direction of the PTP timestamp transition value, and reloading the configuration items of the 802.1Qbv state machine, the network instability caused by PTP timestamp transitions was resolved, thus achieving stability and reliability of the TSN network.

CN119945908BActive Publication Date: 2025-11-04SUZHOU CENTEC COMM CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510094452.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-21
Publication Date
2025-11-04
Estimated Expiration
2045-01-21

AI Technical Summary

Technical Problem

In TSN networks, PTP timestamp jumps cause the configuration items of the 802.1Qbv state machine to fail to adapt in a timely manner, affecting the stability and reliability of the network environment.

Method used

By obtaining the magnitude and direction of the PTP timestamp transition value, it is determined whether it is an abnormal transition. In the case of an abnormal transition, the configuration items of the 802.1Qbv state machine are reloaded. The number of transitions is counted using the abnormal threshold and debug register, and the processing strategy is optimized to adapt to different transition situations.

Benefits of technology

It improves the processing efficiency of the 802.1Qbv protocol, avoids TSN network disorder caused by PTP anomalies, and ensures the stability and reliability of the network environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119945908B_ABST
    Figure CN119945908B_ABST
Patent Text Reader

Abstract

The application discloses a time jump processing method, system, device and readable storage medium, and the method specifically comprises the following steps: acquiring the size and direction of a PTP timestamp jump value; judging whether the PTP timestamp jump is an abnormal jump; if the PTP timestamp jumps to the past time direction abnormally, reloading each configuration item of a Qbv state machine based on the Qbv configuration information of the time after the jump. Compared with the prior art, the time jump processing method provided by the application improves the processing efficiency of the system. Through the judgment of the jump, 802.1Qbv Old Config or New Config is reconfigured respectively, the current scene is adapted, and reconfiguration is avoided. Further, through the reconfiguration of 802.1Qbv, abnormal situations caused by the jump are avoided, and the TSN network environment is prevented from being in disorder.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of network communication technology, and specifically relates to a time jump processing method, system, device, and readable storage medium. Background Technology

[0002] With the dramatic increase in data volume in data networks, higher and higher requirements are being placed on network quality. It is necessary to be able to quickly switch to backup link nodes when problems occur in intermediate links, so as to enhance the reliability and stability of the network.

[0003] The resulting TSN protocol family uses the 802.1Qbv protocol to achieve precise data latency control. By adding time-sensitive gate thresholds to packets at the egress point, it ensures that time-sensitive traffic can be accurately forwarded at the specified time. The 802.1Qbv protocol needs to complete time synchronization with the 802.1AS protocol (hereinafter referred to as PTP) before running the 802.1Qbv state machine (802.1Qbv protocol). At this time, the timestamp fluctuations of PTP will affect the 802.1Qbv state machine.

[0004] After the PTP timestamp changes, the configuration items of the Qbv state machine can only switch configurations or continue their states according to the changed timestamp. This will inevitably lead to the actual working state of the Qbv state machine being different from the expected working state, affecting the normal operation of the Qbv state machine, and may even cause disorder in the TSN network environment.

[0005] Therefore, to address the aforementioned technical issues, it is necessary to provide a method for handling PTP timestamp transitions using the 802.1Qbv protocol.

[0006] The information disclosed in this background section is intended only to enhance the understanding of the overall background of the invention and should not be construed as an admission or in any way implying that the information constitutes prior art known to those skilled in the art. Summary of the Invention

[0007] The purpose of this invention is to provide a time jump processing method, system, device, and readable storage medium, which enables 802.1Qbv machines to quickly adapt and execute stably after a PTP timestamp jump occurs in the TSN network, thus avoiding TSN network environment disorder caused by PTP anomalies.

[0008] To achieve the above objectives, a specific embodiment of the present invention provides the following technical solution:

[0009] In a first aspect, the present invention provides a time jump processing method applied to the 802.1Qbv protocol, comprising:

[0010] Obtain the magnitude and direction of the PTP timestamp transition value;

[0011] Determine whether the PTP timestamp jump is an abnormal jump;

[0012] If the PTP timestamp undergoes an abnormal jump towards a past time, the configuration items of the Qbv state machine are reloaded based on the Qbv configuration information at the time after the jump.

[0013] In one or more embodiments of the present invention, the method further includes:

[0014] If the PTP timestamp jumps abnormally in the direction of future time, and the PTP timestamp jumps to after the preset configuration change time, then obtain the Qbv configuration information after the configuration change time.

[0015] Based on the Qbv configuration information after the configuration change time, reload each configuration item of the Qbv state machine.

[0016] In one or more embodiments of the present invention, the method further includes:

[0017] If the PTP timestamp changes abnormally in the direction of future time, and the PTP timestamp changes to a time before the preset configuration change time, then the configuration items of the Qbv state machine are reloaded based on the current Qbv configuration information, or the abnormal change is ignored.

[0018] In one or more embodiments of the present invention, obtaining the magnitude and direction of the PTP timestamp transition value includes:

[0019] Periodically retrieve the deviation time recorded in the preset PTP deviation time register;

[0020] Calculate the absolute value of the difference between the deviation time obtained this time and the deviation time obtained last time, and use it as the value of the current PTP timestamp jump;

[0021] If the difference is positive, the PTP timestamp jumps to the future direction;

[0022] If the difference is negative, the PTP timestamp jumps to the past direction.

[0023] In one or more embodiments of the present invention, determining whether the PTP timestamp jump is an abnormal jump includes:

[0024] If the jump value of the PTP timestamp is greater than or equal to the preset abnormal threshold, then the current PTP timestamp jump is an abnormal jump.

[0025] If the jump value of the PTP timestamp is less than the preset abnormal threshold, then the current PTP timestamp jump is ignored.

[0026] In one or more embodiments of the present invention, the method further includes:

[0027] When an abnormal transition occurs, the first debug register is incremented by one.

[0028] When a negligible transition occurs, the preset second debug register is incremented by one.

[0029] Secondly, the present invention provides a time jump processing system, which applies the aforementioned time jump processing method and includes:

[0030] The acquisition module is used to obtain the magnitude and direction of the PTP timestamp transition value;

[0031] The judgment module is used to determine whether the PTP timestamp jump is an abnormal jump;

[0032] The processing module is used to reload each Qbv configuration item based on the current Qbv configuration information when the PTP timestamp undergoes an abnormal jump in the direction of past time.

[0033] In one or more embodiments of the present invention, the system is further configured to:

[0034] If the PTP timestamp jumps abnormally towards a future time, and the PTP timestamp jumps to a time after the preset configuration change time, then the Qbv configuration information after the configuration change time is obtained; based on the Qbv configuration information after the configuration change time, the Qbv configuration is reloaded.

[0035] If the PTP timestamp changes abnormally towards a future time and the PTP timestamp changes to a time before the preset configuration change time, then each Qbv configuration item is reloaded based on the current Qbv configuration information, or the abnormal change is ignored.

[0036] Thirdly, the present invention provides a computer device comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the time jump processing method by executing the computer instructions.

[0037] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to execute the time jump processing method.

[0038] Compared with existing technologies, the time jump handling method provided by this invention determines the magnitude and direction of the timestamp deviation by observing changes in the deviation value recorded in the register used for time synchronization. By setting a register variable (abnormal threshold), timestamp deviations are classified, and only abnormal jumps are processed, improving the system's processing efficiency. By judging the jumps, the 802.1Qbv Old Config or New Config is reconfigured respectively to adapt to the current scenario, avoiding reconfiguration. Furthermore, by reconfiguring 802.1Qbv, abnormal situations caused by jumps are avoided, preventing TSN network environment disruptions. Simultaneously, this invention adds a debug register to count the number of forward / backward abnormal jumps and the number of forward / backward jumps below the abnormal threshold, combining with Qbv's own registers to achieve state observation of the Qbv state machine. Attached Figure Description

[0039] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0040] Figure 1 This is a flowchart illustrating a time jump processing method according to an embodiment of the present invention;

[0041] Figure 2 This is a schematic diagram of PTP timestamp transition in one embodiment of the present invention;

[0042] Figure 3 This is a structural block diagram of a time jump processing system according to an embodiment of the present invention;

[0043] Figure 4 This is a structural block diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0044] To enable those skilled in the art to better understand the technical solutions of this invention, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this invention.

[0045] Unless otherwise expressly stated, throughout the specification and claims, the term "comprising" or its variations such as "including" or "comprises" shall be understood to include the stated elements or components without excluding other elements or other components.

[0046] Please refer to Figure 1 The diagram shown is a flowchart of a time jump processing method according to an embodiment of the present invention. This time jump processing method specifically includes the following steps:

[0047] S101: Obtain the magnitude and direction of the PTP timestamp jump value;

[0048] The PTP clock structure is a master-slave clock mode. It obtains the timestamps of master-slave clock message transmission and reception by continuously exchanging PTP messages. The slave clock performs time deviation calculation and network delay estimation, and corrects the local clock to achieve master-slave clock synchronization. The PTP clock system is self-organizing and uses the best masterclock (BMC) algorithm to determine the master-slave clock state within each PTP domain.

[0049] The IEEE 802.1Qbv standard optimizes real-time traffic transmission through time-aware scheduling and multi-priority mechanisms, ensuring low latency and high timeliness. When implementing precise data latency control based on the 802.1Qbv protocol, time synchronization is required before the Qbv state machine runs to ensure accurate forwarding of time-sensitive traffic at specified times. Understandably, fluctuations in the PTP timestamp during this process will affect the normal operation of the subsequent state machine.

[0050] It should be noted that timestamp changes can occur for various reasons, including but not limited to network issues and configuration problems. For example, the server may not have synchronized its time for an extended period, leading to time discrepancies; the server's IP address may be incorrect; or the server's system time may have been manually altered.

[0051] It is understandable that, such as Figure 2 The diagram shown illustrates a PTP timestamp transition in one embodiment of the present invention. The PTP timestamp transition can be forward (towards the future) or backward (towards the past). The direction and distance of the PTP timestamp transition will have different effects on the operation of the state machine. Therefore, in order to cooperate with the subsequent processing strategies for different situations in the present invention, the magnitude and direction of the PTP timestamp transition value should be obtained first.

[0052] In an exemplary embodiment, obtaining the magnitude and direction of the PTP timestamp jump value includes: periodically obtaining the deviation time recorded in a preset PTP deviation time register; calculating the absolute value of the difference between the currently obtained deviation time and the previously obtained deviation time as the current PTP timestamp jump value; if the difference is positive, the PTP timestamp jumps to the future direction; if the difference is negative, the PTP timestamp jumps to the past direction.

[0053] In this embodiment of the invention, PTP time synchronization preferably adopts a relative time synchronization strategy. That is, for the master and slave clocks, although their absolute times are different at the same moment, the difference between adjacent sampling points is the same, and the master and slave clocks measure time in a consistent manner. In other words, at any given moment, the time difference between the master and slave clocks is the same. Specifically, the implementation of the PTP protocol is based on two registers: a relative time register and a time deviation register. The relative time register increments by one every 1 second, and its recorded value is the absolute time value, which is also the time value of the master clock; the time deviation register records the time difference between the master and slave clocks. In this embodiment of the invention, there is no restriction on the definition of absolute time. For ease of configuration and calculation, Beijing time is preferably used as the absolute time.

[0054] For example, if the absolute time is the same as Beijing time, both being 13:00, then the relative time register stores 13 hours. The slave clock is at 14:00, one hour different from Beijing time. The value in the deviation time register is a positive one hour. In the relative time synchronization strategy, the relative time register increments by one every second. During continuous synchronization, it is expected that the value in the deviation time register will always be 1 hour, representing that the time measurement between the master and slave clocks is consistent. At a certain moment, the master clock time is 15:00, and the slave clock time becomes 16:10. Compared to the previous moment, the value in the deviation time register jumps from 1 hour to 1 hour and 10 minutes. Therefore, the difference between the two samples of the deviation time register value can be calculated, and the current PTP timestamp jump value is 10 minutes. Since the difference is positive, this jump is a forward jump (a jump towards the future).

[0055] In one specific embodiment, the time jump processing system of the present invention is configured with a sampling calculation unit, which can sample the deviation time register based on a preset period, calculate the difference between the current sampled value and the sampled value at the previous moment, and output the absolute value of the difference. On the other hand, if the difference is positive, the corresponding Nagitive register is set to 0; if the difference is negative, the corresponding Nagitive register is set to 1. This facilitates the identification of the magnitude and direction of the PTP timestamp jump value. It is understood that the embodiments of the present invention do not limit the configuration of the sampling period and can be dynamically adjusted based on the time sensitivity in the actual implementation scenario.

[0056] S102: Determine whether the PTP timestamp jump is an abnormal jump;

[0057] In an exemplary embodiment of the present invention, determining whether the PTP timestamp jump is an abnormal jump includes: if the jump value of the PTP timestamp is greater than or equal to a preset abnormal threshold, then the current PTP timestamp jump is an abnormal jump; if the jump value of the PTP timestamp is less than the preset abnormal threshold, then the current PTP timestamp jump is ignored.

[0058] Understandably, minor jumps in the PTP timestamp have a small impact on the subsequent operation of the Qbv state machine, and therefore can be ignored or handled in other ways to reduce wasted system load. In an exemplary embodiment, when a minor jump occurs in the PTP timestamp (when the jump value is less than the abnormal threshold), the system can dynamically adapt to the transmittable bits. Specifically, dynamic adaptation to minor jumps is achieved through the absolute time maintained internally by the Qbv register. For example, if the expected time deviation is 1000ns, after PTP calibration, the time deviation is 1200ns, meaning a 200ns PTP timestamp jump occurs. If a message is being transmitted at this time, the Qbv module will rely on its own maintained absolute time for transmission, avoiding overrun issues.

[0059] It should be noted that the anomaly threshold can be implemented by configuring register variables. The specific implementation of the anomaly threshold in this invention depends on the system configuration and is not limited to software or hardware implementation; the specific value of the anomaly threshold can be dynamically configured based on the actual application scenario of this invention. This embodiment of the invention does not limit the implementation method or the specific value of the anomaly threshold.

[0060] S103: If the PTP timestamp jumps abnormally in the direction of past time, then the configuration items of the Qbv state machine are reloaded based on the current Qbv configuration information.

[0061] It should be noted that the 802.1Qbv protocol specifies configuration items such as AdminCycleTime, AdminBasetime, and Transmission Gate for the normal operation of the 802.1Qbv state machine. These parameters are all affected by PTP. Under normal operation, different configurations may need to be adapted at different times, but triggering changes to the configuration items in the 802.1Qbv protocol requires waiting for the calculated preset configuration change time.

[0062] It should also be noted that the deviation time stored in the deviation time register is the difference between the current local time (slave clock time) and the absolute time (master clock time). This deviation time can be used on the slave clock side to calculate the final absolute time. The reason why a PTP timestamp transition affects the subsequent operation of the Qbv state machine is that when the deviation time changes, the time sent to the Qbv state machine via pulse is different from the previous absolute time. Within the time period spanned by the transition, there may be points where configuration changes are needed. Maintaining the configuration from before the transition afterward will cause the state machine to malfunction.

[0063] On the other hand, because there is an uncontrollable time period, namely the end of cycle time, during the execution of the Qbv protocol, the maintenance of this end of cycle time is accomplished by maintaining the remaining time of the current threshold. When a time jump occurs, even if the jump process does not cross the preset configuration change time, it may still lengthen the duration of the old configuration, causing the end of cycle time to become uncontrollable. The user end cannot determine how many bits can still be transmitted based on the remaining time, thus leading to state machine abnormalities.

[0064] It should be noted that the PTP timestamp may jump in the direction of the past or the future, and there may be one or more configuration change time points set. If the PTP timestamp jumps abnormally in the direction of the past, there are two possibilities: either the time period spanned by the jump does not include a configuration change time, or the time period spanned by the jump includes a configuration change time.

[0065] Understandably, if a configuration change occurs within the timeframe spanned by an abnormal transition to the past, it's equivalent to using the current configuration at a past point in time when the old configuration should have been used, inevitably leading to a state machine malfunction. Therefore, it's necessary to reload the Qbv state machine's configuration items based on the state configuration information at the point after the transition. On the other hand, even if no configuration change occurs within the timeframe spanned by an abnormal transition to the past, the extended duration of the current configuration will still cause the unpredictable cycle end time, resulting in a state machine malfunction. Therefore, it's necessary to reload the Qbv state machine's configuration items based on the state configuration information at the point after the transition, recalculating the corresponding cycle times and other configuration information to ensure the state machine functions correctly.

[0066] Similarly, there are two scenarios for PTP timestamps jumping towards the future: one is that the jump spans a time period in which there is no configuration change time; the other is that the jump spans a time period in which there is a configuration change time. However, it's important to note that if the jump doesn't span a configuration change time, an abnormal jump towards the future will not lengthen the duration of the current configuration; in fact, it will shorten it. Therefore, you can choose to reconfigure or ignore the jump and wait for the next configuration change time to load the new configuration.

[0067] Therefore, the time jump processing method provided by the present invention further includes: if the PTP timestamp jumps abnormally in the direction of future time, and the PTP timestamp jumps to after the preset configuration change time, then the Qbv configuration information after the configuration change time is obtained; based on the Qbv configuration information after the configuration change time, each configuration item of the Qbv state machine is reloaded. If the PTP timestamp jumps abnormally in the direction of future time, and the PTP timestamp jumps to before the preset configuration change time, then each configuration item of the Qbv state machine is reloaded based on the current Qbv configuration information, or the abnormal jump is ignored.

[0068] In addition, in this embodiment of the invention, a first debug register and a second debug register are maintained. The first debug register and the second debug register are initialized to 0. When an abnormal transition occurs, the first debug register is incremented by one; when a negligible transition occurs, the second debug register is incremented by one.

[0069] This debug register can be used for system problem localization. By debugging, the number of small jumps (jump values ​​less than the abnormal threshold) and abnormal jumps (jump values ​​greater than or equal to the abnormal threshold) that occur in the PTP timestamp can be counted. Combined with the registers of Qbv itself, it can help users observe the state of the Qbv state machine.

[0070] Please refer to Figure 3 As shown, based on the same inventive concept as the aforementioned time jump processing method, one embodiment of the present invention provides a time jump processing system 300, including: an acquisition module 301, a judgment module 302, and a processing module 303.

[0071] Specifically, the acquisition module 301 is used to acquire the magnitude and direction of the PTP timestamp jump value; the judgment module 302 is used to determine whether the PTP timestamp jump is an abnormal jump; and the processing module 303 is used to reload each Qbv configuration item based on the current Qbv configuration information when the PTP timestamp jumps abnormally in the direction of past time.

[0072] It should be noted that the processing module 303 is further configured to, if the PTP timestamp undergoes an abnormal jump towards a future time and the PTP timestamp jumps to a time after the preset configuration change time, obtain the Qbv configuration information after the configuration change time; and reload each configuration item of the Qbv state machine based on the Qbv configuration information after the configuration change time. If the PTP timestamp undergoes an abnormal jump towards a future time and the PTP timestamp jumps to a time before the preset configuration change time, reload each configuration item of the Qbv state machine based on the current Qbv configuration information, or ignore the abnormal jump.

[0073] The acquisition module 301 is also used to periodically acquire the deviation time recorded in the preset PTP deviation time register; calculate the absolute value of the difference between the current acquired deviation time and the previous acquired deviation time, and use it as the value of the current PTP timestamp jump; if the difference is positive, the PTP timestamp jumps to the future direction; if the difference is negative, the PTP timestamp jumps to the past direction.

[0074] The judgment module 302 is further configured to determine that if the jump value of the PTP timestamp is greater than or equal to a preset abnormal threshold, the current PTP timestamp jump is an abnormal jump; if the jump value of the PTP timestamp is less than the preset abnormal threshold, the current PTP timestamp jump is ignored.

[0075] It should also be noted that the time jump processing system 300 provided by the present invention further includes a statistics module, which is used to increment a preset first debug register by one when an abnormal jump occurs; and to increment a preset second debug register by one when a negligible jump occurs.

[0076] Please refer to Figure 4 As shown, embodiments of the present invention also provide an electronic device 400, which includes at least one processor 401, a memory 402 (e.g., non-volatile memory), a memory 403, and a communication interface 404, wherein the at least one processor 401, the memory 402, the memory 403, and the communication interface 404 are connected together via an internal bus 405. The at least one processor 401 is used to invoke at least one program instruction stored or encoded in the memory 402 to cause the at least one processor 401 to perform various operations and functions of the time jump processing methods described in the various embodiments of this specification.

[0077] In the embodiments of this specification, electronic device 400 may include, but is not limited to: personal computer, server computer, workstation, desktop computer, laptop computer, notebook computer, mobile electronic device, smartphone, tablet computer, cellular phone, personal digital assistant (PDA), handheld device, messaging device, wearable electronic device, consumer electronic device, etc.

[0078] This invention also provides a computer-readable medium carrying computer-executable instructions. When executed by a processor, these instructions can be used to implement various operations and functions of the time jump processing methods described in the various embodiments of this specification.

[0079] The computer-readable medium in this invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: 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 or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a 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.

[0080] In this invention, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. This propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wireline, optical fiber, RF, etc., or any suitable combination thereof.

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

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

[0083] The foregoing description of specific exemplary embodiments of the invention is for illustrative and explanatory purposes. These descriptions are not intended to limit the invention to the precise forms disclosed, and it will be apparent that many changes and variations can be made in accordance with the foregoing teachings. The exemplary embodiments were chosen and described in order to explain the specific principles of the invention and its practical application, thereby enabling those skilled in the art to implement and utilize various different exemplary embodiments of the invention, as well as various different choices and variations. The scope of the invention is intended to be defined by the claims and their equivalents.

[0084] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.

[0085] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.

Claims

1. A time jump processing method, applied to the 802.1Qbv protocol, characterized in that, include: Obtain the magnitude and direction of the PTP timestamp transition value; Determine whether the PTP timestamp jump is an abnormal jump; If the PTP timestamp jumps abnormally in the direction of past time, the configuration items of the Qbv state machine are reloaded based on the Qbv configuration information at the time after the jump. The process of obtaining the magnitude and direction of the PTP timestamp jump value includes: periodically obtaining the deviation time recorded in a preset PTP deviation time register; calculating the absolute value of the difference between the currently obtained deviation time and the previously obtained deviation time as the current PTP timestamp jump value; if the difference is positive, the PTP timestamp jumps to the future direction; if the difference is negative, the PTP timestamp jumps to the past direction; if the jump value of the PTP timestamp is greater than or equal to a preset abnormal threshold, the current PTP timestamp jump is an abnormal jump; if the jump value of the PTP timestamp is less than the preset abnormal threshold, the current PTP timestamp jump is ignored.

2. The time jump processing method according to claim 1, characterized in that, The method further includes: If the PTP timestamp jumps abnormally in the direction of future time, and the PTP timestamp jumps to after the preset configuration change time, then obtain the Qbv configuration information after the configuration change time. Based on the Qbv configuration information after the configuration change time, reload each configuration item of the Qbv state machine.

3. The time jump processing method according to claim 1, characterized in that, The method further includes: If the PTP timestamp changes abnormally in the direction of future time, and the PTP timestamp changes to a time before the preset configuration change time, then the configuration items of the Qbv state machine are reloaded based on the current Qbv configuration information, or the abnormal change is ignored.

4. The time jump processing method according to claim 1, characterized in that, The method further includes: When an abnormal transition occurs, the first debug register is incremented by one. When a negligible transition occurs, the preset second debug register is incremented by one.

5. A time jump processing system, employing the time jump processing method as described in any one of claims 1-4, characterized in that, include: The acquisition module is used to obtain the magnitude and direction of the PTP timestamp transition value; The judgment module is used to determine whether the PTP timestamp jump is an abnormal jump; The processing module is used to reload each Qbv configuration item based on the current Qbv configuration information when the PTP timestamp undergoes an abnormal jump in the direction of past time.

6. The time jump processing system according to claim 5, characterized in that, The system also includes: If the PTP timestamp jumps abnormally towards a future time, and the PTP timestamp jumps to a time after the preset configuration change time, then the Qbv configuration information after the configuration change time is obtained; based on the Qbv configuration information after the configuration change time, the Qbv configuration is reloaded. If the PTP timestamp changes abnormally towards a future time and the PTP timestamp changes to a time before the preset configuration change time, then each Qbv configuration item is reloaded based on the current Qbv configuration information, or the abnormal change is ignored.

7. A computer device, characterized in that, include: A memory and a processor are communicatively connected, the memory stores computer instructions, and the processor executes the time jump processing method according to any one of claims 1-4 by executing the computer instructions.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing a computer to execute the time jump processing method according to any one of claims 1-4.

Citation Information

Patent Citations

  • Deterministic packet scheduling and DMA for time sensitive networking

    CN114285510A

  • Gating period control method, system and device based on clock fault tolerance

    CN115981904A