Seismic data sorting method and device, computer equipment and readable storage medium
By using memory buffers and indexing technologies in computer equipment, the seismic data sorting process is simplified, and the problems of low disk performance and storage efficiency in massive data processing are solved, and efficient data sorting and resource conservation are achieved.
Patent Information
- Application Number
- CN202310626276.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-30
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2043-05-30
AI Technical Summary
When the existing seismic data sorting method processes massive data, it leads to degradation of disk performance, low storage efficiency, complex operation process and large disk space, and it is impossible to directly connect the previous and subsequent processing modules.
By using the buffer in memory in the computer device to cache data channels, when the buffer is full, the data channels are written to temporary files, reducing the number of disk accesses, and generating the index of the data channels based on keywords, directly connecting to the previous link Continuing and subsequent processing modules simplify the operation process.
It improves the efficiency of seismic data sorting, saves hardware and storage resources, reduces intermediate file storage, and is suitable for massive data processing.
Smart Images

Figure CN119064991A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of geophysical exploration technology, and in particular to a seismic data sorting method, device, computer equipment and readable storage medium. Background Art
[0002] In the process of seismic data processing, it is necessary to first divide the collected data channels into different channel sets according to keywords, and sort the data channels in the channel sets to obtain multiple ordered channel sets, that is, to perform seismic data sorting, also known as extracting channel sets, and then further process the selected channel sets, wherein the data channel includes a channel header and a seismic data sample value, the channel header includes at least one keyword, which is used to describe the attribute information of the data channel, and the seismic data sample value includes the values of multiple sampling points. With the development of seismic data acquisition technology, the number of collected data channels is increasing. Therefore, a seismic data sorting method suitable for massive data channels is urgently needed.
[0003] In the related art, a multi-node parallel method is used to sort seismic data. First, the collected data channels are divided into multiple blocks, each of which is stored in the disk of a processing node. The processing node counts the keywords in the data channels to obtain statistical information of the keywords. Each processing node sorts the data channels in its own disk based on the channel set keywords required by the subsequent processing flow, that is, a rough selection of the data channels. Then, the channel sets sorted by each processing node are aggregated into different temporary files according to the channel set keywords, and then the data channels in each temporary file are sorted, that is, the data channels are completely ordered to obtain multiple channel sets.
[0004] However, in the above method, each time the track gather keyword required by the subsequent processing flow changes, each processing node needs to extract the track gather separately. This process will generate intermediate temporary data multiple times, resulting in low storage efficiency of the entire cluster. Each parallel sorting involves multiple reading and writing of disk data, resulting in reduced disk performance and low seismic data sorting efficiency of a single processing node. In addition, the above sorting process cannot be directly connected in series with the previous processing module of the sorting process. The previous processing module is required to first store the data tracks to be sorted as a system format file inside the processing node, and the processing node then reads the data tracks from the system format file for sorting; the above sorting process cannot be directly connected in series with the subsequent processing module of the sorting process. The processing node needs to first output the sorted track gather to a temporary file, which is a temporary seismic data file used in the processing system. The subsequent processing module then further processes the track gather in the temporary file, resulting in the need to output intermediate files multiple times during the seismic data processing process. The operation process is relatively complicated and occupies more disk space. Summary of the invention
[0005] The present application provides a seismic data sorting method, device, computer equipment and readable storage medium, which can reduce the number of disk accesses and the number of data temporary storages, and can complete the sorting with one computer equipment, and can improve the seismic data sorting efficiency of the computer equipment, can save hardware resources and storage resources, and can directly connect the previous processing module and the subsequent processing module in series, reducing the operation process. The technical solution of the present application is as follows.
[0006] According to a first aspect of an embodiment of the present application, a seismic data sorting method is provided, which is applied to a seismic data sorting module in a seismic data processing system, wherein the seismic data processing system further comprises a pre-processing module and a post-processing module of the seismic data sorting module, and the method comprises:
[0007] receiving the data track to be sorted transmitted by the preceding processing module, storing the data track to be sorted in a first buffer in the memory, extracting a keyword from a track header of the data track, generating an index of the data track based on the extracted keyword and a sequence number of the data track in the first buffer, and storing the index in a second buffer in the memory;
[0008] Whenever the number of data tracks stored in the first buffer reaches a preset number, sorting the indexes in the second buffer to obtain a sorting result, and based on the sorting result, sequentially storing the preset number of data tracks and the indexes of the data tracks in the first buffer into a temporary file to obtain a plurality of temporary files;
[0009] The indexes in multiple temporary files are merged and sorted. Based on the merged and sorted indexes, the data channels corresponding to the indexes are read from the temporary files where the indexes are located in turn. Each time a data channel is read, the read data channel is divided into corresponding channel sets based on a preset channel set keyword, and the read data channel is output to a subsequent processing module. If the read data channel is the last data channel in the channel set corresponding to the data channel, a channel set identifier is added to the data channel. The channel set identifier is used to prompt the subsequent processing module that the channel set corresponding to the data channel has been sorted.
[0010] Optionally, the method further comprises:
[0011] Get the preset capacity;
[0012] Determine a first quantity based on the preset capacity and the byte length of the data track, the first quantity being the quantity of the data tracks that can be accommodated by the preset capacity;
[0013] rounding the first quantity to obtain a preset quantity;
[0014] Based on the preset number, a first buffer is determined from the memory, and the capacity of the first buffer is equal to the data amount of the preset number of data tracks.
[0015] Optionally, the indexes in the second buffer are sorted to obtain a sorting result, including:
[0016] Determine the comparison order of each keyword in the index;
[0017] Based on the comparison order, the values of the keywords in each index are compared in turn to obtain the sorting result.
[0018] Optionally, storing a preset number of data tracks and indexes of the data tracks in the first buffer in sequence into a temporary file includes:
[0019] Copying the index of the data track from the second buffer to a third buffer in the memory, wherein the capacity of the third buffer is equal to the sum of the data volume of one data track and one index;
[0020] Copying the data track from the first buffer to the third buffer;
[0021] Store the data in the third buffer into a temporary file.
[0022] Optionally, the file name of the temporary file includes a file sequence number, the indexes in the multiple temporary files are merged and sorted, and based on the merged and sorted indexes, the data tracks corresponding to the indexes are read from the temporary files where the indexes are located in sequence, including:
[0023] Based on the sorting results of the indexes in each temporary file, the indexes in multiple temporary files are sorted multiple times;
[0024] Each time the sorting is performed, a plurality of indexes are determined from the plurality of temporary files, the determined plurality of indexes and the file serial numbers corresponding to the respective indexes are stored in the first container, the plurality of indexes in the first container are sorted, the first index among the plurality of indexes is determined, a target temporary file is determined based on the file serial number corresponding to the first index, a data track corresponding to the first index is read from the target temporary file, and the first index is deleted from the first container.
[0025] Optionally, each time a data track is read, the read data track is divided into corresponding track sets based on a preset track set keyword, including:
[0026] If the values of the channel gather keywords in the indexes of the read N+1th data channel and the Nth data channel are the same, the N+1th data channel is divided into the channel gather where the Nth data channel is located;
[0027] If the values of the track gather keywords in the indexes of the read N+1th data track and the Nth data track are different, the N+1th data track is divided into a track gather different from the track gather where the Nth data track is located;
[0028] Wherein, N is a positive integer greater than or equal to 1.
[0029] Optionally, each time a preset number of data tracks and indexes of the data tracks in the first buffer are sequentially stored in a temporary file, the first buffer and the second buffer are initialized to clear the first buffer and the second buffer.
[0030] According to a second aspect of an embodiment of the present application, a seismic data sorting device is provided, which is applied to a seismic data sorting module in a seismic data processing system, wherein the seismic data processing system further includes a pre-processing module and a post-processing module of the seismic data sorting module, and the device includes:
[0031] a storage unit, configured to receive the data track to be sorted transmitted by the preceding processing module, store the data track to be sorted in a first buffer in the memory, extract a keyword from a track header of the data track, generate an index of the data track based on the extracted keyword and a sequence number of the data track in the first buffer, and store the index in a second buffer in the memory;
[0032] a temporary file generating unit, configured to sort the indexes in the second buffer to obtain a sorting result whenever the number of data tracks stored in the first buffer reaches a preset number, and based on the sorting result, sequentially store the preset number of data tracks and the indexes of the data tracks in the first buffer into a temporary file to obtain a plurality of temporary files;
[0033] The track set division unit is used to merge and sort the indexes in multiple temporary files, and read the data tracks corresponding to the indexes from the temporary files where the indexes are located in turn based on the merged and sorted indexes. Each time a data track is read, the read data track is divided into corresponding track sets based on a preset track set keyword, and the read data track is output to a subsequent processing module. If the read data track is the last data track in the track set corresponding to the data track, a track set identifier is added to the data track, and the track set identifier is used to prompt the subsequent processing module that the track set corresponding to the data track has been sorted.
[0034] Optionally, the device further includes a determining unit, the determining unit being configured to:
[0035] Get the preset capacity;
[0036] Determine a first quantity based on the preset capacity and the byte length of the data track, the first quantity being the quantity of the data tracks that can be accommodated by the preset capacity;
[0037] rounding the first quantity to obtain a preset quantity;
[0038] Based on the preset number, a first buffer is determined from the memory, and the capacity of the first buffer is equal to the data amount of the preset number of data tracks.
[0039] Optionally, the temporary file generating unit includes a comparing subunit, and the comparing subunit is used to:
[0040] Determine the comparison order of each keyword in the index;
[0041] Based on the comparison order, the values of the keywords in each index are compared in turn to obtain the sorting result.
[0042] Optionally, the temporary file generation unit includes a storage subunit, and the storage subunit is used to:
[0043] Copying the index of the data track from the second buffer to a third buffer in the memory, wherein the capacity of the third buffer is equal to the sum of the data volume of one data track and one index;
[0044] Copying the data track from the first buffer to the third buffer;
[0045] Store the data in the third buffer into a temporary file.
[0046] Optionally, the file name of the temporary file includes a file sequence number, and the gather division unit includes a reading subunit, and the reading subunit is used to:
[0047] Based on the sorting results of the indexes in each temporary file, the indexes in multiple temporary files are sorted multiple times;
[0048] Each time the sorting is performed, a plurality of indexes are determined from the plurality of temporary files, the determined plurality of indexes and the file serial numbers corresponding to the respective indexes are stored in the first container, the plurality of indexes in the first container are sorted, the first index among the plurality of indexes is determined, a target temporary file is determined based on the file serial number corresponding to the first index, a data track corresponding to the first index is read from the target temporary file, and the first index is deleted from the first container.
[0049] Optionally, the gather division unit includes a division subunit, and the division subunit is used to:
[0050] If the values of the channel gather keywords in the indexes of the read N+1th data channel and the Nth data channel are the same, the N+1th data channel is divided into the channel gather where the Nth data channel is located;
[0051] If the values of the track gather keywords in the indexes of the read N+1th data track and the Nth data track are different, the N+1th data track is divided into a track gather different from the track gather where the Nth data track is located;
[0052] Wherein, N is a positive integer greater than or equal to 1.
[0053] Optionally, the device further comprises:
[0054] The initialization unit is used to store a preset number of data tracks and indexes of the data tracks in the first buffer in a temporary file in sequence, initialize the first buffer and the second buffer, and clear the first buffer and the second buffer.
[0055] According to a third aspect of an embodiment of the present application, a computer device is provided, the computer device comprising:
[0056] one or more processors;
[0057] a memory for storing a computer program executable by the processor;
[0058] The processor is configured to execute the computer program to implement the above-mentioned seismic data sorting method.
[0059] According to a fourth aspect of an embodiment of the present application, a readable storage medium is provided, which includes: when the computer program code in the readable storage medium is executed by a processor of a computer device, the computer device is enabled to implement the above-mentioned seismic data sorting method.
[0060] According to the fifth aspect of the embodiment of the present application, a computer program product is provided, comprising one or more computer programs, wherein the one or more computer programs are executed by one or more processors of a computer device, so that the computer device can implement the above-mentioned seismic data sorting method.
[0061] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] The drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification are used to explain the principles of the present application, and do not constitute an improper limitation on the present application.
[0063] Figure 1 is a flow chart of a seismic data sorting method provided in an embodiment of the present application;
[0064] Figure 2 is a schematic diagram of a seismic data processing system provided in an embodiment of the present application;
[0065] Figure 3 is a flow chart of a seismic data sorting method provided in an embodiment of the present application;
[0066] Figure 4It is a method structure diagram of a seismic data sorting method provided in an embodiment of the present application;
[0067] Figure 5 This is a schematic diagram of an interface for initializing sorting parameters provided in an embodiment of the present application;
[0068] Figure 6 It is a flow chart of a seismic data sorting method provided in an embodiment of the present application;
[0069] Figure 7 It is a structural schematic diagram of a seismic data sorting device provided in an embodiment of the present application;
[0070] Figure 8 It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0071] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0072] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of methods and systems consistent with some aspects of the present application as detailed in the appended claims.
[0073] In this application, the terms "first", "second", etc. are used to distinguish between identical or similar items with substantially the same effects and functions. It should be understood that there is no logical or temporal dependency between "first", "second", and "nth", nor is there a limitation on the quantity and execution order. It should also be understood that although the following description uses the terms first, second, etc. to describe various elements, these elements should not be limited by the terms.
[0074] These terms are only used to distinguish one element from another element. For example, without departing from the scope of various examples, a first buffer can be referred to as a second buffer, and similarly, a second buffer can also be referred to as a first buffer.
[0075] Here, "at least one" means one or more, for example, at least one index can be one index, two indexes, three indexes, or any other integer greater than or equal to one. "Multiple" means two or more, for example, multiple indexes can be two indexes, three indexes, or any other integer greater than or equal to two.
[0076] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions. For example, the seismic data channels involved in this application are all obtained with full authorization.
[0077] In order to facilitate understanding of the contents in the embodiments of the present application, several technical terms involved in the embodiments of the present application are explained below.
[0078] Data channel: During the seismic data acquisition process, it is necessary to first select at least one shot point location and deploy multiple geophones in the area to be explored, and then use the vibration excitation equipment to sequentially excite seismic waves at each shot point location. The geophones collect seismic data, and the seismic data of a seismic wave collected by a geophone is a data channel. The data channel includes a track header and seismic data sample values, wherein the track header includes at least one keyword, which is used to describe the attribute information of the data channel, for example, the distance between the geophone and the shot point corresponding to the data channel (shot spacing), the shot number, CMP (Common Middle Point) and CMP Line (Common Middle Point Line), etc.; the seismic data sample value includes the values of multiple sampling points on multiple seismic waves.
[0079] Track set: Track set includes track set keyword and multiple data channels, where the track set keyword is used to describe the attribute information of the track set, and the attribute information of the track set refers to the common attribute information of each data channel in the track set. For example, the track set keyword is the shot number, and each data channel in the same track set selected based on the track set keyword corresponds to the same shot number.
[0080] Seismic data sorting: According to the channel gather keyword, multiple data channels are divided into different channel gathers, and the data channels in each channel gather are sorted to obtain multiple ordered channel gathers. This process is also called extracting channel gathers. For example: the channel gather keyword is the shot number, and the data channels in the channel gather are sorted in ascending order according to the shot spacing. When sorting seismic data, multiple data channels with the same shot number in the multiple data channels are first divided into the same channel gather, and then the data channels in the channel gather are arranged in ascending order according to the shot spacing to complete the channel gather sorting. It should be noted that seismic data sorting can be divided into channel gathers first and then the data channels are sorted, or the data channels can be sorted first and then divided into channel gathers.
[0081] Gather transformation: If the gather keyword used in seismic data sorting changes, it is necessary to re-sort the seismic data based on the new gather keyword to obtain a new ordered gather. This process is called gather transformation. For example, the first seismic data sorting uses the shot number as the gather keyword, and the shot numbers of the data channels in the selected same gather are the same. The second seismic data sorting uses the shot spacing as the gather keyword, so the seismic data needs to be re-sorted, and the shot spacing of the data channels in the newly selected same gather is the same.
[0082] The above introduces the relevant terms involved in the embodiments of the present application. The following introduces a seismic data sorting method provided by the embodiments of the present application. Figure 1 1 is a flow chart of a seismic data sorting method provided in an embodiment of the present application. The method is applied to a seismic data sorting module in a seismic data processing system. The seismic data processing system also includes a pre-processing module and a post-processing module of the seismic data sorting module. Taking the seismic data processing system deployed on a computer device as an example, Figure 1 As shown, the method includes the following steps 101 to 103.
[0083] 101. A computer device receives a data track to be sorted transmitted by a preceding processing module, stores the data track to be sorted in a first buffer in a memory, extracts a keyword from a track header of the data track, generates an index of the data track based on the extracted keyword and a sequence number of the data track in the first buffer, and stores the index in a second buffer in the memory.
[0084] Among them, the pre-processing module can be any module that needs to further sort any data channel transmitted during the seismic data processing process, such as: seismic data splitting module, amplitude compensation module and noise attenuation module, etc., which is not limited in the embodiments of the present application. The computer device is connected in series with the pre-processing module, and the computer device can receive the data channel to be sorted transmitted by the pre-processing module in real time, and store the received data channel in the first buffer, without first storing the data channel to be sorted transmitted by the pre-processing module as a system format file inside the computer device, and then reading the data channel from the system format file for seismic data sorting, which can reduce the storage times of intermediate files, save storage resources, and improve the efficiency of seismic data sorting.
[0085] The data track includes a track header and seismic data sample values, wherein the track header includes at least one keyword, which is used to describe the attribute information of the data track, for example, the distance between the detector and the shot point corresponding to the data track (shot spacing), the shot number, etc., and the data type of each keyword can be an integer or a floating point type; the seismic data sample value includes the values of multiple sampling points on the seismic wave. Multiple data tracks can be arranged based on the value of the keyword (keyword value), wherein the value of each keyword can be set to ascending or descending order according to actual needs to flexibly meet different seismic data processing requirements. The computer device can automatically extract the keyword from the track header of the data track after storing the data track in the first buffer according to actual needs to generate an index of the data track without predetermining the statistical information of each keyword included in the multiple data tracks to be sorted. Among them, the computer device can extract one or more keywords from the track header of the data track, and the number of extracted keywords can be set according to actual needs, and the embodiment of the present application is not limited to this.
[0086] In an embodiment of the present application, a first buffer and a second buffer are provided in the memory, wherein the first buffer is used to cache the data tracks to be sorted, and the second buffer is used to cache the indexes of the data tracks to be sorted, the capacity of the first buffer is equal to the data volume of the preset number of data tracks, and the capacity of the second buffer is equal to the data volume of the preset number of indexes. A dynamic track header description table is stored in the computer device, and the dynamic track header description table is used to indicate the meaning and byte length of each field in the track header. The computer device determines the position information of each keyword in the track header from the dynamic track header description table, and extracts each keyword from the track header based on the position information. The sequence number of the data track in the first buffer is the sequence number of the data track written into the first buffer. For example, if the data track t1 is the first data track written into the first buffer, the sequence number of the data track t1 in the first buffer is 1. It should be noted that each time the first buffer is initialized, the sequence number of the data track in the first buffer starts counting again. The computer device splices the extracted keyword and the sequence number of the data track to generate the index of the data track.
[0087] 102. Whenever the number of data tracks stored in the first buffer reaches a preset number, the computer device sorts the indexes in the second buffer to obtain a sorting result, and based on the sorting result, stores the preset number of data tracks and the indexes of the data tracks in the first buffer in sequence into a temporary file to obtain multiple temporary files.
[0088] Among them, the capacity of the first buffer is equal to the data volume of a preset number of data tracks, and the number of data tracks stored in the first buffer reaches the preset number, that is, the first buffer is full. The computer device sorts the index in the second buffer based on the value of the keyword in the index. Since the index and the data track are one-to-one corresponding, sorting the index is to sort the data track indirectly. The storage medium of the temporary file can be a local disk of the computer device, an external storage medium associated with the computer device (for example, a disk, NAS (Network Attached Storage, network attached storage) and shared storage, etc.) or a distributed storage system associated with the computer device, etc. The embodiment of the present application does not limit the capacity of the temporary file, as long as the capacity of the temporary file is greater than or equal to the sum of the data volume of the preset number of data tracks and the preset number of indexes.
[0089] Wherein, whenever the first buffer is full, the computer device reads one data track and the index of the data track each time according to the order indicated by the sorting result, splices the read data tracks and indexes, and stores the spliced data tracks and indexes in a temporary file, until a preset number of data tracks and their corresponding indexes in the first buffer are stored in the temporary file. For example, when the first buffer is full, there are data tracks t1, t2 and t3 in the first buffer, and there are three indexes index1 (corresponding to data track t1), index2 (corresponding to data track t2) and index3 (corresponding to data track t3) in the second buffer. The three indexes in the second buffer are index3, index1 and index2 after sorting. Then, the computer device first splices t3 at the end of index3, stores the spliced index3-t3 in the temporary file a, then splices t1 at the end of index1, stores the spliced index1-t1 in the temporary file a, and finally splices t2 at the end of index2, stores the spliced index2-t2 in the temporary file a. It should be noted that the above description of splicing the data track at the end of the index is only exemplary. In some embodiments, the data track is spliced at the head of the index, which is not limited in the embodiments of the present application.
[0090] In the above method, whenever the first buffer is full, the computer device writes the data tracks in the first buffer into a temporary file to generate multiple temporary files, without the need to divide the data tracks to be sorted into multiple blocks in advance, and without the need to determine the data volume of the data tracks to be sorted in advance. This can improve the efficiency of seismic data sorting and can be applicable to seismic data sorting of different data volumes.
[0091] It should be noted that step 102 can be understood as the computer device writing the data tracks into the temporary file in batches, and the premise for writing the data tracks into the temporary file is that the first buffer is full. In some embodiments, if the number of data tracks of the last batch in multiple batches is less than a preset number, that is, the first buffer is not full, the computer device sorts the indexes corresponding to the remaining data tracks in the first buffer, and based on the sorting result, concatenates the remaining data tracks and the indexes of the data tracks in the first buffer and stores them in a temporary file in sequence to obtain multiple temporary files.
[0092] 103. The computer device merges and sorts the indexes in the multiple temporary files, and reads the data tracks corresponding to the indexes from the temporary files where the indexes are located in turn based on the merged and sorted indexes. Each time a data track is read, the read data track is divided into corresponding track sets based on a preset track set keyword, and the read data track is output to a subsequent processing module. If the read data track is the last data track in the track set corresponding to the data track, a track set identifier is added to the data track, and the track set identifier is used to prompt the subsequent processing module that the track set corresponding to the data track has been sorted.
[0093] Merge sorting refers to merging ordered subsequences together for sorting to obtain a completely ordered sequence. Since the computer device first sorts the indexes in the second buffer, and then stores the data tracks and the indexes of the data tracks in the temporary file based on the order indicated by the sorting result, each temporary file is equivalent to an ordered subsequence. The computer device merges and sorts the indexes in multiple temporary files, that is, merges and sorts the indexes in multiple temporary files together to obtain a completely ordered sequence.
[0094] The gather keyword is used to describe the attribute information of the gather, and the attribute information of the gather refers to the common attribute information of each data channel in the gather. For example, the gather keyword is the shot number, and each data channel in the same gather selected based on the gather keyword corresponds to the same shot number. The computer device divides the read data channels into corresponding gathers based on the preset gather keyword, that is, the computer device determines whether the read data channels belong to the current gather or the new gather based on the preset gather keyword.
[0095] Among them, the subsequent processing module can be any module that further processes the selected track set in the seismic data processing process, such as: dynamic correction module and noise attenuation module, etc., which is not limited in the embodiment of the present application. The computer device is directly connected in series with the subsequent processing module, and each time a data track is read, the data track is output to the subsequent processing module, and when the data track is the last data track in the track set corresponding to the data track, a track set identifier is added to the data track to prompt the subsequent processing module that the track set corresponding to the data track has been sorted, without first outputting the selected track set as an intermediate file. The subsequent processing module then reads the selected track set from the intermediate file for further processing, which can reduce the number of storage times of the intermediate file, save storage resources, and improve the efficiency of seismic data sorting.
[0096] It should be noted that the above steps 101 to 103 are described using a single track gather division process as an example. In some embodiments, it is necessary to divide the track gather multiple times. After completing the first track gather division, the computer device sorts the indexes in each temporary file based on the order of each keyword corresponding to the second division, and then merges and sorts each temporary file, and then reads the data tracks and divides the track gathers based on the result of the merge and sort, without storing the data tracks in new temporary files. This can simplify the operation process, reduce the storage of temporary data, and save storage resources. In addition, in some embodiments, the seismic data processing system can connect the seismic data sorting modules in series at different links in the same operation process according to the needs of the operation process, so as to meet the needs of track gather sorting at different links in the operation process, simplify the operation process, and improve the operation efficiency. Figure 2 As shown, Figure 2 is a schematic diagram of a seismic data processing system provided in an embodiment of the present application, Figure 2 It includes multiple seismic data sorting modules 201 and other processing modules (data splitting module, amplification compensation module, noise attenuation module, data channel control module, dynamic correction module, superposition module, static correction module and disk output module, etc.), and the seismic data sorting modules are connected in series in different links of the same operation process. Multiple modules can form a pipeline operation, simplify the operation process, reduce the number of intermediate file storage times, and improve the operation efficiency. It should be noted that Figure 2 The modules included in the seismic data processing system shown, and the serial connection between the seismic data sorting module and other modules in the system are merely exemplary and are not limited to this in the embodiments of the present application.
[0097] In the above method, the buffer in the memory is preferentially used as a cache for the data track. When the buffer is full, the data track is written to a temporary file, which is beneficial to reducing the number of disk accesses and improving the sorting efficiency of the computer device. In addition, an index of the data track is generated based on the keyword, and the data track and the index are stored together in a temporary file. When sorting the data tracks, only the keywords in the index need to be sorted without repeatedly extracting the keywords. When the track set keywords change, there is no need to first copy the data track to a new temporary file, and then sort and divide the data track into track sets. Instead, the track sets are directly divided based on the new track set keywords and the index in the existing temporary file, which can reduce the number of temporary data storage times. That is, the track sets can be flexibly changed multiple times in one operation process, and one computer device can complete the sorting, which can save hardware resources and storage resources. The previous processing module and the subsequent processing module can be directly connected in series, which simplifies the operation process and is suitable for on-site processing of seismic data. One operation process can complete the sorting of seismic data collected on the same day.
[0098] The above introduces the basic process of the embodiment of the present application. The following is a detailed introduction to the specific process of the embodiment of the present application. Figure 3 1 is a flow chart of a seismic data sorting method provided in an embodiment of the present application. The method is applied to a seismic data sorting module in a seismic data processing system. The seismic data processing system also includes a pre-processing module and a post-processing module of the seismic data sorting module. The seismic data processing system is deployed on a computer device, such as Figure 3 As shown, the method includes the following steps 301 to 309.
[0099] 301. The computer device obtains sorting parameters, which include keywords to be extracted from the trace header, the comparison order of each keyword, the trace gather keyword, the preset capacity of the first buffer, and the storage medium of the temporary file.
[0100] The comparison order of each keyword refers to which keyword is used to compare the keyword value first in the case of multiple keywords. For example, the keywords include gun number and gun spacing. The comparison order of the keywords is: gun number first, then gun spacing. When sorting, the gun number values corresponding to each data channel are compared first. When the gun numbers are the same, the gun spacing values are compared to complete the sorting. The preset capacity of the first buffer and the storage medium of the temporary file can be set according to actual needs, and the embodiments of the present application do not limit this.
[0101] In the above method, the sorting parameters are set by the user according to actual needs. After the computer device obtains the sorting parameters set by the user, it completes the sorting of data channels based on the sorting parameters, which can improve the flexibility of the seismic data sorting method.
[0102] 302. The computer device sets a first buffer and a second buffer from a memory.
[0103] Wherein, each time the computer device performs the seismic data sorting operation, the computer device temporarily sets the first buffer and the second buffer from the memory based on the preset capacity in the sorting parameters obtained in step 301. In some embodiments, the computer device sets the first buffer and the second buffer from the memory before performing the seismic data sorting operation, and there is no need to reset the first buffer and the second buffer each time the seismic data sorting is performed, which is not limited in the embodiments of the present application.
[0104] Among them, the process of setting the first buffer from the memory of the computer device includes: determining a first number based on the preset capacity and the byte length of the data track, the first number being the number of data tracks that can be accommodated by the preset capacity; rounding the first number to obtain the preset number; and determining the first buffer from the memory based on the preset number, the capacity of the first buffer being equal to the data volume of the preset number of data tracks. In some embodiments, a dynamic track header description table and a track header buffer are stored in the computer device, the dynamic track header description table is used to indicate the meaning and byte length of each field in the track header, and the track header buffer is used to store the number of sampling points in the seismic data sample value. The process of determining the byte length of the data track by the computer device includes: obtaining the byte length of the track header in the data track from the dynamic track header description table, obtaining the number of sampling points in the seismic data sample value in the data track from the track header buffer; determining the byte length of the data track based on the byte length of the track header, the number of sampling points and the byte length of each sampling point. In the above method, the capacity of the first buffer is adjusted to the data volume of an integer number of data tracks based on the preset capacity, which is conducive to saving storage resources.
[0105] Among them, the process of setting the second buffer in the computer device from the memory includes: determining the byte length of each keyword in the sorting parameter from the dynamic track header description table; determining the byte length of the index based on the byte length of each keyword and the byte length of the serial number of the data track in the first buffer; based on a preset number, determining the second buffer from the memory, the capacity of the second buffer being equal to the data volume of the preset number of indexes.
[0106] 303. The computer device receives the data track to be sorted transmitted by the previous processing module, stores the data track to be sorted in a first buffer in the memory, extracts a keyword from the track header of the data track, generates an index of the data track based on the extracted keyword and the sequence number of the data track in the first buffer, and stores the index in a second buffer in the memory.
[0107] The step 303 is the same as the above step 101 and will not be described in detail.
[0108] 304. If the number of data tracks stored in the first buffer reaches a preset number, the computer device creates a temporary file and names the temporary file using a character string composed of a process number that creates the temporary file, a creation time of the temporary file, and a file sequence number of the temporary file.
[0109] In some embodiments, after the computer device creates a temporary file, it sets the output flag of the temporary file to true, and the output flag of the temporary file being true indicates that the data needs to be read from the temporary file when it is subsequently read.
[0110] In the above method, the temporary file is named with a string composed of the process number that creates the temporary file, the creation time of the temporary file and the file sequence number of the temporary file, which can ensure the uniqueness of the file name of the temporary file, thereby avoiding subsequent failures in reading data or indexing from the temporary file due to duplicate file names.
[0111] It should be noted that the above description of the naming method of temporary files is only exemplary, and the temporary files can be named according to actual needs, and the embodiments of the present application do not limit this.
[0112] In some embodiments, after creating a temporary file, the computer device stores the file name of the temporary file in a vector container to provide file information for subsequent reading of data tracks or indexes in the temporary file, wherein the vector container is a dynamically expandable array, that is, the length of the array is variable.
[0113] 305. The computer device sorts the indexes in the second buffer, and based on the sorting result, stores a preset number of data tracks and indexes of the data tracks in the first buffer in sequence into a temporary file.
[0114] The process of the computer device sorting the indexes in the second buffer includes: determining the comparison order of the keywords in the index; and comparing the values of the keywords in the indexes in turn based on the comparison order to obtain a sorting result. In some embodiments, multiple threads are used to sort the indexes in the second buffer in parallel to improve the efficiency of sorting the indexes.
[0115] In some embodiments, taking a data track as an example, the process in which a computer device stores a preset number of data tracks and indexes of the data tracks in a first buffer in sequence into a temporary file includes: opening the temporary file in write mode; copying the index of the data track from the second buffer to a third buffer in the memory, the capacity of the third buffer being equal to the sum of the data volume of a data track and an index; based on the sequence number of the data track in the index in the first buffer, copying the data track corresponding to the index from the first buffer to the back of the index in the third buffer to splice the data track and the index of the data track; storing the data in the third buffer into the temporary file. In the above method, the data to be written into the temporary file is first copied to the buffer for transferring data, and then the data is read from the buffer and written into the temporary file. The process of writing the temporary file is divided into two steps, and the two processes can be processed in parallel by multiple threads, which is conducive to improving efficiency.
[0116] 306. The computer device initializes the first buffer and the second buffer to clear the first buffer and the second buffer.
[0117] Wherein, each time the computer device generates a temporary file, the first buffer and the second buffer are initialized and cleared to free up storage space for subsequent data tracks to be sorted.
[0118] 307. The computer device repeats the above steps 303 to 306. If there are remaining data tracks in the first buffer, the computer device sorts the indexes of the remaining data tracks in the first buffer, and based on the sorting result, stores the remaining data tracks and the indexes of the data tracks in the first buffer in a temporary file in sequence to obtain multiple temporary files.
[0119] The above steps 304 to 307 are an implementation method in which each index in the second buffer is sorted to obtain a sorting result whenever the number of data tracks stored in the first buffer reaches a preset number, and based on the sorting result, a preset number of data tracks and the indexes of the data tracks in the first buffer are sequentially stored in a temporary file to obtain multiple temporary files. In some embodiments, the above process is implemented based on other methods, which is not limited in the embodiments of the present application.
[0120] 308. The computer device merges and sorts the indexes in the multiple temporary files, and reads the data tracks corresponding to the indexes from the temporary files where the indexes are located in sequence based on the merged and sorted indexes.
[0121] The process of merging and sorting the indexes in multiple temporary files by the computer device includes: sorting the indexes in the multiple temporary files multiple times based on the sorting results of the indexes in each temporary file; during each sorting, determining multiple indexes from the multiple temporary files, storing the determined multiple indexes and the file sequence numbers corresponding to each index in the first container, sorting the multiple indexes in the first container, determining the first index among the multiple indexes, determining the target temporary file based on the file sequence number corresponding to the first index, reading the data track corresponding to the first index from the target temporary file, and deleting the first index from the first container. When the computer device sorts the indexes in the temporary file for the Mth time, it determines an index from the temporary file corresponding to the data track read in the M-1th sorting, and stores the index in the first container, the index is the next index of the first index in the M-1th sorting in the target temporary file, and M is a positive integer greater than 1. For example, there are three temporary files, among which the indexes of the data tracks in temporary file a are index-a1, index-a2 and index-a3 from large to small, those in temporary file b are index-b1, index-b2 and index-b3, and those in temporary file c are index-c1, index-c2 and index-c3. First sorting: the computer device first stores the first index (index-a1, index-b1 and index-c1) in each temporary file into the first container, and sorts the three indexes in the first container. If index-a1 is ranked first, it means that index-a1 is the largest among all indexes. Based on the file sequence number corresponding to index-a1, the data track corresponding to index-a1 is read from temporary file a, and index-a1 is deleted from the first container. Second sorting: the computer device stores index-a2 into the first container, and then sorts the three indexes (index-a2, index-b1 and index-c1) in the first container. The subsequent process is the same as the first sorting and will not be repeated.
[0122] In the above method, the data tracks are sorted by sorting the indexes of the data tracks. Since sorting the indexes is a disk read and write (IO) task with a small amount of calculation, the CPU (Central Processing Unit) occupancy rate of the computer device is low. Therefore, when the computer device sorts the indexes, it can simultaneously execute other CPU-intensive tasks, thereby improving the resource utilization of the computer device.
[0123] In some embodiments, the computer device stores the read handle of each temporary file in a vector container, and the read handle is used to open the temporary file corresponding to the read handle. When reading a temporary file, the computer device reads the handle of the temporary file from the vector container, and then opens the temporary file based on the handle, without first requesting the handle of the temporary file based on the file name of the temporary file, and then opening the temporary file based on the handle. In the above method, the data pre-reading technology is used to prepare the handle of the temporary file to be read, so as to be called in the subsequent formal reading, which can improve the reading efficiency of the temporary file.
[0124] In some embodiments, the temporary file has a read status attribute, which is used to indicate whether the temporary file has been read. If the read status of any temporary file is not completed, the computer device stores the file number and read status of the temporary file in an associated (map) container. Then, the computer device can determine whether there is a data track to be read in the temporary file based on the read status, thereby reading the data track from the temporary file that has not been read, which can improve the reading efficiency of the data track.
[0125] 309. Every time the computer device reads a data channel, it divides the read data channel into corresponding channel sets based on a preset channel set keyword, and outputs the read data channel to a subsequent processing module. If the read data channel is the last data channel in the channel set corresponding to the data channel, a channel set identifier is added to the data channel. The channel set identifier is used to prompt the subsequent processing module that the channel set corresponding to the data channel has been sorted.
[0126] Among them, if the values of the channel set keywords in the indexes of the read N+1th data channel and the Nth data channel are the same, the computer device will divide the N+1th data channel into the channel set where the Nth data channel is located; if the values of the channel set keywords in the indexes of the read N+1th data channel and the Nth data channel are different, the computer device will divide the N+1th data channel into a channel set different from the channel set where the Nth data channel is located; wherein N is a positive integer greater than or equal to 1.
[0127] Among them, if the values of the channel set keywords in the indexes of the read N+1th data channel and the Nth data channel are different, the computer device adds a channel set identifier for the Nth data channel to prompt the subsequent processing module that the channel set corresponding to the Nth data channel has been sorted, wherein N is a positive integer greater than or equal to 1.
[0128] It should be noted that the process of the seismic data sorting method described in the above steps 301 to 309 can be used for sorting within a channel set, that is, further sorting multiple data channels within a channel set, and can also be used for sorting all data channels, that is, sorting all data channels collected during the seismic exploration process to meet different seismic data sorting needs. Among them, the process of sorting within a channel set is: after the computer device stores all data channels in a channel set, it sorts the data channels in the channel set, and then stores the data channels in the next channel set, and sorts the data channels in the next channel set; the process of sorting all data channels is: the computer device first stores all data channels, and then sorts the stored data channels. The specific process of sorting is the same as the above steps 301 to 309, and will not be repeated.
[0129] It should be noted that the above steps 301 to 309 are explained by taking the total number of data tracks to be sorted as greater than the preset number as an example. In some embodiments, the total number of data tracks to be sorted is less than or equal to the preset number. At this time, the first buffer can accommodate all the data tracks to be sorted, and the computer device does not need to write the data tracks and their indexes into a temporary file. Instead, after sorting the indexes in the second buffer, the computer device reads the data tracks from the first buffer in sequence based on the sorting result. Each time a data track is read, the multiple data tracks are divided into corresponding track sets based on the preset track set keyword.
[0130] Below Figures 4 to 6 Taking the example of FIG. 1 as an example, the process shown in the above steps 301 to 309 is illustrated. Figure 4 is a schematic diagram of the structure of a method for seismic data sorting provided in an embodiment of the present application, such as Figure 4 As shown, the method includes initialization function (corresponding to the above step 301), multi-buffer allocation (corresponding to the above step 302), writing data tracks (corresponding to the above step 303), reading data tracks (corresponding to the above steps 304 to 309), index management and seismic data sorting control. Figure 5 is a flow chart of a seismic data sorting method provided in an embodiment of the present application, such as Figure 5 As shown, the computer device stores the data tracks of one track set or all track sets in the first buffer 501, and stores the indexes of the data tracks in the second buffer 502; when the first buffer 501 is full, the computer device sorts the data in the second buffer 502, and writes the data tracks and their indexes in a temporary file 503 (temporary file 1 to temporary file X, X is a positive integer greater than 1) in order; the computer device reads the indexes in each temporary file in turn, compares the indexes in each temporary file, and then reads the data tracks in the temporary files in order.
[0131] Figure 6 Schematic diagram of an interface for initializing sorting parameters provided in an embodiment of the present application. Figure 6 As shown in the figure, the user can set the sorting parameters through the sorting parameter initialization interface, where the sorting parameters include sorting type (sorting within the gather and sorting of all data channels), keyword comparison order (first keyword, second keyword, third keyword in sequence), storage medium of temporary files, gather identifier, preset capacity of the first buffer, and sorting method of each keyword (from small to large and from large to small). The settings of each sorting parameter are shown in the figure. Figure 6 The specific process of seismic data sorting is illustrated below with examples.
[0132] The following first introduces the process of allocating various buffers (first buffer, second buffer and third buffer) used by the seismic data sorting method based on the sorting parameters after the sorting parameters are initialized. Among them, the second buffer is implemented using a vector container. The number of indexes in the container is consistent with the number of tracks (preset number) in the first buffer. By sorting the indexes in the second buffer, the order of the data tracks in the first buffer is indirectly obtained. The specific steps are as follows: calculate the byte length of a data track (the data track consists of a track header and seismic data sample values. The track header length HL is obtained through the dynamic track header description table. The number of sampling points SN in the seismic data sample value is obtained from the track header buffer. The byte length of a sampling point is 4, and the byte length of a data track TL=HL+SN*4 can be calculated); allocate the first buffer BufTraces (by using the preset capacity and the byte length of the data track, calculate the number of data tracks TN that the preset capacity can accommodate, and recalculate the capacity of the first buffer by using the number of tracks to confirm Ensure that the first buffer zone can accommodate the entire number of data tracks); calculate the byte length of an index (by sorting each keyword to be used, searching the dynamic track header description table, obtaining the type, byte length, byte position in the track header buffer and other information of each keyword, accumulating the byte length of each keyword and the byte length of the sequence number of the data track in the first buffer zone, and then calculating the length IL of an index information); allocate the third buffer zone BufTrace (when writing data tracks to a temporary file, it is necessary to determine the order of the data tracks through the index. When reading data tracks of various temporary files, it is necessary to select data tracks between multiple temporary files, and the index of the data track is also required. In order to avoid repeated extraction of the index, the index of the data track is written to the temporary file together with the data track. The length of the third buffer zone TBL=IL+TL).
[0133] The following is an introduction to the process of storing data tracks in a computer device. Whether the data track is written to the first buffer or written to a temporary file again depends on whether the number of data tracks written to the first buffer is greater than TN. If it is not greater than TN, it will only be stored in the first buffer. If it is greater than TN, the data tracks in the first buffer will be written to a temporary file again. The specific steps are as follows: If the number of tracks CT currently written to the first buffer is equal to the number of tracks TN accommodated in the first buffer, the data tracks in the first buffer are written to a temporary file, otherwise the header and seismic data sample value of the current data track are copied to the position corresponding to the number of tracks CT in the first buffer BufTraces. The specific steps of writing the data tracks in the first buffer into the temporary file are as follows: the output flag of the temporary file is set to True, which means that the number of data tracks stored in the first buffer is greater than the number of tracks that the first buffer can accommodate. When reading the data tracks subsequently, they need to be read from the temporary file; index sorting (parallel sorting of the indexes in the second buffer, the sorting algorithm is to compare the value of each keyword one by one); writing a temporary file (obtaining a temporary file name with a path, and putting the file name into the vector container TmpFiles. In order to ensure that the temporary file name is unique, the file name uses a combination of process number + time + file sequence number, and the temporary file name is put into the container The purpose is to provide file information for reading when reading these temporary files again; open the temporary file in write mode; take out the first index or the next index from the second buffer; extract the serial number of the data track from the index. The serial number represents the position of the corresponding data track in the first buffer BufTraces; copy the index to the third buffer BufTrace, and then append the data track in the first buffer BufTraces to the back of the index in the third buffer BufTrace; write the content of the third buffer BufTrace to the temporary file; if there is still an unprocessed index in the second buffer, repeat the above steps of writing the temporary file). Restore the initial state of each buffer (clear all indexes in the second buffer, set the number of tracks written in the first buffer CT to 0, and set the data track position nPosInIndex in the second buffer to 0). Among them, the specific steps of copying the header of the current data track and the seismic data sample value to the position corresponding to the track number CT of the first buffer BufTraces are as follows: extract the values of each keyword from the track header, form a string of these values and the track number CT value of the data track in the first buffer, and put it into the second buffer; add 1 to the track number CT in the first buffer.
[0134] The following describes the process of completing the storage of the remaining data tracks in the buffer and pre-reading the data tracks. When the data tracks in a track set or all data tracks are processed in the first buffer BufTraces, the buffer may not be full, and it is necessary to write the remaining data tracks to a temporary file and prepare to read the data tracks from the temporary file. The specific steps are as follows: sort the indexes in the second buffer in parallel; if the output flag of the temporary file is True, write the data tracks in the first buffer to the temporary file; open each temporary file in read mode. Put the read handle of each temporary file into the vector container vReaderFiles; each temporary file reads the index of the first track and sets the read status through the corresponding file number (reads the index and status of the next data track in the temporary file corresponding to the given file number. The specific steps are as follows: find the read handle of the corresponding element in the read handle container vReaderFiles through the file number, read the index, and obtain the read status state; query whether there is a corresponding element in the temporary file read status map container mReadState through the file number. If not, add the temporary file status state corresponding to the file number to the container mReadState. If it exists and the temporary file read status corresponding to the file number indicates that the temporary file has been read, then update the temporary file read status. If the file read status is not read, put the read index into the temporary file index map container mFilesIndex. Otherwise, it means that all data tracks in the temporary file have been read.
[0135] The following describes the process of reading data tracks. The data tracks read may come from the first buffer or from a temporary file, and need to be processed separately according to the situation. The specific steps are as follows: Determine whether there are data tracks, which also need to be processed separately: whether there are data tracks that need to be obtained in the first buffer; whether there are data tracks that need to be read in the temporary file (if the output flag of the temporary file is True, it means that the data track is read from the temporary file, if the element of the temporary file index map container mFilesIndex is greater than 0, it means that there is a data track, otherwise it means that there is no data track; if the output flag of the temporary file is False, it means that the data track is read from the first buffer, if the data track position nPosInIndex of the second buffer is less than the number of elements in the second buffer, it means that there is a data track, otherwise it means that there is no data track). In the case of data tracks, the specific steps of reading data tracks from temporary files are as follows: Get the first element in the container mFilesIndex and save the element to the vector container currentFileIndex, get the file number of the temporary file from the element, get the read handle corresponding to the file number from the temporary file container vReaderFiles, read the data track, clear the first element of the temporary file index map container mFilesIndex, use the file number of the temporary file read, read the index and read status of the next data track in the temporary file corresponding to the given file number. Read data tracks from the first buffer, the specific steps are as follows: Get the index corresponding to the data track position nPosInIndex from the second buffer, and then get the data track number from the index; Get the data track corresponding to the data track number from the first buffer; Add 1 to the data track position nPosInIndex in the second buffer. Determine whether the current track is the last track in the track set. Whether the current track is the last track in the track set is used to provide a track set identifier to the subsequent processing module, which can notify the subsequent processing module that this data track is the last track in the current track set. If there is no data track, it means that this data track is the last track of the track set, and this step ends. If there is a data track, if the output mark of the temporary file is True, get the first element in the container mFilesIndex, that is, the index of the next track, and judge whether the two indexes belong to the same track set according to the track set keyword; if the output mark of the temporary file is False, get the index of the current track and the index of the next track from the data track positions nPosInIndex and nPosInIndex-1 of the index container respectively, and judge whether the two indexes belong to the same track set according to the track set keyword.
[0136] The following is an introduction to the process of dividing the channel set. Seismic data sorting includes: sorting within the channel set and sorting of all data channels. The overall process of sorting within the channel set is as follows: receiving data channels, sorting the channel set after receiving all data channels of a channel set, providing sorted data channels for the subsequent processing module, and then sorting the data channels of the next channel set. The initial state of the last channel identifier LastGather in the channel set and the last channel identifier LastTrace of the entire data body is False. The specific steps are as follows: If the last channel identifier LastGather in the channel set and the last channel identifier LastTrace of the entire data body are both False, it means that the data channel is being received, and the last channel identifier LastGather in the channel set and the last channel identifier LastTrace of the entire data body are obtained. If the last channel identifier LastGather in the channel set and the last channel identifier LastTrace of the entire data body are both False, write the current data channel into the buffer or temporary file, and complete the writing of temporary files and pre-reading of data channels for the remaining seismic data channels in the buffer. Read a seismic data. If it is the last track in the data set, set the last track mark in the data set or the last track mark of the entire data body, and restore the last track mark LastGather and the last track mark LastTrace of the entire data body to False. If it is not the last track of the entire data body, set the output next data track mark and continue to receive data tracks. The overall process of sorting all data tracks is: receive seismic data tracks, and after receiving all data tracks, sort the data set to provide sorted data tracks for subsequent processing modules, and the sorting is completed. The initial state of the last track identifier LastTrace of the entire data body is False. The specific steps are as follows: If the last track identifier LastTrace of the entire data body is False, it means that the data track is being received. Get the last track identifier LastTrace of all data tracks. If the last track identifier LastTrace of all data tracks is False, write the current data track into the buffer or temporary file, and complete the writing of the temporary file and pre-reading of the data tracks of the remaining seismic data tracks in the buffer. Read a seismic data. If it is the last track in the track set, set the last track identifier of the track set. If it is the last track of all data tracks, set the last track identifier of all data tracks. Otherwise, set the output next data track identifier and continue reading data tracks until the seismic data sorting is completed.
[0137] In the above method, the buffer in the memory is preferentially used as the cache of the data track. When the buffer is full, the data track is written to a temporary file, which is beneficial to reduce the number of disk accesses and improve the sorting efficiency of the computer device. In addition, an index of the data track is generated based on the keyword, and the data track and the index are stored in a temporary file together. When the data track is merged and sorted, only the keywords in the index need to be sorted, and there is no need to repeatedly extract the keywords to generate the index. When the track set keyword changes, there is no need to first copy the data track to a new temporary file, and then sort and divide the data track into track sets, but directly based on the new track set keyword The channel gathers are divided according to the indexes in the existing temporary files, so as to adapt to different channel gather transformation requirements, that is, the channel gathers can be flexibly transformed multiple times in one operation process, which can simplify the operation process and save storage resources. One computer device can complete the sorting, which can save hardware resources and can directly connect the previous processing module and the subsequent processing module in series. It is suitable for on-site processing of seismic data, and one operation process can complete the sorting of seismic data collected on the same day; further, in the process of reading data channels, the data pre-reading technology is used to further improve the reading efficiency of data channels, thereby improving the sorting efficiency of computer equipment.
[0138] In order to verify the effectiveness of a seismic data sorting method provided in this application, the method is deployed on a high-performance computer device cluster, in which one computer device is used for seismic data sorting, and other computer devices are used to execute the pre- or post-processing process of the seismic data sorting process, and experiments are conducted on the cluster for many times. Each computer device in the cluster is equipped with two processors (Intel(R)Xeon(R)E5-2660 v3 2.6GHz CPU), each processor contains 10 physical cores, each computer device has a total of 20 physical cores, 128GB of memory, and the storage medium for temporary files is shared storage. The version of the operating system of the computer device is Red Hat Enterprise LinuxServer release 6.8 (Santiago). The data scale of the test is the actual data of the acquisition project, and multiple transformation gathers can be used in one operation process. This method can meet the needs of fast extraction of gathers for on-site processing of aliased data and transformation gathers in the operation flow in processing production projects.
[0139] Figure 7 It is a structural schematic diagram of a seismic data sorting device provided in an embodiment of the present application, and the device includes a storage module 701, a temporary file generation module 702 and a track gather division module 703.
[0140] The storage module 701 is used to receive the data track to be sorted transmitted by the previous processing module, store the data track to be sorted in a first buffer in the memory, extract a keyword from the track header of the data track, generate an index of the data track based on the extracted keyword and the sequence number of the data track in the first buffer, and store the index in a second buffer in the memory;
[0141] The temporary file generating module 702 is used for sorting the indexes in the second buffer to obtain a sorting result whenever the number of data tracks stored in the first buffer reaches a preset number, and based on the sorting result, sequentially storing the preset number of data tracks and the indexes of the data tracks in the first buffer into a temporary file to obtain a plurality of temporary files;
[0142] The track set division module 703 is used to merge and sort the indexes in multiple temporary files, and read the data tracks corresponding to the indexes from the temporary files where the indexes are located in turn based on the merged and sorted indexes. Each time a data track is read, the read data track is divided into corresponding track sets based on a preset track set keyword, and the read data track is output to a subsequent processing module. If the read data track is the last data track in the track set corresponding to the data track, a track set identifier is added to the data track, and the track set identifier is used to prompt the subsequent processing module that the track set corresponding to the data track has been sorted.
[0143] Optionally, the device further includes a determining module, wherein the determining module is configured to:
[0144] Get the preset capacity;
[0145] Determine a first quantity based on the preset capacity and the byte length of the data track, the first quantity being the quantity of the data tracks that can be accommodated by the preset capacity;
[0146] rounding the first quantity to obtain a preset quantity;
[0147] Based on the preset number, a first buffer is determined from the memory, and the capacity of the first buffer is equal to the data amount of the preset number of data tracks.
[0148] Optionally, the temporary file generating unit 702 includes a comparing subunit, and the comparing subunit is used to:
[0149] Determine the comparison order of each keyword in the index;
[0150] Based on the comparison order, the values of the keywords in each index are compared in turn to obtain the sorting result.
[0151] Optionally, the temporary file generating unit 702 includes a storage subunit, which is used to:
[0152] Copying the index of the data track from the second buffer to a third buffer in the memory, wherein the capacity of the third buffer is equal to the sum of the data volume of one data track and one index;
[0153] Copying the data track from the first buffer to the third buffer;
[0154] Store the data in the third buffer into a temporary file.
[0155] Optionally, the file name of the temporary file includes a file sequence number. The gather division unit 703 includes a reading subunit, and the reading subunit is used to:
[0156] Based on the sorting results of the indexes in each temporary file, the indexes in multiple temporary files are sorted multiple times;
[0157] Each time the sorting is performed, a plurality of indexes are determined from the plurality of temporary files, the determined plurality of indexes and the file serial numbers corresponding to the respective indexes are stored in the first container, the plurality of indexes in the first container are sorted, the first index among the plurality of indexes is determined, a target temporary file is determined based on the file serial number corresponding to the first index, a data track corresponding to the first index is read from the target temporary file, and the first index is deleted from the first container.
[0158] Optionally, the gather division unit 703 includes a division subunit, and the division subunit is used to:
[0159] If the values of the channel gather keywords in the indexes of the read N+1th data channel and the Nth data channel are the same, the N+1th data channel is divided into the channel gather where the Nth data channel is located;
[0160] If the values of the track gather keywords in the indexes of the read N+1th data track and the Nth data track are different, the N+1th data track is divided into a track gather different from the track gather where the Nth data track is located;
[0161] Wherein, N is a positive integer greater than or equal to 1.
[0162] Optionally, the device further comprises:
[0163] The initialization module is used to store a preset number of data tracks and indexes of the data tracks in the first buffer in a temporary file in sequence, initialize the first buffer and the second buffer, and clear the first buffer and the second buffer.
[0164] It should be noted that: when the seismic data sorting device provided in the above embodiment executes the corresponding steps, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the seismic data sorting device provided in the above embodiment and the seismic data sorting method embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0165] In an embodiment of the present disclosure, a computer device is also provided. The computer device includes a processor and a memory. The memory is used to store at least one computer program. The at least one computer program is loaded and executed by the processor to implement the above-mentioned seismic data sorting method.
[0166] Figure 8 is a schematic diagram of the structure of a computer device provided in an embodiment of the present application, see Figure 8 The computer device 800 may be a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 player (Moving Picture Experts Group Audio Layer IV), a laptop computer, or a desktop computer. The computer device 800 may also be referred to as a user device, a portable computer device, a laptop computer device, a desktop computer device, or other names.
[0167] Typically, the computer device 800 includes a processor 801 and a memory 802 .
[0168] The processor 801 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 801 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 801 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 801 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 801 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0169] The memory 802 may include one or more computer-readable storage media, which may be non-transitory. The memory 802 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 802 is used to store at least one program code, which is used to be executed by the processor 801 to implement the process executed by the computer device in the seismic data sorting method provided in the method embodiment of the present disclosure.
[0170] In some embodiments, the computer device 800 may further optionally include: a peripheral device interface 803 and at least one peripheral device. The processor 801, the memory 802 and the peripheral device interface 803 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 803 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 804, a display screen 805, a camera assembly 806, an audio circuit 807 and a power supply 808.
[0171] The peripheral device interface 803 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 801 and the memory 802. In some embodiments, the processor 801, the memory 802, and the peripheral device interface 803 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 801, the memory 802, and the peripheral device interface 803 may be implemented on a separate chip or circuit board, which is not limited in the embodiments of the present disclosure.
[0172] The radio frequency circuit 804 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 804 communicates with communication networks and other communication devices through electromagnetic signals. The radio frequency circuit 804 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. In some embodiments, the radio frequency circuit 804 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. The radio frequency circuit 804 can communicate with other computer devices through at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: a metropolitan area network, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 804 may also include circuits related to NFC (Near Field Communication), which is not limited in the present disclosure.
[0173] The display screen 805 is used to display the UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 805 is a touch display screen, the display screen 805 also has the ability to collect touch signals on the surface or above the surface of the display screen 805. The touch signal can be input to the processor 801 as a control signal for processing. At this time, the display screen 805 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 805 can be one, set on the front panel of the computer device 800; in other embodiments, the display screen 805 can be at least two, respectively set on different surfaces of the computer device 800 or in a folding design; in other embodiments, the display screen 805 can be a flexible display screen, set on the curved surface or folding surface of the computer device 800. Even, the display screen 805 can also be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 805 can be made of materials such as LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode, organic light-emitting diode).
[0174] The camera assembly 806 is used to capture images or videos. In some embodiments, the camera assembly 806 includes a front camera and a rear camera. Typically, the front camera is disposed on the front panel of the computer device, and the rear camera is disposed on the back of the computer device. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize the panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 806 may also include a flash. The flash can be a monochrome temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.
[0175] The audio circuit 807 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals and input them into the processor 801 for processing, or input them into the radio frequency circuit 804 to achieve voice communication. For the purpose of stereo acquisition or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the computer device 800. The microphone may also be an array microphone or an omnidirectional acquisition microphone. The speaker is used to convert the electrical signal from the processor 801 or the radio frequency circuit 804 into sound waves. The speaker may be a traditional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 807 may also include a headphone jack.
[0176] The power supply 808 is used to power various components in the computer device 800. The power supply 808 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 808 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology.
[0177] In some embodiments, the computer device 800 further includes one or more sensors 809 , including but not limited to: an acceleration sensor 810 , a gyroscope sensor 811 , a pressure sensor 812 , an optical sensor 813 , and a proximity sensor 814 .
[0178] The acceleration sensor 810 can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established by the computer device 800. For example, the acceleration sensor 810 can be used to detect the components of gravity acceleration on the three coordinate axes. The processor 801 can control the display screen 805 to display the user page in a horizontal view or a vertical view according to the gravity acceleration signal collected by the acceleration sensor 810. The acceleration sensor 810 can also be used for collecting game or user motion data.
[0179] The gyro sensor 811 can detect the body direction and rotation angle of the computer device 800, and the gyro sensor 811 can cooperate with the acceleration sensor 810 to collect the user's 3D actions on the computer device 800. The processor 801 can implement the following functions based on the data collected by the gyro sensor 811: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.
[0180] The pressure sensor 812 can be set on the side frame of the computer device 800 and / or the lower layer of the display screen 805. When the pressure sensor 812 is set on the side frame of the computer device 800, it can detect the user's grip signal of the computer device 800, and the processor 801 performs left and right hand recognition or shortcut operation according to the grip signal collected by the pressure sensor 812. When the pressure sensor 812 is set on the lower layer of the display screen 805, the processor 801 controls the operability controls on the UI page according to the user's pressure operation on the display screen 805. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
[0181] The optical sensor 813 is used to collect the ambient light intensity. In one embodiment, the processor 801 can control the display brightness of the display screen 805 according to the ambient light intensity collected by the optical sensor 813. Specifically, when the ambient light intensity is high, the display brightness of the display screen 805 is increased; when the ambient light intensity is low, the display brightness of the display screen 805 is reduced. In another embodiment, the processor 801 can also dynamically adjust the shooting parameters of the camera component 806 according to the ambient light intensity collected by the optical sensor 813.
[0182] The proximity sensor 814, also called a distance sensor, is usually disposed on the front panel of the computer device 800. The proximity sensor 814 is used to collect the distance between the user and the front of the computer device 800. In one embodiment, when the proximity sensor 814 detects that the distance between the user and the front of the computer device 800 is gradually decreasing, the processor 801 controls the display screen 805 to switch from the screen-on state to the screen-off state; when the proximity sensor 814 detects that the distance between the user and the front of the computer device 800 is gradually increasing, the processor 801 controls the display screen 805 to switch from the screen-off state to the screen-on state.
[0183] Those skilled in the art will understand that Figure 8 The structure shown in the figure does not constitute a limitation on the computer device 800, and the computer device 800 may include more or less components than those shown in the figure, or combine some components, or adopt a different arrangement of components.
[0184] In the embodiment of the present application, a computer-readable storage medium including program code is also provided, such as a memory 802 including program code, and the program code can be executed by the processor 801 of the computer device 800 to complete the seismic data sorting method. Optionally, the computer-readable storage medium can be ROM (Read-Only Memory), RAM (Random Access Memory), CD-ROM (Compact-Disc Read-Only Memory), magnetic tape, floppy disk and optical data storage device, etc.
[0185] In an embodiment of the present application, a computer program product is also provided, comprising one or more instructions, wherein the one or more instructions are executed by one or more processors of a computer device, so that the computer device can execute the above-mentioned seismic data sorting method.
[0186] In some embodiments, the computer program involved in the embodiments of the present application may be deployed and executed on a computer device, or on multiple computer devices located at one location, or on multiple computer devices distributed at multiple locations and interconnected by a communication network. Multiple computer devices distributed at multiple locations and interconnected by a communication network may constitute a blockchain system.
[0187] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0188] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A seismic data sorting method, characterized in that: A seismic data sorting module applied to a seismic data processing system, wherein the seismic data processing system further comprises a pre-processing module and a post-processing module of the seismic data sorting module, and the method comprises: receiving the data track to be sorted transmitted by the preceding processing module, storing the data track to be sorted in a first buffer in the memory, extracting a keyword from a track header of the data track, generating an index of the data track based on the extracted keyword and a sequence number of the data track in the first buffer, and storing the index in a second buffer in the memory; Whenever the number of data tracks stored in the first buffer reaches a preset number, sorting the indexes in the second buffer to obtain a sorting result, and based on the sorting result, sequentially storing the preset number of data tracks and the indexes of the data tracks in the first buffer into a temporary file to obtain a plurality of temporary files; The indexes in the multiple temporary files are merged and sorted, and based on the merged and sorted indexes, the data tracks corresponding to the indexes are read from the temporary files where the indexes are located in turn. Every time a data track is read, the read data track is divided into corresponding track sets based on a preset track set keyword, and the read data track is output to the subsequent processing module. If the read data track is the last data track in the track set corresponding to the data track, a track set identifier is added to the data track, and the track set identifier is used to prompt the subsequent processing module that the track set corresponding to the data track has been sorted.
2. The method according to claim 1, characterized in that: The method further comprises: Get the preset capacity; Determining a first quantity based on the preset capacity and the byte length of the data track, the first quantity being the quantity of the data tracks that can be accommodated by the preset capacity; rounding the first quantity to obtain the preset quantity; Based on the preset number, the first buffer is determined from the memory, and the capacity of the first buffer is equal to the data amount of the preset number of data tracks.
3. The method according to claim 1, characterized in that The step of sorting the indexes in the second buffer to obtain a sorting result includes: Determining a comparison order of each of the keywords in the index; Based on the comparison order, the values of the keywords in each of the indexes are compared in turn to obtain the sorting result.
4. The method according to claim 1, characterized in that: The step of sequentially storing the preset number of data tracks and indexes of the data tracks in the first buffer into a temporary file includes: Copying the index of the data track from the second buffer to a third buffer in the memory, wherein the capacity of the third buffer is equal to the sum of the data volume of one data track and one index; Copying the data track from the first buffer to the third buffer; The data in the third buffer is stored in the temporary file.
5. The method according to claim 1, characterized in that The file name of the temporary file includes a file sequence number, and the indexes in the multiple temporary files are merged and sorted, and based on the merged and sorted indexes, data tracks corresponding to the indexes are read from the temporary files where the indexes are located in sequence, including: Based on the sorting results of the indexes in each of the temporary files, sorting the indexes in the multiple temporary files multiple times; Each time the sorting is performed, a plurality of indexes are determined from the plurality of temporary files, the determined plurality of indexes and the file serial numbers corresponding to the respective indexes are stored in a first container, the plurality of indexes in the first container are sorted, the first index among the plurality of indexes is determined, a target temporary file is determined based on the file serial number corresponding to the first index, a data track corresponding to the first index is read from the target temporary file, and the first index is deleted from the first container.
6. The method according to claim 1, characterized in that Each time a data track is read, the read data track is divided into corresponding track sets based on a preset track set keyword, including: If the values of the track gather key in the indexes of the read N+1th data track and the Nth data track are the same, the N+1th data track is divided into the track gather where the Nth data track is located; If the values of the track gather keywords in the indexes of the read N+1th data track and the Nth data track are different, the N+1th data track is divided into a track gather different from the track gather where the Nth data track is located; Wherein, N is a positive integer greater than or equal to 1.
7. The method according to claim 1, characterized in that Each time the preset number of data tracks and indexes of the data tracks in the first buffer are sequentially stored in a temporary file, the first buffer and the second buffer are initialized to clear the first buffer and the second buffer.
8. A seismic data sorting device, characterized in that: A seismic data sorting module applied to a seismic data processing system, wherein the seismic data processing system further comprises a pre-processing module and a post-processing module of the seismic data sorting module, and the device comprises: a storage unit, configured to receive the data track to be sorted transmitted by the preceding processing module, store the data track to be sorted in a first buffer in a memory, extract a keyword from a track header of the data track, generate an index of the data track based on the extracted keyword and a sequence number of the data track in the first buffer, and store the index in a second buffer in the memory; a temporary file generating unit, configured to sort the indexes in the second buffer to obtain a sorting result whenever the number of data tracks stored in the first buffer reaches a preset number, and based on the sorting result, sequentially store the preset number of data tracks and the indexes of the data tracks in the first buffer into a temporary file to obtain a plurality of temporary files; A track set division unit is used to merge and sort the indexes in the multiple temporary files, and read the data tracks corresponding to the indexes from the temporary files where the indexes are located in turn based on the merged and sorted indexes. Each time a data track is read, the read data track is divided into corresponding track sets based on a preset track set keyword, and the read data track is output to the subsequent processing module. If the read data track is the last data track in the track set corresponding to the data track, a track set identifier is added to the data track, and the track set identifier is used to prompt the subsequent processing module that the track set corresponding to the data track has been sorted.
9. A computer device, characterized in that: The computer device includes a processor and a memory, wherein the memory is used to store at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the seismic data sorting method according to any one of claims 1 to 7.
10. A readable storage medium, characterized in that: At least one computer program is stored in the readable storage medium, and the at least one computer program is loaded and executed by a processor of a computer device to implement the seismic data sorting method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Seismic data processing method and device
CN103901468A
Method and device for creating earthquake big data storage application model
CN114547026A
Continuously combining seismic migration results using a massively parallel processing (MPP) database
US10649106B1
BT sorting method and apparatus for large volumes of seismic data
US20020188405A1
