Das real-time data stream adaptation method and system for jopens system
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-13
- Publication Date
- 2026-08-11
AI Technical Summary
然而,DAS系统产生的海量、高频且非标准化的阵列数据,与现有地震业务系统基于离散台站的低带宽数据标准存在严重不兼容,难以实现实时接入
[0018]本发明中,所提出的面向JOPENS系统的DAS实时数据流适配方法和系统,实现DAS原始数据向JOPENS 系统标准地震波形数据的实时转换与传输,解决了现有 DAS 系统实时数据流无法直接、稳定接入JOPENS 系统的技术问题。
Smart Images

Figure CN122554524A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of technology, and in particular to a method and system for adapting DAS real-time data streams to the JOPENS system. Background Technology
[0002] The JOPENS system is the core data processing platform for the National Earthquake Intensity Rapid Reporting and Early Warning Project. With the rise of distributed optical fiber acoustic sensing (DAS) technology, its high spatiotemporal resolution monitoring capabilities provide a new approach for building a high-density seismic observation network. However, the massive, high-frequency, and non-standardized array data generated by the DAS system is severely incompatible with the low-bandwidth data standards of existing seismic operational systems based on discrete stations, making real-time access difficult. Summary of the Invention
[0003] To address the technical problems existing in the background art, this invention proposes a DAS real-time data stream adaptation method and system for the JOPENS system.
[0004] Firstly, the present invention proposes a DAS real-time data stream adaptation method for the JOPENS system, comprising: Real-time acquisition of DAS data packets; Perform data verification on the DAS data packet; if the verification passes, convert the format of the DAS data packet, generate a MiniSEED data packet, and cache it. The cached MiniSEED data packets are pushed to the JOPENS system in real time.
[0005] Preferably, data verification of DAS data packets specifically includes: The DAS data packet header is parsed to obtain the parsed data; the parsed data includes the source GPS timestamp, the number of valid channel numbers of the waveform data, and the sampling rate; Determine whether the number of valid channel numbers and the sampling rate of the waveform data are consistent with the preset registration information; if so, determine whether the difference between the source GPS timestamp of the DAS data and the previous DAS data is within the error range of the preset sampling interval; if so, the verification is deemed successful.
[0006] Preferably, the MiniSEED data packet includes: station code, network code, channel identifier, latitude and longitude, elevation, and sampling rate.
[0007] Preferably, the verified DAS data packets are format-converted to obtain MiniSEED data packets, specifically including: Based on the valid channel number of each waveform data in the DAS data packet and the preset valid channel number-virtual seismic station mapping relationship model, the virtual seismic station nodes of each waveform data are determined; wherein, the virtual seismic station node includes the station code, channel identifier, latitude and longitude, and elevation; Time drift is checked for each waveform data based on the source GPS timestamp and sampling rate. If time drift occurs, the source GPS timestamp is corrected. The source GPS timestamp is a UTC timestamp. Bandwidth limiting is applied to each waveform data after time synchronization and drift correction. Perform downsampling on each waveform data after bandwidth limiting processing; Compress the waveform data after downsampling; According to the preset MiniSEED encapsulation standard, the compressed waveform data, along with the station code, network code, channel identifier, standardized sampling rate, and source GPS timestamp of the corresponding virtual seismic station node, are written into the record header, and a fixed-length data block structure is generated to form the MiniSEED data packet.
[0008] Preferably, during the bandwidth limiting process, an anti-aliasing low-pass filtering algorithm is used to perform bandwidth limiting on the waveform data.
[0009] Preferably, during the downsampling operation, the waveform data after bandwidth limitation is downsampled according to a preset decimation factor; wherein, the decimation factor is M=fs / ft; where M is the decimation factor, fs is the sampling rate, and ft is the target sampling rate.
[0010] Preferably, during the compression process, the Obspy library is used to call the underlying C language dynamic link library, and the STEIM2 compression algorithm is used to compress the waveform data. The STEIM2 differential lossless compression algorithm is used to compress and encode the downsampled waveform data.
[0011] Preferably, before converting the format of the verified DAS data packet to obtain the MiniSEED data packet, the method further includes: A communication session is established with the JOPENS system, and a connection is established with the designated service port of the JOPENS system based on the HTTP protocol. A Uniform Resource Locator containing device identity information is sent to the JOPENS system to complete the authentication process. After successful authentication, dynamic station registration is performed according to the valid trace number selection parameters issued by the JOPENS system. Each valid trace number in the preset DAS system is mapped to an independent virtual seismic station node. Based on each valid trace number and its corresponding virtual seismic station node, a valid trace number-virtual seismic station mapping relationship model is constructed.
[0012] Preferably, dynamic station registration is performed based on the valid track number selection parameters issued by the JOPENS system, mapping each valid track number in the preset DAS system to an independent virtual seismic station node, specifically including: For each valid channel number in the preset DAS system, the valid channel number is physically parameterized to convert the discrete channel index into the coordinate parameters of the continuous optical cable in the optical fiber measurement unit. Based on the coordinate parameters of the continuous optical cable in the optical fiber measurement unit, spatial interpolation calculation is performed through the preset optical cable path function to obtain the latitude and longitude coordinates and elevation information of each sampling point on the continuous optical cable corresponding to the valid track number. Based on the latitude, longitude coordinates and elevation information of each sampling point of the continuous optical cable corresponding to the valid channel number, an independent virtual seismic station node is constructed for the valid channel number. The station code of the virtual seismic station node is bound to the valid channel number, and the channel identifiers of the virtual seismic station node are bound to each sampling point on the continuous optical cable corresponding to the valid channel number, as well as its latitude, longitude coordinates and elevation information.
[0013] Preferably, the process of pushing the MiniSEED data packets to the JOPENS system in real time adopts a multi-threaded asynchronous sending mechanism to send the cached MiniSEED data packets in a unified manner.
[0014] Preferably, after pushing the MiniSEED data packet to the JOPENS system in real time, the method further includes: Monitor the status codes returned by the JOPENS system in real time: the status codes are divided into success and failure. If the status code is success, release the MiniSEED data packet cached in the memory buffer; If the status code is failure or no status code is received within the predetermined time, the exception handling mechanism is triggered, and the breakpoint resume function is enabled.
[0015] Preferably, in the exception handling mechanism, the MiniSEED data packet is temporarily stored in the local storage area; if the network interruption time is within the preset timeout, after the network is restored, the cached MiniSEED data packet is sent quickly first, and then the MiniSEED data packet stored in the local storage area is sent; if the network interruption time is outside the preset network timeout time, after the network is fully restored, while ensuring the real-time upload of the MiniSEED data packet, an independent thread is started to read the local storage area in time sequence for re-upload until the real-time time is caught up.
[0016] Secondly, this invention also proposes a DAS real-time data stream adaptation system for the JOPENS system, comprising: The acquisition module is used to acquire DAS data packets in real time. The verification module performs data verification on DAS data packets; The acquisition module is also used to reacquire DAS data packets when verification fails; The format conversion module is used to convert the format of the verified DAS data packets to obtain MiniSEED data packets. The caching module is used to cache MiniSEED data packets; The data upload module is used to push the cached MiniSEED data packets to the JOPENS system in real time.
[0017] Preferably, the MiniSEED data packet includes: station code, network code, channel identifier, latitude and longitude, elevation, and sampling rate; The DAS data packets that pass verification are then converted into MiniSEED data packets, which specifically include: Based on the valid channel number of each waveform data in the DAS data packet and the preset valid channel number-virtual seismic station mapping relationship model, the virtual seismic station nodes of each waveform data are determined; wherein, the virtual seismic station node includes the station code, channel identifier, latitude and longitude, and elevation; Time drift is checked for each waveform data based on the source GPS timestamp and sampling rate. If time drift occurs, the source GPS timestamp is corrected. The source GPS timestamp is a UTC timestamp. Bandwidth limiting is applied to each waveform data after time synchronization and drift correction. Perform downsampling on each waveform data after bandwidth limiting processing; Compress the waveform data after downsampling; According to the preset MiniSEED encapsulation standard, the compressed waveform data, along with the station code, network code, channel identifier, standardized sampling rate, and source GPS timestamp of the corresponding virtual seismic station node, are written into the record header, and a fixed-length data block structure is generated to form a MiniSEED data packet. Preferably, before converting the format of the verified DAS data packet to obtain the MiniSEED data packet, the method further includes: Establish a communication session with the JOPENS system, and establish a connection with the designated service port of the JOPENS system based on the HTTP protocol, and send a Uniform Resource Locator containing device identity information to the JOPENS system to complete the authentication process; Once authentication is successful, dynamic station registration is performed based on the valid track number selection parameters issued by the JOPENS system, mapping each valid track number to an independent virtual seismic station node. Based on each valid trace number and its corresponding virtual seismic station node, a mapping relationship model between valid trace numbers and virtual seismic stations is constructed.
[0018] The present invention proposes a method and system for adapting real-time DAS data streams to the JOPENS system, which realizes the real-time conversion and transmission of raw DAS data to standard seismic waveform data of the JOPENS system, and solves the technical problem that existing real-time data streams of DAS systems cannot be directly and stably accessed by the JOPENS system. Attached Figure Description
[0019] Figure 1 This is a flowchart illustrating the DAS real-time data stream adaptation method for the JOPENS system in one embodiment of the present invention.
[0020] Figure 2 This is a test schematic diagram of a DAS real-time data stream adaptation system for the JOPENS system in one embodiment of the present invention. Detailed Implementation
[0021] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0022] Firstly, referring to Figure 1 The present invention proposes a DAS real-time data stream adaptation method for the JOPENS system, comprising: Real-time acquisition of DAS data packets; Perform data verification on DAS data packets; If the verification passes, the format of the verified DAS data packet is converted to generate a standard MiniSEED data packet and then cached. MiniSEED data packets are pushed to the JOPENS system in real time.
[0023] This invention enables real-time conversion and transmission of raw DAS data to standard seismic waveform data of the JOPENS system, solving the technical problem that existing DAS system real-time data streams cannot be directly and stably accessed by the JOPENS system.
[0024] In some embodiments, data verification of DAS data packets specifically includes: The DAS data packet header is parsed to obtain the parsed data; the parsed data includes the source GPS timestamp, the number of valid channel numbers of the waveform data, and the sampling rate; First, determine whether the number of valid channels and the sampling rate of the waveform data are consistent with the preset registration information; if not, the verification is directly determined to have failed; if yes, determine whether the difference between the source GPS timestamp of the DAS data packet and the previous DAS data packet is within the error range of the preset sampling interval; if yes, the verification is determined to have passed; if not, the verification is determined to have failed.
[0025] This embodiment first parses the high-precision GPS timestamp from the source end carried in the header of the DAS data packet, instead of using the local reception time, thereby completely eliminating the impact of network transmission delay on timing accuracy; then it verifies whether the number of valid channel numbers and the sampling rate of the waveform data are consistent with the preset registration information; then, it calculates the difference between the source end GPS timestamps of the DAS data packets before and after, and verifies whether it is within the error range of the preset sampling interval, so as to ensure the absolute time continuity of the data.
[0026] In one specific embodiment, the sampling interval is 1 second to ensure real-time performance.
[0027] In some embodiments, the MiniSEED data packet includes: station code, network code, channel identifier, latitude and longitude, elevation, and sampling rate.
[0028] In some embodiments, the format of the verified DAS data packets is converted to obtain MiniSEED data packets, specifically including: Based on the valid channel number of each waveform data in the DAS data packet and the preset valid channel number-virtual seismic station mapping relationship model, the virtual seismic station nodes of each waveform data are determined; wherein, the virtual seismic station node includes the station code, channel identifier, latitude and longitude, and elevation; Time drift is checked for each waveform data based on the source GPS timestamp and sampling rate. If time drift occurs, the source GPS timestamp is corrected. The source GPS timestamp is a UTC timestamp. Bandwidth limiting is applied to each waveform data after time synchronization and drift correction. Perform downsampling on each waveform data after bandwidth limiting processing; Compress the waveform data after downsampling; According to the preset MiniSEED encapsulation standard, the compressed waveform data, along with the station code, network code, channel identifier, standardized sampling rate, and source GPS timestamp of the corresponding virtual seismic station node, are written into the record header, and a fixed-length data block structure is generated to form the MiniSEED data packet.
[0029] With this configuration, this embodiment can abstract the original fiber optic measurement unit characterized by "channel number + distance" into a virtual seismic station node with independent spatial coordinates and a unique identifier. This enables a structured, high-fidelity, low-bandwidth conversion from DAS data to standard seismic array data. Finally, using a batch packetization and unified transmission mechanism, multiple virtual station data are synchronously aggregated and encapsulated in fixed time windows to generate structured data objects with standard seismic station metadata fields (station code, network code, channel identifier, latitude and longitude, elevation, sampling rate). These objects are then used for MiniSEED standard encapsulation and array-level batch output.
[0030] In some embodiments, an anti-aliasing low-pass filtering algorithm is used to perform frequency band limiting on waveform data during the frequency band limiting process.
[0031] Specifically, a digital low-pass filter with a cutoff frequency of ft / 2 is designed to suppress high-frequency components above the Nyquist frequency. A linear phase FIR filter is used, and the filter coefficients h(k) are calculated using the window function method or the equiripple method. The original signal is then subjected to a convolution operation y[n]=∑h(k)x[n−k] to complete the anti-aliasing low-pass filtering.
[0032] In some embodiments, during the downsampling operation, the waveform data after bandwidth limitation is downsampled according to a preset extraction factor, thereby achieving high-fidelity conversion from kHz-level data to 100Hz or 200Hz standard seismic sampling rate without avoiding spectral aliasing distortion.
[0033] Wherein, the extraction factor is M = fs / ft; where M is the extraction factor, fs is the sampling rate, and ft is the target sampling rate.
[0034] In some embodiments, during the compression process, the Obspy library is used to call the underlying C language dynamic link library, and the STEIM2 compression algorithm is used to compress the waveform data. The STEIM2 differential lossless compression algorithm is used to compress and encode the downsampled waveform data.
[0035] This embodiment uses Python to implement the format conversion process to ensure the system's flexibility and scalability. For computationally intensive steps such as data compression and encoding, this embodiment introduces the Obspy library to encapsulate the MiniSEED data packet. When performing STEIM2 encoding, this library actually calls the standard compression algorithm implemented in the underlying C language, thus avoiding the performance overhead of Python interpreted execution and achieving millisecond-level data processing latency, meeting the timeliness requirements of DAS real-time data stream uploads.
[0036] The packaging standard in this embodiment conforms to the requirements of the JOPENS User Manual 6.1.9.
[0037] To quickly determine the virtual seismic station nodes for each waveform data, in some embodiments, before converting the format of the verified DAS data packets to obtain the MiniSEED data packets, the following steps are also included: Establish a communication session with the JOPENS system, and establish a connection with the designated service port of the JOPENS system based on the HTTP protocol, and send a Uniform Resource Locator containing device identity information to the JOPENS system to complete the authentication process; Once authentication is successful, dynamic station registration is performed based on the valid track number selection parameters issued by the JOPENS system, mapping each valid track number in the preset DAS system to an independent virtual seismic station node. Based on each valid trace number and its corresponding virtual seismic station node, a mapping relationship model between valid trace numbers and virtual seismic stations is constructed.
[0038] This embodiment designs an "authentication-transmission" long session interaction mechanism based on the HTTP protocol, which solves the problem of high-concurrency access for a large number of virtual stations.
[0039] In a further embodiment, dynamic station registration is performed based on the valid track number selection parameters issued by the JOPENS system, mapping each valid track number in the preset DAS system to an independent virtual seismic station node, specifically including: For each valid channel number in the preset DAS system, the valid channel number is physically parameterized to convert the discrete channel index into the coordinate parameters of the continuous optical cable in the optical fiber measurement unit. Based on the coordinate parameters of the continuous optical cable in the optical fiber measurement unit, spatial interpolation calculation is performed through the preset optical cable path function to obtain the latitude and longitude coordinates and elevation information of each sampling point on the continuous optical cable corresponding to the valid track number. Based on the latitude, longitude coordinates and elevation information of each sampling point of the continuous optical cable corresponding to the valid channel number, an independent virtual seismic station node is constructed for the valid channel number. The station code of the virtual seismic station node is bound to the valid channel number, and the channel identifiers of the virtual seismic station node are bound to each sampling point on the continuous optical cable corresponding to the valid channel number, as well as its latitude, longitude coordinates and elevation information.
[0040] In some embodiments, during data verification, if the verification fails, the DAS data packet is reacquired; when the number of failed verifications reaches three, the acquisition of DAS data packets is stopped and an error is reported.
[0041] In some embodiments, reacquiring DAS data packets specifically includes: Send a retransmission request to the acquisition terminal of the DAS system to reacquire DAS data packets.
[0042] In some embodiments, during the caching process, data is written to the cache in batches according to time order.
[0043] In some embodiments, the process of pushing MiniSEED data packets to the JOPENS system in real time adopts a multi-threaded asynchronous sending mechanism to send the cached MiniSEED data packets in a unified manner.
[0044] In some embodiments, after the MiniSEED data packet is pushed to the JOPENS system in real time, the method further includes: Monitor the status codes returned by the JOPENS system in real time: the status codes are divided into success and failure. If the status code is success, release the MiniSEED data packet cached in the memory buffer; If the status code is failure or no status code is received within the predetermined time, it indicates a timeout, and the exception handling mechanism is triggered to enable the breakpoint resume function.
[0045] In the exception handling mechanism, the MiniSEED data packet is temporarily stored in the local storage area. If the network interruption time is within the preset timeout, after the network is restored, the MiniSEED data packet in the cache is sent quickly first, and then the MiniSEED data packet stored in the local storage area is sent. If the network interruption time is outside the preset network timeout time, after the network is fully restored, while ensuring the real-time upload of the MiniSEED data packet, an independent thread is started to read the local storage area in time sequence for retransmission until the real-time time is caught up.
[0046] The network timeout period is 5 seconds.
[0047] In this embodiment, a memory buffer based on a memory queue is constructed between data reception and processing and network uploading to decouple the data production end (data acquisition, preprocessing and compression) from the data consumption end (network transmission). Even if there is a delay or blockage in network I / O, it will not affect the normal operation of the data acquisition and processing threads, thereby effectively avoiding data loss or system blocking problems and significantly improving the overall stability and reliability of the system.
[0048] The status code in this embodiment is the HTTP status code.
[0049] This invention strictly adheres to the "Data Communication Protocol for Earthquake Intensity Rapid Reporting and Early Warning Stations" specification, abandoning the underlying Socket streaming transmission and instead adopting an HTTP application layer interface more suitable for high-concurrency scenarios. By establishing an "authentication-transmission-deregistration" session interaction mechanism, combined with a built-in data dimensionality reduction processing algorithm and a MiniSEED format encapsulation engine, this invention achieves real-time conversion and access of DAS massive array data to standard seismic waveform streams, thus opening up the technical link for integrating new fiber optic sensing equipment into the national earthquake early warning service system.
[0050] Secondly, this invention also proposes a DAS real-time data stream adaptation system for the JOPENS system, comprising: The acquisition module is used to acquire DAS data packets in real time. The verification module performs data verification on DAS data packets; The acquisition module is also used to reacquire DAS data packets when verification fails; The format conversion module is used to convert the format of the verified DAS data packets to obtain MiniSEED data packets. The caching module is used to cache MiniSEED data packets; The data upload module is used to push the cached MiniSEED data packets to the JOPENS system in real time.
[0051] In some embodiments, the MiniSEED data packet includes: station code, network code, channel identifier, latitude and longitude, elevation, and sampling rate; The DAS data packets that pass verification are then converted into MiniSEED data packets, which specifically include: Based on the valid channel number of each waveform data in the DAS data packet and the preset valid channel number-virtual seismic station mapping relationship model, the virtual seismic station nodes of each waveform data are determined; wherein, the virtual seismic station node includes the station code, channel identifier, latitude and longitude, and elevation; Time drift is checked for each waveform data based on the source GPS timestamp and sampling rate. If time drift occurs, the source GPS timestamp is corrected. The source GPS timestamp is a UTC timestamp. Bandwidth limiting is applied to each waveform data after time synchronization and drift correction. Perform downsampling on each waveform data after bandwidth limiting processing; Compress the waveform data after downsampling; According to the preset MiniSEED encapsulation standard, the compressed waveform data, along with the station code, network code, channel identifier, standardized sampling rate, and source GPS timestamp of the corresponding virtual seismic station node, are written into the record header, and a fixed-length data block structure is generated to form the MiniSEED data packet.
[0052] In some embodiments, the data verification process specifically includes: The DAS data packet header is parsed to obtain the parsed data; the parsed data includes the source GPS timestamp, the number of valid channel numbers of the waveform data, and the sampling rate; Determine whether the number of valid channel numbers and the sampling rate of the waveform data are consistent with the preset registration information; if so, determine whether the difference between the source GPS timestamp of the DAS data and the previous DAS data is within the error range of the preset sampling interval; if so, the verification is deemed successful.
[0053] In some embodiments, a login and registration module is also included. The login and registration module is used to establish a communication session with the JOPENS system and establish a connection with the designated service port of the JOPENS system based on the HTTP protocol. It also sends a Uniform Resource Locator containing device identity information to the JOPENS system to complete the authentication process. After authentication is successful, dynamic station registration is performed according to the valid trace number selection parameters issued by the JOPENS system. Each valid trace number in the preset DAS system is mapped to an independent virtual seismic station node. Based on each valid trace number and its corresponding virtual seismic station node, a valid trace number-virtual seismic station mapping relationship model is constructed.
[0054] This includes dynamic station registration based on the valid track number selection parameters issued by the JOPENS system, mapping each valid track number in the preset DAS system to an independent virtual seismic station node, specifically including: For each valid channel number in the preset DAS system, the valid channel number is physically parameterized to convert the discrete channel index into the coordinate parameters of the continuous optical cable in the optical fiber measurement unit. Based on the coordinate parameters of the continuous optical cable in the optical fiber measurement unit, spatial interpolation calculation is performed through the preset optical cable path function to obtain the latitude and longitude coordinates and elevation information of each sampling point on the continuous optical cable corresponding to the valid track number. Based on the latitude, longitude coordinates and elevation information of each sampling point of the continuous optical cable corresponding to the valid channel number, an independent virtual seismic station node is constructed for the valid channel number. The station code of the virtual seismic station node is bound to the valid channel number, and the channel identifiers of the virtual seismic station node are bound to each sampling point on the continuous optical cable corresponding to the valid channel number, as well as its latitude, longitude coordinates and elevation information.
[0055] In one specific embodiment, the DAS real-time data stream adaptation system for the JOPENS system includes: an acquisition module, a login and registration module, a data verification module, a format conversion module, a data upload module, and a data breakpoint resume module; The login and registration module is used to establish a communication session with the JOPENS system. It establishes a connection with the designated service port of the JOPENS system based on the HTTP protocol and sends a Uniform Resource Locator (URL) containing device identity information to the JOPENS system to complete the authentication process. Dynamic station registration is performed according to the valid trace number selection parameters issued by the JOPENS system. Each valid trace number in the DAS system is mapped to an independent virtual seismic station node. Based on each valid trace number and its corresponding virtual seismic station node, a valid trace number-virtual seismic station mapping relationship model is constructed. After successful registration, the established communication session status, the corresponding station metadata information, and the valid trace number-virtual seismic station mapping relationship model are transmitted to the format conversion module for subsequent data reception and encapsulation processing. The data verification module uses TCP sockets to directly acquire the raw data stream from the acquisition end of the DAS system (including the ZD-DAS demodulator and sensor optical cable). First, it parses the high-precision GPS timestamp from the source end carried in the DAS data packet header. The time slice length of the data stream is set to 1 second. Next, it verifies whether the number of valid channel numbers and the sampling rate of the waveform data are consistent with the registration information. Then, it calculates the difference between the source end GPS timestamps of the preceding and following DAS data packets and verifies whether it is strictly equal to 1 second (or an integer multiple of the sampling interval) to ensure the absolute temporal continuity of the data. If the verification fails, a retransmission request is sent to the acquisition end of the DAS system. If the verification fails three times, the acquisition of DAS data packets is stopped. After successful verification, the data carrying the original timestamp is sent to the format conversion module. The format conversion module performs time drift checks on each waveform data based on the source GPS timestamp and sampling rate. If time drift is found, the source GPS timestamp is corrected. The source GPS timestamp is a UTC timestamp. An anti-aliasing low-pass filtering algorithm is used to perform frequency band limiting on each waveform data after time synchronization and drift correction. The frequency band limiting waveform data is downsampled according to a preset decimation factor. The downsampled waveform data is compressed using the STEIM2 differential lossless compression algorithm. According to the preset MiniSEED encapsulation standard, the compressed waveform data, along with the corresponding virtual seismic station node's station code, network code, channel identifier, standardized sampling rate, and source GPS timestamp, are written into the record header, and a fixed-length data block structure is generated to form a MiniSEED data packet. The data upload module is used to push the cached MiniSEED data packets to the JOPENS system in real time using a multi-threaded asynchronous sending mechanism. Specifically, the encapsulated MiniSEED data packets are placed into the sending queue in the cache, and the status code returned by the server is monitored in real time: if the status code is successful, the cached MiniSEED data packets are released; if the status code is a failure or no status code is received within a predetermined time, the exception handling mechanism is triggered, and the breakpoint resume function of the data breakpoint resume module is enabled. The data interruption resume module is used to temporarily store the MiniSEED data packet in the local storage area. The network timeout is set to 5 seconds. If the network interruption time is within the preset timeout, after the network is restored, the cached MiniSEED data packet is sent quickly first, and then the MiniSEED data packet stored in the local storage area is sent. After the network is fully restored, while ensuring the real-time upload of the MiniSEED data packet, an independent thread is started to read the local storage area in time sequence for retransmission until the real-time time is caught up.
[0056] The DAS real-time data stream adaptation method for the JOPENS system proposed in this embodiment was tested between the DAS system and a streaming service system based on the JOPENS 6.1.9 architecture. Figure 2 As shown, the JOPENS system can correctly receive and display DAS waveform data from the ZD station, and perform subsequent analysis and processing. Furthermore, this method achieves a data reception continuity rate better than 99.9% during long-term operation, and the single-frame data processing delay is controlled within 20ms, realizing distortion-free real-time waveform conversion and effectively supporting the integrated application of new fiber optic sensing equipment in the earthquake early warning system.
[0057] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A method for adapting real-time data streams to the DAS of the JOPENS system, characterized in that, include: Real-time acquisition of DAS data packets; Perform data verification on DAS data packets; If the verification passes, the DAS data packet is converted to a standard MiniSEED data packet and cached. The cached MiniSEED data packets are pushed to the JOPENS system in real time.
2. The DAS real-time data stream adaptation method for the JOPENS system according to claim 1, characterized in that, Data verification of DAS data packets specifically includes: The DAS data packet header is parsed to obtain the parsed data; the parsed data includes the source GPS timestamp, the number of valid channel numbers of the waveform data, and the sampling rate; Determine whether the number of valid channel numbers and the sampling rate of the waveform data are consistent with the preset registration information; if so, determine whether the difference between the source GPS timestamp of the DAS data packet and the previous DAS data packet is within the error range of the preset sampling interval; if so, the verification is deemed successful.
3. The DAS real-time data stream adaptation method for the JOPENS system according to claim 1, characterized in that, The MiniSEED data packet includes: station code, network code, channel identifier, latitude and longitude, elevation, and sampling rate; The DAS data packets that pass verification are then converted into MiniSEED data packets, which specifically include: Based on the valid channel number of each waveform data in the DAS data packet and the preset valid channel number-virtual seismic station mapping relationship model, the virtual seismic station nodes of each waveform data are determined; wherein, the virtual seismic station node includes the station code, channel identifier, latitude and longitude, and elevation; Time drift is checked for each waveform data based on the source GPS timestamp and sampling rate. If time drift occurs, the source GPS timestamp is corrected. The source GPS timestamp is a UTC timestamp. Bandwidth limiting is applied to each waveform data after time drift checking or time drift correction. Perform downsampling on each waveform data after bandwidth limiting processing; Compress the waveform data after downsampling; According to the preset MiniSEED encapsulation standard, the compressed waveform data, along with the station code, network code, channel identifier, standardized sampling rate, and source GPS timestamp of the corresponding virtual seismic station node, are written into the record header, and a fixed-length data block structure is generated to form a MiniSEED data packet. Preferably, during the bandwidth limiting process, an anti-aliasing low-pass filtering algorithm is used to perform bandwidth limiting on the waveform data; Preferably, during the downsampling operation, the waveform data after bandwidth limitation is downsampled according to a preset decimation factor; wherein, the decimation factor is M=fs / ft; where M is the decimation factor, fs is the sampling rate, and ft is the target sampling rate. Preferably, during the compression process, the Obspy library is used to call the underlying C language dynamic link library, and the STEIM2 differential lossless compression algorithm is used to compress and encode the downsampled waveform data.
4. The DAS real-time data stream adaptation method for the JOPENS system according to claim 1, characterized in that, Before converting the verified DAS data packets into MiniSEED data packets, the process also includes: Establish a communication session with the JOPENS system, and establish a connection with the designated service port of the JOPENS system based on the HTTP protocol, and send a Uniform Resource Locator containing device identity information to the JOPENS system to complete the authentication process; Once authentication is successful, dynamic station registration is performed based on the valid track number selection parameters issued by the JOPENS system, mapping each valid track number in the preset DAS system to an independent virtual seismic station node. Based on each valid trace number and its corresponding virtual seismic station node, a mapping relationship model between valid trace numbers and virtual seismic stations is constructed.
5. The DAS real-time data stream adaptation method for the JOPENS system according to claim 4, characterized in that, Dynamic station registration is performed based on the valid track number selection parameters issued by the JOPENS system. Each valid track number in the preset DAS system is mapped to an independent virtual seismic station node, specifically including: For each valid channel number in the preset DAS system, the valid channel number is physically parameterized to convert the discrete channel index into the coordinate parameters of the continuous optical cable in the optical fiber measurement unit. Based on the coordinate parameters of the continuous optical cable in the optical fiber measurement unit, spatial interpolation calculation is performed through the preset optical cable path function to obtain the latitude and longitude coordinates and elevation information of each sampling point on the continuous optical cable corresponding to the valid track number. Based on the latitude, longitude coordinates and elevation information of each sampling point of the continuous optical cable corresponding to the valid channel number, an independent virtual seismic station node is constructed for the valid channel number. The station code of the virtual seismic station node is bound to the valid channel number, and the channel identifiers of the virtual seismic station node are bound to each sampling point on the continuous optical cable corresponding to the valid channel number, as well as its latitude, longitude coordinates and elevation information.
6. The DAS real-time data stream adaptation method for the JOPENS system according to claim 1, characterized in that, The process of pushing MiniSEED data packets to the JOPENS system in real time adopts a multi-threaded asynchronous sending mechanism to send the cached MiniSEED data packets in a unified manner.
7. The DAS real-time data stream adaptation method for the JOPENS system according to claim 1, characterized in that, After pushing the MiniSEED data package to the JOPENS system in real time, the following is also included: Real-time monitoring of the status codes returned by the JOPENS system: The status codes are divided into success and failure; if the status code is success, the cached MiniSEED data packet is released; if the status code is failure or no status code is received within a predetermined time, the exception handling mechanism is triggered and the breakpoint resume function is enabled.
8. The DAS real-time data stream adaptation method for the JOPENS system according to claim 7, characterized in that, In the exception handling mechanism, the MiniSEED data packet is temporarily stored in the local storage area. If the network interruption time is within the preset network timeout time, after the network is restored, the cached MiniSEED data packet is sent quickly first, and then the MiniSEED data packet stored in the local storage area is sent. If the network interruption time is outside the preset network timeout time, after the network is restored, while ensuring the upload of the cached MiniSEED data packet, an independent thread is started to read the local storage area in time sequence for retransmission until the real time is caught up.
9. A DAS real-time data stream adaptation system for the JOPENS system, characterized in that, include: The acquisition module is used to acquire DAS data packets in real time. The verification module performs data verification on DAS data packets; The acquisition module is also used to reacquire DAS data packets when verification fails; The format conversion module is used to convert the format of the verified DAS data packets to obtain MiniSEED data packets. The caching module is used to cache MiniSEED data packets; The data upload module is used to push the cached MiniSEED data packets to the JOPENS system in real time.
10. The DAS real-time data stream adaptation system for the JOPENS system according to claim 9, characterized in that, The MiniSEED data packet includes: station code, network code, channel identifier, latitude and longitude, elevation, and sampling rate; The DAS data packets that pass verification are then converted into MiniSEED data packets, which specifically include: Based on the valid channel number of each waveform data in the DAS data packet and the preset valid channel number-virtual seismic station mapping relationship model, the virtual seismic station nodes of each waveform data are determined; wherein, the virtual seismic station node includes the station code, channel identifier, latitude and longitude, and elevation; Time drift is checked for each waveform data based on the source GPS timestamp and sampling rate. If time drift occurs, the source GPS timestamp is corrected. The source GPS timestamp is a UTC timestamp. Bandwidth limiting is applied to each waveform data after time synchronization and drift correction. Perform downsampling on each waveform data after bandwidth limiting processing; Compress the waveform data after downsampling; According to the preset MiniSEED encapsulation standard, the compressed waveform data, along with the station code, network code, channel identifier, standardized sampling rate, and source GPS timestamp of the corresponding virtual seismic station node, are written into the record header, and a fixed-length data block structure is generated to form a MiniSEED data packet. Preferably, before converting the format of the verified DAS data packet to obtain the MiniSEED data packet, the method further includes: Establish a communication session with the JOPENS system, and establish a connection with the designated service port of the JOPENS system based on the HTTP protocol, and send a Uniform Resource Locator containing device identity information to the JOPENS system to complete the authentication process; Once authentication is successful, dynamic station registration is performed based on the valid track number selection parameters issued by the JOPENS system, mapping each valid track number to an independent virtual seismic station node. Based on each valid trace number and its corresponding virtual seismic station node, a mapping relationship model between valid trace numbers and virtual seismic stations is constructed.