An earthquake early warning terminal method based on edge computing
By combining edge computing and the Viterbi algorithm, automated audio processing of earthquake early warning terminals and direct connection to emergency broadcasting platforms have been achieved, solving the problems of small coverage, poor timeliness and low reliability of traditional earthquake early warning systems, and improving the coverage, timeliness and convenience of earthquake early warning.
Patent Information
- Application Number
- CN202310662179.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-06
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2043-06-06
AI Technical Summary
Traditional earthquake early warning terminals have limited coverage, poor timeliness, inconvenience, and low reliability. They also have difficulty being connected to earthquake bureaus below the provincial level, which affects the broadcasting of early warning information.
Using edge computing technology, the system collects audio data through earthquake early warning terminals and converts it into PCM data. It generates waveform files for silent verification, uses the Viterbi algorithm to match the contingency plan file, and combines it with an emergency broadcasting platform to provide earthquake early warning. It also supports offline SMS or telephone voice transmission.
It expands the coverage of earthquake early warning, improves timeliness and convenience, ensures the reliability of earthquake early warning, and avoids problems of manual operation and intermediate forwarding.
Smart Images

Figure CN116863649B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of emergency broadcasting technology, and in particular to an earthquake early warning terminal method based on edge computing. Background Technology
[0002] Earthquake early warning terminals can receive earthquake early warning information issued by provincial earthquake early warning centers and display it on their screens. The information is then output via the terminal's built-in speaker system and audio cable for small-scale earthquake early warning broadcasts. After the municipal and county-level emergency broadcasting platforms are completed, an earthquake early warning pre-positioning system needs to be deployed to connect to earthquake early warning information for emergency broadcasting. Provincial earthquake early warning centers can connect to the emergency broadcasting platform via protocol interfacing and then broadcast the information precisely to the appropriate areas through tiered forwarding.
[0003] However, traditional earthquake early warning systems have the following problems: 1. The early warning range of earthquake early warning terminals is small, only applicable to densely populated areas such as schools, office buildings, and squares; 2. The timeliness of earthquake early warning pre-positioning systems is poor, and earthquake bureaus below the provincial level lack the ability to interoperate with protocols, requiring manual operation by the earthquake bureaus. This is clearly unsuitable for emergency broadcasting of earthquake early warnings and can only be used for routine earthquake early warning publicity; 3. Access to provincial earthquake early warning centers requires strict approval. Access from county-level and below levels to provincial earthquake early warning centers would disrupt the existing network security model, making it very difficult for emergency broadcasting platforms below the provincial level to connect to earthquake early warning centers; 4. Even when provincial earthquake early warning centers have access conditions, various unforeseen problems arise after each level of forwarding, such as problems with intermediate forwarding nodes or low forwarding timeliness, affecting the broadcasting of early warning information.
[0004] Therefore, how to provide an earthquake early warning terminal method based on edge computing to improve the coverage, timeliness, convenience and reliability of earthquake early warning has become an urgent technical problem to be solved. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to provide an earthquake early warning terminal method based on edge computing, so as to improve the coverage, timeliness, convenience and reliability of earthquake early warning.
[0006] This invention is implemented as follows: an earthquake early warning terminal method based on edge computing, comprising the following steps:
[0007] Step S10: Collect the output audio of the earthquake early warning terminal and convert the output audio into PCM data through an analog-to-digital converter chip;
[0008] Step S20: Convert the PCM data into sample data, and generate a waveform file based on the waveform of the sample data;
[0009] Step S30: Perform silent verification based on the waveform file and generate silent verification results;
[0010] Step S40: Activate or deactivate the emergency broadcast plan based on the silent verification result;
[0011] Step S50: The earthquake early warning terminal uses the Viterbi algorithm to match the waveform file with the corresponding contingency plan file, and then issues an earthquake early warning based on the contingency plan file and the emergency broadcast platform.
[0012] Further, step S10 specifically includes:
[0013] The output audio of the earthquake early warning terminal is collected through the onboard audio interface, and the output audio is converted into PCM data through the analog-to-digital converter chip. During the conversion process, it is resampled to a bit rate of 44100.
[0014] Further, step S20 specifically includes:
[0015] The PCM data is inverted and then incremented by 1 to convert it into sample data. The waveform of the sample data is written into a waveform file, and a data string is inserted into the waveform file to serve as the time frame of the sample data, thus completing the generation of the waveform file.
[0016] Furthermore, the sample data is unsigned 16-bit data with a value range of -255 to +255; the duration of the 45 sample data is 1 second.
[0017] Furthermore, the data string is 0xCE, 0xDF, 0xFA, 0x01, where the first three bytes are fixed bytes and the fourth byte is a data sequence identifier.
[0018] Further, step S30 specifically includes:
[0019] A first amplitude threshold, a second amplitude threshold, a first time period threshold, a second time period threshold, and a ratio threshold are set; the first amplitude threshold is less than the second amplitude threshold;
[0020] The waveform file is parsed, and when the amplitude of the waveform is less than the first amplitude threshold and the duration is within the first time period threshold, a silence verification result of the silent audio is generated.
[0021] Within the second time period threshold range, when the amplitude of the waveform is greater than the second amplitude threshold during a time period that is greater than the proportional threshold, a silence verification result for non-silent audio is generated.
[0022] Further, step S40 specifically includes:
[0023] When the silence verification result is silent audio, the emergency broadcast plan is turned off; when the silence verification result is non-silent audio, the emergency broadcast plan is activated.
[0024] Further, step S50 specifically includes:
[0025] Step S51: The earthquake early warning terminal uses a token passing method based on the Viterbi algorithm to match the corresponding contingency plan file with the waveform file;
[0026] Step S52: The earthquake early warning terminal sends a broadcast command carrying the coverage area to the emergency broadcasting platform. Based on the received broadcast command, the emergency broadcasting platform sends feedback data carrying the URL of the streaming media server back to the earthquake early warning terminal.
[0027] Step S53: After the earthquake early warning terminal encodes the PCM data into the ffmpeg library, it uploads the PCM data and the contingency plan file to the URL.
[0028] Step S54: The emergency broadcasting platform matches the corresponding broadcasting terminal identification code based on the coverage area, and notifies the corresponding emergency broadcasting terminal to download PCM data and contingency plan documents from the URL based on the broadcasting terminal identification code;
[0029] Step S55: After decoding the downloaded PCM data, the emergency broadcast terminal performs earthquake early warning based on the PCM data and the contingency plan document.
[0030] Furthermore, step S52 also includes:
[0031] When the emergency broadcasting platform is offline, the earthquake early warning terminal sends the encoded PCM data via the wireless communication module to a pre-associated mobile phone in the form of an SMS or telephone voice message, and sends it to the SMS access gateway of the emergency broadcasting platform in the form of an SMS message.
[0032] Furthermore, in step S50, the plan file includes at least the coverage area, volume level, broadcast level, broadcast type, and broadcast ID.
[0033] The advantages of this invention are:
[0034] By collecting the output audio from earthquake early warning terminals and converting it into PCM data, then converting the PCM data into sample data, generating waveform files based on the waveforms of the sample data, and performing silence verification based on the waveform files to generate silence verification results, the emergency broadcast plan can be activated or deactivated. Finally, the earthquake early warning terminal uses the Viterbi algorithm to match the waveform files with the corresponding plan files, and then issues earthquake warnings based on the plan files and the emergency broadcast platform. In other words, the earthquake early warning terminal sends the PCM data to the URL of the streaming media server through the emergency broadcast platform, and emergency broadcast terminals within the coverage area retrieve the PCM data from the URL to issue earthquake warnings, thus expanding the coverage of earthquake early warning. Because the earthquake early warning process is automatic and requires no manual operation, and the earthquake early warning terminal connects directly to the emergency broadcast platform, eliminating the need for traditional access to provincial earthquake early warning centers, the timeliness and convenience of earthquake early warning are ensured. Using the Viterbi algorithm to match plan files for earthquake early warning is simpler and more effective than artificial intelligence algorithms, providing stable voice recognition. Furthermore, when the emergency broadcast platform is offline, earthquake warnings can still be issued via SMS or telephone voice, ultimately greatly improving the coverage, timeliness, convenience, and reliability of earthquake early warning. Attached Figure Description
[0035] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0036] Figure 1 This is a flowchart of an earthquake early warning terminal method based on edge computing according to the present invention. Detailed Implementation
[0037] The overall concept of the technical solution in this application embodiment is as follows: The earthquake early warning terminal sends PCM data to the emergency broadcasting terminal linked to the streaming media server through the emergency broadcasting platform to improve the coverage of earthquake early warning; by automatically issuing earthquake early warnings, and with the earthquake early warning terminal directly connected to the emergency broadcasting platform without needing to access the provincial earthquake early warning center, the timeliness and convenience of earthquake early warnings are improved; earthquake early warnings are issued by matching the pre-plan file using the Viterbi algorithm, which is simple, effective, and can stably perform voice recognition. Furthermore, when the emergency broadcasting platform is offline, earthquake early warnings can still be issued via SMS or telephone voice to improve the reliability of earthquake early warnings.
[0038] Please refer to Figure 1 As shown, a preferred embodiment of the earthquake early warning terminal method based on edge computing of the present invention includes the following steps:
[0039] Step S10: Collect the output audio of the earthquake early warning terminal and convert the output audio into PCM data through an analog-to-digital converter chip;
[0040] Step S20: Convert the PCM data into sample data, and generate a waveform file based on the waveform of the sample data;
[0041] Step S30: Perform silent verification based on the waveform file and generate silent verification results;
[0042] Step S40: Activate or deactivate the emergency broadcast plan based on the silent verification result; that is, by analyzing and identifying the audio waveform of the waveform file, determine the earthquake early warning information issued by the earthquake early warning terminal, and encode the PCM data in real time, and forward it to the emergency broadcast terminal with a wider dissemination range through the emergency broadcast platform;
[0043] Step S50: The earthquake early warning terminal uses the Viterbi algorithm to match the waveform file with the corresponding contingency plan file, and then issues an earthquake early warning based on the contingency plan file and the emergency broadcast platform.
[0044] Step S10 specifically involves:
[0045] The output audio of the earthquake early warning terminal is directly acquired through the audio cable connected by the onboard audio interface. The output audio is converted into PCM data through the analog-to-digital converter chip (AD chip), and resampled to 44100 bit rate during the conversion process.
[0046] Since the sampling rate of ADC chips is generally 48000, in order to use a unified algorithm in subsequent waveform file comparisons, the sampled data needs to be resampled at a bit rate of 44100. The resampled data can be directly analyzed without further encoding.
[0047] Step S20 specifically involves:
[0048] The PCM data is inverted and then incremented by 1 to convert it into sample data. The waveform of the sample data is written to a waveform file, and a data string is inserted into the waveform file to serve as the time frame of the sample data, thus completing the generation of the waveform file. Since the initial waveform file does not have a time frame, a custom time frame needs to be defined.
[0049] The sample data is unsigned 16-bit data, with a value range of -255 to +255; the duration of the 45 sample data is 1 second. In mono mode, 8 bits of the sample data are 0; in stereo mode, the two bytes of real-time sample data need to be processed separately. After obtaining the sample data, the amplitude can be obtained by taking its absolute value. The amplitude can be used to determine the intensity of the sound, and the waveform of the sample data can be used to determine the similarity of the audio.
[0050] The data string is 0xCE, 0xDF, 0xFA, 0x01, where the first three bytes are fixed bytes and the fourth byte is a data sequence identifier.
[0051] Step S30 specifically involves:
[0052] A first amplitude threshold, a second amplitude threshold, a first time period threshold, a second time period threshold, and a ratio threshold are set; the first amplitude threshold is less than the second amplitude threshold;
[0053] The waveform file is parsed. When the amplitude of the waveform is less than the first amplitude threshold and the duration is within the first time period threshold, a silence verification result of the silence audio is generated. This indicates that no earthquake warning was issued or the earthquake warning has just ended. If the earthquake warning has just ended, a stop broadcast instruction needs to be sent to the emergency broadcasting platform to notify the streaming media server to reclaim resources.
[0054] In practice, if the amplitude is less than 5 and the duration is 2-5 seconds, it is considered a silent audio signal.
[0055] Within the second time period threshold range, when the amplitude of the waveform is greater than the second amplitude threshold during a time period that is greater than the proportional threshold, a silence verification result for non-silent audio is generated.
[0056] Since some samples in a series have an amplitude of 0, but this cannot be considered silent audio, the aforementioned ratio threshold needs to be set, for example, to 60%.
[0057] Step S40 specifically involves:
[0058] When the silence verification result is silent audio, the emergency broadcast plan is turned off; when the silence verification result is non-silent audio, the emergency broadcast plan is activated.
[0059] Step S50 specifically includes:
[0060] Step S51: The earthquake early warning terminal uses a token passing method based on the Viterbi algorithm to match the corresponding pre-plan file with the waveform file; through waveform learning and pairing, the earthquake early warning broadcast is more accurate, thereby greatly improving the efficiency of earthquake early warning.
[0061] The waveform file can be graphically processed to form an image for display. Combined with relevant speech visualization tools, the sample is converted into a T×S matrix, where T represents Time and S represents the sample. The Viterbi algorithm is used to traverse the matrix. It's important to note that the basic implementation of the Viterbi algorithm involves traversing acoustic state frames. For each frame's state, the cumulative cost of all states in the previous frame is added to the cost of the current frame in the current state. The preceding state with the lowest cost in the current frame is taken as the preceding path of the current path. The Viterbi algorithm can be applied to sample recognition because this invention does not incorporate a speech recognition algorithm library. Instead, it directly annotates the corresponding text information under specific waveforms for recognition. By using the token passing method of the Viterbi algorithm to determine the sum of costs across all stored paths on the token, the path fit can be evaluated.
[0062] The token passing process is as follows: A frame of data is acquired; a threshold (boundary value) is set to filter tokens with excessively low scores; the states of the tokens in the previous frame are traversed to obtain the token in the current state; for each state starting from the current token, the acoustic score is calculated using the decoding library and acoustic comparison function, where cost = historical cost + graph weight - acoustic score; if the cost is too high, the path is deleted; the boundary value is updated to keep the threshold within a reasonable range; a new token is created; if it is already the last token, it is placed in the next state; if the cost of the token in the next state is greater than or equal to the cost of the new token, it is replaced with the new token; if the cost of the token in the next state is smaller, the new token is deleted.
[0063] Step S52: The earthquake early warning terminal sends a broadcast command carrying the coverage area to the emergency broadcasting platform. Based on the received broadcast command, the emergency broadcasting platform sends feedback data carrying the URL of the streaming media server back to the earthquake early warning terminal.
[0064] Step S53: After the earthquake early warning terminal encodes the PCM data into the ffmpeg library, it uploads the PCM data and the contingency plan file to the URL. In specific implementation, the audio waveform information of the PCM data can be processed, the waveform feature file can be saved, and the audio that may be voice output can be converted into text information through the audio-to-text interface.
[0065] Step S54: The emergency broadcasting platform matches the corresponding broadcasting terminal identification code based on the coverage area, and notifies the corresponding emergency broadcasting terminal to download PCM data and contingency plan documents from the URL based on the broadcasting terminal identification code;
[0066] Step S55: After decoding the downloaded PCM data, the emergency broadcast terminal performs earthquake early warning based on the PCM data and the contingency plan document.
[0067] Step S52 further includes:
[0068] When the emergency broadcasting platform is offline, the earthquake early warning terminal sends the encoded PCM data via the wireless communication module to a pre-associated mobile phone in the form of an SMS or telephone voice message, and sends it to the SMS access gateway of the emergency broadcasting platform in the form of an SMS message.
[0069] In step S50, the plan file shall at least include coverage area, volume level, broadcast level, broadcast type, and broadcast ID.
[0070] In summary, the advantages of this invention are as follows:
[0071] By collecting the output audio from earthquake early warning terminals and converting it into PCM data, then converting the PCM data into sample data, generating waveform files based on the waveforms of the sample data, and performing silence verification based on the waveform files to generate silence verification results, the emergency broadcast plan can be activated or deactivated. Finally, the earthquake early warning terminal uses the Viterbi algorithm to match the waveform files with the corresponding plan files, and then issues earthquake warnings based on the plan files and the emergency broadcast platform. In other words, the earthquake early warning terminal sends the PCM data to the URL of the streaming media server through the emergency broadcast platform, and emergency broadcast terminals within the coverage area retrieve the PCM data from the URL to issue earthquake warnings, thus expanding the coverage of earthquake early warning. Because the earthquake early warning process is automatic and requires no manual operation, and the earthquake early warning terminal connects directly to the emergency broadcast platform, eliminating the need for traditional access to provincial earthquake early warning centers, the timeliness and convenience of earthquake early warning are ensured. Using the Viterbi algorithm to match plan files for earthquake early warning is simpler and more effective than artificial intelligence algorithms, providing stable voice recognition. Furthermore, when the emergency broadcast platform is offline, earthquake warnings can still be issued via SMS or telephone voice, ultimately greatly improving the coverage, timeliness, convenience, and reliability of earthquake early warning.
[0072] While specific embodiments of the present invention have been described above, those skilled in the art should understand that the specific embodiments described are merely illustrative and not intended to limit the scope of the present invention. Equivalent modifications and variations made by those skilled in the art in accordance with the spirit of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. An earthquake early warning terminal method based on edge computing, characterized in that: Includes the following steps: Step S10: Collect the output audio of the earthquake early warning terminal and convert the output audio into PCM data through an analog-to-digital converter chip; Step S20: Convert the PCM data into sample data, and generate a waveform file based on the waveform of the sample data; Step S30: Perform silent verification based on the waveform file and generate silent verification results; Step S40: Activate or deactivate the emergency broadcast plan based on the silent verification result; Step S50: The earthquake early warning terminal uses the Viterbi algorithm to match the waveform file with the corresponding contingency plan file, and then issues an earthquake early warning based on the contingency plan file and the emergency broadcasting platform. Step S50 specifically includes: Step S51: The earthquake early warning terminal uses a token passing method based on the Viterbi algorithm to match the corresponding contingency plan file with the waveform file; Step S52: The earthquake early warning terminal sends a broadcast command carrying the coverage area to the emergency broadcasting platform. Based on the received broadcast command, the emergency broadcasting platform sends feedback data carrying the URL of the streaming media server back to the earthquake early warning terminal. Step S53: After the earthquake early warning terminal encodes the PCM data into the ffmpeg library, it uploads the PCM data and the contingency plan file to the URL. Step S54: The emergency broadcasting platform matches the corresponding broadcasting terminal identification code based on the coverage area, and notifies the corresponding emergency broadcasting terminal to download PCM data and contingency plan documents from the URL based on the broadcasting terminal identification code; Step S55: After decoding the downloaded PCM data, the emergency broadcast terminal performs earthquake early warning based on the PCM data and the contingency plan document.
2. The earthquake early warning terminal method based on edge computing as described in claim 1, characterized in that: Step S10 specifically involves: The output audio of the earthquake early warning terminal is collected through the onboard audio interface, and the output audio is converted into PCM data through the analog-to-digital converter chip. During the conversion process, it is resampled to a bit rate of 44100.
3. The earthquake early warning terminal method based on edge computing as described in claim 1, characterized in that: Step S20 specifically involves: The PCM data is inverted and then incremented by 1 to convert it into sample data. The waveform of the sample data is written into a waveform file, and a data string is inserted into the waveform file to serve as the time frame of the sample data, thus completing the generation of the waveform file.
4. The earthquake early warning terminal method based on edge computing as described in claim 3, characterized in that: The sample data is unsigned 16-bit data with a value range of -255 to +255; the duration of the 45 sample data is 1 second.
5. The earthquake early warning terminal method based on edge computing as described in claim 3, characterized in that: The data string is 0xCE, 0xDF, 0xFA, 0x01, where the first three bytes are fixed bytes and the fourth byte is a data sequence identifier.
6. The earthquake early warning terminal method based on edge computing as described in claim 1, characterized in that: Step S30 specifically involves: A first amplitude threshold, a second amplitude threshold, a first time period threshold, a second time period threshold, and a ratio threshold are set; the first amplitude threshold is less than the second amplitude threshold; The waveform file is parsed, and when the amplitude of the waveform is less than the first amplitude threshold and the duration is within the first time period threshold, a silence verification result of the silent audio is generated. Within the second time period threshold range, the cumulative duration for which the amplitude of the statistical waveform is greater than the second amplitude threshold is generated. When the cumulative duration accounts for a proportion greater than the proportion threshold of the second time period, a silence verification result for non-silent audio is generated.
7. The earthquake early warning terminal method based on edge computing as described in claim 1, characterized in that: Step S40 specifically involves: When the silence verification result is silent audio, the emergency broadcast plan is turned off; when the silence verification result is non-silent audio, the emergency broadcast plan is activated.
8. The earthquake early warning terminal method based on edge computing as described in claim 1, characterized in that: Step S52 further includes: When the emergency broadcasting platform is offline, the earthquake early warning terminal sends the encoded PCM data via the wireless communication module to a pre-associated mobile phone in the form of an SMS or telephone voice message, and sends it to the SMS access gateway of the emergency broadcasting platform in the form of an SMS message.
9. The earthquake early warning terminal method based on edge computing as described in claim 1, characterized in that: In step S50, the plan file shall at least include coverage area, volume level, broadcast level, broadcast type, and broadcast ID.
Citation Information
Patent Citations
Time domain feature extraction method and system for automatic speech recognition
CN110660382A