Background technology
The appearance of " Internet of Things " concept, the Traditional Thinking before having broken.The thinking in past is that physical infrastructure and information infrastructure are separated always.For Safety of Coal Mine Production, in " Internet of Things " epoch, the various kinds of sensors such as gas, CO, cable, electricapparatus equipment, all these will be integrated into unified infrastructure with chip, broadband, and Internet of Things can be implemented more in real time effectively coordinated management and control to the personnel in the production system under the complex environment of colliery, machine, equipment, infrastructure, Environmental security.The Internet of Things concept has proposed new thinking and method for setting up Safety of Coal Mine Production and early warning rescue new system.
The emphasis of mine Internet of Things solves the safe and efficient running problem of mine " people, machine, thing, ring " exactly, and creative essence safety-type operating environment guarantees personal safety, and improves the service efficiency of equipment.By two change fusions, scientific and technical innovation changes existing management and control pattern, increases economic efficiency.
How to utilize technology of Internet of things to solve the perception problems of personal security environment, electromechanical equipment in the coal production, solve the mine disaster situation prediction, reduce or avoid the generation of serious disasters and accidents, solve the Intellectualized monitoring of safety in production, these all are the problems that the mine Internet of Things is paid close attention to.
The situation in current mine is very complicated, has the transducer diversity, the agreement diversity, and the way to manage diversity, this is applied to the mine to the Internet of Things correlation technique and has proposed very large challenge.Therefore, it is not the comprehensive automation of simple mine that the mine Internet of Things is used, but on this basis, utilizes technology of Internet of things further to improve the mine comprehensive automation, needs to set up to adapt to transducer diversity and the multifarious intelligent gateway device of agreement.
Reference paper 1 (number of patent application: CN200810201578) provide a kind of industry wireless network access MODBUS/TCP Industrial Ethernet based on IEEE802.15.4a and the multi-protocol gateway of PROFIBUS-DP fieldbus.This multi-protocol gateway comprises microprocessor, MODBUS/TCP main website, the wireless main website of IEEE802.15.4a, PROFIBUS-DP slave station, extend out SDRAM memory and FLASH memory, RJ45 network interface, 485 physical layer interfaces, USB interface; The connected mode of circuit is centered by microprocessor, extend out DM9161EP ethernet physical layer interface chip by the MDIO interface, connect PROFIBUS-DP protocol chip SPC3 by internal bus, connect NA1TR8 wireless protocols chip by spi bus, extend out USB interface.
Technique scheme has realized the protocol conversion of a lot of interfaces, but in the application of Internet of Things, also has a lot of functions not to be met.Analyze etc. such as the data representation of agreement, the again programming of receiver, dynamic many interface processors system, sensing equipment geocoding and intelligent packet.
Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, below in conjunction with specific embodiment, and with reference to accompanying drawing, the present invention is described in more detail.
Need to prove that in accompanying drawing or specification description, similar or identical part is all used identical figure number.The implementation that does not illustrate in the accompanying drawing or describe is form known to a person of ordinary skill in the art in the affiliated technical field.In addition, although this paper can provide the demonstration of the parameter that comprises particular value, should be appreciated that parameter need not definitely to equal corresponding value, but can in acceptable error margin or design constraint, be similar to corresponding value.
In one exemplary embodiment of the present invention, provide a kind of mining intelligent transport gateway.Fig. 1 is the topological relation schematic diagram of embodiment of the invention mining intelligent transport gateway.As shown in Figure 1, its lower end is connected by physical layer interface with transducer, and the upper end is connected with the mine optical fiber looped network by mine optical fiber looped network interface.This mining intelligent transport gateway is mainly used in: the packet information of receiving sensor, carry out the intelligent standard processing of various protocols, and identification is unified geocoding, and the heat transfer agent after the Unified coding is transferred to host computer.
Fig. 2 is the structural representation of embodiment of the invention mining intelligent transport gateway.As shown in Figure 2, present embodiment mining intelligent transport gateway comprises: physical layer interface circuit module, data representation module, data packet analysis module and sensing equipment geocoding module.Wherein, data representation module, data packet analysis module and sensing equipment geocoding module integration are in fpga chip.Below respectively modules is elaborated:
The compatible CAN of physical layer interface circuit module, WIFI, 802.15.4, RS485, RS232, optical fiber interface, RJ45 interface, TD-SCDMA/GPRS/GSM interface, the interfaces such as serial ports, be used for converting above-mentioned different electrical specification of interface signal to signal that suitable FPGA processes, process for the data processing module on the FPGA, perhaps the standard signal of data processing module is changed into the signal of suitable above-mentioned interface transmission in the other direction.Fig. 3 is the schematic diagram that embodiment of the invention mining intelligent transport gateway physical layer interface circuit module transform electric module is carried out transform electric.This transform electric process can adopt the whole bag of tricks of the prior art, no longer describes in detail herein.
The data representation module is used for each the road sensor signal with electric conversion, and the generated data table comprises: physical layer parameter dispensing unit, physical layer receiving element, byte content buffer cell, gap information buffer cell and tables of data generation unit.
Wherein, described physical layer transceiver unit comprises a plurality of physical layer transceivers, described data representation module also comprises: the physical layer parameter dispensing unit, be used for utilizing the multidiameter option switch parameter to select one of them front end input sensor signal of these a plurality of physical layer transceivers, the rear end is connected to byte content buffer cell and gap information buffer cell; And after utilizing present physical layer transceiver to resolve, during the tables of data failed regeneration, send the multidiameter option switch parameter updating request to host computer, and after receiving the feedback of host computer, select suitable physical layer transceiver by revising the multidiameter option switch parameter.
For example, the original program of this interface is the total sequence of threads of CAN, need to switch to RS485.The physical layer parameter dispensing unit sends modification multidiameter option switch parameter updating request to host computer, and after receiving the feedback of host computer, selects RS485 physical layer signal transceiver by revising the multidiameter option switch parameter.
Fig. 4 is the key diagram that the data representation module is carried out data representation in the embodiment of the invention mining intelligent transport gateway.Below in conjunction with Fig. 4 the data representation module is elaborated.
The physical layer transceiver unit, be used for utilizing physical layer transceiver to realize each road sensor signal bus protocol, will be fit to the variety of protocol of FPGA processing, as: CAN, WIFI, 802.15.4, RS485, RS232, optical fiber interface, the RJ45 interface, the signal of TD-SCDMA/GPRS/GSM etc. is resolved, temporal information between output byte content and byte.
The byte content buffer cell is used for the byte content that storage current physical layer Transmit-Receive Unit is resolved output.
The gap information buffer cell is for temporal information between the byte of storage current physical layer Transmit-Receive Unit output.
The tables of data generation unit is used for utilizing the byte content of byte content buffer cell and the byte time information of gap information buffer cell, generates the tables of data of two dimension, and is as shown in table 1.
Table 1 tables of data
Byte content |
Byte 1 |
Byte 2 |
Byte 3 |
... |
Byte N |
Temporal information |
The forward time |
The forward time |
The forward time |
... |
The forward time |
The data packet analysis module, the content in the reading out data table utilizes the intelligent protocol analysis engine that existing protocol status conversion module in tables of data content and the library template is mated, and the tables of data content is converted into the message body according to the protocol status conversion module that mates.
Table 2 protocol status conversion module
This state transitions template is as shown in table 2, and it can be stored in the library template of intelligent protocol analysis engine, represents very eurypalynous application protocol.The state transitions template is the tlv triple that is made of following element: byte content, state relation and temporal information.
Byte content is current byte content.
State relation comprises forward expectation state and redirect ring, the content of the next byte that the current byte of forward expectation state representation is desired,
The redirect ring when the redirect ring occurs, a ring then occurred in figure, the information of ring, the byte offset location of pointing to redirect represents that positive number is offset as to be offset to the high byte direction, the negative skew is for being offset to the low byte direction, and 0 represents this position does not have the redirect ring.
Temporal information is used for the aid identification complete data packet.When the time space greater than average time during the space, a complete packet may begin or finish.
For example, exist such as next number according to table:
For above-mentioned tables of data, its corresponding state transitions template is as shown in table 3: x represents arbitrary data:
Table 3 protocol status conversion module
In the table, t0, the mean value of t8 much larger than t1 to t7 represents that this is a complete packet.The data that top tables of data parses are aefh.
The tables of data that the match is successful will be expressed as the message body, and the message body contains: data message, interface message, sensor type.This message can be sent to sensing equipment geocoding module.
For clarity sake, Fig. 5 is that the data packet analysis module is carried out the matching process key diagram in the embodiment of the invention mining intelligent transport gateway.Fig. 6 is the flow chart that the data packet analysis module is carried out matching process in the embodiment of the invention mining intelligent transport gateway.As shown in Figure 5 and Figure 6, matching process is as described below:
Step S502 searches the state conversion module that whether has this sensor passage in the gateway interface agreement storage list, if having, and execution in step S504 then, otherwise, execution in step S506;
Step S504, with tables of data directly with gateway interface agreement storage list in state conversion module and mate execution in step S512;
Step S506 mates tables of data and all state conversion module;
Step S508 judges whether that the match is successful, if so, and execution in step S510, otherwise, execution in step S512;
Step S510 generates the message body with the tables of data content according to existing protocol status conversion module, and flow process finishes;
If the match is successful, represent that then a complete packet is identified.These data not only include transducer and send data, but also comprise other control information.
After the match is successful, will temporarily fix this interface protocol, be recorded in the gateway interface agreement storage list, when next tables of data arrives, directly and the corresponding template in the form mate.
Table 3 gateway interface agreement storage list
Interface 1 |
(the CAN type, the water wave transducer,, protocol status conversion module 1) |
Interface 2 |
(WIFI type, mobile phone, protocol status conversion module 2) |
Interface 3 |
(ZIGBEE type, positioning cards, protocol status conversion module 3) |
Other interface |
(the XX type, XX equipment,, protocol status conversion module 4) |
Step S512 carries out statistical analysis to the tables of data data in the tables of data that it fails to match and seeks rule, enters the pattern matching method, and the packet of some is distinguished good character pattern and not good character pattern through statistical analysis.
Good character pattern refers to that data have certain rule in the tables of data, data packet head for example, packet tail, data length, incremental data, the data of successively decreasing, smoothed data etc.Gateway of the present invention adopts Fuzzy Cluster Analysis method, identifies good character and these data are dealt into server together with tables of data from tables of data;
Not good character pattern refers to that tables of data contains erratic data, for example: discrete data (switch data), escape character (ESC), specific coding implication character, complicated header etc., gateway of the present invention is dealt into server with data table stores, carries out manual analysis.
Sensing equipment geocoding module, be used for from message body extraction equipment type, interface index, bus type and sensor values, utilize device type, interface index and bus type, retrieve IP address corresponding to this equipment, IP address, equipment belonging positions and sensing data are integrated can be at the packet of optical fiber ring network transmission, shown in Fig. 7 and table 4.
Table 4 packet
The IP address |
The equipment belonging positions |
Sensing data |
The IP network section |
Tunnel 1 |
(XXXXXX) |
Sensing equipment geocoding module can be mutual with host computer, obtains and preserve transducer kind and sensor region on each interface.The purpose of coding is foundation and underworkings and working face address and the IP of being combined at the equipment of each position, finishes the tunnel network segment, the working face in whole large mining area, the IP of equipment encodes.
The purpose of the packet of this spline structure is, carries out geographical Module Division, set up based on sensor type, and the address, data type, the address coding method of transducer relation is set up the framework of the geographical module in subregion, articulates multiple sensors and Executive Module.In the single geographical module, multiple sensors is carried out effective perception to being responsible for the zone jointly.The perception data of sensing layer by various kinds of sensors, obtains the information of perceptive object.Such as the environmental informations such as production wells leeward, pressure, temperature, water level, gas and roof delamination, anchor shaft anchor cable, status information of equipment etc.These wireless sensers are responsible for information in the certain coverage of perception as single individuality, as a member in the network, in sensing layer, there is the compatible rule of information between transducer is mutual, can communicate by letter mutually between the transducer, set up sensor data retrieval and Fusion Model.
Above-mentioned steps is the communication steps from the gateway to the host computer.Communication steps from the host computer to the gateway is a reverse procedure, be included in the address resolution of intelligent addresses coding, obtain the respective sensor interface, then analyze in the template at intelligent protocol, find the model agreement of this interface, convert the message body to the state conversion module, then deliver to byte buffering and time buffering, through physical layer transceiver, to the physical layer interface circuit module, become the signal that is fit to bus transfer.
The below lifts an example this programme is described:
2 cables of transducer are connected on the binding post of physical layer circuit interface module of gateway, gateway is received on the mining looped network.Suppose that physical layer transceiver corresponding to binding post is the can transceiver.And the interface of transducer is Rs485.After the energising work, gateway can detect, and the physical layer transceiver program is not right, sends to host computer and upgrades application.The staff is after seeing solicitation message, can check the corresponding interface, select to revise the multidiameter option switch parameter at host computer, send on the gateway, gateway can in the situation of not destroying other modules, be selected RS485 physical layer signal transceiver by revising the multidiameter option switch parameter.Gateway finds that all templates in the storehouse all are not suitable for behind the packet of successfully receiving transducer, behind the packet of accumulation some, gateway can call the intelligent protocol analytical method, carries out the pattern string analysis.After the staff sees analysis result, can formulate new model agreement, this template is sent to gateway, carry out protocol update.
After packet was mated, gateway meeting docking port and transducer carried out unified coding.For example, a regional IP is 187.432.199.0, and the unification of water wave information sensor coding is 00.After host computer was received data, the form of demonstration was zone one, and the water wave transducer is conducive to like this mining area all equipment is carried out unified retrieval.
Mining intelligent transport gateway of the present invention has the compatibility of sensor interface and the applicability of variety of protocol, can realize the fusion of heterogeneous network, use different network technologies that all standing is realized in the tunnel according to environment and needs, and realize freely accessing of terminal by the reconstruct of portable terminal.
Above-described specific embodiment; purpose of the present invention, technical scheme and beneficial effect are further described; institute is understood that; the above only is specific embodiments of the invention; be not limited to the present invention; within the spirit and principles in the present invention all, any modification of making, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.