Background technology
The appearance of " Internet of Things " concept, the Traditional Thinking before having broken.The thinking in past is 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 etc., all these will be unified infrastructure with chip, integrate, and Internet of Things can implement effective coordinated management and control more in real time to the personnel in production system under the complex environment of colliery, machine, equipment, infrastructure, Environmental security.Internet of Things concept is set up Safety of Coal Mine Production and early warning to rescue new system and propose new thinking and countermeasure.
The emphasis of mine Internet of Things, solve mine " people, machine, thing, ring " safe and efficient operational problems exactly, creative essence safety-type operating environment, guarantees personal safety, and improves the service efficiency of equipment.Change by two and merge, scientific and technical innovation, changes existing pipe diameter design, increases economic efficiency.
Technology of Internet of things how is utilized to solve the perception problems of personal security environment, electromechanical equipment in coal production, solve the prediction of mine disaster situation, reduce or avoid the generation of serious disasters and accidents, solve the Intellectualized monitoring of safety in production, these are all mine Internet of Things issues that need special attention.
The situation in current mine is very complicated, there is transducer diversity, agreement diversity, way to manage diversity, and this is applied to mine to Internet of Things correlation technique and proposes very large challenge.Therefore, Internet of Things application in mine is not the comprehensive automation of simple mine, but on this basis, utilizes technology of Internet of things to improve mine comprehensive automation further, needs foundation can adapt to transducer diversity and the multifarious intelligent gateway device of agreement.
Reference paper 1 (number of patent application: CN200810201578) provides the multi-protocol gateway of a kind of industry wireless network based on IEEE802.15.4a access MODBUS/TCP Industrial Ethernet and PROFIBUS-DP fieldbus.This multi-protocol gateway comprises microprocessor, MODBUS/TCP main website, IEEE802.15.4a is wireless main website, 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, DM9161EP ethernet physical layer interface chip is extended out by 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 achieves the protocol conversion of a lot of interface, but in the application of Internet of Things, also has a lot of function not to be met.The programming again of the data representation of such as agreement, receiver, dynamically multiplex roles treatment mechanism, sensing equipment geocoding and intelligent packet are analyzed etc.
Embodiment
For making the object, technical solutions and advantages of the present invention clearly understand, below in conjunction with specific embodiment, and with reference to accompanying drawing, the present invention is described in more detail.
It should be noted that, in accompanying drawing or specification describe, similar or identical part all uses identical figure number.The implementation not illustrating in accompanying drawing or describe is form known to a person of ordinary skill in the art in art.In addition, although herein can providing package containing the demonstration of the parameter of particular value, should be appreciated that, parameter without the need to definitely equaling corresponding value, but can be similar to corresponding value in acceptable error margin or design constraint.
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 present invention mining intelligent transport gateway.As shown in Figure 1, its lower end is connected by physical layer interface with transducer, and upper end is connected with mine optical fiber looped network by mine optical fiber ring interfaces.This mining intelligent transport gateway is mainly used in: the packet information of receiving sensor, carries out the intelligent standard process of various protocols, identifies, carries out unifying geocoding, and the heat transfer agent after Unified coding is transferred to host computer.
Fig. 2 is the structural representation of embodiment of the present invention mining intelligent transport gateway.As shown in Figure 2, the 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 described in detail:
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, for above-mentioned different electrical specification of interface signal being converted to the signal of applicable FPGA process, for the data processing module process on FPGA, or the standard signal of data processing module is changed into the signal of applicable above-mentioned interface transmission in the other direction.Fig. 3 is the schematic diagram that embodiment of the present invention mining intelligent transport gateway physical layer interface circuit modular electrical signal conversion module carries out transform electric.This transform electric process can adopt various method of the prior art, no longer describes in detail herein.
Data representation module, for each the road sensor signal by electric conversion, generates tables of data, comprising: 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 multiple physical layer transceiver, described data representation module also comprises: physical layer parameter dispensing unit, for utilizing multidiameter option switch parameter to select one of them front end input sensor signal of the plurality of physical layer transceiver, rear end is connected to byte content buffer cell and gap information buffer cell; And after utilizing current physical layer transceiver to resolve, during tables of data failed regeneration, send multidiameter option switch parameter updating request to host computer, and after receiving the feedback of host computer, select suitable physical layer transceiver by amendment multidiameter option switch parameter.
Such as, the original program of this interface is CAN program, needs to switch to RS485.Physical layer parameter dispensing unit, sends amendment multidiameter option switch parameter updating request to host computer, and after receiving the feedback of host computer, selects RS485 physical layer signal transceiver by amendment multidiameter option switch parameter.
Fig. 4 is the key diagram that in embodiment of the present invention mining intelligent transport gateway, data representation module carries out data representation.Below in conjunction with Fig. 4, data representation module is described in detail.
Physical layer transceiver unit, for utilizing physical layer transceiver to realize each road sensor signal bus protocol, by the various agreements of applicable FPGA process, as: CAN, WIFI, 802.15.4, RS485, RS232, optical fiber interface, RJ45 interface, the signal of TD-SCDMA/GPRS/GSM etc. is resolved, temporal information between output byte content and byte.
Byte content buffer cell resolves for storing current physical layer Transmit-Receive Unit the byte content exported.
Gap information buffer cell, for store current physical layer Transmit-Receive Unit export byte between temporal information.
Tables of data generation unit, for the byte time information of the byte content and gap information buffer cell that utilize byte content buffer cell, generates the tables of data of two dimension, 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 |
Data packet analysis module, reads the content in tables of data, utilizes intelligent protocol analysis engine to be mated by protocol status conversion module existing in tables of data content and library template, and tables of data content is converted into message body according to the protocol status conversion module of coupling.
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.State transitions template is the tlv triple be made up of following element: byte content, state relation and temporal information.
Byte content is current byte content.
State relation comprises forward and expects state and redirect ring, and forward expects the content of the next byte desired by state representation current byte,
, when redirect ring occurs, then there is a ring in the graphic in redirect ring, the information of ring, represents by the byte offset location that redirect is pointed to, and positive number skew is for offset to high byte direction, negative skew is for offseting to low byte direction, and 0 represents this position does not have redirect ring.
Temporal information is used for aid identification complete data packet.When time space is greater than space average time, a complete packet may start or terminate.
Such as, exist if next number is according to table:
For above-mentioned tables of data, the state transitions template of its correspondence is as shown in table 3: x represents arbitrary data:
Table 3 protocol status conversion module
In table, t0, t8, much larger than the mean value of t1 to t7, represent that this is a complete packet.The data that tables of data above parses are aefh.
The tables of data that the match is successful, will be expressed as message body, and 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 in embodiment of the present invention mining intelligent transport gateway, data packet analysis module carries out matching process key diagram.Fig. 6 is the flow chart that in embodiment of the present invention mining intelligent transport gateway, data packet analysis module carries out matching process.As shown in Figure 5 and Figure 6, matching process is as described below:
Step S502, searches the State Transferring template that whether there is this sensor passage in gateway interface agreement storage list, if had, then performs step S504, otherwise, perform step S506;
Step S504, by tables of data directly with State Transferring template in gateway interface agreement storage list with mate, execution step S512;
Step S506, mates tables of data with all State Transferring templates;
Step S508, judges whether that the match is successful, if so, performs step S510, otherwise, perform step S512;
Step S510, tables of data content is generated message body according to existing protocol status conversion module, and flow process terminates;
If the match is successful, then the packet that expression one is complete 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 gateway interface agreement storage list, when next tables of data arrives, the corresponding template coupling directly and in form.
Table 3 gateway interface agreement storage list
Interface 1 |
(CAN type, 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 |
(XX type, XX equipment, protocol status conversion module 4) |
Step S512, carries out statistical analysis to the data table data in the tables of data that it fails to match and finds rule, Dietary behavior String matching method, and the packet of some, through statistical analysis, distinguishes good character pattern and not good character pattern.
Good character pattern, refers to that in tables of data, data have certain rule, such as data packet head, packet tail, data length, incremental data, decremented data, 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, such as: discrete data (switch data), escape character (ESC), specific coding implication character, complicated header etc., tables of data stores by gateway of the present invention, is dealt into server, carries out manual analysis.
Sensing equipment geocoding module, for extraction equipment type, interface index, bus type and sensor values from message body, utilize device type, interface index and bus type, retrieve the IP address that this equipment is corresponding, IP address, equipment belonging positions and sensing data are integrated the packet that can transmit at optical fiber ring network, as shown in Fig. 7 and table 4.
Table 4 packet
IP address |
Equipment belonging positions |
Sensing data |
IP network section |
Tunnel 1 |
(XXXXXX) |
Sensing equipment geocoding module can be mutual with host computer, obtains and the kind of sensor preserved on each interface and sensor region.The object of coding sets up and underworkings and working face address and the IP that is combined at the equipment of each position, complete the tunnel network segment in whole large mining area, working face, equipment IP encode.
The object of the packet of this spline structure is, carries out geographical Module Division, sets up based on sensor type, address, data type, the address coding method of transducer relation, sets up the framework of the geographical module in subregion, mounting multiple sensors and Executive Module.In single geographical module, multiple sensors carries out effective perception to responsible region jointly.The perception data of sensing layer, by various kinds of sensors, obtains the information of perceptive object.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 the information in the certain coverage of perception as single individuality, as a member in network, in sensing layer, between transducer is mutual, there is the compatible rule of information, can communicate mutually between transducer, set up sensor data retrieval and Fusion Model.
Above-mentioned steps is the communication steps from gateway to host computer.Communication steps from host computer to gateway is a reverse procedure, be included in the address resolution of intelligent addresses coding, obtain respective sensor interface, then analyze in template at intelligent protocol, find the model agreement of this interface, convert message body to State Transferring template, then byte buffer and time buffering is delivered to, through physical layer transceiver, to physical layer interface circuit module, become the signal of applicable bus transfer.
Lift an example below and this programme be described:
Transducer 2 cables are connected on the binding post of physical layer circuit interface module of gateway, gateway is received on mining looped network.Assuming that physical layer transceiver corresponding to binding post is can transceiver.And the interface of transducer is Rs485.After energising work, gateway can detect, physical layer transceiver program is not right, sends upgrade application to host computer.Staff is after seeing solicitation message, can the corresponding interface be checked, host computer be selected amendment multidiameter option switch parameter, is sent on gateway, gateway when not destroying other modules, can select RS485 physical layer signal transceiver by amendment multidiameter option switch parameter.Gateway is after the packet successfully receiving transducer, and find that all templates in storehouse are all not suitable for, after the packet of accumulation some, gateway can call intelligent protocol analytical method, carries out pattern string analysis.After staff sees analysis result, new model agreement can be formulated, this template is sent to gateway, carry out protocol update.
After packet is mated, gateway meeting docking port and transducer, carry out unified coding.Such as, region one IP is 187.432.199.0, and the unification of water wave information sensor coding is 00.After host computer receives data, the form of display is region one, and water wave transducer is conducive to mining area like this and carries out unified retrieval to all equipment.
Mining intelligent transport gateway of the present invention has the compatibility of sensor interface and the applicability of various agreement, the fusion of heterogeneous network can be realized, environmentally use different network technologies to realize all standing to tunnel with needing, and realize freely accessing of terminal by the reconstruct of mobile terminal.
Above-described specific embodiment; object of the present invention, technical scheme and beneficial effect are further described; be understood that; the foregoing is only specific embodiments of the invention; be not limited to the present invention; within the spirit and principles in the present invention all, any amendment made, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.