CN106549904A - The method and device of packet parsing - Google Patents
The method and device of packet parsing Download PDFInfo
- Publication number
- CN106549904A CN106549904A CN201510591409.XA CN201510591409A CN106549904A CN 106549904 A CN106549904 A CN 106549904A CN 201510591409 A CN201510591409 A CN 201510591409A CN 106549904 A CN106549904 A CN 106549904A
- Authority
- CN
- China
- Prior art keywords
- message
- parsing
- analysis mode
- packet parsing
- parsed
- 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.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/40—Network security protocols
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/22—Parsing or analysis of headers
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Synchronisation In Digital Transmission Systems (AREA)
Abstract
The invention discloses a kind of method of packet parsing, the method includes:When packet parsing system receives the message of time synchronism equipment transmission, the message is parsed according to the corresponding analysis mode in current message type mark position;During the packet parsing, detect whether the packet parsing is overtime;When packet parsing time-out, it is default value to change current message type mark position;The message is parsed according to the type of message marker bit of the default value, obtain the analysis mode of the message.The invention also discloses a kind of packet parsing device.Present invention is primarily aimed at provide a kind of method of packet parsing, can automatic detection, process in time, improve efficiency, and ensure successfully, so as to avoid the problem gone offline between caused base station due to packet parsing time-out.
Description
Technical field
The present invention relates to computer communication field, more particularly to the method and device of packet parsing.
Background technology
IPization is the development trend of future network and business, and Ethernet is with its superior cost performance and widely
Using and product support become the main development direction of the bearer network/access network based on IP.Network to
Full IP draws migration, but wherein many applications need strict time synchronized.Two or two are generally referred to synchronously
Between individual above signal, certain particular kind of relationship is kept in frequency or phase place, i.e. two or more letters
Number in corresponding significant instant, its phase contrast or difference on the frequency are maintained within the allowed band of agreement.
In actual applications, in order to be able to correctly be parsed to message, need in advance according to corresponding message
Form does corresponding configuration, after TOD (Time of Day, Time of Day) message is received, could be according to
The correct corresponding analysis mode of message format is parsed to which, but is changed or time source artificial
When changing causes message format to change, needing personnel to participate in modification configuration could be to the report after change
Literary form is correctly parsed.
The content of the invention
Present invention is primarily targeted at providing a kind of method of packet parsing, it is intended to solve to work as what is received
When message format changes, need personnel to participate in, otherwise lead to not carry out message correct parsing
Problem.
For achieving the above object, the present invention provides a kind of message parsing method, the message parsing method bag
Include following steps:
It is during the message that synchronizer sends between when received, corresponding according to current message type mark position
Analysis mode is parsed to the message;
During the packet parsing, detect whether the packet parsing is overtime;
When packet parsing time-out, it is default value to change current message type mark position;
The message is parsed according to the type of message marker bit of the default value, obtain the message
Analysis mode.
Preferably, it is described when received between synchronizer send message when, according to current message type
Before the corresponding analysis mode of marker bit is parsed to the message, also include:
Whether message is received in the packet parsing system detectio scheduled time, if so, then execution step:According to
The corresponding analysis mode in current message type mark position is parsed to the message.
Preferably, whether the step of time-out includes for the detection messages parsing:
One degradation value of the packet parsing systemic presupposition, and message is entered according to type of message marker bit
Row parsing, in successfully resolved, resets default degradation value;In parsing failure, degradation value is subtracted 1, after
It is continuous message to be parsed according to type of message marker bit, when default degradation value is 0, judge the report
Text parsing time-out.
Preferably, the type of message marker bit according to the default value is parsed to the message,
The step of analysis mode for obtaining the message, includes:
The message is parsed successively according to the analysis mode of system intialization, until successfully resolved, solution
The analysis mode of current message is obtained after analysis success.
Preferably, the type of message marker bit according to the default value is parsed to the message,
After the step of obtaining the analysis mode of the message, also include:
It is non-default value to change type of message marker bit, and is continued according to the current analysis mode of the message
The message of parsing receipt of subsequent.
Additionally, for achieving the above object, the present invention also provides a kind of packet parsing device, and the device includes:
Packet parsing module, during the message sent for synchronizer between when received, according to current report
The corresponding analysis mode in literary type mark position is parsed to the message;
Overtime detection module, for, during packet parsing, whether detection messages parsing is overtime;
Marker bit control module, for when packet parsing is overtime, changing type of message marker bit for acquiescence
Value;
Analysis mode acquisition module, for according to the type of message marker bit of the default value to the message
Parsed, obtained the analysis mode of the message.
Preferably, described device also includes:
Timing detection module, whether receive message for detecting, if so, then by the report in the scheduled time
Literary parsing module is parsed to the message according to the corresponding analysis mode in current message type mark position.
Preferably, the overtime detection module includes:
Setting unit, for presetting a degradation value;
Judging unit, for when default degradation value is 0, judging the packet parsing time-out;
Control unit, in successfully resolved, resetting default degradation value;In parsing failure, will be bad
Change value subtracts 1, and continuation is parsed to message according to type of message marker bit.
Preferably, the analysis mode acquisition module includes:
Resolution unit, for being parsed according to the analysis mode of system intialization successively to the message, directly
To successfully resolved;
Acquiring unit, for the analysis mode for obtaining current message after resolution unit successfully resolved.
Preferably, the packet parsing module, is additionally operable to:
After the analysis mode acquisition module gets the analysis mode of the message, change type of message
Marker bit is non-default value, and continues the report of parsing receipt of subsequent according to the current analysis mode of the message
Text.
A kind of message parsing method and device that the embodiment of the present invention is proposed, by synchronous between when received
During the message that equipment sends, the message is entered according to the corresponding analysis mode in current message type mark position
Row parsing;During the packet parsing, detect whether the packet parsing is overtime;When the message
During parsing time-out, it is default value to change current message type mark position;According to the message class of the default value
Phenotypic marker position is parsed to the message, obtains the analysis mode of the message so that message format is sent out
During raw change, analysis mode can be switched automatically according to current message form, it is not necessary to the participation of personnel,
And avoid because message format changes and cause asking for message interior packet parsing failure for a period of time
Topic.
Description of the drawings
Fig. 1 is the schematic flow sheet of message parsing method first embodiment of the present invention;
Fig. 2 is the schematic flow sheet of message parsing method second embodiment of the present invention;
Fig. 3 is the schematic flow sheet of message parsing method 3rd embodiment of the present invention;
Fig. 4 is the schematic flow sheet of message parsing method fourth embodiment of the present invention;
Fig. 5 is the schematic flow sheet of 5th embodiment of message parsing method of the present invention;
Fig. 6 is the high-level schematic functional block diagram of packet parsing device first embodiment of the present invention;
Fig. 7 is the high-level schematic functional block diagram of packet parsing device second embodiment of the present invention;
Fig. 8 is the high-level schematic functional block diagram of packet parsing device 3rd embodiment of the present invention;
Fig. 9 is the high-level schematic functional block diagram of packet parsing device fourth embodiment of the present invention.
The realization of the object of the invention, functional characteristics and advantage will be done further in conjunction with the embodiments referring to the drawings
Explanation.
Specific embodiment
It should be appreciated that specific embodiment described herein is not used to limit only to explain the present invention
The fixed present invention.
The primary solutions of the embodiment of the present invention are:During the message that synchronizer sends between when received,
The message is parsed according to the corresponding analysis mode in current message type mark position;In the message
In resolving, detect whether the packet parsing is overtime;When packet parsing time-out, change and work as
Front type of message marker bit is default value;According to the type of message marker bit of the default value to the message
Parsed, obtained the analysis mode of the message.
As prior art is present when message format changes, personnel are needed to participate in otherwise causing nothing
Method carries out the problem of correct parsing to message.
The present invention provides a solution, when making message format change, can be automatically according to current
Message format switches analysis mode, it is not necessary to the participation of personnel, and avoids because message format occurs
Change and cause the problem of message interior packet parsing failure for a period of time.
With reference to Fig. 1, it is message parsing method first embodiment of the present invention, the message parsing method includes:
Step S101, when received between synchronizer send message when, according to current message type mark
The corresponding analysis mode in note position is parsed to the message;
This embodiment scheme is mainly used in TOD message formats, is also not necessarily limited to certainly other reports for needing parsing
Literary form, the present embodiment are illustrated with TOD message formats.
First, packet parsing system is opened, and packet parsing system is communicated with time synchronism equipment, starts to connect
Receive the message from time synchronism equipment.
When the message that the time synchronism equipment sends is received, deposit in reading current message type mark position
The analysis mode of storage, parses to the message according to the analysis mode, the type of message labelling
Position correspondence at least one packet parsing mode.
By taking TOD messages as an example, comprise the following steps that:
First, packet parsing system is opened, to the communication before packet parsing system and time synchronism equipment
Interface is monitored, when the interface is to data, the packet parsing system start receive from
The message of time synchronism equipment;
Then, when received between synchronizer send message when, according to current message type mark position
Corresponding analysis mode is parsed to the message.
Wherein, for TOD messages, 1PPS (1Pulse Per Second, pulse per second (PPS))+TOD messages
Form is the more commonly used, and 1PPS+TOD is the time synchronized interface of short-distance transmission, carries gps time,
Leapsecond (leap second) information and UTC (Universal Time Coordinated, Coordinated Universal Time(UTC))
There are multiple format time, 1PPS+TOD interfaces:GPS general NMEA (National Marine
Electronics Association, National Marine Electronics association) form, DCLS (Data Collection
And Location System, data collection and position system) form, China Mobile's precise synchronization
1PPS+TOD forms and Chinese Beidou satellite navigation system form etc..Generally, a kind of packet parsing mode
A kind of message format of correspondence, i.e., a kind of analysis mode parse a kind of message of message format, if message format
It is not corresponding with analysis mode, then cause packet parsing to fail.
When synchronizer sends message, the possible message for sending different-format, and the message of different-format
Different analysis modes are needed to be parsed, therefore, after message format switches, if the message after switching
Form cannot be matched with current analysis mode, then cause parsing failure.
Step S102, during the packet parsing, detects whether the packet parsing is overtime;
During the packet parsing, the message according to the state-detection during the packet parsing
Whether parsing is overtime, and the packet parsing time-out is not received by message or continuous because of long-time
Repeatedly message is parsed all unsuccessfully causes, for long-time is not received by message and caused message
Parsing time-out, is judged using pre-set threshold value, if the time for being not received by message exceedes pre-set threshold value
Then it is judged as packet parsing time-out;All failed and caused message for continuous several times parse to message
Parsing time-out, it is possible to use the number of times of degradation value record parsing failure, due to being that continuous several times are entered to message
Row parsing all fails, so, when packet parsing success, the degradation value will be recovered, when degradation value is 0
Shi Ze is judged as packet parsing time-out.
Step S103, when packet parsing time-out, it is default value to change current message type mark position;
As message format changes, be non-default value type of message marker bit corresponding to message solution
Analysis mode can not be parsed to new message format, so the packet parsing will occur time-out;When
When the packet parsing occurs time-out, the current type of message marker bit for non-default value is modified,
Default value is revised as, wherein, it is the various analysis modes of type of message marker bit correspondence of default value,
The analysis mode of including but not limited to GPS general NMEA forms, the analysis mode of DCLS forms,
The analysis mode of China Mobile's precise synchronization 1PPS+TOD forms and Chinese Beidou satellite navigation system
The analysis mode of system form, it is general, a kind of parsing is only corresponded to when type of message marker bit is non-default value
Mode, a kind of analysis mode of type of message marker bit correspondence are conducive to packet parsing system receiving message
When the message format that can parse to being not belonging to the analysis mode corresponding to type of message marker bit do not solve
Analysis, improves the execution efficiency of packet parsing system.
Step S104, parses to the message according to the type of message marker bit of the default value, obtains
Take the analysis mode of the message.
Current message type mark position is read, current message type mark position is default value, according to default value
Corresponding packet parsing mode determines the analysis mode of the message, specifically, due to for default value
The various analysis modes of type of message marker bit correspondence, so packet parsing system will be according to corresponding various
Analysis mode is parsed to message successively, until successfully resolved, if successfully resolved, then it represents that current to solve
Analysis mode and current message format match, obtain analysis mode during successfully resolved, wherein, due to described
When type of message marker bit is default value, various analysis modes can be corresponded to and including all possible message solution
Analysis mode, so packet parsing can success.When being embodied as, with time synchronized 1PPS+TOD message it is
Example, one kind is possible to be comprised the following steps that:
During the TOD messages that the 1st, packet parsing system time of receipt (T of R) synchronizer sends, according to todFlag (reports
Literary type mark position) corresponding to analysis mode the TOD messages are parsed;
2nd, it is 30 that packet parsing system arranges todFlagTimeOut (degradation value), when described to TOD
During packet parsing process time-out, todFlagTimeOut is subtracted 1;
3rd, whether the value of todFlagTimeOut is judged equal to 0, if todFlag is set to acquiescence then
Value, the corresponding various analysis modes of the default value;
4th, the message is parsed successively according to the analysis mode corresponding to todFlag, until parsing
Success, obtains the analysis mode of current message after successfully resolved;
5th, change analysis modes of the todFlag for current message, and according to the corresponding analysis modes of todFlag
Continue the message of parsing receipt of subsequent, the todFlag can be additionally used in not belonging to other when message is received
The judgement not parsed by the message format that can be parsed in the analysis mode corresponding to todFlag.
In the present embodiment, when received between synchronizer send message when, according to current message class
The corresponding analysis mode in phenotypic marker position is parsed to the message;During the packet parsing, inspection
The packet parsing is surveyed whether overtime;When packet parsing time-out, change current message type mark
Position is default value;The message is parsed according to the type of message marker bit of the default value, obtained
The analysis mode of the message.The present embodiment is realized after message format changes, after change
During message format parsing failure, it is not necessary to which personnel participate in, and parse automatically according to the switching of current message form
The method of mode, so as to avoid causing message interior message solution for a period of time because message format changes
The problem of analysis failure.
Further, with reference to Fig. 2, it is message parsing method second embodiment of the present invention, based on above-mentioned Fig. 1
Shown embodiment, also includes before step S101:
Message whether is received in step S201, the packet parsing system detectio scheduled time, is if so, then performed
Step:The message is parsed according to the corresponding analysis mode in current message type mark position.
Packet parsing system to message receive arrange the scheduled time limit, receive in the given time from
During the message that time synchronism equipment sends, the analysis mode stored in reading current message type mark position,
The message is parsed according to the analysis mode.
In the present embodiment by such scheme, message is received in the advantage based on a upper embodiment and be provided with
Time restriction, due to message format change without receiving message when, the packet parsing system is still
Analysis mode can be switched automatically according to current message form.
Further, with reference to Fig. 3, it is message parsing method 3rd embodiment of the present invention, based on above-mentioned Fig. 1
Shown embodiment:
Step S102 is specifically included:
Step S1021, one degradation value of the packet parsing systemic presupposition, and according to type of message labelling
Position is parsed to message, in successfully resolved, resets default degradation value;In parsing failure, will be bad
Change value subtracts 1, and continuation is parsed to message according to type of message marker bit, when default degradation value is 0,
Judge the packet parsing time-out;
Comprise the following steps that by taking TOD messages as an example:
In packet parsing system analysis message, system can preset degradation value, report for computing system parsing
The number of times of literary failure;
System analysis message success, obtains effective information, other messages is not processed;
System analysis message fails, record parsing failure 1 time, subtracts 1 by degradation value, and parsing failure is fallen in deterioration
Message, continuation message is parsed according to type of message marker bit;
When packet parsing continuously fails, the degradation value is 0, and system judges packet parsing time-out, currently
Packet parsing mode fail;
Wherein, NMEA forms message may have several messages to transmit in 1 second, actual for transparent transmission
For, all, the message for parsing failure can be deteriorated the key message carried within this second, no
Process.
In the present embodiment by such scheme, to packet parsing failure time in the advantage based on a upper embodiment
Say and limit, shorten due to message format changes without receiving message and causing when, the message
Resolution system still can switch the time of analysis mode automatically according to current message form.
Further, with reference to Fig. 4, it is message parsing method fourth embodiment of the present invention, based on above-mentioned Fig. 1
Shown embodiment:
Step S104 is specifically included:
Step S1041, is parsed according to the analysis mode of system intialization successively to the message, until solution
Analyse successfully, after successfully resolved, obtain the analysis mode of current message;
System is parsed to the message successively according to preset analysis mode, until successful analytic message,
Wherein, packet parsing system does corresponding analysis mode configuration to packet parsing mode, can parse all
Type of message.
Packet parsing system analysis message success, obtains the analysis mode of the message.
In the present embodiment, in the advantage based on a upper embodiment, packet parsing system is according to for non-default
Packet parsing mode corresponding to the type of message marker bit of value or according to the type of message labelling for default value
Various packet parsing modes corresponding to position are parsed to message, when the type of message marker bit is silent
When recognizing value, the packet parsing system is according to the corresponding various analysis mode orders of type of message marker bit
Message is parsed, until successfully resolved, makes system have clear and definite type of message marker bit to parse report
Text.
Further, with reference to Fig. 5, it is 5th embodiment of message parsing method of the present invention, based on above-mentioned Fig. 1
Shown embodiment:
Also include step S105 after step S104, it is non-default value to change type of message marker bit,
And continue the message of parsing receipt of subsequent according to the current analysis mode of the message;
First, packet parsing system changes type of message for non-default value, and current system has clearly parsing
Mode is parsing the message of receipt of subsequent.
Then, system continues the message of parsing receipt of subsequent according to the current analysis mode of the message.
In the present embodiment by such scheme, by the parsing of current message in the advantage based on a upper embodiment
Mode is recorded in type of message marker bit, according to type of message marker bit correspondence during subsequently received message
Analysis mode parsed, shorten the time parsed to subsequent packet.
With reference to Fig. 6, it is packet parsing device first embodiment of the present invention, the packet parsing device includes:
Packet parsing module 100, during the message sent for synchronizer between when received, according to current
The corresponding analysis mode of type of message marker bit is parsed to the message;
Packet parsing module 100 is communicated with time synchronism equipment, is sent out the time synchronism equipment is received
During the message for sending, the analysis mode stored in reading current message type mark position, according to the parsing side
Formula is parsed to the message, the type of message marker bit correspondence at least one packet parsing mode.
By taking TOD messages as an example, comprise the following steps that:
First, start packet parsing module 100, to logical before packet parsing system and time synchronism equipment
Letter interface is monitored, and when the interface is to data, the packet parsing system starts to receive to be come
From the message of time synchronism equipment;
Then, when received between synchronizer send message when, according to current message type mark position
Corresponding analysis mode is parsed to the message.
Wherein, for TOD messages, the more commonly used in 1PPS+TOD message formats, 1PPS+TOD is
The time synchronized interface of short-distance transmission, carries gps time, when leapsecond information and UTC
Between, 1PPS+TOD interfaces have multiple format:GPS general NMEA forms, DCLS forms, in
State moves precise synchronization 1PPS+TOD forms and Chinese Beidou satellite navigation system form etc..It is logical
Often, a kind of message format of a kind of packet parsing mode correspondence, i.e., a kind of analysis mode parse a kind of message lattice
The message of formula, if message format is not corresponding with analysis mode, causes packet parsing to fail.
When synchronizer sends message, the possible message for sending different-format, and the message of different-format
Different analysis modes are needed to be parsed, therefore, after message format switches, if the message after switching
Form cannot be matched with current analysis mode, then cause parsing failure.
Overtime detection module 200, for, during packet parsing, whether detection messages parsing is overtime;
During the packet parsing, the message according to the state-detection during the packet parsing
Whether parsing is overtime, and the packet parsing time-out is not received by message or continuous because of long-time
Repeatedly message is parsed all unsuccessfully causes, for long-time is not received by message and caused message
Parsing time-out, is judged using pre-set threshold value, if the time for being not received by message exceedes pre-set threshold value
Then it is judged as packet parsing time-out;All failed and caused message for continuous several times parse to message
Parsing time-out, it is possible to use the number of times of degradation value record parsing failure, due to being that continuous several times are entered to message
Row parsing all fails, so, when packet parsing success, the degradation value will be recovered, when degradation value is 0
Shi Ze is judged as packet parsing time-out.
Marker bit control module 300, for when packet parsing is overtime, it is silent to change type of message marker bit
Recognize value;
As message format changes, be non-default value type of message marker bit corresponding to message solution
Analysis mode can not be parsed to new message format, so the packet parsing will occur time-out;When
When the packet parsing occurs time-out, the current type of message marker bit for non-default value is modified,
Default value is revised as, wherein, it is the various analysis modes of type of message marker bit correspondence of default value,
The analysis mode of including but not limited to GPS general NMEA forms, the analysis mode of DCLS forms,
The analysis mode of China Mobile's precise synchronization 1PPS+TOD forms and Chinese Beidou satellite navigation system
The analysis mode of system form, it is general, a kind of parsing is only corresponded to when type of message marker bit is non-default value
Mode, a kind of analysis mode of type of message marker bit correspondence are conducive to packet parsing system receiving message
When the message format that can parse to being not belonging to the analysis mode corresponding to type of message marker bit do not solve
Analysis, improves the execution efficiency of packet parsing system.
Analysis mode acquisition module 400, for according to the type of message marker bit of the default value to the report
Text is parsed, and obtains the analysis mode of the message.
Current message type mark position is read, current message type mark position is default value, according to default value
Corresponding packet parsing mode determines the analysis mode of the message, specifically, due to for default value
The various analysis modes of type of message marker bit correspondence, so packet parsing system will be according to corresponding various
Analysis mode is parsed to message successively, until successfully resolved, if successfully resolved, then it represents that current to solve
Analysis mode and current message format match, obtain analysis mode during successfully resolved, wherein, due to described
When type of message marker bit is default value, various analysis modes can be corresponded to and including all possible message solution
Analysis mode, so packet parsing can success.
When being embodied as, by taking time synchronized 1PPS+TOD message as an example, a kind of possible concrete steps are such as
Under:
During the TOD messages that the 1st, packet parsing system time of receipt (T of R) synchronizer sends, according to todFlag (reports
Literary type mark position) corresponding to analysis mode the TOD messages are parsed;
2nd, it is 30 that packet parsing system arranges todFlagTimeOut (degradation value), when described to TOD
During packet parsing process time-out, todFlagTimeOut is subtracted 1;
3rd, whether the value of todFlagTimeOut is judged equal to 0, if todFlag is set to acquiescence then
Value, the corresponding various analysis modes of the default value;
4th, the message is parsed successively according to the analysis mode corresponding to todFlag, until parsing
Success, obtains the analysis mode of current message after successfully resolved;
5th, change analysis modes of the todFlag for current message, and according to the corresponding analysis modes of todFlag
Continue the message of parsing receipt of subsequent, the todFlag can be additionally used in not belonging to other when message is received
The judgement not parsed by the message format that can be parsed in the analysis mode corresponding to todFlag.
In the present embodiment, when packet parsing module 100 receives the message of time synchronism equipment transmission,
The message is parsed according to the corresponding analysis mode in current message type mark position;Time-out detection mould
, during packet parsing, whether detection messages parsing is overtime for block 200;Marker bit control module 300 exists
During packet parsing time-out, it is default value to change type of message marker bit;Analysis mode acquisition module 400, root
The message is parsed according to the type of message marker bit of the default value, obtain the parsing of the message
Mode.The present embodiment is realized after message format changes, and the message format parsing after change is lost
When losing, it is not necessary to personnel participate in, and automatically according to current message form switch analysis mode method, from
And avoid causing the problem of message interior packet parsing failure for a period of time because message format changes.
Further, with reference to Fig. 7, it is the second embodiment of packet parsing device of the present invention, described device is also
Including:
Timing detection module 500, whether receive message for detecting, if so, then by described in the scheduled time
Packet parsing module is solved to the message according to the corresponding analysis mode in current message type mark position
Analysis.
Timing detection module 500 is received to message and arranges scheduled time restriction, is received in the given time
From the message that time synchronism equipment sends when, the parsing side stored in reading current message type mark position
Formula, parses to the message according to the analysis mode.
In the present embodiment by such scheme, timing detection module 500 in the advantage based on a upper embodiment
To message receive be provided with time restriction, due to message format change without receiving message when, it is described
Packet parsing system still can switch analysis mode automatically according to current message form.
Further, with reference to Fig. 8, it is the 3rd embodiment of packet parsing device of the present invention:
The module time-out detection module 200 is specifically included:
Setting unit 210, for presetting a degradation value;
Judging unit 220, for when default degradation value is 0, judging the packet parsing time-out;
Control unit 230, in successfully resolved, resetting default degradation value;In parsing failure, will
Degradation value subtracts 1, and continuation is parsed to message according to type of message marker bit.
In the present embodiment by such scheme, in the advantage based on a upper embodiment, pass through setting unit 210
Be provided with frequency of failure restriction, shorten due to message format changes without receiving message and causing when,
The packet parsing system still can switch the time of analysis mode automatically according to current message form.
Further, with reference to Fig. 9, it is the fourth embodiment of packet parsing device of the present invention:
The module analysis mode acquisition module 400 is specifically included:
Resolution unit 410, for being parsed according to the analysis mode of system intialization successively to the message,
Until successfully resolved;
Acquiring unit 420, for the analysis mode for obtaining current message after resolution unit successfully resolved.
In the present embodiment by such scheme, in the advantage based on a upper embodiment, acquiring unit 420
Analysis mode during 410 successfully resolved of resolution unit is obtained, makes system get clear and definite type of message mark
Analytic message is carried out in note position.
Further, with reference to Fig. 6, the packet parsing module 100 is additionally operable to obtain in the analysis mode
After module gets the analysis mode of the message, change type of message marker bit for non-default value, and root
Continue the message of parsing receipt of subsequent according to the current analysis mode of the message.
By such scheme, based on the advantage of a upper embodiment, upper message parsing module 100 currently will be reported
The analysis mode of text is recorded in type of message marker bit, according to type of message mark during subsequently received message
The corresponding analysis mode in note position is parsed, and shortens the time parsed to subsequent packet.
The preferred embodiments of the present invention are these are only, the scope of the claims of the present invention is not thereby limited, it is every
The equivalent structure made using description of the invention and accompanying drawing content or equivalent flow conversion, or directly or
Connect and be used in other related technical fields, be included within the scope of the present invention.
Claims (10)
1. a kind of message parsing method, it is characterised in that the message parsing method is comprised the following steps:
It is during the message that synchronizer sends between when received, corresponding according to current message type mark position
Analysis mode is parsed to the message;
During the packet parsing, detect whether the packet parsing is overtime;
When packet parsing time-out, it is default value to change current message type mark position;
The message is parsed according to the type of message marker bit of the default value, obtain the message
Analysis mode.
2. message parsing method as claimed in claim 1, it is characterised in that it is described when received between
During the message that synchronizer sends, according to the corresponding analysis mode in current message type mark position to the report
Before text is parsed, also include:
Whether message is received in the packet parsing system detectio scheduled time, if so, then execution step:According to
The corresponding analysis mode in current message type mark position is parsed to the message.
3. message parsing method as claimed in claim 1, it is characterised in that the detection messages parsing
Whether the step of time-out includes:
One degradation value of the packet parsing systemic presupposition, and message is entered according to type of message marker bit
Row parsing, in successfully resolved, resets default degradation value;In parsing failure, degradation value is subtracted 1, after
It is continuous message to be parsed according to type of message marker bit, when default degradation value is 0, judge the report
Text parsing time-out.
4. message parsing method as claimed in claim 1, it is characterised in that described according to the acquiescence
The type of message marker bit of value is parsed to the message, the step of obtain the analysis mode of the message
Including:
The message is parsed successively according to the analysis mode of system intialization, until successfully resolved, solution
The analysis mode of current message is obtained after analysis success.
5. the message parsing method as any one of claim 1-4, it is characterised in that described
The message is parsed according to the type of message marker bit of the default value, obtain the parsing of the message
After the step of mode, also include:
It is non-default value to change type of message marker bit, and is continued according to the current analysis mode of the message
The message of parsing receipt of subsequent.
6. a kind of device of packet parsing, it is characterised in that the device includes:
Packet parsing module, during the message sent for synchronizer between when received, according to current report
The corresponding analysis mode in literary type mark position is parsed to the message;
Overtime detection module, for, during packet parsing, whether detection messages parsing is overtime;
Marker bit control module, for when packet parsing is overtime, changing type of message marker bit for acquiescence
Value;
Analysis mode acquisition module, for according to the type of message marker bit of the default value to the message
Parsed, obtained the analysis mode of the message.
7. packet parsing device as claimed in claim 6, it is characterised in that described device also includes:
Timing detection module, whether receive message for detecting, if so, then by the report in the scheduled time
Literary parsing module is parsed to the message according to the corresponding analysis mode in current message type mark position.
8. packet parsing device as claimed in claim 6, it is characterised in that the overtime detection module
Including:
Setting unit, for presetting a degradation value;
Judging unit, for when default degradation value is 0, judging the packet parsing time-out;
Control unit, in successfully resolved, resetting default degradation value;In parsing failure, will be bad
Change value subtracts 1, and continuation is parsed to message according to type of message marker bit.
9. device as claimed in claim 6, it is characterised in that the analysis mode acquisition module includes:
Resolution unit, for being parsed according to the analysis mode of system intialization successively to the message, directly
To successfully resolved;
Acquiring unit, for the analysis mode for obtaining current message after resolution unit successfully resolved.
10. the packet parsing device as any one of claim 6-9, it is characterised in that the report
Literary parsing module, is additionally operable to:
After the analysis mode acquisition module gets the analysis mode of the message, change type of message
Marker bit is non-default value, and continues the report of parsing receipt of subsequent according to the current analysis mode of the message
Text.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510591409.XA CN106549904B (en) | 2015-09-16 | 2015-09-16 | Message parsing method and device |
PCT/CN2016/090030 WO2017045474A1 (en) | 2015-09-16 | 2016-07-14 | Message parsing method and apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510591409.XA CN106549904B (en) | 2015-09-16 | 2015-09-16 | Message parsing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106549904A true CN106549904A (en) | 2017-03-29 |
CN106549904B CN106549904B (en) | 2020-12-29 |
Family
ID=58288131
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510591409.XA Active CN106549904B (en) | 2015-09-16 | 2015-09-16 | Message parsing method and device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN106549904B (en) |
WO (1) | WO2017045474A1 (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112235262A (en) * | 2020-09-26 | 2021-01-15 | 建信金融科技有限责任公司 | Message analysis method and device, electronic equipment and computer readable storage medium |
CN113162913A (en) * | 2021-03-15 | 2021-07-23 | 煤炭科学技术研究院有限公司 | Message analysis method and device of mine monitoring system |
CN114866626A (en) * | 2022-04-28 | 2022-08-05 | 国电南瑞科技股份有限公司 | Intelligent substation Ethernet message processing system |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111614647B (en) * | 2020-05-14 | 2022-06-07 | 中国银行股份有限公司 | Message detection and analysis method and device |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060195589A1 (en) * | 2005-01-26 | 2006-08-31 | Internet Security Systems, Inc. | Method and system for avoiding an unintentional time-out for communications in a client-proxy-server environment |
CN101547156A (en) * | 2009-05-04 | 2009-09-30 | 华为技术有限公司 | Message parsing method and device |
CN102183769A (en) * | 2011-03-17 | 2011-09-14 | 华为技术有限公司 | Method and device for sharing clock reference source |
CN103166728A (en) * | 2011-12-12 | 2013-06-19 | 中兴通讯股份有限公司 | Method and device of lock synchronization |
CN103401672A (en) * | 2013-07-24 | 2013-11-20 | 福建星网锐捷网络有限公司 | Time synchronization device, equipment and system |
CN103532970A (en) * | 2013-10-23 | 2014-01-22 | 杭州华三通信技术有限公司 | Transmission method and equipment of time synchronization messages |
WO2014049511A1 (en) * | 2012-09-25 | 2014-04-03 | Rad Data Communications Ltd. | Pluggable packet master clock |
CN104506268A (en) * | 2014-12-15 | 2015-04-08 | 飞天诚信科技股份有限公司 | Method for implementing time calibration |
-
2015
- 2015-09-16 CN CN201510591409.XA patent/CN106549904B/en active Active
-
2016
- 2016-07-14 WO PCT/CN2016/090030 patent/WO2017045474A1/en active Application Filing
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060195589A1 (en) * | 2005-01-26 | 2006-08-31 | Internet Security Systems, Inc. | Method and system for avoiding an unintentional time-out for communications in a client-proxy-server environment |
CN101547156A (en) * | 2009-05-04 | 2009-09-30 | 华为技术有限公司 | Message parsing method and device |
CN102183769A (en) * | 2011-03-17 | 2011-09-14 | 华为技术有限公司 | Method and device for sharing clock reference source |
CN103166728A (en) * | 2011-12-12 | 2013-06-19 | 中兴通讯股份有限公司 | Method and device of lock synchronization |
WO2014049511A1 (en) * | 2012-09-25 | 2014-04-03 | Rad Data Communications Ltd. | Pluggable packet master clock |
CN103401672A (en) * | 2013-07-24 | 2013-11-20 | 福建星网锐捷网络有限公司 | Time synchronization device, equipment and system |
CN103532970A (en) * | 2013-10-23 | 2014-01-22 | 杭州华三通信技术有限公司 | Transmission method and equipment of time synchronization messages |
CN104506268A (en) * | 2014-12-15 | 2015-04-08 | 飞天诚信科技股份有限公司 | Method for implementing time calibration |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112235262A (en) * | 2020-09-26 | 2021-01-15 | 建信金融科技有限责任公司 | Message analysis method and device, electronic equipment and computer readable storage medium |
CN113162913A (en) * | 2021-03-15 | 2021-07-23 | 煤炭科学技术研究院有限公司 | Message analysis method and device of mine monitoring system |
CN114866626A (en) * | 2022-04-28 | 2022-08-05 | 国电南瑞科技股份有限公司 | Intelligent substation Ethernet message processing system |
CN114866626B (en) * | 2022-04-28 | 2023-09-29 | 国电南瑞科技股份有限公司 | Intelligent substation Ethernet message processing system |
Also Published As
Publication number | Publication date |
---|---|
WO2017045474A1 (en) | 2017-03-23 |
CN106549904B (en) | 2020-12-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP2173136B1 (en) | A synchronization and delay compensation method between baseband unit and radio frequency unit | |
CN101242230B (en) | Clock synchronization aid device and associated clock synchronization device, main communication station and secondary communication station | |
CN106549904A (en) | The method and device of packet parsing | |
CN101331736B (en) | Using travel-time as means for improving the accuracy of simple network time protocol | |
CN103563287B (en) | Synchronization device and synchronization method | |
US20170150461A1 (en) | Method for Determining Transmission Time, Terminal, Base Station, System and Storage Medium | |
JP2019522405A (en) | Method and terminal for measuring radio link quality | |
CN103188064A (en) | Clock synchronization method and clock synchronization device | |
EP2515591A1 (en) | Method, apparatus and system for clock synchronization | |
CN112187390B (en) | Method and apparatus for time synchronization | |
CN1337138A (en) | Method for the time synchronisation of a computer network and computer network with time synchronisation | |
CN109257132A (en) | A kind of multi-sensor data cognitive method and system based on time synchronization | |
CN102195769A (en) | Clock synchronization method for automobile CAN (Control Area Network) | |
CN101719867A (en) | Method and system for clock recovery in packet switching network | |
CN1964227B (en) | A method for data interaction and data transmit-receive module | |
SE513449C2 (en) | Procedure for radio synchronization of DECT systems | |
CN101296049A (en) | Method and device for eliminating time slot drifting fault in time division multiplexing system | |
CN112235096A (en) | Data communication method, data receiving method and device, and data sending method and device | |
EP2775774A1 (en) | Method and apparatus for transmitting multiple sub-frames scheduling signaling | |
CN104396274B (en) | Meter Reading Device | |
CN104735448A (en) | ARINC818 sending node data acquisition and control method | |
CN107612788B (en) | Time server fault detection method, equipment and system | |
CN103517286A (en) | Method for determining clock asynchronization and device thereof | |
CN115968023A (en) | Interphone communication method and device | |
CN102394740B (en) | Time synchronization method and device |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |