CN106301996B - A kind of method and device that PTP message is tested automatically - Google Patents

A kind of method and device that PTP message is tested automatically Download PDF

Info

Publication number
CN106301996B
CN106301996B CN201510363262.9A CN201510363262A CN106301996B CN 106301996 B CN106301996 B CN 106301996B CN 201510363262 A CN201510363262 A CN 201510363262A CN 106301996 B CN106301996 B CN 106301996B
Authority
CN
China
Prior art keywords
message
field
ptp
ptp message
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510363262.9A
Other languages
Chinese (zh)
Other versions
CN106301996A (en
Inventor
韩柳燕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201510363262.9A priority Critical patent/CN106301996B/en
Publication of CN106301996A publication Critical patent/CN106301996A/en
Application granted granted Critical
Publication of CN106301996B publication Critical patent/CN106301996B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Maintenance And Management Of Digital Transmission (AREA)

Abstract

The present invention provides a kind of method and devices that PTP message is tested automatically, are applied to test equipment, which comprises determine the type of message for receiving the PTP message for being devices under transmission;According to the determining type of message, the standard word segment value of all or part of field of pre-set PTP message corresponding with the type of message is determined;The field value of first field in the PTP message received is compared with the standard word segment value of the first field;If the field value of the first field and the standard word segment value of the first field are inconsistent in the PTP message, the first field for exporting the PTP message is unsatisfactory for the first desired test result.The case where judging PTP message intercommunication by pre-set standard word segment value, avoid that each field filling numerical value has differences when realizing PTP function because of PTP relevant device in the prior art, caused by the intercommunication of different network systems and equipment the problem of causing certain difficulty.

Description

A kind of method and device that PTP message is tested automatically
Technical field
The present invention relates to field of communication technology more particularly to a kind of PTP (Precision Time Protocol, when accurate Between agreement) method and device tested automatically of message.
Background technique
In a communication network, perhaps multiple services normal operation requires that network clocking is synchronous, i.e., each equipment of whole network it Between time or difference on the frequency be maintained in reasonable error level.Such as it is required in the multiple network mode of mobile communication field Base station meets time synchronization and could work normally between eating dishes without rice or wine, comprising: TD-SCDMA (Time Division-Synchronous Code Division Multiple Access, TD SDMA), TD-LTE (Time Division Long Term Evolution, timesharing long term evolution), CDMA2000 (Code Division Multiple Access 2000), LTE-A (LTE Advanced), MBMS (multimedia broadcast/multicast service) etc..
PTP is a kind of agreement of time synchronization, itself can be used for the precise synchronization between equipment.At one In PTP synchronization path, master clock provides source time, synchronous for next stage clock, that is, supplies from clock reference.Then lead to from clock It crosses with master clock intercommunication message, the time adjustment local zone time provided according to master clock.
Referring to Fig. 1, for PTP message interaction flow chart in the prior art.PTP is related to a variety of PTP messages, comprising: when interaction Between stab synchronization (Sync) message, latency request (Delay_Req) message, delay respond (Delay_Resp) message and carry when Between state notice (Announce) message.The specific value and real network phase that each field of PTP message is filled in application It closes, therefore does not make specific definition in IEEE.
It is different network systems since when realizing PTP function, each field filling numerical value has differences PTP relevant device Intercommunication with equipment causes certain difficulty.In order to preferably realize device intercommunicating, it is necessary to which proposition can accurately and effectively judge The scheme of the interworking case of PTP message.
Summary of the invention
In view of the above problems, the present invention is proposed in order to provide a kind of method and device that PTP message is tested automatically, it can be with The case where judging PTP message intercommunication by pre-set standard word segment value is avoided because PTP relevant device exists in the prior art Each field filling numerical value has differences when realizing PTP function, caused by the intercommunications of different network systems and equipment cause one Fixed difficult problem.
According to one aspect of the present invention, a kind of method that PTP message is tested automatically is provided, test equipment is applied to, The described method includes: determining the type of message for receiving the PTP message for being devices under transmission;According to the determining message class Type determines the standard word segment value of all or part of field of pre-set PTP message corresponding with the type of message;By institute The field value of the first field in the PTP message received is stated to be compared with the standard word segment value of the first field;If the PTP report The field value of the first field and the standard word segment value of the first field are inconsistent in text, then export the first field of the PTP message It is unsatisfactory for the first desired test result.
Optionally, the method also includes: record the time of each PTP message received, and every according to what is received The time of a PTP message, calculate the PTP message of various type of messages first send frequency;It is mentioned from the PTP message received The field value for taking logMessageInterval field, the second of the PTP message received send frequency;It will be connect with described The first of the corresponding PTP message of the type of message of the PTP message received sends frequency, the with the PTP message received Two transmission frequencies are compared;If inconsistent, the transmission frequency of the PTP message received described in return problematic second is surveyed Test result.
Optionally, the method also includes: record transmission Delay_Resp message carry The transmission frequency of the field value of logMessageInterval field and the Delay_Resp message;By the Delay_ of transmission The field value for the logMessageInterval field that Resp message carries and the transmission frequency of the Delay_Resp message, It is reported with the practical transmission frequency of the Delay_Req message that is devices under transmission and the Delay_Req for being devices under transmission The field value of the logMessageInterval field of text is compared;If inconsistent, the transmission of Delay_Resp message is returned The problematic third test result of frequency.
Optionally, the method also includes: according to the transmission of the PTP message for the various type of messages for presetting storage frequency The numberical range of rate adjusts the transmission frequency of the PTP message of sending;If not receiving be devices under reply in the given time The sending PTP message response message, then return described in be devices under support PTP message transmission frequency it is problematic The 4th test result.
Optionally, the method also includes: record the timestamp information of the PTP message received;If the timestamp information It is less than the timestamp information of the previous message of the PTP message received for negative value or timestamp information, then returns and received To the timestamp information mistake for stating PTP message the 5th test result.
Optionally, before determination receives the type of message for the PTP message for being devices under transmission, the method is also wrapped It includes: according to the numerical value of ethernet type field in the encapsulation of ether network packet, identifying and obtain from the message for be devices under transmission PTP message.
According to another aspect of the invention, a kind of device that PTP message is tested automatically is additionally provided, is set applied to test Standby, described device includes: determination type module, for determining the type of message for receiving the PTP message for being devices under transmission; Matching module, for determining pre-set PTP message corresponding with the type of message according to the determining type of message All or part of field standard word segment value;First comparison module, for by the first field in the PTP message received Field value be compared with the standard word segment value of the first field;First output module, if for the first word in the PTP message The field value of section and the standard word segment value of the first field are inconsistent, then the first field for exporting the PTP message is unsatisfactory for requiring The first test result.
Optionally, described device further include: the first logging modle, for recording the time of each PTP message received, And according to the time of each PTP message received, calculate the PTP message of various type of messages first sends frequency;Frequency Determining module is received for extracting the field value of logMessageInterval field from the PTP message received PTP message second send frequency;Second comparison module, for by the type of message pair with the PTP message received The first of the PTP message answered sends frequency, is compared with the second transmission frequency of the PTP message received;Second is defeated Module out, if for inconsistent, problematic second test result of transmission frequency of the PTP message received described in return.
Optionally, described device further include: the second logging modle, for recording the Delay_Resp message sent carrying The transmission frequency of the field value of logMessageInterval field and the Delay_Resp message;Third comparison module, The field value and the Delay_ for the logMessageInterval field that Delay_Resp message for that will send carries The transmission frequency of Resp message, and the practical transmission frequency of the Delay_Req message that is devices under transmission and tested sets The field value of the logMessageInterval field for the Delay_Req message that preparation is sent is compared;Third output module is used If returning to Delay_Resp message in inconsistent and sending the problematic third test result of frequency.
Optionally, described device further include: adjustment module, for according to the various type of messages for presetting storage The numberical range of the transmission frequency of PTP message adjusts the transmission frequency of the PTP message of sending;4th output module, if being used for The response message for being devices under the PTP message of the sending of reply is not received in predetermined time, then is returned described tested Try problematic 4th test result of transmission frequency that equipment supports PTP message.
Optionally, described device further include: third logging modle, for recording the timestamp information of the PTP message received; 5th output module, if being that negative value or timestamp information are less than the PTP message received for the timestamp information The timestamp information of previous message, then the 5th test result of the timestamp information mistake of the PTP message received described in return.
The beneficial effects of the present invention are: test equipment can store the PTP message recognized, and preset the every class of storage The standard word segment value (being equivalent to standard figures or numberical range) of all or part of field of PTP message is reported with PTP is detected Text carries out automatic comparison, if certain field of the PTP message detected is unsatisfactory for the standard word segment value in test equipment, automatically The field for returning to the PTP message is unsatisfactory for the first desired test result, so as to pass through pre-set standard word segment value The case where judging PTP message intercommunication is avoided because PTP relevant device each field when realizing PTP function is filled out in the prior art Value of making up the number has differences, caused by the intercommunication of different network systems and equipment the problem of causing certain difficulty.And it can also The critical values such as PTP message packet sending speed, timestamp are judged automatically with the presence or absence of problem.
Detailed description of the invention
Fig. 1 shows PTP message interaction flow charts in the prior art;
Fig. 2 indicates the flow chart for the method that the PTP message in the first embodiment of the present invention is tested automatically;
Fig. 3 indicates one of the schematic diagram of the test environment in the first embodiment of the present invention;
Fig. 4 indicates the two of the schematic diagram of the test environment in the first embodiment of the present invention;
Fig. 5 indicates the flow chart for the method that the PTP message in the second embodiment of the present invention is tested automatically;
Fig. 6 indicates the flow chart for the method that the PTP message in the third embodiment of the present invention is tested automatically;
Fig. 7 indicates the flow chart for the method that the PTP message in the fourth embodiment of the present invention is tested automatically;
Fig. 8 shows the flow charts for the method that the PTP message in the fifth embodiment of the present invention is tested automatically;
Fig. 9 indicates the schematic diagram for the device that the PTP message in the sixth embodiment of the present invention is tested automatically.
Specific embodiment
Exemplary embodiments of the present disclosure are described in more detail below with reference to accompanying drawings.Although showing the disclosure in attached drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure It is fully disclosed to those skilled in the art.
Referring to fig. 2, the flow chart for the method tested automatically for the PTP message in the first embodiment of the present invention, this method Executing subject can be test equipment, this method comprises the following steps:
Step S201, the type of message for receiving the PTP message for being devices under transmission is determined, subsequently into step S203。
It should be noted that the test equipment can be directly connect by interfaces such as Ethernet interfaces with being devices under, Be devices under between test equipment interaction PTP message or test equipment extract two be devices under between interaction PTP message.
The type of message of the PTP message can be determined according to the field value in PTP message in the present embodiment.Specifically such as Under: test equipment identifies that different PTP is reported in the PTP message having detected that, according to messageType fields match in payload The type of message of text, such as messageType field are 0x00, and the type of message of PTP message is Sync message; MessageType field is 0x01, and the type of message of PTP message is Delay_Req message;MessageType field is 0x09, The type of message of PTP message is Delay_Resp message;MessageType field is 0x0B, and the type of message of PTP message is Announce message.
It should be noted that in the present embodiment, it can be according to ethernet type field in the encapsulation of ether network packet (Ethertype) numerical value, identification obtains PTP message, such as ethernet type field from the message for be devices under transmission Numerical value be 0x88F7.
Step S203, according to determining type of message, the complete of pre-set PTP message corresponding with type of message is determined The standard word segment value of portion or part field, subsequently into step S205.
It should be noted that in the present embodiment can be with the standard of all or part of field of pre-storing multiple sets PTP message Field value supports that the standard word segment value for choosing wherein all or part of field of any a set of PTP message is surveyed in test Examination.
Step S205, by the field value of the first field in the PTP message received and the standard word segment value of the first field into Row compares, subsequently into step S207.
If step S207, the field value of the first field and the standard word segment value of the first field are inconsistent in PTP message, defeated The first field of PTP message is unsatisfactory for the first desired test result out.
In step S201~step S207, test equipment can store the PTP message recognized, and preset storage The standard word segment value (being equivalent to standard figures or numberical range) of every all or part of field of class PTP message, and detects PTP message carries out automatic comparison, if certain field of the PTP message detected is unsatisfactory for the standard word segment value in test equipment, Then the field of the auto-returned PTP message is unsatisfactory for the first desired test result, so as to pass through pre-set standard Field value judges the case where PTP message intercommunication, avoids because PTP relevant device is each when realizing PTP function in the prior art Field filling numerical value has differences, caused by the intercommunication of different network systems and equipment the problem of causing certain difficulty.
It should be noted that PTP message may is that Announce message, Sync message, Delay_ in the present embodiment Req message, Delay_Resp message.
Wherein, Announce packet check field includes some or all of following field: TransportSpecific (transportation protocol type) field, versionPTP (PTP version) field, messageLength (disappear Cease length) field, domainNumber (time-domain numerical value) field, alternateMasterFlag (spare principal mark shows) field, UnicastFlag (unicast mark) field, PTP profile Specific 1 (PTP configuration file characteristic 1) field, PTP Profile Specific 2 (PTP configuration file characteristic 2) field, (whether time seconds value is adding a situation, i.e. leap second just to leap61 Value) field, leap59 (whether time seconds value subtract one situation, i.e. leap second negative value) field, currentUtcOffsetValid (when Whether preceding leap second value is effective) field, ptpTimescale (PTP time ruler), timeTraceable (time trackability) word Section, frequencyTraceable (frequency trackability) field, sourcePortIdentity (source port number) field, SequenceId (sequence number) Field, controlField (control field), logMessageInterval are (between message time Every) field, originTimestamp (original time stamp) field, currentUtcOffset (current leap second value, optimal clock Cumulative offset amount of the UTC time relative to the TAI time) field, grandmasterPriority1 (main equipment clock priority One value) field, grandmasterClockQuality (main equipment clock quality characteristic) field, GrandmasterPriority2 (value of main equipment clock priority two) field, grandmasterIdentity (main equipment Number) field, stepsRemoved (hop count of optimal clock to this clock node), timeSource (time source attribute) field.
Sync packet check field includes some or all of following field: transportSpecific field, VersionPTP field, messageLength field, domainNumber field, alternateMasterFlag field, TwoStepFlag (two-step mode mark) field, unicastFlag field, PTP profile Specific1 field, PTP 2 field of profile Specific, sourcePortIdentity field, sequenceId field, controlField word Section, logMessageInterval field, originTimestamp field.
Delay_Req packet check field includes some or all of following field: transportSpecific word Section, versionPTP field, messageLength field, domainNumber field, sourcePortIdentity field, SequenceId (sequence number), controlField field, logMessageInterval field, originTimestamp word Section.
Delay_Resp packet check field includes some or all of following field: transportSpecific Field, versionPTP field, messageLength field, domainNumber field, alternateMasterFlag word Section, sourcePortIdentity field, sequenceId field, controlField field, logMessageInterval Field, receiveTimestamp (receiving time stamp) field, requestingPortIdentity (receiving port mark) word Section.
It is one of the schematic diagram of the test environment in the first embodiment of the present invention referring to Fig. 3.In the first topological environmental In, test equipment is directly connected by interfaces such as Ethernet interfaces with being devices under, and is devices under between test equipment Interaction PTP message is determined by being devices under as master clock, or by testing according to the type of message of the PTP message of test Device systems are as master clock.
If the Announce/Sync/Delay_Resp message being devices under is tested, by being devices under as master Clock, test equipment are used as from clock.It is devices under and issues Announce/Sync/Delay_Resp message, test equipment is returned Answer Delay_Req message.
If testing the Delay_Req message being devices under is devices under work by test equipment as master clock For from clock.Test equipment issues Announce/Sync/Delay_Resp message, and test equipment responds Delay_Req message.
It referring to fig. 4, is the two of the schematic diagram of the test environment in the first embodiment of the present invention, in second of topological environmental In, it is devices under A and is devices under interaction PTP message between B, test equipment extracts PTP message interactive between the two.
Test equipment is described below with reference to second embodiment, 3rd embodiment and fourth embodiment, and frequency is sent to PTP message The test of rate.
Second embodiment
It is shown in Fig. 2 for the method flow diagram that PTP message in the second embodiment of the present invention is tested automatically referring to Fig. 5 On the basis of method in first embodiment, this method in a second embodiment further include:
Step S501, time of each PTP message that record receives, and according to each PTP message received when Between, calculate the PTP message of various type of messages first sends frequency, subsequently into step S503.
Step S503, the field value that logMessageInterval field is extracted from the PTP message received, is connect The second of the PTP message received sends frequency, subsequently into step S505.
Step S505, frequency is sent by the first of PTP message corresponding with the type of message of the PTP message received, with Second transmission frequency of the PTP message received is compared, if inconsistent, enters step S507.
The PTP message received with this can be obtained according to the type of message of the PTP message received in step S505 The corresponding PTP message of type of message first send frequency.
Step S507, problematic second test result of transmission frequency of the PTP message received is returned.
In the present embodiment, the transmission frequency to the PTP message of test equipment may be implemented by step S501~S507 It is detected, promotes synchronizing network intercommunication and application.
3rd embodiment
It is shown in Fig. 2 for the method flow diagram that PTP message in the third embodiment of the present invention is tested automatically referring to Fig. 6 On the basis of method in first embodiment, this method in the third embodiment further include:
Step S601, the field value for the logMessageInterval field that the Delay_Resp message that record is sent carries And the transmission frequency of the Delay_Resp message, subsequently into step S603.
Specifically, in test environment as shown in Figure 3, when test equipment is with directly interaction PTP message is devices under, When test equipment is as master clock, what the Delay_Resp message that test equipment record is sent carried The transmission frequency of the field value of logMessageInterval field and the Delay_Resp message.
Step S603, the field value for the logMessageInterval field for carrying the Delay_Resp message of transmission with And the transmission frequency of the Delay_Resp message, the practical transmission frequency with the Delay_Req message for being devices under transmission And be devices under the field value of the logMessageInterval field of the Delay_Req message of transmission and be compared, if It is inconsistent, then enter step S605.
It should be noted that the practical transmission frequency for being devices under the Delay_Req message of transmission can be according to record The time determination for receiving PTP message obtains.
Step S605, it returns to Delay_Resp message and sends the problematic third test result of frequency.
In the present embodiment, the hair to the Delay_Resp message of test equipment may be implemented by step S601~S605 It send frequency to be detected, promotes synchronizing network intercommunication and application.
Fourth embodiment
Referring to Fig. 7, the method flow diagram tested automatically for PTP message in the fourth embodiment of the present invention.Shown in Fig. 2 On the basis of method in first embodiment, this method in fourth embodiment further include:
Step S701, basis presets the numberical range of the transmission frequency of the PTP message of the various type of messages of storage, The transmission frequency for adjusting the PTP message issued, subsequently into step S703.
If step S703, not receiving the sound for being devices under the PTP message of the sending of reply in the given time Message is answered, then returns to problematic 4th test result of transmission frequency for being devices under and supporting PTP message.
In the present embodiment, the transmission frequency to the PTP message of test equipment may be implemented by step S701~S703 It is detected, promotes synchronizing network intercommunication and application.
5th embodiment
It is shown in Fig. 2 for the method flow diagram that PTP message in the fourth embodiment of the present invention is tested automatically referring to Fig. 8 On the basis of method in first embodiment, this method in the fourth embodiment further include:
Step S801, the timestamp information for the PTP message that record receives, subsequently into step S803.
If step S803, the described timestamp information is that negative value or timestamp information are less than the PTP message received The timestamp information of previous message, then the 5th test result of the timestamp information mistake of the PTP message received described in return.
It should be noted that term " first ", " second ", " third ", " the 4th " and " the 5th " are used for description purposes only, and It cannot be understood as indicating or implying relative importance or implicitly indicate the quantity of indicated technical characteristic.
In the present embodiment, by step S801~S805 may be implemented to the timestamp of the PTP message of test equipment into Row detection, promotes synchronizing network intercommunication and application.
Sixth embodiment
Referring to Fig. 9, for the structure chart for the device that the PTP message in the sixth embodiment of the present invention is tested automatically, the device Applied to test equipment, described device 900 includes: determination type module 901, is devices under transmission for determining to receive The type of message of PTP message;Matching module 903, for according to the determining type of message, the determining and type of message pair The standard word segment value of all or part of field for the pre-set PTP message answered;First comparison module 905, being used for will be described The field value of the first field is compared with the standard word segment value of the first field in the PTP message received;First output module 907, if inconsistent for the field value of the first field in the PTP message and the standard word segment value of the first field, export institute The first field for stating PTP message is unsatisfactory for the first desired test result.
Optionally, in another embodiment, described device further include: the first logging modle is received for recording The time of each PTP message, and according to the time of each PTP message received, calculate the PTP message of various type of messages First sends frequency;Frequency determining module, for extracting logMessageInterval field from the PTP message received Field value, the second of the PTP message received send frequency;Second comparison module, for by with the PTP received The first of the corresponding PTP message of the type of message of message sends frequency, sends frequency with the second of the PTP message received It is compared;Second output module, if the transmission frequency of the PTP message received described in return is problematic for inconsistent The second test result.
Optionally, in another embodiment, described device further include: the second logging modle, for recording transmission The field value for the logMessageInterval field that Delay_Resp message carries and the hair of the Delay_Resp message Send frequency;Third comparison module, the logMessageInterval field that the Delay_Resp message for that will send carries The transmission frequency of field value and the Delay_Resp message, the reality with the Delay_Req message for being devices under transmission The field value for sending frequency and being devices under the logMessageInterval field of the Delay_Req message of transmission carries out It compares;Third output module, if returning to Delay_Resp message for inconsistent and sending the problematic third test knot of frequency Fruit.
Optionally, in another embodiment, described device further include: adjustment module presets storage for basis Various type of messages PTP message transmission frequency numberical range, adjust the transmission frequency of the PTP message of sending;4th Output module, if for not receiving the response report for being devices under the PTP message of the sending of reply in the given time Text is then devices under problematic 4th test result of transmission frequency for supporting PTP message described in return.
Optionally, in another embodiment, described device further include: third logging modle, for recording the PTP received The timestamp information of message;5th output module, if being that negative value or timestamp information are less than institute for the timestamp information The timestamp information for stating the previous message of the PTPPTP message received then returns to the timestamp for the PTP message that the PTP is received 5th test result of information errors.
In the present embodiment, device can store the PTP message recognized, and it is complete to preset the every class PTP message of storage The standard word segment value (being equivalent to standard figures or numberical range) of portion or part field carries out certainly with PTP message is detected Dynamic to compare, if certain field of the PTP message detected is unsatisfactory for the standard word segment value in test equipment, auto-returned should The field of PTP message is unsatisfactory for the first desired test result, so as to judge PTP by pre-set standard word segment value The case where message intercommunication, avoids because PTP relevant device each field filling numerical value when realizing PTP function is deposited in the prior art In difference, caused by the intercommunication of different network systems and equipment the problem of causing certain difficulty.And PTP can be judged automatically Message sends the detection of the key functions such as frequency, timestamp, promotes synchronizing network intercommunication and application.
In several embodiments provided herein, it should be understood that disclosed method and apparatus, it can be by other Mode realize.For example, the apparatus embodiments described above are merely exemplary, for example, the division of the unit, only For a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components can combine Or it is desirably integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed phase Coupling, direct-coupling or communication connection between mutually can be through some interfaces, the INDIRECT COUPLING or communication of device or unit Connection can be electrical property, mechanical or other forms.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit It is that the independent physics of each unit includes, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of hardware adds SFU software functional unit.
The above-mentioned integrated unit being realized in the form of SFU software functional unit can store and computer-readable deposit at one In storage media.Above-mentioned SFU software functional unit is stored in a storage medium, including as dried fruit instruction is used so that a calculating Machine equipment (can be personal computer, server or the network equipment etc.) executes each embodiment the method for the present invention Part steps.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (Read-Only Memory, abbreviation ROM), random access memory (Random Access Memory, abbreviation RAM), magnetic or disk etc. are various can store The medium of program code.
Above-described is the preferred embodiment of the present invention, it should be pointed out that the ordinary person of the art is come It says, can also be made under the premise of not departing from principle of the present invention such as dried fruit improvements and modifications, these improvements and modifications Within the scope of the present invention.

Claims (11)

1. a kind of method that PTP message is tested automatically is applied to test equipment, which is characterized in that the described method includes:
Determine the type of message for receiving the PTP message for being devices under transmission;
According to the determining type of message, determine pre-set PTP message corresponding with the type of message whole or The standard word segment value of part field;
The field value of first field in the PTP message received is compared with the standard word segment value of the first field;
If the field value of the first field and the standard word segment value of the first field are inconsistent in the PTP message, the PTP is exported First field of message is unsatisfactory for the first desired test result.
2. the method as described in claim 1, which is characterized in that the method also includes:
The time of each PTP message received is recorded, and according to the time of each PTP message received, calculates various reports The first of the PTP message of literary type sends frequency;
The field value of the record time interval logMessageInterval field of log is extracted from the PTP message received, The second of the PTP message received sends frequency;
Frequency is sent by the first of PTP message corresponding with the type of message of PTP message received, is received with described PTP message second transmission frequency be compared;
If inconsistent, problematic second test result of transmission frequency of the PTP message received described in return.
3. the method as described in claim 1, which is characterized in that the method also includes:
Record send delay respond Delay_Resp message carry logMessageInterval field field value and The transmission frequency of the Delay_Resp message;
The field value and the Delay_ for the logMessageInterval field that the Delay_Resp message of transmission is carried The transmission frequency of Resp message, with the practical transmission frequency of the latency request Delay_Req message that is devices under transmission and The field value for being devices under the logMessageInterval field of the Delay_Req message of transmission is compared;
If inconsistent, return to the Delay_Resp message and send the problematic third test result of frequency.
4. the method as described in claim 1, which is characterized in that the method also includes:
According to the numberical range of the transmission frequency of the PTP message for the various type of messages for presetting storage, the PTP of sending is adjusted The transmission frequency of message;
If not receiving the response message for being devices under the PTP message of the sending of reply in the given time, return It is described to be devices under problematic 4th test result of transmission frequency for supporting PTP message.
5. the method as described in claim 1, which is characterized in that the method also includes:
Record the timestamp information of the PTP message received;
If the timestamp information is the previous message that negative value or timestamp information are less than the PTP message received Timestamp information, then the 5th test result of the timestamp information mistake of the PTP message received described in return.
6. method as claimed in any one of claims 1 to 5, which is characterized in that be devices under transmission determining to receive Before the type of message of PTP message, the method also includes:
According to the numerical value of ethernet type field in the encapsulation of ether network packet, identifies and obtain from the message for be devices under transmission PTP message.
7. a kind of device that PTP message is tested automatically, it is applied to test equipment, which is characterized in that described device includes:
Determination type module, for determining the type of message for receiving the PTP message for being devices under transmission;
Matching module, for determining pre-set PTP corresponding with the type of message according to the determining type of message The standard word segment value of all or part of field of message;
First comparison module, for by the field value of the first field and the standard of the first field in the PTP message received Field value is compared;
First output module, if for the first field in the PTP message field value and the first field standard word segment value not Unanimously, then the first field for exporting the PTP message is unsatisfactory for the first desired test result.
8. device as claimed in claim 7, which is characterized in that described device further include:
First logging modle, for recording the time of each PTP message received, and according to each PTP message received Time, calculate the PTP message of various type of messages first send frequency;
Frequency determining module is obtained for extracting the field value of logMessageInterval field from the PTP message received Second to the PTP message received sends frequency;
Second comparison module, for by the hair of the first PTP message corresponding with the type of message of PTP message received Frequency is sent, is compared with the second transmission frequency of the PTP message received;
Second output module, if for inconsistent, the transmission frequency problematic second of the PTP message received described in return Test result.
9. device as claimed in claim 7, which is characterized in that described device further include:
Second logging modle, for recording the word for the logMessageInterval field that the Delay_Resp message sent carries The transmission frequency of segment value and the Delay_Resp message;
Third comparison module, the field for the logMessageInterval field that the Delay_Resp message for that will send carries The transmission frequency of value and the Delay_Resp message, the practical transmission with the Delay_Req message for being devices under transmission Frequency and the field value of logMessageInterval field of Delay_Req message for being devices under transmission are compared It is right;
Third output module, if returning to Delay_Resp message for inconsistent and sending the problematic third test knot of frequency Fruit.
10. device as claimed in claim 7, which is characterized in that described device further include:
Module is adjusted, the numberical range of the transmission frequency of the PTP message of the various type of messages of storage is preset for basis, Adjust the transmission frequency of the PTP message issued;
4th output module, if for not receiving the PTP message for being devices under the sending of reply in the given time Response message, then return described in be devices under support PTP message problematic 4th test result of transmission frequency.
11. device as claimed in claim 7, which is characterized in that described device further include:
Third logging modle, for recording the timestamp information of the PTP message received;
5th output module, if being that negative value or timestamp information are less than the PTP report received for the timestamp information The timestamp information of the previous message of text, then the 5th test of the timestamp information mistake of the PTP message received described in return As a result.
CN201510363262.9A 2015-06-26 2015-06-26 A kind of method and device that PTP message is tested automatically Active CN106301996B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510363262.9A CN106301996B (en) 2015-06-26 2015-06-26 A kind of method and device that PTP message is tested automatically

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510363262.9A CN106301996B (en) 2015-06-26 2015-06-26 A kind of method and device that PTP message is tested automatically

Publications (2)

Publication Number Publication Date
CN106301996A CN106301996A (en) 2017-01-04
CN106301996B true CN106301996B (en) 2019-10-08

Family

ID=57650941

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510363262.9A Active CN106301996B (en) 2015-06-26 2015-06-26 A kind of method and device that PTP message is tested automatically

Country Status (1)

Country Link
CN (1) CN106301996B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106656395B (en) * 2017-01-05 2018-12-18 西安电子科技大学 Based on the improved power grid time synchronized measurement system of self study and method
CN109327428A (en) * 2018-06-05 2019-02-12 中国移动通信有限公司研究院 A kind of message transmitting method, device, network side equipment and storage medium
US20220030533A1 (en) * 2018-11-26 2022-01-27 Telefonaktiebolaget Lm Ericsson (Publ) Devices and Methods for Handling Precise Timing Protocol Signaling from a Time Sensitive Network
CN111277349B (en) * 2018-12-04 2023-12-22 深圳市中兴微电子技术有限公司 Clock synchronization method and system
CN113067654B (en) * 2020-01-02 2022-04-15 中国移动通信有限公司研究院 Method and equipment for testing state of synchronous source selection port
CN117009998A (en) * 2023-08-29 2023-11-07 上海倍通医药科技咨询有限公司 Data inspection method and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101827098A (en) * 2010-03-31 2010-09-08 中兴通讯股份有限公司 Processing method and device for time synchronization
CN102377663A (en) * 2010-08-24 2012-03-14 华为技术有限公司 Method, device and system for processing clock message
CN103051406A (en) * 2011-10-17 2013-04-17 中兴通讯股份有限公司 Clock synchronization method and system in 1588-2008 protocol

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20070070299A (en) * 2005-07-06 2007-07-04 삼성전자주식회사 Time synchronous method in residential ethernet system
CN103036848B (en) * 2011-09-29 2015-11-25 西门子公司 The reverse engineering approach of agreement and system
EP3053288A1 (en) * 2013-10-02 2016-08-10 Khalifa University of Science, Technology and Research Method and devices for time and frequency synchronization
CN103701581B (en) * 2013-12-06 2017-01-18 电信科学技术第五研究所 Method for realizing IEEE1588 master clock
CN104506296B (en) * 2014-12-08 2018-02-27 盛科网络(苏州)有限公司 One kind ensures the symmetrical implementation method of PTP packet routes

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101827098A (en) * 2010-03-31 2010-09-08 中兴通讯股份有限公司 Processing method and device for time synchronization
CN102377663A (en) * 2010-08-24 2012-03-14 华为技术有限公司 Method, device and system for processing clock message
CN103051406A (en) * 2011-10-17 2013-04-17 中兴通讯股份有限公司 Clock synchronization method and system in 1588-2008 protocol

Also Published As

Publication number Publication date
CN106301996A (en) 2017-01-04

Similar Documents

Publication Publication Date Title
CN106301996B (en) A kind of method and device that PTP message is tested automatically
CN103929293B (en) Asymmetrically-delayed time synchronization method and system
US8982776B1 (en) Increasing accuracy for delivering precision time protocol frequency and phase synchronization over a network without on-path support
WO2020135857A1 (en) Time synchronization method, system and device, and storage medium
CN108650050A (en) A kind of distributed network clock synchronous method
CN102932083B (en) A kind of method and apparatus during microwave synchronization pair
CN103546268B (en) The compensation method of a kind of system time and equipment
CN106027190B (en) A kind of clock synchronizing method and device
CN106688207A (en) Method for determining a propagation time of a telegram in a communication network, and corresponding network components
KR101801801B1 (en) Slot frame virtualization System and Method for TSCH based industrial wireless network
CN103580768B (en) A kind of method for synchronizing time and device
CN108737006A (en) A kind of method for synchronizing time, client and computer readable storage medium
CN101938825A (en) Time synchronization method, device and system in digital subscriber line
CN109379160A (en) A kind of clock alignment server and method
CN102404152A (en) Method and equipment for identifying response messages
CN106549822B (en) Method and device for testing response time of time synchronization message and test equipment
CN108574547A (en) A kind of time calibrating method and device
CN104601269A (en) Master and slave clock synchronization method and system
CN107645768A (en) A kind of method for synchronizing time and device for intra-office distribution
CN106027189A (en) Method and system for providing message timestamp of Internet of things equipment
CN109982428A (en) Construct method, terminal, the network equipment and the synchronous network system of synchronizing network
CN102983959B (en) Method for realizing one-step mode and two-step mode for PTP (precision time synchronization protocol) in a plurality of MAC
CN102821457B (en) Clock synchronizing method based on software defined radio and software defined radio system
CN108307416A (en) A kind of internet-of-things terminal management method
CN103813382A (en) Clock synchronization method, device and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant