CN107294870A - Message sending, receiving method and device and message processing method and system - Google Patents
Message sending, receiving method and device and message processing method and system Download PDFInfo
- Publication number
- CN107294870A CN107294870A CN201610207570.7A CN201610207570A CN107294870A CN 107294870 A CN107294870 A CN 107294870A CN 201610207570 A CN201610207570 A CN 201610207570A CN 107294870 A CN107294870 A CN 107294870A
- Authority
- CN
- China
- Prior art keywords
- message
- clock
- time
- timestamp
- data network
- 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.)
- Withdrawn
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/55—Prevention, detection or correction of errors
- H04L49/557—Error correction, e.g. fault recovery or fault tolerance
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/35—Switches specially adapted for specific applications
- H04L49/351—Switches specially adapted for specific applications for local area network [LAN], e.g. Ethernet switches
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/90—Buffering arrangements
Abstract
The invention discloses a kind of message sending, receiving method and device and message processing method and system, generate message, recorded message enters the timestamp of data network, then message is sent by data network, after the message and timestamp is received, according to timestamp and default maximum delay, the output time of message is determined, it is less than output time when the time point of outlet clock, then message is cached.Overcome the time transmitted in a data network due to message it is uncertain caused by message export uncertain problem, message is set to be transmitted according to regular time, facility is provided for follow-up processing, the application of data network is expanded, improves Consumer's Experience.
Description
Technical field
Field, more particularly to a kind of message sending, receiving method and device are transmitted the present invention relates to data message
And message processing method and system.
Background technology
The fast development of ethernet technology so that data service turns into the main business flow of network, data network
Network starts to replace SDH (Synchronous Digital Hierarchy, SDH) network to turn into
The developing direction of communication network, each current operator greatly develops PTN (Packet Transport Network, Packet
Transport Network), IPRAN (IP Radio Access Network, wireless access network IPization)
Deng data network, former SDH network is progressively substituted.Data network possesses that integrated cost is low, traffic scheduling
Ability flexibly, meets the transmission demand of current data service well.But data network is in business transmission
All there is uncertainty in terms of time delay, time delay shake, and in some fields, for data message
Transmission duration and insensitive but very sensitive to the change of message passing time, for example, in power system
Communicate in private network, control centre needs to issue electric brake switch command to two power stations of upstream and downstream, it is desirable to order
Passing time is to determine, it is ensured that upstream and downstream electric brake switch is switched according to instruction sequences relational operation electric brake, up and down
The switching sequence of trip electric brake has strict demand, and the electric brake order of mistake can cause grid power action appearance
Disorder, leads to disaster.Because the message passing time of data network is not known, therefore it is special to meet electric power
The demand of net.
The content of the invention
The invention provides a kind of message sending, receiving method and device and message processing method and system,
The problems such as aiming to solve the problem that data message passing time is unstable in the prior art, and then result in potential safety hazard.
In order to solve the above-mentioned technical problem, the invention provides a kind of file transmitting method, including:
Generate message;
When recording the message into data network, the timestamp of inlet clock;Wherein, the inlet clock
It is synchronous with outlet clock;
The timestamp is sent together with the message by the data network.
Optionally, described send timestamp by the data network together with message includes:When will be described
Between stab and be inserted into message;Encapsulation is re-started to the message, and is sent by the data network.
Further, present invention also offers a kind of message method of reseptance, including:
Message and the message are received into the time of inlet clock during the data network by data network
Stamp;
According to the timestamp and default maximum delay, the output time of the message is determined;
When being less than the output time at the time point of outlet clock, then the message is cached, it is described
Outlet clock is synchronous with inlet clock.
Optionally, it is described according to the timestamp and default maximum delay, when determining the output of the message
Quarter includes:The output time is more than or equal to the timestamp and the default maximum delay sum.
Optionally, when being more than or equal to the output time at the time point of the outlet clock, then export described
Message.
Optionally, when the timestamp is encapsulated into the message, the output message includes:Will
The timestamp is removed from the message;The message is re-started and encapsulates and exports.
Further, present invention also offers a kind of message processing method, including:
The message and timestamp are sent using above-mentioned file transmitting method;
The message and timestamp are received, and is handled using above-mentioned message method of reseptance.
Further, present invention also offers a kind of packet transmission device, including:
Message generation module, for generating message;
Time logging modle, during for recording the message into data network, the timestamp of inlet clock;
Wherein, the inlet clock is synchronous with outlet clock;
Message sending module, for the timestamp to be sent together with the message by the data network.
Optionally, the message sending module includes the first package module, for the timestamp to be inserted into
In message, and encapsulation is re-started to the message.
Further, present invention also offers a kind of message reception device, including:
Message receiving module, for receiving message by data network and entering the data with the message
The timestamp of inlet clock during network;
Time determining module, for according to the timestamp and default maximum delay, determining the message
Output time;
Packet buffer module, for when being less than the output time at the time point of outlet clock, then to described
Message is cached, and the outlet clock is synchronous with inlet clock.
Optionally, it is described according to the timestamp and default maximum delay, when determining the output of the message
Quarter includes:The output time is more than or equal to the timestamp and the default maximum delay sum.
Optionally, in addition to message output module, it is more than or equal to institute for the time point when the outlet clock
When stating output time, then the message is exported.
Optionally, when the timestamp is encapsulated into the message, the message output module includes second
Package module, for the timestamp to be removed from the message, and re-starts encapsulation to the message
And export.
Further, present invention also offers a kind of message handling system, including above-mentioned packet transmission device
And above-mentioned message reception device.
Beneficial effect
The invention provides a kind of message sending, receiving method and device and message processing method and system,
Message is generated, recorded message enters the timestamp of data network, then sends message by data network,
After the message and timestamp is received, according to timestamp and default maximum delay, the output of message is determined
At the moment, it is less than output time when the time point of outlet clock, then message is cached.Overcome due to report
Message exports uncertain problem caused by the time that text is transmitted in a data network does not know, and makes message can
To be transmitted according to regular time, facility is provided for follow-up processing, the application of data network is expanded
Scope, improves Consumer's Experience.
Brief description of the drawings
Fig. 1 is a kind of file transmitting method flow chart provided in an embodiment of the present invention;
Fig. 2 is a kind of message method of reseptance flow chart provided in an embodiment of the present invention;
Fig. 3 is a kind of message processing method flow chart provided in an embodiment of the present invention;
Fig. 4 is a kind of packet transmission device module diagram provided in an embodiment of the present invention;
Fig. 5 is a kind of message reception device module diagram provided in an embodiment of the present invention;
Fig. 6 is a kind of message processing method flow chart provided in an embodiment of the present invention.
Embodiment
The design point of the present invention is:During by recorded message by data network transmission, into data network
Timestamp, and the default maximum delay of setting makes message when being transferred to message reception device, meeting
It could export, be led so as to avoid message and be transmitted in the case where being not unrestricted in the case of output time
The uncertain problem of transmission time of cause, message must postpone default this duration of maximum delay, convenient follow-up
Operation and expand the application of data network.
Each embodiment of the invention is described further below in conjunction with the accompanying drawings.
A kind of file transmitting method is present embodiments provided, Fig. 1 is refer to, including:
S101, generation message;
When S102, recorded message enter data network, the timestamp of inlet clock;Wherein, inlet clock with
Outlet clock is synchronous;
S103, timestamp is sent to message reception device together with message by data network.
In S101, the message of packet transmission device generation, not necessarily packet transmission device is generated in itself,
Can also be sent to packet transmission device after other devices are generated;Packet transmission device is that message passes through number
The starting point sent according to network, message enters data network in packet transmission device this point.
In S102, because packet transmission device sends message by data network, and packet transmission device
The starting point of data network again, send when, record message into data network when, inlet clock when
Between stab, and the timestamp is corresponding with the message.The place for entering data network in message sets an entrance
Clock, the inlet clock is used for the time that real-time recorded message enters data network.
The registration accuracy of inlet clock can be very high, that is, be accurate to the moment that message enters data network, that is, remember
Time under record at that time;Precision is higher, and the fluctuation of passing time is just smaller.For the shape of clock in this implementation
Formula, in other words principle do not limit, either mechanical clock, or electronic clock, quartz clock, atomic clock etc.,
All it is feasible.
Due to needing recorded message dispensing device to send the time of message, and message reception device receives message
Time, then, the time of inlet clock and outlet clock should be synchronous;Synchronization is meant that, or is entered
Mouthful clock be with the time of outlet clock it is consistent, or inlet clock time and outlet clock time it
Between conversion relation be to determine.For example, the areas of time zone Shi Dong eight where Beijing, the time zone where Tokyo is
Eastern 9th area, then, just there is the time difference of a hour between Pekinese's time and the time in Tokyo;Therefore, if
Packet transmission device is in Beijing, and message reception device is in Tokyo, then the timestamp of record just should
A hour is subtracted plus the time of a hour, or outlet clock, can thus make both synchronous.
The method of synchronization of inlet clock and outlet clock, can have a variety of;In general, the synchronization side of clock
Formula is divided into two major classes, first, synchronized between outlet clock and inlet clock, i.e., with outlet clock/enter
On the basis of mouth clock, make inlet clock/outlet clock consistent therewith;So synchronous result is two clocks
Absolute time might not be accurate, but the realization of the present embodiment is not influenceed;Second, be outlet clock and
Inlet clock is synchronized with reference clock, i.e., on the basis of the clock of a third-party standard, use
Mouth clock and inlet clock are synchronous with the reference clock, accordingly, between outlet clock and inlet clock
Just it is synchronized.Specifically, synchronous mode can include:GPS (Global Positioning System,
Global positioning system), NTP (Network Time Protocol, NTP), the Chinese Big Dipper defends
Star navigation system, atomic clock, IEEE1588 (the precision interval clock synchronous protocol marks of network measure and control system
It is accurate) etc. any synchronous mode.
In S103, now packet transmission device has obtained timestamp corresponding with message;During for this
Between stab and can be learnt by message reception device, accordingly, it would be desirable to which the timestamp and message are passed through into data network together
Network is sent.Why to send together, be in order to avoid message and timestamp are connect while reaching message
Receiving apparatus, so as to be made troubles to comparison.But, in a general case, even if when corresponding with message
Between stamp with message be not at the same time arrival message reception device, for the present embodiment realization there will not be it is too big
Influence.
Optionally, have recorded message into data network timestamp after, the timestamp is just inserted into report
Wen Zhong, so ensures that message and corresponding timestamp can be while reach message reception device.Tool
Body, multiple positions that the timestamp may be inserted into message, such as header, header and effectively in
Between appearance, or message afterbody.
Message adds timestamp this data in original content, it is thus typically necessary to message again
Encapsulation;Resealing here, includes but is not limited to:Recalculate message length content, recalculate report
CRC (Cyclic Redundancy Code, CRC) check byte of text etc..Again to message
After being Resealed, it is possible to be smoothly sent to the message after encapsulation and be sent to by data network
Message reception device, is then handled message by message reception device.
A kind of message method of reseptance is present embodiments provided, Fig. 2 is refer to, including:
S201, the timestamp for receiving by data network inlet clock when message and message enter data network;
S202, according to timestamp and default maximum delay, determine the output time of message;
If the time point of S203, outlet clock is less than output time, message is cached, outlet clock
It is synchronous with inlet clock.
In S201, it is the message sent naturally by data network to receive message;What message was sent
What the time was not to determine, the time spent in and time of arrival be not to determine that this is due to data network
Network itself does not have the transmission time of a determination.And timestamp be exactly message enter data network when, entrance
The time of clock.
Optionally, timestamp and message are sent by data network together, i.e., timestamp and message be simultaneously
Reach message output device;Why to send together, be in order to avoid message and timestamp are not simultaneously
Message reception device is reached, so as to be made troubles to comparison.But, in a general case, though with report
The corresponding timestamp of text is not to reach message reception device at the same time with message, for the realization of the present embodiment
Do not have too much influence.
In S202, the corresponding timestamp of message received is removed, maximum delay and outlet clock is also preset
Time point.The time point of outlet clock is it is well understood that be exactly the time suggested by outlet clock.During outlet
Clock is similar with inlet clock, and its precision can be very high, and precision is higher, and the time of message transmission is more accurate,
More message can be made to be exported with expected time delay;To the form of clock in the present embodiment, principle does not have in other words
Limit, either mechanical clock, or electronic clock, quartz clock, atomic clock etc., is all feasible.
According to timestamp corresponding with message and default maximum delay, the output time of message is determined;And report
The output time of text includes:Output time is more than or equal to timestamp and default maximum delay sum.Output time
Refer to a time point, message be allowed to more than or equal to timestamp and default maximum time sum this
One time point was output, and was also allowed to be output more than timestamp and the time point of default maximum time sum;
Although output time is a time point, but is not meant to that message is bound to export at this moment, true
On, output time is the earliest time point that message allows to be output, and optimal time point, it is ensured that report
From being sent to, output can pass through one section of regular time to text and this regular time is also short as far as possible, protect
Efficiency is demonstrate,proved.
Default maximum delay has been also discussed above.Because the time that message is transmitted in a data network is not fixed,
Therefore, a fixed default maximum delay is set in the present embodiment to it, during by this default maximum
Prolong so that message is fixed from time of the output between this is sent to, be exactly default maximum delay.Preset most
Long time delay is exactly a kind of time that is default, making message delay fixation duration.As a rule, although data network
Its transmission time of the message transmitted in network is not fixed, but the general maximum for having a transmission time, i.e.,
Maximum delay time;And in normal transmitting procedure, message is passed not over this maximum delay time
The defeated time is smaller than this maximum delay time.The maximum delay time is usually experimental data, i.e.,
Determined by multiple repairing weld, from packet transmission device to message reception device, under normal circumstances, message
That value that time delay maximum is no more than.Default maximum delay in the present embodiment, typically just refers to this
Maximum delay time, this can ensure, the time that message is transmitted in a data network is default most not over this
Long time delay, therefore, just can by message from be sent to output this period be fixed up, reduction do not produce even
Fluctuation, makes the transmission of message more stablize.Certainly, default maximum delay can also according to demand be tuned up and turned down,
As long as it is in rational scope.
In S203, when being less than output time at the time point of outlet clock, message is cached.Need
Bright, the time point of outlet clock, not just message reach the time of message reception device at that moment,
What it referred to is exactly the time suggested on outlet clock;Because the time suggested by outlet clock is to exist always
In passage, therefore, when the time point of outlet clock is less than output time, it should which the progress continued for is compared
It is right.If the time point of outlet clock is less than output time, then when reaching output at the time point of outlet clock
During quarter, it is possible to outgoing message;If the time point of outlet clock is more than output time, it is possible to directly export
Message.In other words, when being less than output time at the time point of outlet clock, output time is exactly the true of message
The real time outwards exported;When being more than output time at the time point of outlet clock, it is possible to which directly output is reported
Text.
When message has just reached message reception device, it is clear that now time point of outlet clock, in other words
The time of outlet clock prompting and the difference of timestamp, are exactly the time that message is transmitted in a data network.Above
It is known that this time is not fixed, it often floats, therefore, and the present embodiment has
The concept of default maximum delay;If just right always if the time point of outlet clock is less than output time always
The message is cached.And during caching, the time point of outlet clock can become closer to output time,
And when being equal to output time at the time point of outlet clock, it is possible to export the message.
Further, since timestamp is the time of inlet clock, therefore, outlet clock should be same with inlet clock
Step;Synchronization is meant that either inlet clock is consistent or inlet clock with the time of outlet clock
Time and outlet clock time between conversion relation be to determine.
The method of synchronization between outlet clock and inlet clock, can have a variety of;In general, clock is same
Step mode is divided into two major classes, first, being to be synchronized between outlet clock and inlet clock, i.e., when to export
On the basis of clock/inlet clock, make inlet clock/outlet clock consistent therewith;So synchronous result is two
The absolute time of clock might not be accurate, but the realization of the present embodiment is not influenceed, as long as both it
Between time synchronized;Second, being that outlet clock and inlet clock are synchronized with reference clock, i.e.,
On the basis of the clock of a third-party standard, make outlet clock and inlet clock same with the reference clock
Step, accordingly, is also just synchronized accordingly between outlet clock and inlet clock.Specifically, synchronous side
Formula can include:GPS, NTP, Chinese Beidou satellite navigation system, atomic clock, IEEE1588 etc. are any
Synchronous mode.
In outgoing message, if timestamp is packaged in message, need to move the timestamp in message
Remove, then message is Resealed and exported again.Reseal including but not limited to:Recalculate message
Lengthy content, the CRC check byte for recalculating message etc..
The message of output can be output to required place, so as to realize required function;In the present embodiment,
It is consistent from output elapsed time is sent to that message, which can be made, in other words, as long as sending message
When, to have the message of sequential set sequencing, that ensure that message output when, its be also according to
What default sequential was exported.For same message reception device, when sending, two are set
Sequential between message, after the transmission by data network, even if the message first sent is received afterwards, also can
But do not meet the requirement of output time because the message sent afterwards is arrived first and be buffered, allow for what is first sent
Message still can guarantee that and first be exported;And the message for having sequential is sent to different messages by packet transmission device
Reception device is also the same, and sequential when equally ensure that sequential when message is sent with reception is consistent, from
And make user's operation easier and reliable.
A kind of message processing method is present embodiments provided, Fig. 3 is refer to, including:
S301, generation message;
When S302, recorded message enter data network, the timestamp of inlet clock;Wherein, inlet clock with
Outlet clock is synchronous;
Timestamp is sent to message by data network together with message and receives dress by S303, packet transmission device
Put;
S304, pass through data network and receive message and timestamp;
S305, the output time for determining according to timestamp and default maximum delay message;
If the time point of S306, outlet clock is less than output time, message is cached, outlet clock
It is synchronous with inlet clock.
In S301, the message of packet transmission device generation, not necessarily packet transmission device is generated in itself,
Can also be sent to packet transmission device after other devices are generated;Packet transmission device is that message passes through number
The starting point sent according to network, message enters data network in packet transmission device this point.
In S302, because packet transmission device sends message by data network, and packet transmission device
The starting point of data network again, send when, record message into data network when, inlet clock when
Between stab, and the timestamp is corresponding with the message.The place for entering data network in message sets an entrance
Clock, the inlet clock is used for the time that real-time recorded message enters data network.
The registration accuracy of inlet clock can be very high, that is, be accurate to the moment that message enters data network, that is, remember
Time under record at that time;Precision is higher, and the fluctuation of passing time is just smaller.For the shape of clock in this implementation
Formula, in other words principle do not limit, either mechanical clock, or electronic clock, quartz clock, atomic clock etc.,
All it is feasible.
Due to needing recorded message dispensing device to send the time of message, and message reception device receives message
Time, then, the time of inlet clock and outlet clock should be synchronous;Synchronization is meant that, or is entered
Mouthful clock be with the time of outlet clock it is consistent, or inlet clock time and outlet clock time it
Between conversion relation be to determine.For example, the areas of time zone Shi Dong eight where Beijing, the time zone where Tokyo is
Eastern 9th area, then, just there is the time difference of a hour between Pekinese's time and the time in Tokyo;Therefore, if
Packet transmission device is in Beijing, and message reception device is in Tokyo, then the timestamp of record just should
A hour is subtracted plus the time of a hour, or outlet clock, can thus make both synchronous.
The method of synchronization of inlet clock and outlet clock, can have a variety of;In general, the synchronization side of clock
Formula is divided into two major classes, first, synchronized between outlet clock and inlet clock, i.e., with outlet clock/enter
On the basis of mouth clock, make inlet clock/outlet clock consistent therewith;So synchronous result is two clocks
Absolute time might not be accurate, but the realization of the present embodiment is not influenceed;Second, be outlet clock and
Inlet clock is synchronized with reference clock, i.e., on the basis of the clock of a third-party standard, use
Mouth clock and inlet clock are synchronous with the reference clock, accordingly, between outlet clock and inlet clock
Just it is synchronized.Specifically, synchronous mode can include:GPS, NTP, Chinese Beidou satellite navigation system,
Any synchronous mode of atomic clock, IEEE1588 etc..
In S303, now packet transmission device has obtained timestamp corresponding with message;During for this
Between stab and can be learnt by message reception device, accordingly, it would be desirable to which the timestamp and message are passed through into data network together
Network is sent.Why to send together, be in order to avoid message and timestamp are connect while reaching message
Receiving apparatus, so as to be made troubles to comparison.But, in a general case, even if when corresponding with message
Between stamp with message be not at the same time arrival message reception device, for the present embodiment realization there will not be it is too big
Influence.
Optionally, have recorded message into data network timestamp after, the timestamp is just inserted into report
Wen Zhong, so ensures that message and corresponding timestamp can be while reach message reception device.Tool
Body, multiple positions that the timestamp may be inserted into message, such as header, header and effectively in
Between appearance, or message afterbody.
Message adds timestamp this data in original content, it is thus typically necessary to message again
Encapsulation;Resealing here, includes but is not limited to:Recalculate message length content, recalculate report
CRC check byte of text etc..After being Resealed again to message, it is possible to smoothly by after encapsulation
Message is sent to is sent to message reception device by data network, and then message is entered by message reception device
Row processing.
In S304, it is the message sent naturally by data network to receive message;What message was sent
What the time was not to determine, the time spent in and time of arrival be not to determine that this is due to data network
Network itself does not have the transmission time of a determination.And timestamp be exactly message enter data network when, entrance
The time of clock.
Optionally, timestamp and message are sent by data network together, i.e., timestamp and message be simultaneously
Reach message output device;Why to send together, be in order to avoid message and timestamp are not simultaneously
Message reception device is reached, so as to be made troubles to comparison.But, in a general case, though with report
The corresponding timestamp of text is not to reach message reception device at the same time with message, for the realization of the present embodiment
Do not have too much influence.
In S305, the corresponding timestamp of message received is removed, maximum delay and outlet clock is also preset
Time point.The time point of outlet clock is it is well understood that be exactly the time suggested by outlet clock.During outlet
Clock is similar with inlet clock, and its precision can be very high, and precision is higher, and the time of message transmission is more accurate,
More message can be made to be exported with expected time delay;To the form of clock in the present embodiment, principle does not have in other words
Limit, either mechanical clock, or electronic clock, quartz clock, atomic clock etc., is all feasible.
According to timestamp corresponding with message and default maximum delay, the output time of message is determined;And report
The output time of text includes:Output time is more than or equal to timestamp and default maximum delay sum.Output time
Refer to a time point, message be allowed to more than or equal to timestamp and default maximum time sum this
One time point was output, and was also allowed to be output more than timestamp and the time point of default maximum time sum;
Although output time is a time point, but is not meant to that message is bound to export at this moment, true
On, output time is the earliest time point that message allows to be output, and optimal time point, it is ensured that report
From being sent to, output can pass through one section of regular time to text and this regular time is also short as far as possible, protect
Efficiency is demonstrate,proved.
Default maximum delay has been also discussed above.Because the time that message is transmitted in a data network is not fixed,
Therefore, a fixed default maximum delay is set in the present embodiment to it, during by this default maximum
Prolong so that message is fixed from time of the output between this is sent to, be exactly default maximum delay.Preset most
Long time delay is exactly a kind of time that is default, making message delay fixation duration.As a rule, although data network
Its transmission time of the message transmitted in network is not fixed, but the general maximum for having a transmission time, i.e.,
Maximum delay time;And in normal transmitting procedure, message is passed not over this maximum delay time
The defeated time is smaller than this maximum delay time.The maximum delay time is usually experimental data, i.e.,
Determined by multiple repairing weld, from packet transmission device to message reception device, under normal circumstances, message
That value that time delay maximum is no more than.Default maximum delay in the present embodiment, typically just refers to this
Maximum delay time, this can ensure, the time that message is transmitted in a data network is default most not over this
Long time delay, therefore, just can by message from be sent to output this period be fixed up, reduction do not produce even
Fluctuation, makes the transmission of message more stablize.Certainly, default maximum delay can also according to demand be tuned up and turned down,
As long as it is in rational scope.
In S306, when being less than output time at the time point of outlet clock, message is cached.Need
Bright, the time point of outlet clock, not just message reach the time of message reception device at that moment,
What it referred to is exactly the time suggested on outlet clock;Because the time suggested by outlet clock is to exist always
In passage, therefore, when the time point of outlet clock is less than output time, it should which the progress continued for is compared
It is right.If the time point of outlet clock is less than output time, then when reaching output at the time point of outlet clock
During quarter, it is possible to outgoing message;If the time point of outlet clock is more than output time, it is possible to directly export
Message.In other words, when being less than output time at the time point of outlet clock, output time is exactly the true of message
The real time outwards exported;When being more than output time at the time point of outlet clock, it is possible to which directly output is reported
Text.
When message has just reached message reception device, it is clear that now time point of outlet clock, in other words
The time of outlet clock prompting and the difference of timestamp, are exactly the time that message is transmitted in a data network.Above
It is known that this time is not fixed, it often floats, therefore, and the present embodiment has
The concept of default maximum delay;If just right always if the time point of outlet clock is less than output time always
The message is cached.And during caching, the time point of outlet clock can become closer to output time,
And when being equal to output time at the time point of outlet clock, it is possible to export the message.
Further, since timestamp is the time of inlet clock, therefore, outlet clock should be same with inlet clock
Step;Synchronization is meant that either inlet clock is consistent or inlet clock with the time of outlet clock
Time and outlet clock time between conversion relation be to determine.
The method of synchronization between outlet clock and inlet clock, can have a variety of;In general, clock is same
Step mode is divided into two major classes, first, being to be synchronized between outlet clock and inlet clock, i.e., when to export
On the basis of clock/inlet clock, make inlet clock/outlet clock consistent therewith;So synchronous result is two
The absolute time of clock might not be accurate, but the realization of the present embodiment is not influenceed, as long as both it
Between time synchronized;Second, being that outlet clock and inlet clock are synchronized with reference clock, i.e.,
On the basis of the clock of a third-party standard, make outlet clock and inlet clock same with the reference clock
Step, accordingly, is also just synchronized accordingly between outlet clock and inlet clock.Specifically, synchronous side
Formula can include:GPS, NTP, Chinese Beidou satellite navigation system, atomic clock, IEEE1588 etc. are any
Synchronous mode.
In outgoing message, if when sending message, timestamp is inserted into the message, and to message
Resealed, then need to remove the timestamp in message, then message is Resealed again defeated
Go out.Reseal including but not limited to:Recalculate message length content, recalculate the CRC schools of message
Test byte etc..
The message of output can be output to required place, so as to realize required function;In the present embodiment,
It is consistent from output elapsed time is sent to that message, which can be made, in other words, as long as sending message
When, to have the message of sequential set sequencing, that ensure that message output when, its be also according to
What default sequential was exported.For same message reception device, when sending, two are set
Sequential between message, after the transmission by data network, even if the message first sent is received afterwards, also can
But do not meet the requirement of output time because the message sent afterwards is arrived first and be buffered, allow for what is first sent
Message still can guarantee that and first be exported;And the message for having sequential is sent to different messages by packet transmission device
Reception device is also the same, and sequential when equally ensure that sequential when message is sent with reception is consistent, from
And make user's operation easier and reliable.
A kind of packet transmission device is present embodiments provided, Fig. 4 is refer to, including:
Message generation module 101, for generating message;
Time logging modle 102, when recorded message enters data network, the timestamp of inlet clock;Wherein,
Inlet clock is synchronous with outlet clock;
Message sending module 103, message reception device is sent to by timestamp together with message by data network.
The message that message generation module 101 is generated, not necessarily packet transmission device is generated in itself,
Can be sent to packet transmission device after other devices are generated;Message sending module 103 is that message passes through
The starting point that data network is sent, message enters data network in packet transmission device this point.
Because message sending module 103 sends message by data network, and message sending module 103
It is the starting point of data network again, when sending, time logging modle 102, which needs to record message, enters data
During network, the timestamp of inlet clock, and the timestamp is corresponding with the message.Enter data network in message
Network place set an inlet clock, the inlet clock be used for real-time recorded message enter data network when
Between.
The registration accuracy of inlet clock can be very high, that is, be accurate to the moment that message enters data network, that is, remember
Time under record at that time;Precision is higher, and the fluctuation of passing time is just smaller.For the shape of clock in this implementation
Formula, in other words principle do not limit, either mechanical clock, or electronic clock, quartz clock, atomic clock etc.,
All it is feasible.
Due to needing recorded message sending module 103 to send the time of message, and message reception device is received
The time of message, then, the time of inlet clock and outlet clock should be synchronous;It is synchronous to be meant that, or
Person's inlet clock be with the time of outlet clock it is consistent, or inlet clock time and outlet clock when
Between between conversion relation be to determine.For example, where the areas of time zone Shi Dong eight where Beijing, Tokyo when
The areas of area Shi Dong nine, then, just there is the time difference of a hour between Pekinese's time and the time in Tokyo;Therefore,
If packet transmission device is in Beijing, and message reception device is in Tokyo, then the timestamp of record just should
A hour should be subtracted plus a hour, or the time of outlet clock, and can thus make both synchronous.
The method of synchronization of inlet clock and outlet clock, can have a variety of;In general, the synchronization side of clock
Formula is divided into two major classes, first, synchronized between outlet clock and inlet clock, i.e., with outlet clock/enter
On the basis of mouth clock, make inlet clock/outlet clock consistent therewith;So synchronous result is two clocks
Absolute time might not be accurate, but the realization of the present embodiment is not influenceed;Second, be outlet clock and
Inlet clock is synchronized with reference clock, i.e., on the basis of the clock of a third-party standard, use
Mouth clock and inlet clock are synchronous with the reference clock, accordingly, between outlet clock and inlet clock
Just it is synchronized.Specifically, synchronous mode can include:GPS, NTP, Chinese Beidou satellite navigation system,
Any synchronous mode of atomic clock, IEEE1588 etc..
Now time logging modle 102 has obtained timestamp corresponding with message;For this timestamp
It can be learnt by message reception device, accordingly, it would be desirable to which the timestamp and message are sent out by data network together
Send.Why to send together, be in order to avoid message and timestamp are not while reaching message receives dress
Put, so as to be made troubles to comparison.But, in a general case, even if timestamp corresponding with message
It is not to reach message reception device at the same time with message, the realization for the present embodiment there will not be too big shadow
Ring.
Optionally, in addition to the first package module 1031, for have recorded message into data network when
Between stab after, just the timestamp is inserted into message, message is so ensured that and the corresponding time
Stamp can reach message reception device simultaneously.Specifically, multiple positions that the timestamp may be inserted into message,
As between header, header and effective content, or message afterbody.
Message adds timestamp this data in original content, it is thus typically necessary to message again
Encapsulation;Resealing here, includes but is not limited to:Recalculate message length content, recalculate report
CRC check byte of text etc..After being Resealed again to message, it is possible to smoothly by after encapsulation
Message is sent to is sent to message reception device by data network, and then message is entered by message reception device
Row processing.
A kind of message reception device is present embodiments provided, Fig. 5 is refer to, including:
Message receiving module 201, enters during for receiving message and message into data network by data network
The timestamp of mouth clock;
Time determining module 202, for according to timestamp and default maximum delay, when determining the output of message
Carve;
Packet buffer module 203, if the time point for outlet clock is less than output time, is carried out to message
Caching, outlet clock and inlet clock are synchronous.
Message receiving module 201 receives the message sent naturally by data network;Message is sent
Time be not to determine, the time spent in and time of arrival be not to determine that this is due to data
Network itself does not have the transmission time of a determination.And timestamp be exactly message enter data network when, enter
The time of mouth clock.
Optionally, timestamp and message are sent by data network together, i.e., timestamp and message be simultaneously
Reach message receiving module 201;Why to send together, be in order to avoid message and timestamp are not same
When reach message receiving module 201, so as to be made troubles to comparison.But, in a general case, even if
Timestamp corresponding with message is not to reach message receiving module 201 at the same time with message, for the present embodiment
Realization there will not be too much influence.
The corresponding timestamp of message received is removed, the time point of maximum delay and outlet clock is also preset.
The time point of outlet clock is it is well understood that be exactly the time suggested by outlet clock.When outlet clock is with entrance
Clock is similar, and its precision can be very high, and precision is higher, and the time of message transmission is more accurate, more can make report
Text is exported with expected time delay;To the form of clock in the present embodiment, principle is not limited in other words, no
Pipe is mechanical clock, or electronic clock, quartz clock, and atomic clock etc., is all feasible.
According to timestamp corresponding with message and default maximum delay, the output time of message is determined;And report
The output time of text includes:Output time is more than or equal to timestamp and default maximum delay sum.Output time
Refer to a time point, message be allowed to more than or equal to timestamp and default maximum time sum this
One time point was output, and was also allowed to be output more than timestamp and the time point of default maximum time sum;
Although output time is a time point, but is not meant to that message is bound to export at this moment, true
On, output time is the earliest time point that message allows to be output, and optimal time point, it is ensured that report
From being sent to, output can pass through one section of regular time to text and this regular time is also short as far as possible, protect
Efficiency is demonstrate,proved.
Default maximum delay has been also discussed above.Because the time that message is transmitted in a data network is not fixed,
Therefore, a fixed default maximum delay is set in the present embodiment to it, during by this default maximum
Prolong so that message is fixed from time of the output between this is sent to, be exactly default maximum delay.Preset most
Long time delay is exactly a kind of time that is default, making message delay fixation duration.As a rule, although data network
Its transmission time of the message transmitted in network is not fixed, but the general maximum for having a transmission time, i.e.,
Maximum delay time;And in normal transmitting procedure, message is passed not over this maximum delay time
The defeated time is smaller than this maximum delay time.The maximum delay time is usually experimental data, i.e.,
Determined by multiple repairing weld, from packet transmission device to message reception device, under normal circumstances, message
That value that time delay maximum is no more than.Default maximum delay in the present embodiment, typically just refers to this
Maximum delay time, this can ensure, the time that message is transmitted in a data network is default most not over this
Long time delay, therefore, just can by message from be sent to output this period be fixed up, reduction do not produce even
Fluctuation, makes the transmission of message more stablize.Certainly, default maximum delay can also according to demand be tuned up and turned down,
As long as it is in rational scope.
Because timestamp is the time of inlet clock, therefore, outlet clock should be synchronous with inlet clock;Together
Step is meant that either inlet clock and the time of outlet clock are consistent or inlet clock time
What the conversion relation between the time of outlet clock was to determine.
The method of synchronization between outlet clock and inlet clock, can have a variety of;In general, clock is same
Step mode is divided into two major classes, first, being to be synchronized between outlet clock and inlet clock, i.e., when to export
On the basis of clock/inlet clock, make inlet clock/outlet clock consistent therewith;So synchronous result is two
The absolute time of clock might not be accurate, but the realization of the present embodiment is not influenceed, as long as both it
Between time synchronized;Second, being that outlet clock and inlet clock are synchronized with reference clock, i.e.,
On the basis of the clock of a third-party standard, make outlet clock and inlet clock same with the reference clock
Step, accordingly, is also just synchronized accordingly between outlet clock and inlet clock.Specifically, synchronous side
Formula can include:GPS, NTP, Chinese Beidou satellite navigation system, atomic clock, IEEE1588 etc. are any
Synchronous mode.
When being less than output time at the time point of outlet clock, packet buffer module 203 is just delayed to message
Deposit.It should be noted that the time point of outlet clock, not just message reach message receiving module 201
Time at that moment, what it referred to is exactly the time suggested on outlet clock;By being carried for outlet clock
The time shown is always in passage, therefore, when the time point of outlet clock is less than output time, it should
What is continued for is compared.Optionally, in addition to message output module 204, for when outlet clock
Between point be less than output time, then when reaching output time at the time point of outlet clock, it is possible to output report
Text;It is more than output time when the time point of outlet clock, it is possible to direct outgoing message.In other words, going out
When the time point of mouth clock is less than output time, output time is exactly the true time outwards exported of message;
When being more than output time at the time point of outlet clock, it is possible to direct outgoing message.
When message has just reached message receiving module 201, it is clear that now time point of outlet clock, or
Person explains the time of clock prompting and the difference of timestamp, is exactly the time that message is transmitted in a data network.
Above it is known that this time is not fixed, it often floats, therefore, the present embodiment
There is the concept of default maximum delay;If the time point of outlet clock always be less than output time if, just by
Packet buffer module 203 is cached to the message always.And during caching, the time point of outlet clock
Output time can be become closer to, and when being equal to output time at the time point of outlet clock, it is possible to by reporting
Literary output module 204 exports the message.
Optionally, message output module 204 also includes the second package module 2041, if being envelope for timestamp
Fill in messages, then need to remove the timestamp in message, then message is Resealed again defeated
Go out.Reseal including but not limited to:Recalculate message length content, recalculate the CRC schools of message
Test byte etc..
The message of output can be output to required place, so as to realize required function;In the present embodiment,
It is consistent from output elapsed time is sent to that message, which can be made, in other words, as long as sending message
When, to have the message of sequential set sequencing, that ensure that message output when, its be also according to
What default sequential was exported.For same message reception device, when sending, two are set
Sequential between message, after the transmission by data network, even if the message first sent is received afterwards, also can
But do not meet the requirement of output time because the message sent afterwards is arrived first and be buffered, allow for what is first sent
Message still can guarantee that and first be exported;And the message for having sequential is sent to different messages by packet transmission device
Reception device is also the same, and sequential when equally ensure that sequential when message is sent with reception is consistent, from
And make user's operation easier and reliable.
A kind of message handling system is present embodiments provided, including above-mentioned packet transmission device and message are received
Device, is specifically included:
Message generation module 101, for generating message;
Time logging modle 102, when recorded message enters data network, the timestamp of inlet clock;Wherein,
Inlet clock is synchronous with outlet clock;
Message sending module 103, message reception device is sent to by timestamp together with message by data network;
Message receiving module 201, for receiving message and timestamp by data network;
Time determining module 202, for according to timestamp and default maximum delay, when determining the output of message
Carve;
Packet buffer module 203, if the time point for outlet clock is less than output time, is carried out to message
Caching.
The message that message generation module 101 is generated, not necessarily packet transmission device is generated in itself,
Can be sent to packet transmission device after other devices are generated;Message sending module 103 is that message passes through
The starting point that data network is sent, message enters data network in packet transmission device this point.
Because message sending module 103 sends message by data network, and message sending module 103
It is the starting point of data network again, when sending, time logging modle 102, which needs to record message, enters data
During network, the timestamp of inlet clock, and the timestamp is corresponding with the message.Enter data network in message
Network place set an inlet clock, the inlet clock be used for real-time recorded message enter data network when
Between.
The registration accuracy of inlet clock can be very high, that is, be accurate to the moment that message enters data network, that is, remember
Time under record at that time;Precision is higher, and the fluctuation of passing time is just smaller.For the shape of clock in this implementation
Formula, in other words principle do not limit, either mechanical clock, or electronic clock, quartz clock, atomic clock etc.,
All it is feasible.
Due to needing recorded message sending module 103 to send the time of message, and message reception device is received
The time of message, then, the time of inlet clock and outlet clock should be synchronous;It is synchronous to be meant that, or
Person's inlet clock be with the time of outlet clock it is consistent, or inlet clock time and outlet clock when
Between between conversion relation be to determine.For example, where the areas of time zone Shi Dong eight where Beijing, Tokyo when
The areas of area Shi Dong nine, then, just there is the time difference of a hour between Pekinese's time and the time in Tokyo;Therefore,
If packet transmission device is in Beijing, and message reception device is in Tokyo, then the timestamp of record just should
A hour should be subtracted plus a hour, or the time of outlet clock, and can thus make both synchronous.
The method of synchronization of inlet clock and outlet clock, can have a variety of;In general, the synchronization side of clock
Formula is divided into two major classes, first, synchronized between outlet clock and inlet clock, i.e., with outlet clock/enter
On the basis of mouth clock, make inlet clock/outlet clock consistent therewith;So synchronous result is two clocks
Absolute time might not be accurate, but the realization of the present embodiment is not influenceed;Second, be outlet clock and
Inlet clock is synchronized with reference clock, i.e., on the basis of the clock of a third-party standard, use
Mouth clock and inlet clock are synchronous with the reference clock, accordingly, between outlet clock and inlet clock
Just it is synchronized.Specifically, synchronous mode can include:GPS, NTP, Chinese Beidou satellite navigation system,
Any synchronous mode of atomic clock, IEEE1588 etc..
Now time logging modle 102 has obtained timestamp corresponding with message;For this timestamp
It can be learnt by message reception device, accordingly, it would be desirable to which the timestamp and message are sent out by data network together
Send.Why to send together, be in order to avoid message and timestamp are not while reaching message receives dress
Put, so as to be made troubles to comparison.But, in a general case, even if timestamp corresponding with message
It is not to reach message reception device at the same time with message, the realization for the present embodiment there will not be too big shadow
Ring.
Optionally, in addition to the first package module 1031, for have recorded message into data network when
Between stab after, just the timestamp is inserted into message, message is so ensured that and the corresponding time
Stamp can reach message reception device simultaneously.Specifically, multiple positions that the timestamp may be inserted into message,
As between header, header and effective content, or message afterbody.
Message adds timestamp this data in original content, it is thus typically necessary to message again
Encapsulation;Resealing here, includes but is not limited to:Recalculate message length content, recalculate report
CRC check byte of text etc..After being Resealed again to message, it is possible to smoothly by after encapsulation
Message is sent to is sent to message reception device by data network, and then message is entered by message reception device
Row processing.
Message receiving module 201 receives the message sent naturally by data network;Message is sent
Time be not to determine, the time spent in and time of arrival be not to determine that this is due to data
Network itself does not have the transmission time of a determination.And timestamp be exactly message enter data network when, enter
The time of mouth clock.
Optionally, timestamp and message are sent by data network together, i.e., timestamp and message be simultaneously
Reach message receiving module 201;Why to send together, be in order to avoid message and timestamp are not same
When reach message receiving module 201, so as to be made troubles to comparison.But, in a general case, even if
Timestamp corresponding with message is not to reach message receiving module 201 at the same time with message, for the present embodiment
Realization there will not be too much influence.
The corresponding timestamp of message received is removed, the time point of maximum delay and outlet clock is also preset.
The time point of outlet clock is it is well understood that be exactly the time suggested by outlet clock.When outlet clock is with entrance
Clock is similar, and its precision can be very high, and precision is higher, and the time of message transmission is more accurate, more can make report
Text is exported with expected time delay;To the form of clock in the present embodiment, principle is not limited in other words, no
Pipe is mechanical clock, or electronic clock, quartz clock, and atomic clock etc., is all feasible.
According to timestamp corresponding with message and default maximum delay, the output time of message is determined;And report
The output time of text includes:Output time is more than or equal to timestamp and default maximum delay sum.Output time
Refer to a time point, message be allowed to more than or equal to timestamp and default maximum time sum this
One time point was output, and was also allowed to be output more than timestamp and the time point of default maximum time sum;
Although output time is a time point, but is not meant to that message is bound to export at this moment, true
On, output time is the earliest time point that message allows to be output, and optimal time point, it is ensured that report
From being sent to, output can pass through one section of regular time to text and this regular time is also short as far as possible, protect
Efficiency is demonstrate,proved.
Default maximum delay has been also discussed above.Because the time that message is transmitted in a data network is not fixed,
Therefore, a fixed default maximum delay is set in the present embodiment to it, during by this default maximum
Prolong so that message is fixed from time of the output between this is sent to, be exactly default maximum delay.Preset most
Long time delay is exactly a kind of time that is default, making message delay fixation duration.As a rule, although data network
Its transmission time of the message transmitted in network is not fixed, but the general maximum for having a transmission time, i.e.,
Maximum delay time;And in normal transmitting procedure, message is passed not over this maximum delay time
The defeated time is smaller than this maximum delay time.The maximum delay time is usually experimental data, i.e.,
Determined by multiple repairing weld, from packet transmission device to message receiving module 201, under normal circumstances, message
That value for being no more than of time delay maximum.Default maximum delay in the present embodiment, typically just refers to this
Individual maximum delay time, this can ensure, the time that message is transmitted in a data network is default not over this
Maximum delay, therefore, just can by message from be sent to output this period be fixed up, reduction do not produce even
Raw fluctuation, makes the transmission of message more stablize.Certainly, default maximum delay can also be tuned up according to demand
It is small, as long as it is in rational scope.
When being less than output time at the time point of outlet clock, packet buffer module 203 is just delayed to message
Deposit.It should be noted that the time point of outlet clock, not just message reach message receiving module 201
Time at that moment, what it referred to is exactly the time suggested on outlet clock;By being carried for outlet clock
The time shown is always in passage, therefore, when the time point of outlet clock is less than output time, it should
What is continued for is compared.Optionally, in addition to message output module 204, for when outlet clock
Between point be less than output time, then when reaching output time at the time point of outlet clock, it is possible to output report
Text;It is more than output time when the time point of outlet clock, it is possible to direct outgoing message.In other words, going out
When the time point of mouth clock is less than output time, output time is exactly the true time outwards exported of message;
When being more than output time at the time point of outlet clock, it is possible to direct outgoing message.
When message has just reached message receiving module 201, it is clear that now time point of outlet clock, or
Person explains the time of clock prompting and the difference of timestamp, is exactly the time that message is transmitted in a data network.
Above it is known that this time is not fixed, it often floats, therefore, the present embodiment
There is the concept of default maximum delay;If the time point of outlet clock always be less than output time if, just by
Packet buffer module 203 is cached to the message always.And during caching, the time point of outlet clock
Output time can be become closer to, and when being equal to output time at the time point of outlet clock, it is possible to by reporting
Literary output module 204 exports the message.
Optionally, message output module 204 includes the second package module 2041, if being encapsulation for timestamp
In messages, then need to remove the timestamp in message, then message is Resealed and exported again.
Reseal including but not limited to:Recalculate message length content, recalculate the CRC check word of message
Section etc..
The message of output can be output to required place, so as to realize required function;In the present embodiment,
It is consistent from output elapsed time is sent to that message, which can be made, in other words, as long as sending message
When, to have the message of sequential set sequencing, that ensure that message output when, its be also according to
What default sequential was exported.For same message reception device, when sending, two are set
Sequential between message, after the transmission by data network, even if the message first sent is received afterwards, also can
But do not meet the requirement of output time because the message sent afterwards is arrived first and be buffered, allow for what is first sent
Message still can guarantee that and first be exported;And the message for having sequential is sent to different messages by packet transmission device
Reception device is also the same, and sequential when equally ensure that sequential when message is sent with reception is consistent, from
And make user's operation easier and reliable.
A kind of message processing method is present embodiments provided, Fig. 6 is refer to, including:
S401, generation message;
The message of message generation module generation, not necessarily packet transmission device is generated in itself, can also
It is to be sent to packet transmission device after other devices are generated;Message sending module is that message passes through data network
The starting point of transmission, message enters data network in packet transmission device this point.
When S402, recorded message enter data network, the timestamp of inlet clock, and timestamp is inserted into report
Wen Zhong;Wherein, inlet clock is synchronous with outlet clock;
The method of synchronization of inlet clock and outlet clock, can have a variety of;In general, the synchronization side of clock
Formula is divided into two major classes, first, synchronized between outlet clock and inlet clock, i.e., with outlet clock/enter
On the basis of mouth clock, make inlet clock/outlet clock consistent therewith;So synchronous result is two clocks
Absolute time might not be accurate, but the realization of the present embodiment is not influenceed;Second, be outlet clock and
Inlet clock is synchronized with reference clock, i.e., on the basis of the clock of a third-party standard, use
Mouth clock and inlet clock are synchronous with the reference clock, accordingly, between outlet clock and inlet clock
Just it is synchronized.Specifically, synchronous mode can include:GPS, NTP, Chinese Beidou satellite navigation system,
Any synchronous mode of atomic clock, IEEE1588 etc..
Have recorded message into data network timestamp after, just the timestamp is inserted into message, this
Sample ensures that message and corresponding timestamp can be while reach message reception device.
S403, the message to insertion timestamp are packaged processing;
Message adds timestamp this data in original content, it is thus typically necessary to message again
Encapsulation;Resealing here, includes but is not limited to:Recalculate message length content, recalculate report
CRC check byte of text etc..After being Resealed again to message, it is possible to smoothly by after encapsulation
Message is sent to is sent to message reception device by data network, and then message is entered by message reception device
Row processing.
S404, message are transmitted by data network;
S405, the message for obtaining the carrying timestamp sent by data network, and according to outlet clock
Time point and default maximum delay determine output time;
It is the message sent naturally by data network to receive message;The time that message is sent is not
Be to determine, the time spent in and time of arrival be not to determine, this be due to data network itself simultaneously
The transmission time that neither one is determined.
S406, message is cached;
S407, judge whether the time point of outlet clock meets output time;As met, then S408 is gone to;
Such as it is unsatisfactory for, then goes to S406;
The time point of outlet clock is less than output time, in other words, time point of outlet clock and timestamp it
Difference, less than default maximum delay, then, the time point for being considered as outlet clock is unsatisfactory for output time;No
If satisfaction, just message is cached.
S408, removes the timestamp in message, and encapsulation is re-started to message;
In outgoing message, if timestamp is packaged in message, need to move the timestamp in message
Remove, then message is Resealed.Reseal including but not limited to:Recalculate in message length
CRC check byte hold, recalculated message etc..
S409, message is outwardly exported.
Above content is to combine specific embodiment further description made for the present invention, it is impossible to recognized
The specific implementation of the fixed present invention is confined to these explanations.For the ordinary skill of the technical field of the invention
For personnel, without departing from the inventive concept of the premise, some simple deduction or replace can also be made,
Protection scope of the present invention should be all considered as belonging to.
Claims (14)
1. a kind of file transmitting method, it is characterised in that including:
Generate message;
When recording the message into data network, the timestamp of inlet clock;Wherein, the inlet clock
It is synchronous with outlet clock;
The timestamp is sent together with the message by the data network.
2. file transmitting method as claimed in claim 1, it is characterised in that described by timestamp and report
Text is sent by the data network together to be included:The timestamp is inserted into message;To the message
Encapsulation is re-started, and is sent by the data network.
3. a kind of message method of reseptance, it is characterised in that including:
Message and the message are received into the time of inlet clock during the data network by data network
Stamp;
According to the timestamp and default maximum delay, the output time of the message is determined;
When being less than the output time at the time point of outlet clock, then the message is cached, it is described
Outlet clock is synchronous with inlet clock.
4. message method of reseptance as claimed in claim 3, it is characterised in that described according to the time
Stamp and default maximum delay, determining the output time of the message includes:The output time is more than or equal to
The timestamp and the default maximum delay sum.
5. the message output intent as described in claim 3 or 4, it is characterised in that when the outlet
When the time point of clock is more than or equal to the output time, then the message is exported.
6. message method of reseptance as claimed in claim 5, it is characterised in that when the timestamp is sealed
When loading the message, the output message includes:The timestamp is removed from the message;
The message is re-started and encapsulates and exports.
7. a kind of message processing method, it is characterised in that including:
The message and timestamp are sent using the file transmitting method described in claim 1 or 2;
The message and timestamp are received, and using the message recipient as described in claim any one of 3-6
Method is handled.
8. a kind of packet transmission device, it is characterised in that including:
Message generation module, for generating message;
Time logging modle, during for recording the message into data network, the timestamp of inlet clock;
Wherein, the inlet clock is synchronous with outlet clock;
Message sending module, for the timestamp to be sent together with the message by the data network.
9. packet transmission device as claimed in claim 13, it is characterised in that the message sends mould
Block includes the first package module, for the timestamp to be inserted into message, and the message is entered again
Row encapsulation.
10. a kind of message reception device, it is characterised in that including:
Message receiving module, for receiving message by data network and entering the data with the message
The timestamp of inlet clock during network;
Time determining module, for according to the timestamp and default maximum delay, determining the message
Output time;
Packet buffer module, for when being less than the output time at the time point of outlet clock, then to described
Message is cached, and the outlet clock is synchronous with inlet clock.
11. message reception device as claimed in claim 10, it is characterised in that it is described according to it is described when
Between stamp and default maximum delay, determining the output time of the message includes:The output time be more than etc.
In the timestamp and the default maximum delay sum.
12. the message reception device as described in claim 10 or 11, it is characterised in that also including message
Output module, for when being more than or equal to the output time at the time point of the outlet clock, then exporting institute
State message.
13. message reception device as claimed in claim 12, it is characterised in that when the timestamp quilt
When being encapsulated into the message, the message output module includes the second package module, for by the timestamp
Removed from the message, and encapsulation is re-started to the message and is exported.
14. a kind of message handling system, it is characterised in that including message as claimed in claim 8 or 9
Dispensing device and the message reception device as described in claim any one of 10-13.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610207570.7A CN107294870A (en) | 2016-04-05 | 2016-04-05 | Message sending, receiving method and device and message processing method and system |
PCT/CN2017/076784 WO2017173915A1 (en) | 2016-04-05 | 2017-03-15 | Message processing method, device, and system, and computer storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610207570.7A CN107294870A (en) | 2016-04-05 | 2016-04-05 | Message sending, receiving method and device and message processing method and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107294870A true CN107294870A (en) | 2017-10-24 |
Family
ID=60000881
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610207570.7A Withdrawn CN107294870A (en) | 2016-04-05 | 2016-04-05 | Message sending, receiving method and device and message processing method and system |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN107294870A (en) |
WO (1) | WO2017173915A1 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2022247307A1 (en) * | 2021-05-28 | 2022-12-01 | 华为技术有限公司 | Message transmission method and apparatus |
WO2024067483A1 (en) * | 2022-09-28 | 2024-04-04 | 中兴通讯股份有限公司 | Time reference position transmission method, packet position determination method, and communication device |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112994824B (en) * | 2021-03-03 | 2023-03-21 | 山东山大电力技术股份有限公司 | Time synchronization method, device and system for IRIG-B code non-delay transmission |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050232309A1 (en) * | 2004-04-17 | 2005-10-20 | Innomedia Pte Ltd. | In band signal detection and presentation for IP phone |
CN101883392A (en) * | 2009-05-05 | 2010-11-10 | 中兴通讯股份有限公司 | Method and system for ensuring mobile network downward message QoS |
CN102244603A (en) * | 2010-05-11 | 2011-11-16 | 华为技术有限公司 | Method, equipment and system for transmitting message bearing time |
EP2882120A1 (en) * | 2013-12-06 | 2015-06-10 | ADVA AG Optical Networking | A method and apparatus for mitigation of packet delay variation |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102123073B (en) * | 2010-01-07 | 2014-10-08 | 华为技术有限公司 | Packet reordering method and device |
US9860605B2 (en) * | 2013-06-14 | 2018-01-02 | Google Llc | Method and apparatus for controlling source transmission rate for video streaming based on queuing delay |
CN104168212B (en) * | 2014-08-08 | 2017-10-17 | 北京华为数字技术有限公司 | The method and apparatus for sending message |
CN104202131A (en) * | 2014-08-21 | 2014-12-10 | 云南电力试验研究院(集团)有限公司电力研究院 | Method for improving transmission real-time of sample data in electric power distribution network system |
-
2016
- 2016-04-05 CN CN201610207570.7A patent/CN107294870A/en not_active Withdrawn
-
2017
- 2017-03-15 WO PCT/CN2017/076784 patent/WO2017173915A1/en active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050232309A1 (en) * | 2004-04-17 | 2005-10-20 | Innomedia Pte Ltd. | In band signal detection and presentation for IP phone |
CN101883392A (en) * | 2009-05-05 | 2010-11-10 | 中兴通讯股份有限公司 | Method and system for ensuring mobile network downward message QoS |
CN102244603A (en) * | 2010-05-11 | 2011-11-16 | 华为技术有限公司 | Method, equipment and system for transmitting message bearing time |
EP2882120A1 (en) * | 2013-12-06 | 2015-06-10 | ADVA AG Optical Networking | A method and apparatus for mitigation of packet delay variation |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2022247307A1 (en) * | 2021-05-28 | 2022-12-01 | 华为技术有限公司 | Message transmission method and apparatus |
WO2024067483A1 (en) * | 2022-09-28 | 2024-04-04 | 中兴通讯股份有限公司 | Time reference position transmission method, packet position determination method, and communication device |
Also Published As
Publication number | Publication date |
---|---|
WO2017173915A1 (en) | 2017-10-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9363200B2 (en) | Transmission of data over a low-bandwidth communication channel | |
RU2487382C1 (en) | Protected clock synchronisation | |
CN101494613B (en) | Method for clock message tunnel transmission, network node and communication system | |
CN104737490B (en) | Communicator, communication system and method for synchronizing time | |
CN101080889B (en) | Synchronization module of IEEE 1588 standard | |
EP2530860B1 (en) | A method and apparatus for transporting time related information in a packet switched network | |
JP6125714B2 (en) | Communication system and method for distributed power system measurement | |
CN105991384A (en) | Communication method for aerospace Ethernet compatible with time-triggered Ethernet and 1553B | |
US6876670B1 (en) | Method and apparatus for transfer of real time signals over packet networks | |
CN102291272A (en) | Method of remote active testing of a device or network | |
CN107294870A (en) | Message sending, receiving method and device and message processing method and system | |
CN106773928A (en) | A kind of gigabit TTE end system controllers based on FPGA | |
WO2017101484A1 (en) | Time synchronization method and device | |
CN108155982A (en) | A kind of timestamp processing method and equipment | |
CN110278065A (en) | A kind of method and apparatus of delay compensation | |
US20020021717A1 (en) | Method and system for transmit time stamp insertion in a hardware time stamp system for packetized data networks | |
TWI756666B (en) | Method implemented by computer means of a communicating entity in a packet-switched network, and computer program and computer-readable non-transient recording medium thereof, and communicating entity of a packet-switched network | |
CN107528655A (en) | Method for synchronizing time and clock synchronization system | |
CN205610654U (en) | Clock device based on SDH network E1 passageway fault monitoring | |
CN106330420A (en) | Time synchronization method, server and system | |
CN104994034B (en) | A kind of receiving/transmission method of the point-to-point SV messages of combining unit | |
CN102394740B (en) | Time synchronization method and device | |
CN103441949B (en) | Ethernet data transmission method and system based on E1 link | |
CN108667852B (en) | Method for framing and sending SV message by FPGA | |
CN104092509A (en) | Time data processing method, device and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20171024 |
|
WW01 | Invention patent application withdrawn after publication |