Summary of the invention
In order to solve the above-mentioned technical problem the application, proposes following technical solution:
In a first aspect, the embodiment of the present application provides a kind of dam safety monitoring method, which comprises obtain and lay
The data information of sensor acquisition in dam, the sensor include Fiber bragg grating osmometer, optical fiber sedimentation sensing
Device and laser range sensor;The data information is updated in a text file according to prefixed time interval, wherein described
The data information of every a line record corresponds to all different sensors in text file, and the data for record of not going together correspond to different numbers
According to renewable time;The data of a line every in the text file are subjected to cutting, obtain first sensor in each update
Corresponding data information is carved, the first sensor is any sensor;Obtain first sensor described in each renewable time
The average value of data information;It is generated according to the average value of the corresponding data information of the multiple renewable times of the first sensor
Monitoring curve, the monitoring curve is for realizing display early warning.
Using above-mentioned implementation, corresponding prison is generated according to the data information that all the sensors in a period of time are got
Curve is surveyed, the sensing data then updated to subsequent each renewable time is updated in monitoring curve.And then it realizes pair
The real time monitoring of dam various parameters information, and the difference of the data information of current time and historical juncture can also be compared,
And then judge that dam with the presence or absence of security risk, realizes the monitoring of dam safety.
With reference to first aspect, in a first possible implementation of that first aspect, it is described by the data information according to
Prefixed time interval be updated in a text file include: each the first data for receiving first sensor include it is multiple, will be more
A first data are adjacent to be recorded in the corresponding data line of first renewable time of text file, and first data are
The data information of the first sensor detection, first renewable time are any text file data renewable time;When
When two renewable times, the data information of second renewable time is entered a new line in the text file record, and described second more
The new moment is the data renewable time after prefixed time interval described in first renewable time interval.
The first possible implementation with reference to first aspect, in a second possible implementation of that first aspect, institute
It states and the data of a line every in text file is subjected to cutting, obtain the first sensor in the corresponding number of each renewable time
It is believed that breath, comprising: determine the corresponding first data column of first sensor described in the data of every a line in the text file;Root
The first sensor corresponding data in each row are syncopated as according to first data column.
Second of possible implementation with reference to first aspect, in first aspect in the third possible implementation, institute
State the average value for obtaining the data information of each renewable time first sensor, comprising: delete first described in each renewable time
Wrong data in the data information of sensor;Remaining data are made even office's value, to obtain the first sensor each
The data information average value of renewable time.
With reference to first aspect, described according to the first sensor in the 4th kind of possible implementation of first aspect
The average value of the corresponding data information of multiple renewable times generates monitoring curve, comprising: according to the sensor type
Difference generates the different types of monitoring curve, wherein the data information that the sensor obtains includes the horizontal position of dam
Shifting, the sinkage of lock body and water level information;According to the different types of monitoring curve to the horizontal displacement of dam, lock body it is heavy
It falls into amount and water level information is monitored.
Second aspect, the embodiment of the present application provide a kind of Monitoring System for Dam Safety, the system comprises: first obtains
Module, for obtaining the data information of the sensor being laid in dam acquisition, the sensor includes that fiber grating osmotic pressure passes
Sensor, optical fiber settlement sensor and laser range sensor;Update module is used for the data information according between preset time
Every being updated in a text file, wherein the data information of every a line record correspond to all different sense in the text file
Device, the data for record of not going together correspond to different data renewable times;Cutting module is used for a line every in the text file
Data carry out cutting, obtain first sensor in the corresponding data information of each renewable time, the first sensor is
Any sensor;Second obtains module, the average value of the data information for obtaining first sensor described in each renewable time;
Monitoring modular, for generating monitoring according to the average value of the corresponding data information of the multiple renewable times of the first sensor
Curve, the monitoring curve is for realizing display early warning.
In conjunction with second aspect, in second aspect in the first possible implementation, the update module includes: first more
New unit, receive every time first sensor the first data include it is multiple, for being recorded in multiple first data are adjacent
In the corresponding data line of first renewable time of text file, first data are the data of first sensor detection
Information, first renewable time are any text file data renewable time;Second updating unit, for when second updates
When quarter, the data information of second renewable time is entered a new line in the text file record, and second renewable time is
Data renewable time after prefixed time interval described in first renewable time interval.
The first possible implementation in conjunction with second aspect, in second of second aspect possible implementation, institute
It states cutting module and comprises determining that unit, for determining first sensor pair described in the data of every a line in the text file
The the first data column answered;Cutter unit, for being syncopated as the first sensor in each row according to first data column
Corresponding data.
In conjunction with second of second aspect possible implementation, in second aspect in the third possible implementation, institute
Stating the second acquisition module includes: deletion unit, in the data information for deleting first sensor described in each renewable time
Wrong data;Acquiring unit, for remaining data to be made even office's value, to obtain the first sensor in each renewable time
Data information average value.
In conjunction with second aspect, in the 4th kind of possible implementation of second aspect, the monitoring modular includes: that monitoring is bent
Line generation unit, for generating the different types of monitoring curve according to the difference of the sensor type, wherein the biography
The data information that sensor obtains includes the horizontal displacement of dam, the sinkage of lock body and water level information;Monitoring unit is used for basis
The different types of monitoring curve is monitored the horizontal displacement of dam, the sinkage of lock body and water level information.
Specific embodiment
This programme is illustrated with specific embodiment with reference to the accompanying drawing.
Fig. 1 is a kind of dam safety monitoring method provided by the embodiments of the present application, the dam referring to Fig. 1, in the present embodiment
Safety monitoring method includes:
S101 obtains the data information for the sensor acquisition being laid in dam.
Sensor described in the present embodiment includes that Fiber bragg grating osmometer, optical fiber settlement sensor and laser ranging pass
Sensor.Fiber bragg grating osmometer, optical fiber settlement sensor and laser range sensor are all laid in advance.Laser ranging
Sensor is the horizontal displacement for acquiring dam, actual range is mainly calculated by the principle of reflection of light, accurate unit can
To arrive micron, length laser range sensor oneself can generate.Optical fiber settlement sensor can measure the depression of lock body
Amount, by going out to learn the sinkage of sluice, light with the relative distance of datum mark with inbuilt datum mark accurate measure before
Fine grating osmotic pressure sensor is that the height of water level is calculated by pressure.
The process of data transmission is mainly the cable by being laid in underground, and the data (electric signal) of sensor acquisition are passed
The defeated decoder to connection terminal converts the electrical signal to digital data transmission and reads to terminal (PC machine).
The data information is updated in a text file by S102 according to prefixed time interval.
After the electric signal transmission to serial ports of sensor, serial ports connects decoder, and decoder is by electric signal (analog signal)
It is converted into digital signal.Reading result of the digital signal in terminal side is that text is successively recorded in the data of each sensor measurement
In file, the data information of every a line record corresponds to all different sensors in text file described in the present embodiment, does not go together
The data of record correspond to different data renewable times.
Specifically, receive every time first sensor the first data include it is multiple, by the adjacent note of multiple first data
In the corresponding data line of first renewable time of text file, first data are first sensor detection for record
Data information, first renewable time are any text file data renewable time.When the second renewable time, by described
The data information of two renewable times enters a new line record in the text file, and second renewable time is described first when updating
Carve the data renewable time after being spaced the prefixed time interval.
One schematic example includes 35 sensors in the embodiment of the present application, wherein each sensor is updated at one
Moment is to can send 4 groups of detection datas between another renewable time.Therefore the 4 groups of testing numbers that will be received in interval time section
It is recorded in same a line of text file according to successively adjacent, therefore will record 140 of corresponding 35 sensors in the same row
Data, and the corresponding data of each sensor are adjacent.After all detection datas record, between preset time excessively
Every that can be received again by 140 data, line feed record, corresponds to different renewable times so that not going together at this time.
The data of a line every in the text file are carried out cutting by S103, obtain first sensor in each update
Moment corresponding data information.
Before the embodiment of the present application cuts text file, need to read text file.To text text in the embodiment of the present application
The reading of part carries out the reading of file using FileStream class, and is converted into char array, then exports.Text file
Cutting is read using StreamReader, the then output of a line a line.
FileStream object indicates the stream that file is directed toward on disk or network path.This class provides hereof
The method for reading and writing byte, but these functions are executed commonly using StreamReader or StreamWriter.This is because
FileStream generic operation is byte and byte arrays, and Stream generic operation is character data.Character data is easy to make
With, but some are operated, such as random file access (data of certain point among access file), it just must be by FileStream pairs
As executing.Constructed fuction has many different overloaded versions, and only there are two parameters, i.e. file for band for simplest constructed fuction
Name and FileMode enumerated value.FileStream class safeguards that internal file pointer, the pointer are directed toward in file and are read next time
The position of write operation.In most cases, when a file is opened, it will point to the starting position of file, but this pointer can
With modification.This allows application program to read and write in any position of file, random access file, or leaps to the certain bits of file
It sets.When handling mass file, this is very time saving, because can navigate to correct position at once.FileStream class is only
Raw bytes can be handled.The function of processing raw bytes makes FileStream class can be used for any data file, and not only
It is text file.
It is consistent due to first sensor in the column that the different update moment corresponds to detection data in the present embodiment, this
The corresponding first data column of first sensor described in the data of every a line in the text file are determined in embodiment, according to institute
It states the first data column and is syncopated as the first sensor corresponding data in each row.
Such as sensor is divided into 1 to No. 5 when reading data.In text file, the 1st column corresponding date, the 2nd column pair
The time answered, 3,4,5,6 column are the data of first sensor, and 7,8,9,10 column are the data of second sensor, with such
It pushes away.Therefore the corresponding detection data of first sensor is 3,4,5,6 column in every row, and the 3 of every row, 4,5,6 column datas are cut
It branches away, other sensors operation is consistent.
S104 obtains the average value of the data information of first sensor described in each renewable time.
Assuming that the first sensor in the present embodiment is laser range sensor, the data of laser range sensor are per second
The primary feedback of transmitting is primary, and normal data is probably 23.39 meters or so, but due to factors such as weather either temperature environment, leads
Cause the data deviation of laser range sensor excessive, for example winged insect leaf etc. has covered transmitting signal, data at this moment are very
It goes against accepted conventions, may there was only several millimeters or several centimetres.
For these reasons, the wrong data in the data information of first sensor described in each renewable time is deleted, it will
Remaining data are made even office's value, to obtain the first sensor in the data information average value of each renewable time.
S105 generates monitoring according to the average value of the corresponding data information of the multiple renewable times of the first sensor
Curve.
Sensor described in the embodiment of the present application includes that laser range sensor, Fiber bragg grating osmometer and optical fiber are heavy
Sensor drops.Therefore, the different types of monitoring song is generated according to the difference of the sensor type in the embodiment of the present application
Line is monitored the horizontal displacement of dam, the sinkage of lock body and water level information according to the different types of monitoring curve.
Since monitoring data to be converted to visual monitoring curve, dam duty personnel can be determined big by observation monitoring curve
Dam whether there is security risk.And by laser range sensor in this present embodiment, Fiber bragg grating osmometer and optical fiber
Settlement sensor is provided with multiple, and the different position of dam is arranged in different sensors, therefore can also be accurately judged to dam
There are the specific locations of security risk.
And each sensor can be always according to prefixed time interval uploading detection data, therefore in the embodiment of the present application
Monitoring curve is dynamic change, once there is big fluctuation in the curve for sometime leaving some or multiple sensors, then
Dam can be carried out manually checking with the presence or absence of security risk.
As can be seen from the above embodiments, a kind of dam safety monitoring method is present embodiments provided, which comprises obtain
It is laid in the data information of the sensor acquisition in dam, the sensor includes Fiber bragg grating osmometer, optical fiber sedimentation
Sensor and laser range sensor;The data information is updated in a text file according to prefixed time interval, wherein
The data information of every a line record corresponds to all different sensors in the text file, and the data for record of not going together are corresponding different
Data renewable time;The data of a line every in the text file are subjected to cutting, obtain first sensor each more
Corresponding data information of new moment, the first sensor are any sensor;Obtain the first sensing described in each renewable time
The average value of the data information of device;According to the average value of the corresponding data information of the multiple renewable times of the first sensor
Monitoring curve is generated, the monitoring curve is for realizing display early warning.The number got according to all the sensors in a period of time
It is believed that breath generates corresponding monitoring curve, it is bent that the sensing data then updated to subsequent each renewable time is updated to monitoring
In line.The real time monitoring to dam various parameters information is realized in turn, and can also be compared current time and historical juncture
Data information difference, and then judge that dam with the presence or absence of security risk, realizes the monitoring of dam safety.
Corresponding with a kind of dam safety monitoring method provided by the above embodiment, present invention also provides a kind of dam peaces
Full monitoring system embodiment.Referring to fig. 2, Monitoring System for Dam Safety 20 include: the first acquisition module 201, update module 202,
Cutting module 203, second obtains module 204 and monitoring modular 205.
Described first obtains module 201, for obtaining the data information of the sensor being laid in dam acquisition, the biography
Sensor includes Fiber bragg grating osmometer, optical fiber settlement sensor and laser range sensor.The update module 202 is used
In the data information is updated in a text file according to prefixed time interval, wherein every a line in the text file
The data information of record corresponds to all different sensors, and the data for record of not going together correspond to different data renewable times.It is described
Cutting module 203, for the data of a line every in the text file to be carried out cutting, obtain first sensor each more
Corresponding data information of new moment, the first sensor are any sensor.Described second obtains module 204, for obtaining
The average value of the data information of first sensor described in each renewable time.The monitoring modular 205, for according to described first
The average value of the corresponding data information of the multiple renewable times of sensor generates monitoring curve, the monitoring curve for realizing
Show early warning.
Further, the update module 202 includes: the first updating unit and the second updating unit.
First updating unit, the first data of reception first sensor include multiple every time, and being used for will be multiple described
First data are adjacent to be recorded in the corresponding data line of first renewable time of text file, and first data are described the
The data information of one sensor detection, first renewable time are any text file data renewable time.Described second more
New unit, for when the second renewable time, the data information of second renewable time to be entered a new line in the text file
Record, second renewable time are the data renewable time after prefixed time interval described in first renewable time interval.
The cutting module 203 comprises determining that unit and cutter unit.
The determination unit, for determining, first sensor described in the data of every a line is corresponding in the text file
First data column.The cutter unit, for being syncopated as the first sensor in each row according to first data column
Corresponding data.
The second acquisition module 204 includes: to delete unit and acquiring unit.
The deletion unit, the error number in data information for deleting first sensor described in each renewable time
According to.The acquiring unit, for remaining data to be made even office's value, to obtain the first sensor in each renewable time
Data information average value.
The monitoring modular 205 includes: monitoring curve generation unit and monitoring unit.
The monitoring curve generation unit, for generating the different types of prison according to the difference of the sensor type
Curve is surveyed, wherein the data information that the sensor obtains includes the horizontal displacement of dam, the sinkage of lock body and water level information.
The monitoring unit, for according to the different types of monitoring curve to the horizontal displacement of dam, the sinkage and water of lock body
Position information is monitored
In present specification for system embodiments, since method therein is substantially similar to the implementation of method
Example, so being described relatively simple, related place is referring to the explanation in embodiment of the method.
It should be noted that, in this document, the relational terms of such as " first " and " second " or the like are used merely to one
A entity or operation with another entity or operate distinguish, without necessarily requiring or implying these entities or operation it
Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant are intended to
Cover non-exclusive inclusion, so that the process, method, article or equipment for including a series of elements not only includes those
Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or setting
Standby intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that
There is also other identical elements in the process, method, article or apparatus that includes the element.
Certainly, above description is also not limited to the example above, technical characteristic of the application without description can by or
It is realized using the prior art, details are not described herein;The technical solution that above embodiments and attached drawing are merely to illustrate the application is not
It is the limitation to the application, Tathagata substitutes, and the application is described in detail only in conjunction with and referring to preferred embodiment, ability
Domain it is to be appreciated by one skilled in the art that those skilled in the art were made in the essential scope of the application
Variations, modifications, additions or substitutions also should belong to claims hereof protection scope without departure from the objective of the application.