Summary of the invention
The technical problem to be solved in the present invention is, at the communication protocol of the above-mentioned network element in the supervisory control system of prior art not simultaneously, can not on same monitor supervision platform, focus on the defective of the above-mentioned packet that mails to network element or send by network element, the communication protocol that a kind of network element in the supervisory control system is provided can focus on above-mentioned data package processing method and the device that mails to network element or sent by network element not simultaneously on same monitor supervision platform.
The technical solution adopted for the present invention to solve the technical problems is: construct the processing method of multi-protocol data bag in a kind of remote monitoring, comprise that the network element that monitor supervision platform and at least one is monitored links to each other by network, also comprises the steps:
A) set up the protocol format file;
B), in described protocol format file, search the pairing protocol format content of this network element according to the essential information of target network element or source network element;
C) according to indicated this packet of format analysis processing of protocol format content that finds.
In the processing method of multi-protocol data bag, described handle packet comprises that formation is mail to the packet of target network element or resolved the packet that is dealt into described monitor supervision platform by the source network element by described monitor supervision platform in a kind of remote monitoring of the present invention.
In a kind of remote monitoring of the present invention in the processing method of multi-protocol data bag, described steps A) further comprises the steps: in
A1) the protocol format content of independent respectively each network element of input;
A2) essential information with network element is that index is with steps A 1) in content be kept in the protocol format file.
In the processing method of multi-protocol data bag, the basic information packet purse rope of described network element unit's title or network element are numbered in a kind of remote monitoring of the present invention.
In the processing method of multi-protocol data bag, described agreement comprises privately owned communication protocol in a kind of remote monitoring of the present invention; Described protocol format content comprises the parameter of concrete byte representative or the definition of variable in the packet.
In a kind of remote monitoring of the present invention in the processing method of multi-protocol data bag, described parsing is further comprised by the step that the source network element is dealt into the packet of described monitor supervision platform: if do not carry the net element information that the net element information of described source network element maybe can not be obtained described source network element in the described packet, described monitor supervision platform traversal also uses the protocol format content in the described format protocol file to attempt resolving this packet successively.
In the processing method of multi-protocol data bag, described network comprises note, GPRS, landline telephone or Ethernet in a kind of remote monitoring of the present invention.
The present invention has also disclosed a kind of device of realizing data package processing method, comprise network interface and the data packet processing that links to each other with described network interface, described network interface is connected to the network element that network sent or received packet with the form of at least one communications protocol that has with himself by network, comprise that also document of agreement storage device and document of agreement search/reading device, described document of agreement memory device stores has the communications protocol format content of network element; Described document of agreement searches/and reading device is connected on described data packet processing and the described agreement storage device, from described data packet processing obtain to want the pairing network element of handle packet essential information, described document of agreement storage device, search the corresponding protocols format content, read this content and pass described data packet processing back according to this information, described data packet processing is according to described this packet of protocol format contents processing.
In the device of the present invention, the processing of described packet comprises and constitutes packet that the packet mail to described target network element or parsing receive, that sent by described source network element.
In the device of the present invention, the content of described protocol format file comprises the parameter of concrete byte representative or the definition of variable in the packet; The input in advance of described protocol format content also is numbered index stores in described document of agreement storage device with the element name or the network element of network element.
Implement the processing method and the device of multi-protocol data bag in a kind of remote monitoring of the present invention, has following beneficial effect: owing to comprise the protocol format file therein, so when handle packet, can adjust the used protocol format of deal with data according to the protocol format of target network element or source network element, can on same monitor supervision platform, focus on the above-mentioned packet that mails to network element or send by network element.
Embodiment
As shown in Figure 1, in a kind of remote monitoring of the present invention among multi-protocol data packet processing method first embodiment, by monitor supervision platform 11, network 12 and a plurality of network element are formed long distance control system, wherein, network element 13-1 is first network element, network element 13-2 is second network element, network element 13-n is a n network element, above-mentioned monitor supervision platform 11 links to each other with a plurality of network elements by network 12, in first embodiment of the invention, network 12 is a SMS platform, be network element 13-1 to network element 13-n mail to the information of monitor supervision platform 11 or monitor supervision platform 11 mail to network element 13-1 to the information of network element 13-n all by the SMS platform transmission, in the prior art, because monitor supervision platform 11 can only send or receive the note that meets a kind of communications protocol format, adds the employed communications protocol format difference of said network element 13-1 to 13-n, so, though monitor supervision platform 11 can be received the note that network element 13-1 sends to network element 13-n, monitor supervision platform can not be learnt the implication of the information representative that this note comprises; Perhaps the information in the note of being sent by monitor supervision platform 11 can not correctly be learnt to network element 13-n by network element 13-1.And in the first embodiment of the present invention, because monitor supervision platform 11 can obtain the communications protocol format of its use according to the title of network element, so, no matter monitor supervision platform 11 receives or sends note, its form is all the same with target network element or the employed protocol format of source network element, thereby can handle the packet that the network element that uses different communications protocol format was sent or mail to the network element that uses different communications protocol format on same monitor supervision platform.Certainly, in the present embodiment, above-mentioned network 12 is SMS platforms, and still, in actual use, network 12 can also be wired or wireless networks such as GPRS, landline telephone or Ethernet, and this will select for use according to equipment and the on-site concrete condition of network.
As shown in Figure 2, in first embodiment of the invention, above-mentioned functions realizes as follows:
S21 imports the employed protocol format content of each network element respectively separately on monitor supervision platform: the form of the employed communication protocol of each network element is different, they may be certain tissue or certain institute of technology alliance accepted standard, it also may be the proprietary protocol that manufacturer set up of network element, but because the network element that connects on network is known, so can obtain the particular content of the communications protocol format of its use by the data that its manufacturer provides, as: specifically in the SMS platform of present embodiment, the network element parameter of each byte representative of receiving or sending out, and to definition of the meaning of these parameter values representatives etc.In this step, these concrete definition are showed with text, and are input to the protocol format file that is arranged on the monitor supervision platform in advance, certainly, are unit input and storage with the network element.What deserves to be mentioned is, in this step, can be to grow out of nothing, import the protocol format content of a plurality of network elements successively respectively, from setting up a complete protocol format file (when moving for the first time), also can be after adding one or more network elements in the system that has moved, the protocol format content of the network element of above-mentioned adding is added or join respectively in the protocol format file that has existed.
To be index with the element name be kept at the protocol format content of each network element in the protocol format file S22: be input to the protocol format content in the protocol format file in step S21, be kept in the above-mentioned protocol format file as index by essential information in this step, use the element name in the network element essential information to be index in the present embodiment with network element; Certainly in actual applications, can also use other network element essential information to preserve the pairing protocol format content of this network element, for example, can use the network element of this network element to be numbered index etc. as index.
S23 produces the order that sends packet to special network element: monitor supervision platform produces the order that sends packet to a certain special network element according to the indication of operation upper application software (the normally network management software) thereon; In the present embodiment, this order comprises the content that will transmit, and the specifying informations such as title of target network element.In different practical applications, may comprise other different essential informations of this network element, the network element numbering of this for example above-mentioned network element etc.
S24 sends order according to packet, and obtain the title of target network element: from the rapid order that produces of previous step, can obtain as essential information index, that target network element had, in the present embodiment, the essential information of this target network element is an element name.
S25 searches its corresponding protocols format content according to the title of target network element in the protocol format file: obtain the essential information of target network element in the S24 step after, search in the protocol format file; In the present embodiment, the essential information of this target network element is its element name, thus with the element name of this network element as target, the byte of search and this title adaptive (identical) in the protocol format file that step S21, S22 are set up.
Does S26 find not? in above-mentioned protocol format file, found the byte of adaptive with this element name (identical)? in this way, execution in step S27 as not, then jumps to execution in step S29, finishes this processing data packets flow process.
S27 reads this protocol format content: read this and the suitable byte related data pointed or pairing of target network element title, promptly consistent with the employed communications protocol format of this target network element protocol format content.
The packet that S28 sends by this protocol format format of content tissue: the indication of the content of being got according to step S27, step S23 content specified, that need to transmit is filled up to or is filled up to after treatment in the particular location of the packet that will send, and the above-mentioned packet of finishing is sent on the target network element by the network that connects monitor supervision platform and network element; The form of this packet is by the concrete network decision that connects monitor supervision platform and network element, and in the present embodiment, this concrete network is a SMS platform, so its data packet format desired form that is exactly SMS platform.
S29 finishes: finish this processing data packets.
More than specifically described first embodiment of multi-protocol data packet processing method among the present invention, it intactly shows the processing procedure of the packet that sends to concrete network element; To specifically describe second embodiment of multi-protocol data packet processing method among the present invention below, it intactly illustrates the processing method that receives the packet that concrete network element transmits.Fig. 3 shows the flow chart of second embodiment of the invention, wherein:
S31 imports the employed protocol format content of each network element respectively separately on monitor supervision platform: the form of the employed communication protocol of each network element is different, they may be certain tissue or certain institute of technology alliance accepted standard, it also may be the proprietary protocol that manufacturer set up of network element, but because the network element that connects on network is known, so can obtain the particular content of form of the communication protocol of its use by the data that its manufacturer provides, as: specifically in the SMS platform of present embodiment, the network element parameter of each byte representative of receiving or sending out, and to definition of the meaning of these parameter values representatives etc.In this step, these concrete definition are showed with text, and are input to the protocol format file that is arranged on the monitor supervision platform in advance, certainly, are unit input and storage with the network element.What deserves to be mentioned is, in this step, can be to grow out of nothing, import the protocol format content of a plurality of network elements successively respectively, from setting up a complete protocol format file (when moving for the first time), also can be after adding one or more network elements in the system that has moved, the protocol format content of the network element of above-mentioned adding is added or join respectively in the protocol format file that has existed.
To be index with the element name be kept at the protocol format content of each network element in the protocol format file S32: be input to the protocol format content in the protocol format file in step S31, be kept in above-mentioned protocol format file as index by essential information in this step, use the element name in the network element essential information to be index in the present embodiment with network element; Certainly in actual applications, can also use other network element essential information to preserve the pairing protocol format content of this network element, for example, can use the network element of this network element to be numbered index etc. as index.
S33 receives the packet that the source network element sends: in this step, a certain network element on the network according to this network element the appointment of intrinsic protocol format content, its data that will transmit are formed packet by above-mentioned appointment, and it is sent out by network, monitor supervision platform then receives the packet that said network element is sent through network, in this packet, comprised the essential information of the network element that sends this packets of information.
S34 obtains the title of source network element according to the information (IP of Data Source, telephone number or the like) of the packet that receives.In this step, judge, if can obtain the element name of source network element, then execution in step S35 by the element name that whether can obtain the source network element in the packet that receives; As can not, then jump to step S301; Under the situation of the title that can obtain the source network element, owing to comprised the essential information of the network element that sends this packet in the packet that in step S33, receives, and the form of this packet is to be determined by the network that is connected between network element and the monitor supervision platform, so, monitor supervision platform can be untied this packet, will comprising the essential information of network element and the unpack that transmits to monitor supervision platform of network element, the essential information of network element, comprise that element name can obtain in this step, but in this step, though obtained the value of network element to the information of monitor supervision platform transmission, but because in this step, still do not know the protocol format that network element is used, so still do not know the concrete implication of above-mentioned value of information representative, promptly in this step, still also do not finish for the parsing of the packet that network element transmitted.
All protocol format contents in the S301 traversal protocols formatted file, each use a protocol format content that packet is tried to resolve: under the title situation of the network element name of the source network element of the packet that receives not obtaining (can not obtain this element name may comprise do not have this element name in the packet maybe can not reduce this title etc.), monitor supervision platform travels through each protocol format content, attempts resolving this packet with each protocol format content.After executing this step, execution in step S302.
Can S302 resolve not? judge to use current format protocol content can resolve this packet, if can, then do not reattempt other protocol format content, directly jump to step S38; As can not, execution in step S303.
Does S303 finish traversal not? whether the traversal among the determining step S301 is finished, and as finishing, jumps to step S39, finishes this processing data packets; As not finishing traversal as yet, then jump to step S301 to all accord formatted file.
S35 searches its corresponding protocols format content according to the title of network element in the protocol format file: obtain the essential information of source network element in the S34 step after, search in the protocol format file; In the present embodiment, the essential information of this source network element is its element name, thus with the element name of this network element as target, the byte of search and this title adaptive (identical) in the protocol format file that step S21, S22 are set up.
Does S36 find not? in above-mentioned protocol format file, found the byte of adaptive with this element name (identical)? in this way, execution in step S37 as not, then jumps to execution in step S39, finishes this processing data packets flow process.
S37 reads this protocol format content: read this and the suitable byte related data pointed or pairing of target network element title, promptly consistent with the employed communications protocol format of this target network element protocol format content.
The packet that S38 receives by the format analysis of this protocol format file content: in step S34, packet is untied, and the essential information of inciting somebody to action source network element wherein extracts, and the data that will transmit in the packet, owing to do not know the implication of each concrete byte representative, so parsing that can not this packet is complete; And in step S37, the content of the employed protocol format of this source network element is found, so in this step, can be according to the indication of step S37 resulting protocol format content, this packet content is untied fully, obtained the concrete implication of each byte representative in this packet.
S39 finishes: finish this processing data packets.
Fig. 4 is a structural representation of realizing the embodiment of the device that adopted among above-mentioned first, second embodiment among the present invention, and this device is arranged on the monitor supervision platform.In Fig. 4, this device 40 comprises that document of agreement storage device 41, document of agreement search/reading device 42, data packet processing 43 and network interface 44, wherein document of agreement storage device 41 search with document of agreement/reading device 42 links to each other, document of agreement searches/and reading device 42 also links to each other with data packet processing 43, and data packet processing 43 links to each other with network interface 44,44 of network interfaces are by network, with the each part mentioned above (not shown) that links to each other with at least one network element.In document of agreement storage device 41, store the protocol format file of all network elements that link to each other with network, this document is an index with the essential information of said network element, preserve the protocol format content of each network element, these contents comprise the parameter of concrete byte representative in the packet that this network element is sent or receive or the definition of variable; And these contents are inputs in advance and are that index stores is in described document of agreement storage device with the essential information of network element.In the present embodiment, the essential information of above-mentioned network element is an element name.Certainly, in the application of reality, the essential information of this network element also can be a network element numbering etc.
When said apparatus 40 sends packets to and is connected network element on the network, at first, parameter or variable that data packet processing 43 obtains the title of target network element and needs to send, its title with target network element sends document of agreement to searches/reading device 43, and document of agreement is searched/reading device 43 seeks the byte consistent with the target network element title in document of agreement storage device 41, after finding, read out this byte corresponding file content, be the protocol format content of target network element, these contents have indicated the parameter or the variable of concrete byte representative in the packet; Afterwards document of agreement search/reading device 42 will read the delivery of content of coming again to data packet processing 43, in data packet processing 43, the parameter that will send or the value of variable according to document of agreement search/reading device 42 inserts in the data packet format, and will set up good packet and send in the network by network interface 44, make above-mentioned target network element can receive this packet.
When said apparatus 40 receives a packet that is sent by the source network element that is connected on the network, at first, the source network element that sends this packet is formed packet according to the protocol format of oneself and is sent on the network, owing in this packet, comprised the essential information of the network element that sends this packet, and the form of this packet is to be determined by the network that is connected between network element and the monitor supervision platform, so, when this packet enters said apparatus 40 by network interface 44, network interface 44 is owing to be connected above-mentioned data packet processing 43, it can be untied this packet, will comprising the essential information of network element and the unpack that network element will transmit, the essential information of network element, comprise element name, because still do not know the protocol format that the source network element is used this moment, so still do not know the concrete implication of above-mentioned value of information representative; So data packet processing 43 is sent to document of agreement with the element name of source network element and searches/reading device 42, and document of agreement is searched/reading device 43 seeks the byte consistent with the target network element title in document of agreement storage device 41, after finding, read out this byte corresponding file content, be the protocol format content of target network element, these contents have indicated the parameter or the variable of concrete byte representative in the packet; Afterwards document of agreement search/reading device 42 will read the delivery of content of coming again to data packet processing 43, in data packet processing 43, the packet that will be transmitted by source network element place is by the protocol format parsing of reading, thereby obtains correct data content.
Though more than described the specific embodiment of the present invention, it will be appreciated by those skilled in the art that abovely only for illustrating, can make numerous variations or modification to these execution modes and do not deviate from principle of the present invention and essence.