Summary of the invention
In view of this, the present invention aims to provide a kind of data transmission device and method that is used for carrying out transfer of data between the upper network of surveillance and the next network, with upper side exploitation and the exploitation of the next side that can carry out surveillance independently, thereby can before determining, the next network/the next communication protocol carry out upper side exploitation in advance.
To achieve these goals, according to an aspect of the present invention, a kind of data transmission device is provided, it is set between the next network and the upper network, described the next network comprise with described the next network in be monitored that object is connected and in order to the monitor of the status data that monitors the described situation that is monitored object of expression, described upper network comprises and is used to obtain the described management information of object and the office terminal that described management information is handled of being monitored.Described data transmission device comprises: storage part is used to store the described attribute data that is monitored object; The next Department of Communication Force is used for communicating with the monitor of described the next network, to obtain described status data from described monitor; Data processing division, the status data identification that is used for receiving based on described the next Department of Communication Force is monitored object, read the attribute data of being discerned that is monitored object from described storage part, and generate management information as the combination of described status data and described attribute data; And upper Department of Communication Force, be used for communicating, described management information is sent to described upper network with the office terminal of described upper network.
According to a further aspect in the invention, a kind of data transmission method is provided, be used between the next network and upper network, transmitting data, described the next network comprise with described the next network in be monitored that object is connected and in order to the monitor of the status data that monitors the described situation that is monitored object of expression, described upper network comprises and is used to obtain the described management information of object and the office terminal that described management information is handled of being monitored.Described data transmission method comprises: storing step is used for the attribute data that is monitored object in the described the next network of memory storage; The next communication steps is used for communicating with the monitor of described the next network, to monitor the described status data that is monitored object; Data processing step, be used for being monitored object based on the status data identification that receives via described the next communication steps, read the attribute data of being discerned that is monitored object from described memory, and generate management information as the combination of described status data and described attribute data; And upper communication steps, be used for communicating, being sent to described upper network via the management information that described data processing step generates with the office terminal of described upper network.
When above-mentioned data transmission device and method are applied to comprise the surveillance of upper network and the next network, generate and comprise the management information that is monitored the object full detail by the attribute data that is monitored object based on status data that receives from the next network and storage in advance, for example, by being attached to, attribute data generates management information on the status data.Make thus, because about the attribute data that is monitored object is to be stored in addition in the storage part, thereby can be under the situation of the institutional framework of not determining the next network as yet and equipment disposition etc. the communication module of exploitation and upper network in advance, and after the structure of determining the next network and configuration by in storage part, setting corresponding attribute data comprising the management information that is monitored the object full detail based on attribute data and status data generation.In other words, according to above-mentioned data transmission device and method, even the next network is not determined to carry out upper side exploitation as yet yet, and can build whole surveillance at short notice after the next network is determined, also promptly can effectively shorten the construction cycle of whole surveillance.
According to another aspect of the invention, the present invention also provides a kind of surveillance, and it comprises: the next network, it comprise with described the next network in be monitored that object is connected and in order to the monitor of the status data that monitors the described situation that is monitored object of expression; Upper network, it comprises and is used to obtain the described management information of object and the office terminal that described management information is handled of being monitored; And aforesaid data transmission device.
According to another aspect of the invention, the present invention also provides a kind of computer-readable recording medium, has program stored therein on it, can realize aforesaid data transmission method when computer is carried out this program.
According to below with reference to the detailed description of accompanying drawing to exemplary embodiments, it is clear that further feature of the present invention and aspect will become.
Embodiment
Describe various exemplary embodiments of the present invention, feature and aspect in detail below with reference to accompanying drawing.
As mentioned above, the present invention is intended to improve the data transmission device 120 between upper network 110 and the next network 130, so that it can carry out flexible conversion between miscellaneous upper communication protocol and the next communication protocol, thereby reduce to occur new upper/overlapping development cost during the next communication protocol, and construction cycle of reducing whole surveillance.
Below with reference to block diagram shown in Figure 2 data transmission device 120 according to the present invention is explained in detail.
As shown in Figure 2, data transmission device 120 is between upper network 110 and the next network 130, and it comprises: storage part 124 is used for storing the attribute data that is monitored object 220 that is associated with a monitor of the next network 130 respectively; Upper Department of Communication Force 121, be used for communicating with the office terminal of upper network 110, to send management information 210 to upper network 110, and/or the control command that receives in order to the next side is set from upper network 110, wherein the next side is set and comprised that change is monitored the attribute data of object and the object that is monitored in the next network 130 is set etc.; The next Department of Communication Force 123, be used for communicating with the monitor of the next network 130, receiving the status data 230 relevant with the situation that is monitored object from the next network 130, and/or to the next network 130 transmissions in order to being monitored the control command that object is set; And data processing division 122, be used for the attribute data that is monitored object 220 stored based on storage part 124, the status data 230 that receives via the next Department of Communication Force 123 is handled, generating the management information 210 that upper network 110 required comprising are monitored the full detail of object, and/or the control command that receives via upper Department of Communication Force 121 handled setting to expect.
From data flow shown in Figure 2 as can be seen, data processing division 122 generates management information 210 based on the attribute data of being stored status data of importing from the next Department of Communication Force 123 230 and the storage part 124 that is monitored object 220.To this, because the number of the data items that the status data 230 that receives from the next network 130 via the next communication protocol and the management information that sends to upper network 210 via upper communication protocol 210 are included is also inequality, therefore, preferably, data processing division 122 can constitute management information 210 by appending to the status data 230 corresponding attribute datas 220 that are monitored object as shown in Figure 3 on the status data 230.
Wherein, data items is the data entries relevant with currency, for example can be title, description, unit, higher limit, lower limit, time of origin and whether report condition variation etc.In Fig. 3, " currency+project 1~M " is corresponding to the status data of obtaining from the next network 130 230, " project (M+1)~N " is corresponding to the attribute data of being stored in the storage part 124 220 relevant with being monitored object, and " currency+project 1~N " is the management information 210 (that is the complete information that is monitored object to upper network 110 to be sent) by adeditive attribute data 220 obtain on status data 230.Wherein, N and M are positive integer, and N is greater than M.
For example, in water level monitoring system, the status data of obtaining from the next network that is monitored object at a water level value comprises: the cycle of water level value, water-level alarm value, the time of gathering this water level value, collection water level value.These 4 data can be regarded project 1~M (M=4) as.And the attribute data relevant with being monitored object comprises: be monitored the title of object, the explanation that is monitored object, water level value unit, be monitored object the address, be monitored object state (wait judge the state that is monitored object according to water level value and with situation that the next network communicates), whether initiatively report the state variation that is monitored object.These 6 data can regard as project (M+1)~N (M=4, N=10).These 10 data projects are the required full details that are monitored object of upper network.Wherein, all comprise Chinese owing to be monitored the title and the explanation of object, and can't be from direct title and the explanation that obtains to be monitored object of the next network according to the definition of the next communication protocol, therefore, data items 5~10th, data processing division 122 the value according to data items 1~4 identify corresponding be monitored object after, read from storage part 124 according to the information that is monitored object that is identified (for example being monitored the numbering of object and type etc.).
Describe data transmission device 120 carries out transfer of data between upper network 110 and the next network 130 handling process in detail below with reference to Fig. 4~Fig. 7.Wherein, Fig. 4~Fig. 5 relates to the data transmission and processing from the next to upper, and Fig. 6~Fig. 7 relates to the data transmission and processing from upper to the next.Wherein, from the next to upper, be meant the process of obtaining management information, be specially data transmission device 120 and will be forwarded to upper network 110 after treatment from the status data that the next network 130 is obtained; From upper to the next, be meant the process of setting according to from the control command of upper network 110, comprise that data transmission device 120 changes the attribute data of being stored in self storage part 124, also comprise to the next network 130 sending in order to being monitored the control command that object is set.
Fig. 4 shows the flow chart of first embodiment of the data transmission and processing from the next to upper.In first embodiment, send in order to obtain the query requests of management information, to manage all monitors in the next network 130 energetically to the next side in the mode of poll the office terminal in the upper network 110.
As shown in Figure 4, if receive query requests (S01), then start the data transmission and processing from the next to upper in order to obtain management information from upper network 110.Subsequently, the next Department of Communication Force 123 communicates with monitor in the next network 130, receiving the status data (S02) that expression is monitored the situation of object from the next network 130, and status data is sent to data processing division 122.
Then, 122 pairs of status datas from the next Department of Communication Force 123 inputs of data processing division are analyzed, for example, the address, source of status data is determined in being mapped in order to address in the query requests of obtaining management information and status data of will receiving in step S01, and according to described source Address Recognition and the corresponding object (S03) that is monitored of status data.Wherein, identification is monitored object and can be specially type and the numbering of determining to be monitored object.The type that is monitored object comprises DI (numeral input), DO (numeral output), MI (multimode input), MO (multimode output), AI (analog input), AO (simulation output) and PI (metering input) etc.The numbering that is monitored object is monitored object and is monitored position in the object in all of same type in order to represent this.Also promptly, can uniquely determine one according to type with numbering and be monitored object.
Then, data processing division 122 is according to the type that is monitored object and the numbering that are identified, read the attribute data (S04) that is monitored object from storage part 124, comprise the management information (S05) that is monitored the object full detail based on status data and the attribute data generation that is read, and the management information that is generated is sent to upper Department of Communication Force 121.
Subsequently, the office terminal in upper Department of Communication Force 121 and the upper network 110 communicates, being sent to upper network 110 (S06) from the management information of data processing division 122 inputs.So far, the data transmission and processing from the next to upper routine finishes.
Although in first embodiment, start data transmission and processing from the next to upper by issuing by upper network 110 in order to the query requests of obtaining management information.Yet the specific embodiment of the present invention is not limited thereto, and for example, also can come the data transmission and processing of selectivity execution from the next to upper by whether satisfying predetermined condition by data transmission device 120 according to the status data that receives from the next network 130.
Fig. 5 shows the flow chart at second embodiment of the data transmission and processing from the next to upper of this situation.
Compare with Fig. 4, Fig. 5 has omitted step S01, has increased step S031 and S032 simultaneously between step S03 and S04.To omit below they repeat specification of same section between the two, and only describe the difference of Fig. 5 and Fig. 4 in detail.
At first, by omitting step S01, make that the executive condition of second embodiment no longer is to receive in order to obtain the query requests of management information from upper network 110.
Secondly, by between step S03 and S04, having increased step S031 and S032, make to satisfy at status data under the situation of predetermined condition and send warning information etc. to upper side on one's own initiative from the next network 130 according to second embodiment, thereby can in time tackle various emergencies, and needn't wait until that poll regularly.
Particularly, be monitored object (S03) accordingly afterwards based on status data identification, data processing division 122 according to the information that is monitored object that is identified (for example, be monitored the type of object and numbering etc.) status data is handled (for example, carrying out numerical value conversion etc.) situation (S031) to determine to be monitored object.Subsequently, judge whether the determined situation that is monitored object satisfies the predetermined condition (S032) of emergency,, then continue the management information of follow-up step S04~S06, otherwise directly finish with the emergency of transmission expression immediately if satisfy.
The data transmission and processing flow process from upper to the next below with reference to Fig. 6 and Fig. 7 detailed description.As previously mentioned, the data transmission and processing from upper to the next mainly is meant the process that the control command that issues according to upper network 110 is set.
Fig. 6 shows the flow chart of the 3rd embodiment of the data transmission and processing from upper to the next.
As shown in Figure 6, receive afterwards from upper network 110 at upper Department of Communication Force 121 in order to control command (S11) that the next side is set, 122 pairs of received control commands of data processing division are analyzed with identification and the corresponding object (S12) that is monitored of this control command, read the attribute data that is monitored object that is identified from storage part 124, and determine setting content (S13) based on this control command and the attribute data that is read.Subsequently, set (S14) accordingly according to determined setting content.
For above-mentioned assignment procedure from upper to the next, since the full detail (corresponding to management information) that is monitored object comprise with the next network 130 in be monitored the relevant data items of object (corresponding to status data) and be monitored the attribute data of object, therefore, when the control command that receives from upper network 110, need to determine setting content relate to the attribute data that is monitored object also relate to the next network 130 in be monitored the relevant data items of object, and set processing accordingly according to the setting content difference.
Fig. 7 shows the concrete handling process of step S14 among Fig. 6, to describe how to set processing accordingly according to the setting content difference in detail.
As shown in Figure 7, be monitored object (S12) accordingly and determine corresponding setting content (S13) afterwards identifying based on control command, judge setting content whether relate to the next network in be monitored the relevant data items of object (S141).Be not if be judged as, also be that setting content relates to the attribute data (abbreviating " being set to IFU " as) that is monitored object, then change (S145) based on the attribute data of being stored in the storage part 124 of determined setting content to data transmission device 120 that is monitored object.
On the other hand, if the judgment is Yes, also be setting content relate to the next network in be monitored the relevant data items of object (abbreviating " being set to the next " as), then need setting content is sent to corresponding monitor in the next network 130 via the next Department of Communication Force 123.Particularly:
At first, setting content is handled (for example, carrying out numerical value conversion etc.) (S142), the control command that can receive with the monitor that generates in the next network 130 based on the information that is monitored object (for example, being monitored the type of object and numbering etc.).Secondly,, determine to be monitored the monitor that object is associated with this in the next network 130, determine promptly that also the target of control command in the next network 130 sends address (S143) based on the information that is monitored object (for example, being monitored the type of object and numbering etc.).Subsequently, the control command that will comprise the setting content after the processing via the next Department of Communication Force 123 is sent to the monitor (S144) that sends the address in the next network 130 as target.Wherein, monitor is configured to have and carries out for example function of the control of parameter setting etc. to being monitored object; And described control command has and the similar form of described management information, just do not have described attribute data.
By as Fig. 6~data transmission and processing of carrying out from upper to the next shown in Figure 7, the office terminal in the upper network 110 can be controlled the equipment of the next side effectively.And, via data processing division 122 based on being stored in the attribute data that is monitored object in the storage part 124 to resolving from the control command of upper network 110, not only can realize to realize the setting of monitoring by monitor in the next network that is monitored object to the change of the attribute data of being stored in data transmission device 120 self storage part.
In addition, for the above-mentioned data transmission and processing of setting from the control command of upper side in order to basis from upper to the next, preferably, after setting was finished, data transmission device 120 was also set result (S15) via upper Department of Communication Force 121 to upper network 110 feedbacks.
For above-mentioned data transmission device 120, preferably, storage part 124 also stores the numerical value transitional information that is associated with the type that is monitored object; And data processing division 122 can also be converted to the numerical value form that is suitable for office terminal in the upper network 110 with the numerical value in the received status data according to the numerical value transitional information that the type utilization that is monitored object is associated, and/or the numerical value in the received control command is converted to the numerical value form that is suitable for monitor in the next network 130.
For example, the numerical value form of supposing to be suitable for office terminal in the upper network 110 is an analog quantity, the numerical value form that is suitable for monitor in the next network 130 is a digital quantity, and then the numerical value transitional information of being stored in the storage part 124 is to be used for the information changed mutually between digital quantity and analog quantity.Particularly, storage part 124 is preserved two enactment documents, a storage digital information, a storage analog quantity information.
Fig. 8 shows data transmission device 120 carries out the AD/DA conversion in data transmission and processing schematic diagram.
In the data transmission and processing from the next to upper, need carry out DA conversion if be judged as according to the type that is monitored object (for example AI, AO, PI), numerical value the status data that promptly needs to obtain from the next network 130 is converted to analog quantity Ax from digital quantity Dx, then calculates Ax based on oblique line shown in Figure 8 by following formula.
Wherein, Amin represents the minimum analog quantity of the numerical value of data items, and Amax represents the maximum analog amount of the numerical value of data items, and Dmin represents the lowest numeric amount of the numerical value of data items, and Dmax represents the maximum number amount of the numerical value of data items.
On the other hand, in the data transmission and processing from upper to the next, need carry out AD conversion if be judged as according to the type that is monitored object (for example AI, AO, PI), numerical value in the setting content that promptly needs to obtain by the control command of analyzing from upper network 110 is converted to Dx from analog quantity Ax, then also can similarly calculate based on oblique line shown in Figure 8.
By in storage part 124, storing the numerical value transitional information explicitly with the type that is monitored object, and make data processing division 122 to carry out the numerical value conversion to status data and control command (also being setting content) according to the relevant numerical value transitional information of the type utilization that is monitored object, not only can have the management information of physical significance to upper side transmission, and can transmit effective set information the next side.
What need statement is that foregoing invention content and embodiment only are intended to prove the practical application of technical scheme provided by the present invention, should not be construed as the qualification to protection range of the present invention.Those skilled in the art are in spirit of the present invention and principle, when doing various modifications, being equal to and replacing or improve.Protection scope of the present invention is as the criterion with appended claims.