Method for issuing earthquake alarm in grades based on mail-voice form

文档序号:1686325 发布日期:2020-01-03 浏览:26次 中文

阅读说明:本技术 一种基于邮件-语音形式分级下发地震警报的方法 (Method for issuing earthquake alarm in grades based on mail-voice form ) 是由 李天鹏 任涛 丁匀泰 王英男 董普庆 于 2019-09-17 设计创作,主要内容包括:本发明提供一种基于邮件-语音形式分级下发地震警报的方法,涉及地震数据流实时监测技术领域。本发明对实时监控到的数据流读取为可用的地震数据,并过滤无用地震数据。对地震设置分级,不同的地震数据划分到不同的分级,同时也可以按照地震发生位置的不同进行分级,并根据分级获取警报接收方。当读取到新的地震事件时,将地震数据封装成详细的地震信息,一种是通过邮件发送的方式通知相关部门,另一种是改变语音播报系统内文档的内容,当系统监测到播报内容被修改时,便将修改内容进行语音通话的方式通知相关部门,发送过地震警报后,需要对历史数据进行存储,避免来自不同台站侦测到的同一地震时间进行重复警报。(The invention provides a method for issuing earthquake alarms in a grading manner based on a mail-voice form, and relates to the technical field of real-time monitoring of earthquake data streams. The invention reads the real-time monitored data stream as usable seismic data and filters useless seismic data. The earthquake setting is graded, different earthquake data are graded to different grades, meanwhile, the grading can be carried out according to the difference of earthquake occurrence positions, and an alarm receiving party is obtained according to the grading. When a new earthquake event is read, the earthquake data is packaged into detailed earthquake information, one is to notify relevant departments in a mail sending mode, the other is to change the content of a document in a voice broadcasting system, when the system monitors that the broadcasting content is modified, the system notifies the relevant departments in a voice call mode of the modified content, and after an earthquake alarm is sent, historical data needs to be stored, so that repeated alarm at the same earthquake time detected by different stations is avoided.)

1. A method for sending earthquake alarms in grades based on an email-voice form is characterized in that: the method comprises the following steps:

step 1: detecting the seismic data stream in real time, acquiring the data stream with seismic information, processing the data stream into related seismic information which can be directly identified, wherein the related seismic information comprises an earthquake-initiating time, an earthquake-initiating position, an information source and the like, and filtering out the seismic data from foreign stations according to the station name field;

step 2: classifying the earthquake information according to the earthquake occurrence position and the earthquake occurrence level, determining a notifying party of the alarm information according to the classification, sending the earthquake information to the notifying party, wherein a high-level notifying party can receive the alarm information of a low-level notifying party;

and step 3: editing the earthquake information, sending an alarm to a notification party in a mode of firstly sending the earthquake information through a mail and then sending voice broadcast, and automatically storing the earthquake information as historical information after the earthquake information is successfully sent so as to avoid repeated sending;

and 4, step 4: setting a mailbox of a test mail receiver in a configuration file, regularly sending the test mail every day, and successfully sending the regularly sent mail to the mailbox to indicate that the system has normal functions.

2. The method for graded earthquake alarm issuing based on mail-voice form as claimed in claim 1, wherein:

the specific steps of the step 1 are as follows:

step 1.1: setting and logging in a client user IP, a port number, a user name, a password and the like, and connecting with a server for providing seismic data stream;

step 1.2: monitoring the seismic data stream in real time, setting overtime time, reading the seismic data stream by specified byte number, entering a circulating waiting state by a server when no new data exists, reconnecting the server when the specified time is exceeded, and discarding the data if the incomplete data is read;

step 1.3: analyzing the acquired seismic data stream into directly identified seismic information such as time, place, station, longitude and latitude and the like, and storing the information in a list in a key value pair mode;

step 1.4: data from foreign station seismic is filtered according to the station name field.

3. The method for graded earthquake alarm issuing based on mail-voice form as claimed in claim 1, wherein:

in the step 2, the earthquake is classified:

classifying the seismic events according to the seismic occurrence positions: for earthquake events occurring in different regions, the priorities of corresponding notification parties are different, different notification parties are set for the earthquakes in different regions, and meanwhile, the earthquakes in certain regions can be divided into one type and the same notification parties are set;

classifying the seismic events according to the seismic occurrence level: for earthquake events, the magnitude of earthquake is taken as an earthquake intensity measuring standard, for different magnitudes of earthquake, the emergency degree is different, the corresponding emergency measures are different, the magnitude of earthquake is divided into a plurality of classes, the classes are divided according to the severity or the emergency degree, the different magnitudes of earthquake belong to different classes, and the informing parties are different; the method comprises the steps of classifying according to magnitude of magnitude, setting high level as small magnitude data, sending alarm information to the data as long as the magnitude of earthquake is higher than the magnitude of the data, and setting low level as slightly larger magnitude data, sending the alarm information to the data only if the magnitude of earthquake is higher than the magnitude of the data, so that the high level can accept the low level alarm information.

4. The method for graded earthquake alarm issuing based on mail-voice form as claimed in claim 1, wherein:

in the step 3, the mail and voice broadcast notification part is in two modes of sending earthquake alarm notification, and both alarms are executed in real time aiming at any earthquake message;

the mail notification part sets information such as a sender, a notifier, a port, a user name, a password and the like related to mail sending according to an SMTP protocol, mail subjects are uniformly set to be earthquake alarms, mail contents are earthquake information which can be directly identified after data processing, the earthquake information is spliced into complete earthquake alarm information, the information notifier is the notifier to which the earthquake-sending place belongs after grading division according to the earthquake-sending position, the earthquake alarm mail is sent by using a mail parameter setting function to bring parameters, and a mail sending result is determined according to a return value, success represents success in sending, and failure represents failure in sending;

the voice broadcasting notification part is characterized in that the voice broadcasting system corresponds to a preset broadcasting document, when the system detects that the content of the document changes, the system can automatically call a corresponding notification party, when newly detected earthquake event data change, the system can continuously replace the original content in the document, when the document changes, the system can make a voice call to a specified user, and the changed content in the document is broadcasted;

after mail notification and voice broadcasting are carried out, new seismic data are compared with historical seismic data by using a regular method, the text content of alarm information is filtered, only specific seismic numerical data in the information are reserved, when the numerical data deviation of two times of earthquakes is smaller than a preset value, the two times of earthquakes are considered to be the same seismic event, and repeated alarming is not carried out.

Technical Field

The invention relates to the technical field of seismic data stream real-time monitoring, in particular to a method for issuing seismic alarms in a grading manner based on a mail-voice form.

Background

An earthquake is a highly destructive natural disaster, and may cause a building to collapse or be damaged, destroy facilities, influence traffic, normal communication and the like. And has the characteristics of burstiness, unpredictability, high frequency, easy generation of secondary disasters and the like. Therefore, the earthquake information is monitored in real time and is timely notified to relevant departments, and the corresponding measures can be taken as early as possible by each department, so that the influence degree of the disasters on the life of people can be relatively low. The method adopts a dual mode of mail transmission and voice broadcast, and sends the alarm according to the grade of the earthquake information.

In order to reduce the damage caused by earthquake, the government and related units set up earthquake observation centers of various regions to detect the basic information related to the earthquake at each moment. And after the earthquake information data is obtained, the earthquake alarm information is transmitted to the public. However, the following problems may occur in the series of processes: (1) the alarm message is not timely enough. In order to obtain earthquake information more quickly and take corresponding protective measures in time, when the earthquake data is detected, an alarm notice is sent at the first time. (2) The alarm sending mode is single, and if the warning of the earthquake message can be realized by combining multiple modes, the information can be ensured to be acquired. (3) The alarm messages of different levels are not processed hierarchically. When earthquake occurs, the information of the position, the earthquake time or the magnitude of the earthquake magnitude may be different, if the alarm information can be sent in a grading way according to a certain standard, the information transmission structure is clear, and it is more beneficial to each department to take corresponding measures. Therefore, seismic alarms still lack a more comprehensive, specific and timely study.

Disclosure of Invention

Aiming at the defects of the prior art, the invention provides a method for issuing earthquake alarms based on mail-voice form grading. Functionally, the alarm is sent by grading the monitored earthquake information in real time. The programming technology used is mainly Python development technology, and the SMTP protocol is used to send the alarm message to the relevant department by mail. And storing the earthquake information into a text and guiding the text into a voice broadcasting system for call broadcasting.

The technical scheme adopted by the invention is as follows: a method for issuing earthquake alarms based on mail-voice form grading; the method comprises the following steps:

step 1: and detecting the seismic data stream in real time, acquiring the data stream with the seismic information, processing the data stream into identifiable related seismic information comprising the seismic time, the seismic position, the information source and the like, and filtering out the seismic data from the foreign station according to the station name field.

Step 2: classifying the earthquake information according to the earthquake occurrence position and the earthquake occurrence grade, determining the receiver of the alarm information according to the classification, sending the earthquake information to the receiver, and receiving the low-grade alarm information by the high grade;

and step 3: editing the earthquake information, sending an alarm in a mail or voice broadcasting mode, and storing the earthquake information as historical information after the earthquake information is successfully sent so as to avoid repeated sending;

and 4, step 4: setting a mailbox of a receiver in a configuration file, regularly sending a test mail every day, and sending the regularly sent mail to the mailbox to indicate that the system has normal functions.

The specific steps of the step 1 are as follows:

step 1.1: setting IP, port number, user name, password and the like of a client user, and connecting the client user with a server for providing data stream;

step 1.2: monitoring the seismic data stream in real time, setting overtime time, reading the seismic data stream by specified byte number, entering a circulating waiting state by a server when no new data exists, reconnecting the server when the time exceeds a limited time, and discarding the data if incomplete data is read;

step 1.3: analyzing the acquired seismic data stream into directly understandable seismic information such as time, place, station, longitude and latitude and the like, and storing the information in a list in a key value pair mode;

step 1.4: seismic data from foreign stations is filtered out according to the station name field.

In the step 2, the earthquake is classified:

classifying the seismic events according to the seismic occurrence positions: for earthquake events occurring in different areas, the priorities of corresponding notification parties are different, so that the earthquake events are divided into areas, the earthquakes in different areas are notified to different notification parties, and the earthquakes in certain areas can be divided into one type and the same notification party is set;

the earthquake occurrence grades are divided according to earthquake occurrence grades, for earthquake events, the earthquake grades are used as a measuring standard, for different earthquake grades, corresponding emergency measures are different, the emergency degrees of the corresponding emergency measures are different, the earthquake grades are divided into a plurality of categories, the categories are divided according to the severity or the emergency degrees, the different earthquake grades belong to different categories, and notification parties of the categories can be different; the method comprises the steps of classifying according to magnitude of magnitude, setting high level as small magnitude data, sending alarm information to the data as long as the magnitude of earthquake is higher than the magnitude of the data, and setting low level as slightly larger magnitude data, sending the alarm information to the data only if the magnitude of earthquake is higher than the magnitude of the data, so that the high level can accept the low level alarm information.

In step 3, the mail and voice broadcast notification part is two parallel modes for sending earthquake alarm notification, the two broadcast modes are carried out simultaneously, and both alarms are executed and run in real time aiming at any earthquake message;

the mail notification part sets information such as a sender, a notifier, a port, a user name, a password and the like related to mail sending according to an SMTP protocol, mail subjects are uniformly set to be earthquake alarms, mail contents are earthquake information which can be directly identified after data processing, the earthquake information is spliced into complete earthquake alarm information, the information notifier is the notifier to which the earthquake-sending place belongs after grading division according to the earthquake-sending position, the earthquake alarm mail is sent by using a mail parameter setting function to bring parameters, and a mail sending result is determined according to a return value, success represents success in sending, and failure represents failure in sending;

