A kind of coal bed gas remote supervision system
Technical field
The present invention relates to a kind of remote supervision system, especially a kind of coal bed gas remote supervision system.
Background technique
A kind of attention of the coal bed gas as clean energy resource, by various countries.China has fossil energy more abundant, wherein
Coal bed gas is the associated energy sources of coal, and reserves are very considerable, and the resource storage total amount of middle-shallow layer coal bed gas ranks the third of the world position.
Coal bed gas main component is methane, and calorific value is higher, and product is carbon dioxide and water after full combustion.Make in traditional coal mining
In industry, coal bed gas is usually fallen by direct emission, and greatly safety accident also easily occurs for waste of resource, so preparatory working seam
Gas can increase economic interests, while be able to ascend the safety of coal mining, however due to China using the coal bed gas time compared with
Short, technology is not mature enough, and as easily exploded during coal-bed gas exploitation, the requirement to safety is very stringent, careless slightly
Serious production accident may occur, it is therefore desirable to the situation at implementing monitoring exploitation scene understands equipment running status, and
Discover whether that there are external uncertain security risks.Currently used method is manual inspection, wastes huge people
Power material resources, while inspection effect is also not fully up to expectations.Therefore a set of reliable and stable application and coal bed gas operation field are designed
Remote supervision system is very necessary, and the abnormal conditions for being distributed scattered each exploitation scene can be uploaded to middle control by system in time
Room, staff can promptly and accurately occur hidden danger, solve the problems, such as, accomplish the purpose of safety in production, what reduction was reported by mistake and failed to report
Situation, while guaranteeing that system can quickly make a response abnormal conditions, reduce the failure rate of system.
Summary of the invention
To overcome the shortcomings of existing technologies, it the purpose of the present invention is to provide a kind of coal bed gas remote detecting system, is used for
The monitoring coal-bed gas exploitation field condition of intelligence.By on-the-spot investigation combination coal bed gas distribution situation it is found that recovery well station multidigit
In remote mountain area, road bumpiness, and be distributed more dispersed.If system group network relies on traditional wire transmission video mode,
It is routed very difficult, higher cost, wiring cost is then reduced using wireless transmission method, is more advantageous to system group network, still
Need to consider wireless transmission during generate campus network problem, therefore this system use wireless networking mode, while in order to
The campus network generated in actual motion is saved, the abnormal conditions of processing image is realized in collection terminal, is happened when without exception
When, timing uploads a picture;When having abnormal conditions generation, upload has the image of abnormal conditions to show to server immediately alarms
Working method.
The purpose of the present invention is to provide a kind of coal bed gas remote detecting systems, comprising:
Collection terminal, the collection terminal are divided into the software run in hardware and ARM, realize the realtime graphic at acquisition exploitation scene
Information judges whether there is abnormal conditions after processing, and keeps the function of communicating with server;
Group network system;And
Server, including server monitoring end software can be managed after being sent to monitoring client for on-site supervision situation with people
The mode of solution shows, and to the automatic alarm of abnormal conditions.
Preferably, the hardware of the collection terminal includes thermal camera, power module, router, arm processor and outer
The composition of interface circuit is enclosed, the thermal camera uses FW18J-V2 model video camera, by monitoring site real-time image information
Electric signal is converted to by optical signal, the power module is made of solar panel and battery, realizes that stable power supply supplies
It answers, the arm processor is Exynos4412 chip, and the peripheral interface circuit is mainly various interface circuits, video decoding
Circuit and communication control circuit, the interface circuit extend network interface, usb, BNC, UART interface, the video decoding circuit
The chip used converts analog signals into digital signal for TVP5150, realizes that the thermal camera and the ARM are handled
The data connection of device, the communication control circuit use chip for DM9621ANP chip, control the transmission of Ethernet data.
Preferably, the router of the collection terminal uses 3G net by the four letter other routers of F3425 type technical grade
Network.
Preferably, software realization the acquisition image, abnormality detection, the function of data communication run in the ARM, using C
Language is run on the linux system of ARM carrying and using multithreading, including main thread, image acquisition and processing thread,
Image sends thread, order receiving thread, house dog thread, wherein and the main thread realizes parameter, Memory Allocation initialization,
House dog thread is opened, network communication parameters are set, opens and monitors, connection is waited, at this point, image acquisition and processing thread and image
It sends thread and does not set up, system just starts to work normally after waiting host computer connection to send order, if program breaks down
It waiting into Infinite Cyclic or always, then program will be restarted automatically, if collection terminal is paralysed completely, software watchdog will fail,
Whole system can not be restarted, need hardware watchdog to restart entire collection terminal at this time, it is that software systems are normal that order, which receives thread,
The entrance of work, collection terminal waits the connection request of host computer at any time, after establishing connection, receives host computer order, and open
Image acquisition and processing thread and image send thread, and order receiving thread uses epoll model, and image acquisition and processing thread includes
Initialization to camera, the distribution of image stored memory and the acquisition process part of image, pass through the collected figure of video camera
Piece is passed in ARM after format is converted, and after algorithm process, if it find that abnormal conditions, then by the frame picture compression and is examined
It whether idle looks into transmission thread, if sending the thread free time, compressed picture is pressed into and sends buffer area and informs transmission
Thread will be dealt into monitoring client thereon;If detected picture is no abnormal, but reaches timing time, then simultaneously by the picture compression
Check whether transmission thread is idle, if sending the thread free time, compressed picture is pressed into and sends buffer area and informs hair
Line sending journey will be dealt into monitoring client thereon.
Preferably, image sends thread and image acquisition and processing thread uses interlocking mechanism, it is ensured that data are sent accurate
Property.
Preferably, the group network system uses Virtual Private Network technology, i.e. VPN technologies under 3G technology, in collection terminal
The wireless router with VPN function is configured, each collection terminal is considered as a VPN client, and monitoring client is then used as VPN to take
Business device, router are that customer end A RM distributes static ip address, realize the accurate delivery of data, and 30 client's sector addresses distribution divide
With certain tunnel IP address range, while user name, password are set, specifies vpn server address, uses monitoring client in system
Static IP needs addition group membership, by testing with client user's name, password, tunnel IP as server address in vpn server
The communication tunnel with client is established after card, the VPN network interface card designs for double netcard, when user end to server sends data
When, vpn gateway checks that destination address is that datagram is then carried out VPN encapsulation by server address, and packet rs destination address is at this time
The outer gateway address of server VPN, is sent to server vpn gateway by internet, checks that data packet comes from client VPN net
It closes, is then unpacked by VPN agreement, send data packets to server computer, at this point, the data that server obtains are similar to from client
End directly obtains.
Preferably, the server includes:
(1) log-in module: user login validation function guarantees the safe operation of system, prevents non-working person's operation from making
With;
(2) previewing module: to the display function of well station picture, the well station number and selection monitoring of selection while monitoring are special
Fixed well station;
(3) configuration module: the setting of file storing path, user's registration nullify management, long-range to control well station function;
(4) playback module: playback well station monitored picture facilitates staff to realize the review to the previous situation in well station, side
Just monitoring work carries out;
(5) log module: the storage look facility of system work log and alarm log.
Preferably, the database storage model of the server uses the relationship and category of ER conceptual model track record object
Property, wherein user information includes user name and modification logging, has to image and checks permission, has storage to log and checks
Permission;Image information includes image name, three storage location, attribute parts, when wherein attribute is divided into image sources, acquisition
Between, whether abnormal three parts;Log information includes Log Names, three type, storage location parts, and type is divided into working day
Two parts of will and warning message;Well station information includes window number, three IP address, device name parts, well station collection terminal
The picture of upload, by monitoring software analysis shows that and storing, while record log information.
Preferably, the user's checking dialog box of the log-in module corresponds to CDlgLogin Similar integral from MFC dialog box class,
The display of two member variables m_usrPwd and m_usrName including CString character string type, user's checking dialog box are logical
The main dialog class CameraServerDlg class for crossing system is realized;The previewing module includes menu bar, Jing Zhanshebeishu, pre-
Look at window, log information display window, the CMenu class that wherein menu bar is MFC includes preview, playback, log, configuration, window
Number nullifies menu item, initializes letter by the statement menu class members's function m_Menu in main dialog class, and in main dialog box
It calls menu item loading command and display command to draw menu bar in number, realizes the handoff functionality between modules, preview
The corresponding CDlgOutput Similar integral of window includes window number, handle, video in window, socket etc. from base class CDialog class
Member variable, each display window are the object of a CDlgOutput class, realize the switching of multiwindow.Jing Zhanshebeishu
The main management realized to well station, four well stations are divided into one group, divide by last two arrangements of IP address of equipment.Log information is aobvious
Show that window realizes the real-time display of log information, staff is facilitated to check working state of system in time;The playback module wound
New thread function SearchPic (LPVOID pParam) is built, by the opening button of playback menu item in click menu column,
By the COMMAND message of menu class, playback dialog box is opened, and watch the time by setting, website number searches for record
Image data, system work are that record time of the image data received, store path, website number, store name all record
In picture_Tb table;The log module is divided into log information and warning message two parts, passes through Dlglog class dialog box
In type selection dialog box realize log information and warning message switching, after setting the time interval checked, by right
Log_Tb table is accessed, qualified information is searched and shows;Configuration module design be divided into be locally configured, user management,
Three parts of Remote configuration, corresponding to the dialog box module of Dlgconfig class, described be locally configured mainly carries out basic parameter
Setting, the user management mainly include the registration of new user and the deletion of existing subscriber's information, and the Remote configuration is to existing
Station point sends order and realizes reading picture or restarting equipment.
System Whole Work Flow: collection terminal video camera production wells station live image passes through the figure in collection terminal ARM chip
As the exception information in processing routine detection image sequence, after finding that someone or vehicle the abnormal conditions such as swarm into and occur, by this
Frame picture compression, which marks and passes through wireless network, is sent to monitoring client display alarm.
Beneficial effects of the present invention:
Present invention reduces staff's working strength, the next wireless flow of output transmission in control system operational process
Expense, in the course of work in addition to regularly sending real time picture, only transmission abnormality scene picture, so that staff is without for a long time
The case where manually monitoring each scene judge scene it is whether normal, system will make alarm to abnormal conditions, at the same time this
The working method of sample can effectively realize flow control, preferably be suitable for the monitoring scene of coal-bed gas exploitation, and it is past to reject water pumper
Multiple movement is interfered caused by abnormality detection, and can detect that people or vehicle swarm into caused exception, are simultaneously accurately and in time
The safety of system and real-time meet the needs of real-time monitoring system.
According to the following detailed description of specific embodiments of the present invention in conjunction with the accompanying drawings, those skilled in the art will be brighter
The above and other objects, advantages and features of the present invention.
Detailed description of the invention
Some specific embodiments of the present invention is described in detail by way of example and not limitation with reference to the accompanying drawings hereinafter.
Identical appended drawing reference denotes same or similar part or part in attached drawing.It should be appreciated by those skilled in the art that these
What attached drawing was not necessarily drawn to scale.Target and feature of the invention will be apparent from view of following description taken together with the accompanying drawings,
In attached drawing:
Fig. 1 show architecture diagram according to the system in the embodiment of the present invention;
Fig. 2 show collection terminal hardware architecture diagram according to an embodiment of the present invention;
Fig. 3 show camera structure figure according to an embodiment of the present invention;
Fig. 4 show power module structure figure according to an embodiment of the present invention;
Fig. 5 show image acquisition and processing thread flow figure according to an embodiment of the present invention;
Fig. 6 show image according to an embodiment of the present invention and sends thread flow figure;
Fig. 7 show network communication topological diagram according to an embodiment of the present invention;
Fig. 8 show monitoring software module design drawing according to an embodiment of the present invention.
Specific embodiment
Such as Fig. 1, shown system architecture diagram, the purpose of the present invention is to provide a kind of coal bed gas remote detecting systems, comprising:
Collection terminal;
Group network system;And
Server.
Wherein, collection terminal design is divided into the software design run in hardware design and ARM.Collection terminal realizes acquisition from main
The real-time image information for exploiting scene judges whether there is abnormal conditions after processing, and keeps the function communicated with server
Energy.
Collection terminal hardware design:
Collection terminal mainly realizes Image Acquisition, processing and communication function, to meet the function collection terminal hardware structure such as Fig. 2
Shown, wherein infrared camera uses FW18J-V2 model video camera, as shown in figure 3, the model camera can adapt to relatively dislike
Monitoring site real-time image information is converted to electric signal, power module such as Fig. 4 by optical signal by bad working environment, main realize
It is shown, it is made of solar panel and battery, can be realized stable power supply supply.
Arm processor is Exynos4412 chip, has low-power consumption, high-performance, can satisfy image processing requirements, ARM
Processor, which is mainly realized, handles acquisition picture, and realizes communication control;Its peripheral circuit is mainly various interface circuits,
Video decoding circuit and communication control circuit.The interface circuit primary expansion interfaces such as network interface, usb, BNC, UART, video solution
The chip that uses of code circuit can be realized for TVP5150 and convert analog signals into digital signal, realization infrared camera and
The data connection of arm processor;Communication control circuit uses chip for DM9621ANP chip, can control Ethernet data
Transmission.The chip supports IEEE802.3U100BASE-TX and IEEE802.310BASE-T standard, supports TCP/IP transmission, most
High data manipulation speed is 480Mbps.
For the networking for realizing coal-bed gas exploitation scene, each collection terminal need to be equipped with router, realize the communication with server
Connection.Consider on-scene communication signal strength actual conditions, the router that collection terminal uses is by the four letter other roads of F3425 type technical grade
Data transparent transmission is realized using 3G network by device.It has the following characteristics that
1, it is designed using technical grade, has the characteristics that high stability high precision, -35~75 degrees Celsius of operating ambient temperature antiposition,
It can be suitably used for field rugged environment, realize and stablize networking.
2,32 bit CPU of technical grade, Flash capacity 8MB, SCRAM capacity 64MB, can be realized the big datas such as picture, video
Measure wireless transmission demand.
3, bandwidth allocation mode, management flow, bandwidth setting can be set by network protocol type and client.
4, on the basis of common VPN, extension increases PPTP server, L2TP server, OpenVPN server, OpenVPN
Client is supported, multiple network security application deployment scheme is provided.
5, there is metal coating shell, realization communication component is isolated with other live modules.
Collection terminal programming:
Collection terminal programming acquires image, abnormality detection, the function of data communication mainly for realizing, using C language,
It runs on the linux system of ARM carrying.To realize that multi-functional coordination is realized, a variety of affairs are handled in time, using multithreading skill
Art.It wherein, mainly include main thread, image acquisition and processing thread, image transmission thread, order receiving thread, house dog thread.
Main thread mainly realizes parameter, Memory Allocation initialization, opens house dog thread, network communication parameters are arranged, open and monitor, etc.
Wait connect.At this point, image acquisition and processing thread sends thread with image and do not set up, system waits host computer connection to send order
Just start to work normally afterwards.House dog thread is software watchdog implementation, and program needs timing dog-feeding during running, if
Program, which breaks down, to be entered Infinite Cyclic or waits always, then program will be restarted automatically.If collection terminal is paralysed completely, software is seen
Door dog will fail, and can not restart whole system, hardware watchdog is needed to restart entire collection terminal at this time.House dog mechanism can have
The guarantee collection terminal software of effect, hardware stable operation.Order receive thread be software systems work normally entrance, collection terminal with
When wait host computer connection request, after establishing connection, receive host computer order, and open image acquisition and processing thread and figure
As sending thread.Order receiving thread uses epoll model.Image acquisition and processing thread mainly includes the initialization to camera,
The parts such as the acquisition process of the distribution of image stored memory and image, through the collected picture of video camera after format is converted
In incoming ARM, after algorithm process, if it find that abnormal conditions, then by the frame picture compression and check whether send thread
Compressed picture is pressed into if sending the thread free time and sends buffer area and inform that sending thread will be dealt into thereon by the free time
Monitoring client;If detected picture is no abnormal, but reach timing time, then by the picture compression and check send thread be
Compressed picture is pressed into if sending the thread free time and sends buffer area and inform that sending thread will send out thereon by the no free time
To monitoring client, algorithm flow is as shown in Figure 5.Image sends the function that thread realizes collection terminal and monitoring client data communication, calculates
Method process is as shown in Figure 6.The multithreading of Linux platform is supported that primary operational is divided into creation, waits and exit by the library Pthread.
Image sends thread and image acquisition and processing thread uses interlocking mechanism, it is ensured that the accuracy that data are sent, guarantee will not occur
The frame image data is not yet sent completely, and another frame image data, which has been pressed into, sends the feelings that buffer area covering not yet sends data
Condition.
Networking technology: Virtual Private Network technology is used.Since it is desired that guaranteeing that the data of transmission are capable of being sent to for safety
Monitoring client, while considering the 3G technology of selection, selection uses VPN technologies, and expense is small, it is only necessary to pay certain traffic fee, press
It is divided into PPTP, L2TP, IPSec according to tunneling technique.The purpose of system group network design is to realize the Centralized Monitoring at live 30 well stations,
It needs to establish wireless data connection in the collection terminal and monitoring client at 30 well stations, in order to realize the transmission for utilizing VPN technologies safety
Data have the wireless router of VPN function in collection terminal configuration, and each collection terminal is considered as a VPN client, monitors
End is then used as vpn server, and router is that customer end A RM distributes static ip address, realizes the accurate delivery of data, 30 clients
Sector address distribution, distributes certain tunnel IP address range, while user name, password is arranged, and specifies vpn server address, is
Using monitoring client static IP as server address in system.Needed in vpn server addition group membership, by with client user
The communication tunnel with client is established after name, password, tunnel IP verifying.VPN network interface card designs for double netcard, when client is to service
When device sends data, vpn gateway checks that destination address is that datagram is then carried out VPN encapsulation by server address, at this time data packet
Destination address is the outer gateway address of server VPN, is sent to server vpn gateway by internet, checks data packet from visitor
Family end vpn gateway is then unpacked by VPN agreement, sends data packets to server computer, at this point, the data class that server obtains
It is similar to directly obtain from client, network topological diagram is as shown in Figure 7.
Server design:
It mainly include server monitoring end software design, on-site supervision situation can be with people's understanding after being sent to monitoring client
Mode is shown, and accomplishes the automatic alarm to abnormal conditions, reaches the monitoring to coal bed gas well station.Monitoring software module is such as
Shown in Fig. 8, wherein log-in module realizes user login validation function, guarantees the safe operation of system, prevents non-working person from grasping
It uses;Previewing module realizes that the display function to well station picture, the well station number and selection monitoring of selection while monitoring are special
Fixed well station;Configuration module realizes the setting of file storing path, and user's registration nullifies management, long-range to control well station function;It returns
Amplification module realizes playback well station monitored picture, facilitates staff to realize the review to the previous situation in well station, facilitates monitoring work
It carries out;Log module realizes the storage look facility of system work log and alarm log.
(1) database storage model designs: monitoring client software needs to realize that long-term monitoring stores 30 well station monitored pictures
Function, data volume is larger, while storage monitoring well station information, user information, work log, warning message etc. in monitoring software
Data, data class multiplicity, using the relationship and attribute of ER conceptual model track record object, wherein user information includes to use
Name in an account book and modification logging have image and check permission, have storage to log and check permission;Image information includes Image Name
Three title, storage location, attribute parts, wherein whether extremely attribute is divided into image sources, acquisition time, three parts;Log
Information includes Log Names, three type, storage location parts, and type is divided into two parts of work log and warning message;Well
Information of standing includes window number, three IP address, device name parts, the picture that well station collection terminal uploads, by monitoring software point
Analysis displays and store, while record log information.
(2) log-in module designs: being the entrance of system, for realizing login user verifying, user's checking dialog box is corresponding
For CDlgLogin Similar integral from MFC dialog box class, main includes two member variable m_usrPwd of CString character string type
And m_usrName.The display of user's checking dialog box is realized by the main dialog class CameraServerDlg class of system.
(3) previewing module designs: be the major interfaces of system operation, realize image show, well station selection function, main packet
Include menu bar, Jing Zhanshebeishu, the preview window, log information display window.Wherein menu bar is that the CMenu class of MFC is mainly wrapped
Containing menu items such as preview, playback, log, configuration, window number, cancellations, pass through the statement menu class members letter in main dialog class
Number m_Menu, and menu item loading command and display command are called to draw menu bar, in fact in main dialog box initialization function
Handoff functionality between existing modules.The corresponding CDlgOutput Similar integral of the preview window includes window from base class CDialog class
Member variables, each display window such as mouth number, handle, video in window, socket are pair of a CDlgOutput class
As realizing the switching of multiwindow.Jing Zhanshebeishu mainly realizes the management to well station, and four well stations are divided into one group, by device IP
Last two arrangements in address divide.Log information display window realizes the real-time display of log information, facilitates staff timely
Check working state of system.
(4) playback module designs: passing record is surveyed in realization, does not influence the normal work of system monitoring thread, is created
Build new thread function SearchPic (LPVOID pParam).By the opening button of playback menu item in click menu column,
By the COMMAND message of menu class, playback dialog box is opened, and watch the time by setting, website number searches for record
Image data.System work is that record time of the image data received, store path, website number, store name all record
In picture_Tb table, search efficiency is improved.
(5) log module designs: being divided into log information and warning message two parts, passes through the class in Dlglog class dialog box
Type selects the switching of dialog box realization log information and warning message, after setting the time interval checked, by access
Log_Tb table is searched qualified information and is shown.
(6) configuration module design: be divided into be locally configured, three user management, Remote configuration parts, correspond to
The dialog box module of Dlgconfig class.It is locally configured and mainly basic parameter is configured, such as picture, the store path of log;
User management mainly includes the registration of new user and the deletion of existing subscriber's information;Remote configuration is to send to order to live website
It realizes and reads picture or restarting equipment.Configuration module is able to use some basic setups of the family realization to monitoring software, with relatively straight
The mode of sight carries out data management, subscriber information management.
System Whole Work Flow: collection terminal video camera production wells station live image passes through the figure in collection terminal ARM chip
As the exception information in processing routine detection image sequence, after finding that someone or vehicle the abnormal conditions such as swarm into and occur, by this
Frame picture compression, which marks and passes through wireless network, is sent to monitoring client display alarm.
The present embodiment system reduces staff's working strength, the nothing that output transmission comes in control system operational process
Linear flow rate expense, in the course of work in addition to regularly sending real time picture, only transmission abnormality scene picture, so that staff is not necessarily to
Whether the case where manually monitoring each scene for a long time be normal to judge scene, and system will make alarm to abnormal conditions, with this
Such working method can effectively realize flow control simultaneously, preferably be suitable for the monitoring scene of coal-bed gas exploitation, reject and take out
Water dispenser reciprocating motion is interfered caused by abnormality detection, and can detect that people or vehicle swarm into caused exception accurately and in time,
The safety of simultaneity factor and real-time meet the needs of real-time monitoring system.
Although the present invention is described by reference to specific illustrative embodiments, these embodiments are not will receive
Restriction and only limited by accessory claim.It should be understood by those skilled in the art that can be without departing from of the invention
Change and modification are able to carry out to the embodiment of the present invention in the case where protection scope and spirit.