Time hopping processing method, system and device and readable storage medium
By judging the jump of PTP timestamps and reloading the configuration items of the Qbv state machine, the problem of inconsistent working state of the 802.1Qbv state machine after the jump of PTP timestamps is solved, and the stability of the network environment is improved.
Patent Information
- Application Number
- CN202510094452.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-21
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2045-01-21
AI Technical Summary
After the PTP timestamp jumps, the configuration items of the 802.1Qbv state machine cannot be updated in time, resulting in inconsistent with the expected state, affecting the stability of the network environment.
By obtaining the size and direction of the PTP timestamp jump value, determine whether it is an abnormal jump. If it is an abnormal jump, the configuration items of the Qbv state machine will be reloaded according to the time after the jump to adapt to the current scene.
After the PTP timestamp jump, the 802.1Qbv state machine can quickly adapt and execute stably, avoiding the TSN network environment disorder caused by PTP exceptions.
Smart Images

Figure CN119945908A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of network communication technology, and in particular relates to a time jump processing method, system, device and readable storage medium. Background Art
[0002] With the rapid growth of data volume in data networks, higher and higher requirements are placed on network quality. When problems occur in the intermediate links, it is necessary to quickly switch to backup link nodes to enhance the reliability and stability of the network.
[0003] In the TSN protocol family derived from this, the 802.1Qbv protocol is used to achieve precise data delay control. By adding time-sensitive Gate threshold control to the message at the egress, time-sensitive traffic can be accurately forwarded at the specified time. The 802.1Qbv protocol needs to run the 802.1Qbv state machine (802.1Qbv protocol) after the 802.1AS protocol (hereinafter referred to as PTP) completes time synchronization. At this time, the timestamp fluctuation 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 be switched or continued according to the timestamp after the change, which will inevitably cause the actual working state of the Qbv state machine to be different from the expected working state, affecting the normal operation of the Qbv state machine and even causing disorder in the TSN network environment.
[0005] Therefore, in view of the above technical problems, it is necessary to provide a method for processing the 802.1Qbv protocol when the PTP timestamp jumps.
[0006] The information disclosed in this background technology section is only intended to enhance the understanding of the overall background of the invention and should not be regarded as an acknowledgment or any form of suggestion that the information constitutes the prior art already known to a person skilled in the art. Summary of the invention
[0007] The object of the present invention is to provide a time jump processing method, system, device and readable storage medium, which can enable an 802.1Qbv machine to quickly adapt and stably execute after a PTP timestamp jump occurs in a TSN network, thereby avoiding TSN network environment disorder caused by PTP anomalies.
[0008] In order to achieve the above object, a technical solution provided by a specific embodiment of the present invention is as follows:
[0009] In a first aspect, the present invention provides a time hopping processing method, which is applied to the 802.1Qbv protocol, and comprises:
[0010] Get the size and direction of the PTP timestamp jump value;
[0011] Determine whether the PTP timestamp jump is an abnormal jump;
[0012] If the PTP timestamp changes abnormally toward the past time, each configuration item of the Qbv state machine is reloaded based on the Qbv configuration information at the time after the change.
[0013] In one or more embodiments of the present invention, the method further comprises:
[0014] If the PTP timestamp changes abnormally in the future time direction, and the PTP timestamp changes to after the preset configuration change time, then the Qbv configuration information after the configuration change time is obtained;
[0015] Reload the configuration items of the Qbv state machine based on the Qbv configuration information after the configuration change time.
[0016] In one or more embodiments of the present invention, the method further comprises:
[0017] If the PTP timestamp changes abnormally toward the future time direction, and the PTP timestamp changes to before the preset configuration change time, each configuration item of the Qbv state machine is 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 size and direction of the PTP timestamp jump value includes:
[0019] Periodically obtain 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 as the value of the current PTP timestamp jump;
[0021] If the difference is a positive value, the PTP timestamp jumps to the future direction;
[0022] If the difference is a negative value, the PTP timestamp jumps to the past direction.
[0023] In one or more implementations 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, 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, the current PTP timestamp jump is ignored.
[0026] In one or more embodiments of the present invention, the method further comprises:
[0027] When an abnormal jump occurs, the first debug register is preset to increase by one;
[0028] When a negligible transition occurs, the preset second debug register is incremented by one.
[0029] In a second aspect, the present invention provides a time jump processing system, applying the time jump processing method, which includes:
[0030] The acquisition module is used to obtain the size and direction of the PTP timestamp jump value;
[0031] A judging module, used to judge 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 abnormally jumps to the past time direction.
[0033] In one or more embodiments of the present invention, the system is further used for:
[0034] If the PTP timestamp changes abnormally in the future time direction, and the PTP timestamp changes 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 the Qbv configuration;
[0035] If the PTP timestamp changes abnormally toward the future time direction, and the PTP timestamp changes to before the preset configuration change time, each Qbv configuration item is reloaded based on the current Qbv configuration information, or the abnormal change is ignored.
[0036] In a third aspect, 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, computer instructions are stored in the memory, and the processor executes the time jump processing method by executing the computer instructions.
[0037] In a fourth aspect, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the time jump processing method.
[0038] Compared with the prior art, the time jump processing method provided by the present invention determines the size and direction of the timestamp deviation by the change of the deviation value recorded in the register used for time synchronization. By setting the register variable (abnormal threshold), the deviation of the timestamp is classified, and only the abnormal jump is processed, thereby improving the processing efficiency of the system. By judging the jump, 802.1Qbv Old Config or New Config is reconfigured respectively to adapt to the current scene and avoid reconfiguration. Further, by reconfiguring 802.1Qbv, abnormal situations caused by jumps are avoided, and the TSN network environment is prevented from being disordered. At the same time, the present invention adds a debug register in implementation, which can count the number of abnormal forward / backward jumps in time, and the number of forward / backward jumps less than the abnormal threshold, and realize the state observation of the Qbv state machine in combination with the register of Qbv itself. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0040] Figure 1 is a flow chart of a time jump processing method in one embodiment of the present invention;
[0041] Figure 2 This is a schematic diagram of PTP timestamp jump in one embodiment of the present invention;
[0042] Figure 3 is a structural block diagram of a time jump processing system in one embodiment of the present invention;
[0043] Figure 4 It is a structural block diagram of an electronic device in one embodiment of the present invention. DETAILED DESCRIPTION
[0044] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0045] Unless explicitly stated otherwise, throughout the specification and claims, the term “comprise” or variations such as “include” or “comprising”, etc., will be understood to include the stated elements or components but not to exclude other elements or components.
[0046] Please refer to Figure 1 FIG. 1 is a flow chart of a time jump processing method according to an embodiment of the present invention. The time jump processing method specifically includes the following steps:
[0047] S101: Obtain the size and direction of the PTP timestamp jump value;
[0048] The clock structure of PTP is a master-slave clock mode. By continuously exchanging PTP messages, the timestamps of the master-slave clock message sending and receiving are obtained. The slave clock completes the time deviation calculation and network delay estimation, and corrects the local clock to achieve the purpose of master-slave clock synchronization. The PTP clock system is self-organizing management, and the master-slave clock status in each PTP domain is determined by the best masterclock (BMC) algorithm.
[0049] The IEEE802.1Qbv standard optimizes real-time traffic transmission through time-aware scheduling and multi-priority mechanisms to ensure low latency and high timing. When implementing precise data delay control based on the 802.1Qbv protocol, in order to ensure that time-sensitive traffic can be accurately forwarded at the specified time, time synchronization is required before the Qbv state machine runs. It is understandable that if the PTP timestamp fluctuates at this time, it will affect the normal operation of the subsequent state machine.
[0050] It should be noted that the reasons for the timestamp jump are various, including but not limited to network reasons, configuration reasons, etc. For example, the server has not been synchronized for a long time, resulting in time deviation; there is a problem with the IP configured on the server; the system time of the server has been tampered with manually, etc.
[0051] It is understandable that if Figure 2 As shown, it is a schematic diagram of the PTP timestamp jump in one embodiment of the present invention. The jump of the PTP timestamp can be forward (toward the future direction) or backward (toward the past direction). The jump direction and distance of the PTP timestamp will have different effects on the operation of the state machine. Therefore, in order to cooperate with the subsequent processing strategies corresponding to different situations of the present invention, the size and direction of the PTP timestamp jump value should be obtained first.
[0052] In an exemplary embodiment, the size and direction of the PTP timestamp jump value are obtained, including: periodically obtaining the deviation time recorded in a preset PTP deviation time register; calculating the absolute value of the difference between the deviation time obtained this time and the deviation time obtained last time as the value of the current PTP timestamp jump; if the difference is a positive value, the PTP timestamp jumps to the future direction; if the difference is a negative value, the PTP timestamp jumps to the past direction.
[0053] In an embodiment of the present invention, PTP time synchronization preferably adopts a relative time synchronization strategy. That is, for the master and slave clocks, although the absolute time at the same moment is different, 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 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, one of which is a relative time register and the other is a deviation time register. The relative time register increments by one every 1 second, and the value recorded in it is the absolute time value, which is also the time value of the master clock; the deviation time register records the difference between the master and slave clock times. In an embodiment of the present invention, there is no restriction on the provisions of absolute time. In order to facilitate 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 are 13:00, then the relative time register stores 13 hours. The slave clock is 14:00, which is one hour different from Beijing time. The value in the deviation time register is one hour in the positive direction. In the relative time synchronization strategy, the relative time register increments by one every second. During the continuous synchronization process, the value in the deviation time register is expected to be 1 hour, indicating that the master and slave clocks measure time in a consistent manner. At one moment, the master clock time is 15:00, and the slave clock time changes to 16:10. Compared with 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 values sampled twice for the deviation time register can be calculated, and the current PTP timestamp jump value is 10 minutes; since the difference is a positive value, this jump is a forward jump (jumping towards the future).
[0055] In a specific embodiment, the time jump processing system implementing 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 sampling value and the sampling value at the previous moment, and output the absolute value of the difference. On the other hand, if the difference is a positive value, the corresponding Nagitive register is set to 0; if the difference is a negative value, the corresponding Nagitive register is set to 1. In order to identify the size and direction of the PTP timestamp jump value. It can be understood that the embodiment of the present invention does not limit the configuration of the sampling period, and the time sensitivity can be dynamically adjusted based on 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, judging 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, 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.
[0058] It is understandable that for the slight jump of the PTP timestamp, its influence on the operation of the Qbv state machine is small, so it can be ignored or processed by other means to reduce the waste of system load. In an exemplary embodiment, after a slight jump occurs in the PTP timestamp (after the jump value of the PTP timestamp is less than the abnormal threshold), the system can dynamically adapt the transmittable bit. Specifically, the dynamic adaptation of slight jumps is realized by the absolute time maintained inside the Qbv register. For example, the expected deviation time is 1000ns. After PTP calibration, the deviation time is 1200ns, that is, a PTP timestamp jump of 200ns occurs. If the message is transmitted at this time, the Qbv module will rely on the absolute time maintained by itself for transmission to avoid the problem of overrun.
[0059] It should be noted that the abnormal threshold can be implemented by configuring register variables. The specific implementation of the abnormal threshold in the present invention depends on the system configuration and may not be limited to software implementation or hardware implementation; the specific value of the abnormal threshold can be dynamically configured based on the actual use scenario of the present invention. The embodiment of the present invention does not limit the implementation method of the abnormal threshold and the specific value of the abnormal threshold.
[0060] S103: If the PTP timestamp changes abnormally toward the past time, each configuration item of the Qbv state machine is 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, and these parameters are affected by PTP. Under normal operation, different time periods may require different configurations, but triggering changes to configuration items in the 802.1Qbv protocol requires waiting for the calculated preset configuration change time (Config 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), which can be used on the slave clock side to calculate the final absolute time. The reason why the jump of the PTP timestamp affects the operation of the subsequent Qbv state machine is that when the deviation time changes, the time sent to the Qbv state machine through the pulse is different from the absolute time of the previous time. In the time period spanned by the jump, there may be a time point where the configuration needs to be changed. If the configuration before the jump is maintained after the jump, it will cause the state machine to be abnormal.
[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 the end of cycle time is completed by maintaining the remaining time of the current threshold. When the time jumps backward, even if the jump process does not cross the preset configuration change time, it may still extend the duration of the old configuration, causing the end of cycle time to become an uncontrollable time. The user end cannot judge how many bits can be transmitted based on the remaining time, which will cause the state machine to be abnormal.
[0064] It should be noted that the PTP timestamp may jump toward the past or the future, and there may be one or more configuration change time points. If the PTP timestamp jumps abnormally toward the past time, there are two situations: one is that there is no configuration change time in the time period spanned by the jump; the other is that there is a configuration change time in the time period spanned by the jump.
[0065] It is understandable that if there is a configuration change time in the time period spanned by the abnormal jump to the past, it is equivalent to using the configuration of the current time at the past time point where the old configuration should be used, which will inevitably cause the state machine to be abnormal. Therefore, it is necessary to reload the various configuration items of the Qbv state machine based on the state configuration information at the time point after the jump. On the other hand, even if there is no configuration change time in the time period spanned by the abnormal jump to the past, it will also cause the cycle end time to be uncontrollable due to the prolonged duration of the current configuration, making the state machine abnormal. Therefore, it is necessary to reload the various configuration items of the Qbv state machine based on the state configuration information at the time point after the jump, and recalculate the corresponding cycle time and other configuration information to make the state machine run normally.
[0066] Similarly, there are two situations when the PTP timestamp jumps to the future: one is that there is no configuration change time in the time period spanned by the jump; the other is that there is a configuration change time in the time period spanned by the jump. However, it should be noted that if the configuration change time is not spanned, the abnormal jump to the future direction will not extend the duration of the current configuration, but will shorten the duration of the current configuration. Therefore, you can choose to reconfigure or ignore this 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 also includes: if the PTP timestamp jumps abnormally in the future time direction, 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, the configuration items of the Qbv state machine are reloaded. If the PTP timestamp jumps abnormally in the future time direction, and the PTP timestamp jumps to before the preset configuration change time, the configuration items of the Qbv state machine are reloaded based on the current Qbv configuration information, or this abnormal jump is ignored.
[0068] In addition, in the embodiment of the present invention, a first debug register and a second debug register are maintained. The first debug register and the second debug register are both initialized to 0. When an abnormal jump occurs, the first debug register is preset to increase by one; when a negligible jump occurs, the second debug register is preset to increase by one.
[0069] This debug register can be used to locate system problems. By debugging, the number of small jumps (jump value less than the abnormal threshold) and abnormal jumps (jump value greater than or equal to the abnormal threshold) of the PTP timestamp can be counted. Combined with the register of Qbv itself, it can help users observe the status 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, an embodiment of the present invention provides a time jump processing system 300 , which includes: an acquisition module 301 , a judgment module 302 and a processing module 303 .
[0071] Specifically, the acquisition module 301 is used to obtain the size and direction of the PTP timestamp jump value; the judgment module 302 is used to judge whether the PTP timestamp jump is an abnormal jump; 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 past time direction.
[0072] It should be noted that the processing module 303 is also used to obtain the Qbv configuration information after the configuration change time if the PTP timestamp changes abnormally in the future time direction and the PTP timestamp changes to after the preset configuration change time; based on the Qbv configuration information after the configuration change time, reload the configuration items of the Qbv state machine. If the PTP timestamp changes abnormally in the future time direction and the PTP timestamp changes to before the preset configuration change time, reload the configuration items of the Qbv state machine based on the current Qbv configuration information, or ignore this abnormal change.
[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 deviation time acquired this time and the deviation time acquired last time as the value of the current PTP timestamp jump; if the difference is a positive value, the PTP timestamp jumps to the future direction; if the difference is a negative value, the PTP timestamp jumps to the past direction.
[0074] The judgment module 302 is also used 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 also includes a statistical module, which is used to preset the first debug register to increment by one when an abnormal jump occurs; and to preset the second debug register to increment by one when a negligible jump occurs.
[0076] Please refer to Figure 4 As shown, an embodiment of the present invention further provides an electronic device 400, which includes at least one processor 401, a memory 402 (for example, a non-volatile memory), a memory 403, and a communication interface 404, and 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. At least one processor 401 is used to call at least one program instruction stored or encoded in the memory 402, so that the at least one processor 401 performs various operations and functions of the time jump processing method described in various embodiments of this specification.
[0077] In an embodiment of the present specification, the electronic device 400 may include, but is not limited to, a personal computer, a server computer, a workstation, a desktop computer, a laptop computer, a notebook computer, a mobile electronic device, a smart phone, a tablet computer, a cellular phone, a personal digital assistant (PDA), a handheld device, a messaging device, a wearable electronic device, a consumer electronic device, and the like.
[0078] An embodiment of the present invention further provides a computer-readable medium carrying computer execution instructions. When the computer execution instructions are executed by a processor, they can be used to implement various operations and functions of the time jump processing method described in various embodiments of this specification.
[0079] The computer-readable medium in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device.
[0080] In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, device, or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0081] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented 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] The present invention is described with reference to flowcharts and / or block diagrams of methods, apparatuses, systems, and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as a combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the process in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0083] The foregoing description of specific exemplary embodiments of the present invention is for the purpose of illustration and demonstration. These descriptions are not intended to limit the present invention to the precise form disclosed, and it is clear that many changes and variations can be made based on the above teachings. The purpose of selecting and describing the exemplary embodiments is to explain the specific principles of the present invention and its practical application, so that those skilled in the art can realize and utilize various different exemplary embodiments of the present invention and various different selections and changes. The scope of the present invention is intended to be limited by the claims and their equivalents.
[0084] It will be apparent to those skilled in the art that the 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 the spirit or essential features of the invention. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description, and it is intended that all variations falling within the meaning and scope of the equivalent elements of the claims be included in the invention. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.
[0085] In addition, it should be understood that although the present specification is described according to implementation modes, not every implementation mode contains only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment may also be appropriately combined to form other implementation modes that can be understood by those skilled in the art.
Claims
1. A time jump processing method, applied to 802.1Qbv protocol, characterized in that: include: Get the size and direction of the PTP timestamp jump value; Determine whether the PTP timestamp jump is an abnormal jump; If the PTP timestamp changes abnormally toward the past time, each configuration item of the Qbv state machine is reloaded based on the Qbv configuration information at the time after the change.
2. The time jump processing method according to claim 1, characterized in that: The method further comprises: If the PTP timestamp changes abnormally in the future time direction, and the PTP timestamp changes to after the preset configuration change time, then the Qbv configuration information after the configuration change time is obtained; Reload the configuration items of the Qbv state machine based on the Qbv configuration information after the configuration change time.
3. The time jump processing method according to claim 1, characterized in that: The method further comprises: If the PTP timestamp changes abnormally toward the future time direction, and the PTP timestamp changes to before the preset configuration change time, each configuration item of the Qbv state machine is 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: Get the size and direction of the PTP timestamp jump value, including: Periodically obtain the deviation time recorded in the preset PTP deviation time register; Calculate the absolute value of the difference between the deviation time obtained this time and the deviation time obtained last time as the value of the current PTP timestamp jump; If the difference is a positive value, the PTP timestamp jumps to the future direction; If the difference is a negative value, the PTP timestamp jumps to the past direction.
5. The time jump processing method according to claim 1, characterized in that: 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 the 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.
6. The time jump processing method according to claim 5, characterized in that: The method further comprises: When an abnormal jump occurs, the first debug register is preset to increase by one; When a negligible transition occurs, the preset second debug register is incremented by one.
7. A time jump processing system, using the time jump processing method according to any one of claims 1 to 6, characterized in that: include: The acquisition module is used to obtain the size and direction of the PTP timestamp jump value; A judging module, used to judge 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 abnormally jumps to the past time direction.
8. The time jump processing system according to claim 7, characterized in that: The system further comprises: If the PTP timestamp changes abnormally in the future time direction, and the PTP timestamp changes 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 the Qbv configuration; If the PTP timestamp changes abnormally toward the future time direction, and the PTP timestamp changes to before the preset configuration change time, each Qbv configuration item is reloaded based on the current Qbv configuration information, or the abnormal change is ignored.
9. A computer device, characterized in that: include: 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 according to any one of claims 1 to 6 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the time jump processing method according to any one of claims 1 to 6.
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
Detection and adaptive time correction method for clock rollback or forward modulation
CN118282557A
Device and method for managing performance decreases in hybrid wired / wireless TSN networks
US20240380704A1