the voice broadcasting notification part is characterized in that the voice broadcasting system corresponds to a preset broadcasting document, when the system detects that the content of the document changes, the system can automatically call a corresponding notification party, when newly detected earthquake event data change, the system can continuously replace the original content in the document, when the document changes, the system can make a voice call to a specified user, and the changed content in the document is broadcasted;

after mail notification and voice broadcasting are carried out, new seismic data are compared with historical seismic data by using a regular method, the text content of alarm information is filtered, only specific seismic numerical data in the information are reserved, when the numerical data deviation of two times of earthquakes is smaller than a preset value, the two times of earthquakes are considered to be the same seismic event, and repeated alarming is not carried out.

Adopt the produced beneficial effect of above-mentioned technical scheme to lie in:

a method for sending earthquake alarms based on mail-voice form grading firstly ensures that the notification mode of the earthquake alarms is diversified, and does not depend on a single form, thereby ensuring that the earthquake alarm information can be transmitted to a receiving party to a great extent. Secondly, the mode of sending earthquake alarms in stages enables earthquake information of different levels or different severity degrees to be transmitted to different receiving departments according to the levels, so that the method is beneficial to relevant departments to receive alarm notifications in time, and is more beneficial to management of the earthquake information, and the relevant departments can take corresponding measures in time.

Drawings

FIG. 1 is a flow chart of the mail alert section of the present invention;

FIG. 2 is a flow chart of the voice alert portion of the present invention;

FIG. 3 is a flow chart of the part of the invention that avoids repeated alarms.

Detailed Description

The following detailed description of embodiments of the present invention is provided in connection with the accompanying drawings and examples. The following examples are intended to illustrate the invention but are not intended to limit the scope of the invention.

The software development environment of the embodiment is a WINDOWS 10 system, the development tool is jetbranches pychar 2018.2.4, the used virtual machine is VMware, and the program running environment is a Linux operating system.

A method for sending earthquake alarms in grades based on an email-voice form comprises the following steps:

step 1: detecting the seismic data stream in real time, acquiring the data stream with seismic information, processing the data stream into identifiable related seismic information comprising seismic time, seismic position, information source and the like, and filtering out seismic data from foreign stations according to the station name field;

step 1.1: setting IP, port number, user name, password and the like of a client user, and connecting the client user with a server for providing data stream;

step 1.2: monitoring the seismic data stream in real time, setting overtime time, reading the seismic data stream by specified byte number, entering a circulating waiting state by a server when no new data exists, reconnecting the server when the time exceeds a limited time, and discarding the data if incomplete data is read;

step 1.3: analyzing the acquired seismic data stream into directly understandable seismic information such as time, place, station, longitude and latitude and the like, and storing the information in a list in a key value pair mode;

step 1.4: seismic data from foreign stations is filtered out according to the station name field.

Step 2: classifying the earthquake information according to the earthquake occurrence position and the earthquake occurrence grade, determining the receiver of the alarm information according to the classification, sending the earthquake information to the receiver, and receiving the low-grade alarm information by the high grade;

in step 2, the earthquake is classified:

classifying the seismic events according to the seismic occurrence positions: for earthquake events occurring in different areas, the priorities of corresponding notification parties are different, so that the earthquake events are divided into areas, the earthquakes in different areas are notified to different notification parties, and the earthquakes in certain areas can be divided into one type and the same notification party is set;

the earthquake occurrence grades are divided according to earthquake occurrence grades, for earthquake events, the earthquake grades are used as a measuring standard, for different earthquake grades, corresponding emergency measures are different, the emergency degrees of the corresponding emergency measures are different, the earthquake grades are divided into a plurality of categories, the categories are divided according to the severity or the emergency degrees, the different earthquake grades belong to different categories, and notification parties of the categories can be different; the method comprises the steps of classifying according to magnitude of magnitude, setting high level as small magnitude data, sending alarm information to the data as long as the magnitude of earthquake is higher than the magnitude of the data, and setting low level as slightly larger magnitude data, sending the alarm information to the data only if the magnitude of earthquake is higher than the magnitude of the data, so that the high level can accept the low level alarm information.

And step 3: editing the earthquake information, sending an alarm in a mail or voice broadcasting mode, and storing the earthquake information as historical information after the earthquake information is successfully sent so as to avoid repeated sending;

in step 3, the mail and voice broadcast notification part is in two modes of sending earthquake alarm notification, and aiming at any earthquake message, two alarms are executed in real time;

the mail notification part, as shown in fig. 1, firstly determines the mail information content, splices the mail information content into complete earthquake information according to the acquired data, then matches the earthquake information with the region in the configuration file according to the earthquake occurrence position and the earthquake magnitude, acquires all earthquake grades set under the region, and classifies all the earthquake grades into other categories if the earthquake information content is not matched with the corresponding region. And then matching with the earthquake classification of the area according to the magnitude of the earthquake magnitude, and counting all related department mailboxes in all classifications smaller than the earthquake magnitude to serve as receivers of the alarm information. The classification of each region is not necessarily the same, so the regions with the same classification in the configuration file can be put together. Different grades can be set in different areas, finally, the determination of an alarm message receiver is related to the result that certain seismic data is matched with certain area grades, information such as a sender, a notifier, a port, a user name and a password related to mail sending is set according to an SMTP protocol, a mail subject is uniformly set to be an earthquake alarm, the mail content is the earthquake information which can be directly identified after data processing, the earthquake information is spliced into complete earthquake alarm information, the information notifier is the notifier which the earthquake area belongs to after grading division according to earthquake sending positions, parameters are brought in by using a mail parameter setting function SMTP _ SSL () to send the earthquake alarm mail, the mail sending result is determined according to a return value, success represents success in sending, and failure represents failure in sending;

in the voice broadcast notification part, as shown in fig. 2, a voice broadcast system corresponds to a broadcast document, and in order to avoid a messy code situation in broadcast, after editing seismic messages, a broadcast file is uniformly set to be in a TXT format, and a coding format is processed to be in an ANSI format, so that normal broadcast of the voice system is ensured; when the system detects that the document content is changed, the system can automatically call a corresponding contact party, for a new earthquake event, the original content in the document is continuously replaced, when the document is changed, the system can send a voice call to a specified user, and the changed content in the document is broadcasted, for example, after a new piece of earthquake information is obtained, the data is edited, then the position of the broadcasted document is obtained, the original content in the document is emptied, then the new edited information is written into the document, when the document is changed, the system can obtain the corresponding contact party, send the voice call, and broadcast the changed content in the document. If the document is not altered, no voice announcement will be made. And if new seismic information exists, continuously emptying the document and the like.

After the earthquake information is successfully sent, the earthquake information needs to be stored as historical information, and because the situation that a plurality of stations detect the same earthquake event may occur, in order to avoid repeatedly sending earthquake alarms, a regular method is used for comparing new earthquake data with historical data, text content of alarm information is filtered, only specific numerical data in the information is reserved, when deviation of numerical data of two times of earthquakes is smaller than a preset value, the two times of earthquakes are considered as the same earthquake event, and repeated alarms are not carried out, as shown in fig. 3. In the embodiment, the magnitude of vibration is plus or minus 0.5, and the time is plus or minus 30 seconds, which is set as a preset value.

And 4, step 4: setting a mailbox of a receiver in a configuration file, regularly sending a test mail every day, and sending the regularly sent mail to the mailbox to indicate that the system has normal functions.

In step 4, the function of detecting seismic data and sending alarm in time needs to have real-time performance, so that a test mail needs to be sent regularly to ensure that the function can be used normally, the time is positioned to the same time every day, and a mail indicating the normal operation of the system is sent regularly.

10页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:地震波模拟方法及系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类