Earthquake data sorting methods, devices, computer equipment, and readable storage media

By using a buffer in memory to store seismic data and generate an index, the problem of low disk storage efficiency in existing technologies is solved, achieving efficient data sorting and a simplified workflow, making it suitable for processing massive amounts of seismic data.

CN119064991BActive Publication Date: 2025-10-28CHINA NAT PETROLEUM CORP +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310626276.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-30
Publication Date
2025-10-28
Estimated Expiration
2043-05-30

AI Technical Summary

Technical Problem

Existing seismic data sorting methods suffer from low disk storage efficiency, reduced disk performance, and complex sorting processes. They also cannot directly connect to preceding and subsequent processing modules, resulting in resource waste and complex workflows.

Method used

By using a buffer in memory to store data channels and generate indexes, sorting and temporary file storage are performed based on the indexes, reducing the number of disk accesses and temporary storage times, and directly connecting the preceding and subsequent processing modules.

Benefits of technology

It improves the efficiency of seismic data sorting, saves hardware and storage resources, simplifies the workflow, and is suitable for massive data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119064991B_ABST
    Figure CN119064991B_ABST
Patent Text Reader

Abstract

This application relates to a seismic data sorting method, apparatus, computer device, and readable storage medium, belonging to the field of geophysical exploration technology. In this method: a memory buffer is preferentially used as a cache for data tracks. When the buffer is full, the data tracks are written to a temporary file, which helps reduce disk access frequency and improves sorting efficiency. Furthermore, an index for the data tracks is generated based on keywords, and the data tracks and indexes are stored together in a temporary file. When sorting the data tracks, the index does not need to be regenerated. When the track set keywords change, there is no need to copy the data tracks to a new temporary file before sorting; instead, sorting is performed directly based on the new track set keywords and the existing index in the temporary file. This method can be directly connected to other processing modules, thereby reducing the number of times data is temporarily stored, simplifying workflows, and allowing a single computer device to complete the sorting, saving hardware and storage resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of geophysical exploration technology, and in particular to a seismic data sorting method, apparatus, computer equipment, and readable storage medium. Background Technology

[0002] In seismic data processing, the acquired data traces are first divided into different trace sets according to keywords, and then the traces within each trace set are sorted to obtain multiple ordered trace sets. This process is called seismic data sorting, also known as trace set extraction. The sorted trace sets are then further processed. A data trace includes a trace header and seismic data samples. The trace header includes at least one keyword, which describes the attribute information of the data trace. The seismic data samples include values ​​from multiple sampling points. With the development of seismic data acquisition technology, the number of acquired data traces is increasing significantly. Therefore, there is an urgent need for a seismic data sorting method suitable for massive amounts of data traces.

[0003] In related technologies, a multi-node parallel approach is used for seismic data sorting. First, the acquired data traces are divided into multiple blocks, and each block is stored on the disk of a processing node. The processing node performs statistical analysis on the keywords in the data traces to obtain keyword statistics. Based on the trace set keywords required by the subsequent processing flow, each processing node performs a sorting operation on the data traces on its own disk, which is a coarse selection of data traces. Then, the trace sets sorted by each processing node are summarized into different temporary files according to the trace set keywords. Finally, the data traces in each temporary file are sorted to achieve complete ordering of the data traces, resulting in multiple trace sets.

[0004] However, in the above method, each time the trace set key required by the subsequent processing flow changes, each processing node needs to extract the trace set separately. This process generates intermediate temporary data multiple times, resulting in low storage efficiency of the entire cluster. Each parallel sorting involves multiple disk data reads and writes, leading to reduced disk performance. Furthermore, the seismic data sorting efficiency of a single processing node is low. In addition, the above sorting process cannot be directly connected to the preceding processing module. The preceding processing module needs to store the data traces to be sorted as a system format file inside the processing node, and the processing node then reads the data traces from the system format file for sorting. The above sorting process also cannot be directly connected to the subsequent processing module. The processing node needs to output the sorted trace sets to a temporary file, which is a temporary seismic data file used in the processing system. The subsequent processing module then further processes the trace sets in the temporary file, resulting in multiple outputs of intermediate files during the seismic data processing process. The workflow is relatively complex and consumes a lot of disk space. Summary of the Invention

[0005] This application provides a seismic data sorting method, apparatus, computer device, and readable storage medium, which can reduce the number of disk accesses and temporary data storage, allowing a single computer device to complete the sorting process, improving the seismic data sorting efficiency of the computer device, saving hardware and storage resources, and enabling direct connection between pre-processing modules and post-processing modules, thus reducing workflow. The technical solution of this application is as follows.

[0006] According to a first aspect of the embodiments of this application, a seismic data sorting method is provided, applied to a seismic data sorting module in a seismic data processing system. The seismic data processing system further includes a pre-processing module and a post-processing module for the seismic data sorting module. The method includes:

[0007] The system receives the data channel to be sorted transmitted by the preceding processing module, stores the data channel to be sorted in the first buffer in memory, extracts the keyword from the head of the data channel, generates the index of the data channel based on the extracted keyword and the sequence number of the data channel in the first buffer, and stores the index in the second buffer in memory.

[0008] Whenever the number of data channels stored in the first buffer reaches a preset number, the indices in the second buffer are sorted to obtain a sorting result. Based on the sorting result, the preset number of data channels and their indices in the first buffer are stored sequentially into a temporary file to obtain multiple 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 each index are read sequentially from the temporary files containing each index. For each data channel read, the data channel is divided into the corresponding channel based on the preset channel set key, and the read data channel is output to the subsequent processing module. If the read data channel is the last data channel in the channel set corresponding to that data channel, a channel set identifier is added to the data channel. This channel set identifier is used to indicate to the subsequent processing module that the channel set corresponding to that data channel has been sorted.

[0010] Optionally, the method further includes:

[0011] Get the preset capacity;

[0012] Based on the preset capacity and the byte length of the data channel, a first quantity is determined, which is the number of data channels that the preset capacity can accommodate;

[0013] Round the first quantity to the nearest integer to obtain the preset quantity;

[0014] Based on a preset number, a first buffer is determined from memory, the capacity of which is equal to the amount of data in the preset number of data channels.

[0015] Optionally, the indices in the second buffer are sorted to obtain a sorting result, including:

[0016] Determine the comparison order of each key in the index;

[0017] Based on the comparison order, the values ​​of the keywords in each index are compared sequentially to obtain the sorting result.

[0018] Optionally, a predetermined number of data channels and their indices in the first buffer are sequentially stored in a temporary file, including:

[0019] The index of the data track is copied from the second buffer to a third buffer in memory. The capacity of the third buffer is equal to the sum of the data volume of one data track and one index.

[0020] Copy 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 filename of the temporary file includes a file sequence number. The indices in multiple temporary files are merged and sorted. Based on the merged and sorted indices, the data corresponding to each index is read sequentially from the temporary file containing each index, 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] During each sorting process, multiple indexes are determined from multiple temporary files. The determined indexes and their corresponding file numbers are stored in the first container. The multiple indexes in the first container are sorted, and the index that ranks first is determined. Based on the file number corresponding to the index that ranks first, the target temporary file is determined. The data channel corresponding to the index that ranks first is read from the target temporary file, and the index that ranks first is deleted from the first container.

[0025] Optionally, for each data channel read, based on a preset channel set keyword, the read data channel is divided into the corresponding channel set, including:

[0026] If the value of the set key in the index of the (N+1)th data channel and the Nth data channel is the same, then the (N+1)th data channel will be assigned to the set where the Nth data channel is located.

[0027] If the values ​​of the set key in the index of the (N+1)th data channel and the Nth data channel are different, then the (N+1)th data channel will be assigned to a different set than the set in which the Nth data channel is located.

[0028] Where N is a positive integer greater than or equal to 1.

[0029] Optionally, a preset number of data channels and their indices in the first buffer are stored sequentially in a temporary file to initialize the first and second buffers, thereby clearing the first and second buffers.

[0030] According to a second aspect of the embodiments of this application, a seismic data sorting apparatus is provided, applied to a seismic data sorting module in a seismic data processing system. The seismic data processing system further includes a pre-processing module and a post-processing module for the seismic data sorting module. The apparatus includes:

[0031] The storage unit is used to receive the data channels to be sorted transmitted by the preprocessing module, store the data channels to be sorted in the first buffer in memory, extract keywords from the head of the data channels, generate an index of the data channels based on the extracted keywords and the sequence number of the data channels in the first buffer, and store the index in the second buffer in memory.

[0032] The temporary file generation unit is used to sort the indices in the second buffer whenever the number of data channels stored in the first buffer reaches a preset number, obtain the sorting result, and based on the sorting result, store the preset number of data channels and the indexes of the data channels in the first buffer into a temporary file in sequence to obtain multiple temporary files.

[0033] The set partitioning unit is used to merge and sort the indexes in multiple temporary files. Based on the merged and sorted indexes, it sequentially reads the data tracks corresponding to each index from the temporary files where each index is located. For each data track read, it is partitioned into the corresponding set based on the preset set key, and the read data track is output to the subsequent processing module. If the read data track is the last data track in the set corresponding to that data track, a set identifier is added to that data track. This set identifier is used to indicate to the subsequent processing module that the set corresponding to that data track has been sorted.

[0034] Optionally, the device further includes a determining unit, which is used to:

[0035] Get the preset capacity;

[0036] Based on the preset capacity and the byte length of the data channel, a first quantity is determined, which is the number of data channels that the preset capacity can accommodate;

[0037] Round the first quantity to the nearest integer to obtain the preset quantity;

[0038] Based on a preset number, a first buffer is determined from memory, the capacity of which is equal to the amount of data in the preset number of data channels.

[0039] Optionally, the temporary file generation unit includes a comparison subunit, which is used for:

[0040] Determine the comparison order of each key in the index;

[0041] Based on the comparison order, the values ​​of the keywords in each index are compared sequentially to obtain the sorting result.

[0042] Optionally, the temporary file generation unit includes a storage subunit, which is used for:

[0043] The index of the data track is copied from the second buffer to a third buffer in memory. The capacity of the third buffer is equal to the sum of the data volume of one data track and one index.

[0044] Copy 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 temporary file name includes a file sequence number, and the gather partitioning unit includes a reading subunit, which is used for:

[0047] Based on the sorting results of the indexes in each temporary file, the indexes in multiple temporary files are sorted multiple times.

[0048] During each sorting process, multiple indexes are determined from multiple temporary files. The determined indexes and their corresponding file numbers are stored in the first container. The multiple indexes in the first container are sorted, and the index that ranks first is determined. Based on the file number corresponding to the index that ranks first, the target temporary file is determined. The data channel corresponding to the index that ranks first is read from the target temporary file, and the index that ranks first is deleted from the first container.

[0049] Optionally, the gather partitioning unit includes partitioning sub-units, which are used for:

[0050] If the value of the set key in the index of the (N+1)th data channel and the Nth data channel is the same, then the (N+1)th data channel will be assigned to the set where the Nth data channel is located.

[0051] If the values ​​of the set key in the index of the (N+1)th data channel and the Nth data channel are different, then the (N+1)th data channel will be assigned to a different set than the set in which the Nth data channel is located.

[0052] Where N is a positive integer greater than or equal to 1.

[0053] Optionally, the device further includes:

[0054] An initialization unit is used to initialize the first buffer and the second buffer by storing a preset number of data channels and their indices in a temporary file in sequence, thereby clearing the first buffer and the second buffer.

[0055] According to a third aspect of the embodiments of this application, a computer device is provided, the computer device comprising:

[0056] one or more processors;

[0057] Memory used to store computer programs that can be executed by the processor;

[0058] The processor is configured to execute the computer program to implement the aforementioned seismic data sorting method.

[0059] According to a fourth aspect of the present application, a readable storage medium is provided, the readable storage medium comprising: when computer program code in the readable storage medium is executed by a processor of a computer device, enabling the computer device to implement the above-described seismic data sorting method.

[0060] According to a fifth aspect of the embodiments of this application, a computer program product is provided, including one or more computer programs, which are executed by one or more processors of a computer device, enabling the computer device to implement the above-described seismic data sorting method.

[0061] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description

[0062] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application, and do not constitute an undue limitation of this application.

[0063] Figure 1 This is a flowchart of a seismic data sorting method provided in an embodiment of this application;

[0064] Figure 2 This is a schematic diagram of an earthquake data processing system provided in an embodiment of this application;

[0065] Figure 3 This is a flowchart of a seismic data sorting method provided in an embodiment of this application;

[0066] Figure 4This is a schematic diagram of the structural method of a seismic data sorting method provided in an embodiment of this application;

[0067] Figure 5 This is a schematic diagram of an interface for initializing sorting parameters provided in an embodiment of this application;

[0068] Figure 6 This is a flowchart illustrating a seismic data sorting method provided in an embodiment of this application;

[0069] Figure 7 This is a schematic diagram of the structure of a seismic data sorting device provided in an embodiment of this application;

[0070] Figure 8 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0071] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0072] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of methods and systems consistent with some aspects of this application as detailed in the appended claims.

[0073] In this application, the terms "first," "second," etc., are used to distinguish identical or similar items that have essentially the same function. It should be understood that there is no logical or temporal dependency between "first," "second," and "nth," nor does it limit the quantity or 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 simply used to distinguish one element from another. For example, without departing from the various examples, a first buffer can be referred to as a second buffer, and similarly, a second buffer can be referred to as a first buffer.

[0075] "At least one" refers to one or more. For example, at least one index can be one index, two indexes, three indexes, or any integer number of indexes greater than or equal to one. "Multiple" means two or more. For example, multiple indexes can be two indexes, three indexes, or any integer number of indexes greater than or equal to two.

[0076] It should be noted that all 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 have been authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the earthquake data channels involved in this application were obtained with full authorization.

[0077] To facilitate understanding of the content in the embodiments of this application, several technical terms involved in the embodiments of this application will be explained below.

[0078] Data Trace: During seismic data acquisition, at least one shot point location and multiple geophones need to be selected in the area to be explored. Then, seismic waves are sequentially aroused at each shot point location using a vibration excitation device, and the geophones collect seismic data. The seismic data of one seismic wave collected by one geophone constitutes a data trace. A data trace includes a trace header and seismic data samples. The trace header includes at least one keyword, which is used to describe the attribute information of the data trace, such as the distance between the geophone and the shot point (shot spacing), shot number, CMP (Common Middle Point) and CMP Line (Common Middle Point Line), etc. The seismic data samples include the values ​​of multiple sampling points on multiple seismic waves.

[0079] Dao Collection: A Dao collection includes Dao collection keywords and multiple data Daos. The Dao collection keywords are used to describe the attribute information of the Dao collection. The attribute information of the Dao collection refers to the common attribute information of each data Dao in the Dao collection. For example, if the Dao collection keyword is "cannon number", then each data Dao in the same Dao collection selected based on the Dao collection keyword corresponds to the same cannon number.

[0080] Seismic data sorting: Based on the gather key, multiple data traces are divided into different gathers, and the traces in each gather are sorted to obtain multiple ordered gathers. This process is also called gather extraction. For example, if the gather key is the shot number, and the traces in the gather are sorted in ascending order of shot spacing, then during seismic data sorting, multiple traces with the same shot number are first grouped into the same gather, and then the traces in the gather are sorted in ascending order of shot spacing to complete the gather sorting. It should be noted that seismic data sorting can either divide the gathers first and then sort the traces, or sort the traces first and then divide the gathers.

[0081] Trace data transformation: If the gather key used for seismic data sorting changes, the seismic data needs to be re-sorted based on the new gather key to obtain new ordered gathers. This process is called gather transformation. For example, if the first seismic data sorting uses shot number as the gather key, all traces in the sorted gathers will have the same shot number. If the second seismic data sorting uses shot spacing as the gather key, the seismic data needs to be re-sorted, and all traces in the newly sorted gathers will have the same shot spacing.

[0082] The above describes the relevant terminology used in the embodiments of this application. The following describes a seismic data sorting method provided by an embodiment of this application. Figure 1 This is a flowchart of a seismic data sorting method provided in an embodiment of this 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 for 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. The computer device receives the data channel to be sorted transmitted by the preprocessing module, stores the data channel to be sorted in the first buffer in memory, extracts the keyword from the head of the data channel, generates an index of the data channel based on the extracted keyword and the sequence number of the data channel in the first buffer, and stores the index in the second buffer in memory.

[0084] The preceding processing module can be any data channel transmitted during the seismic data processing process that requires further sorting, such as a seismic data splitting module, an amplitude compensation module, and a noise attenuation module, etc. This application embodiment does not limit this. The computer device is connected in series with the preceding processing module. The computer device can receive the data channels to be sorted transmitted by the preceding processing module in real time and store the received data channels in a first buffer. This eliminates the need to first store the data channels to be sorted transmitted by the preceding processing module as a system format file within the computer device, and then read the data channels from the system format file for seismic data sorting. This reduces the number of intermediate file storage operations, saves storage resources, and improves the efficiency of seismic data sorting.

[0085] The data channels include channel headers and seismic data samples. The channel header includes at least one keyword, which describes the channel's attribute information, such as the distance between the corresponding geophone and shot point (shot spacing), shot number, etc. Each keyword can be of integer or floating-point data type. Seismic data samples include values ​​from multiple sampling points on the seismic wave. Multiple data channels can be arranged based on keyword values ​​(keyword values). The values ​​of each keyword can be set to ascending or descending order as needed to flexibly meet different seismic data processing requirements. The computer device can automatically extract keywords from the channel headers after storing the data channels in the first buffer to generate a data channel index, without needing to pre-determine the statistical information of each keyword included in multiple data channels to be sorted. The computer device can extract one or more keywords from the channel headers, and the number of extracted keywords can be set according to actual needs; this embodiment does not limit this.

[0086] In this embodiment, a first buffer and a second buffer are configured in memory. The first buffer is used to cache data channels to be sorted, and the second buffer is used to cache the indices of the data channels to be sorted. The capacity of the first buffer is equal to the data volume of a preset number of data channels, and the capacity of the second buffer is equal to the data volume of a preset number of indices. A dynamic channel header description table is stored in the computer device. This table indicates the meaning and byte length of each field in the channel header. The computer device determines the position information of each keyword in the channel header from the dynamic channel header description table and extracts each keyword from the channel header based on this position information. The sequence number of the data channel in the first buffer is the sequence number of the data channel written to the first buffer. For example, if data channel t1 is the first data channel written to the first buffer, then the sequence number of data channel 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 channel in the first buffer restarts counting once. The computer device concatenates the extracted keywords and the sequence number of the data channel to generate the index of the data channel.

[0087] 102. Whenever the number of data channels stored in the first buffer reaches a preset number, the computer device sorts the indices in the second buffer to obtain a sorting result. Based on the sorting result, the preset number of data channels and their indices in the first buffer are stored sequentially into a temporary file to obtain multiple temporary files.

[0088] The capacity of the first buffer is equal to the data volume of a preset number of data channels. The first buffer is considered full when the number of data channels stored in it reaches the preset number. The computer device sorts the indexes in the second buffer based on the key values ​​in the index. Since there is a one-to-one correspondence between the index and the data channels, sorting the indexes is indirectly sorting the data channels. The storage medium for temporary files can be the computer device's local disk, external storage media associated with the computer device (e.g., disk, NAS (Network Attached Storage), and shared storage), or a distributed storage system associated with the computer device, etc. This embodiment does not limit the capacity of the temporary files, as long as the capacity of the temporary files is greater than or equal to the sum of the data volume of the preset number of data channels and the preset number of indexes.

[0089] Whenever the first buffer is full, the computer device reads one data channel and its index according to the sorting result. The read data channel and index are then concatenated and stored in a temporary file. This process continues until a predetermined number of data channels and their corresponding indices in the first buffer are stored in the temporary file. For example, when the first buffer is full, it contains data channels t1, t2, and t3. The second buffer contains three indices: index1 (corresponding to data channel t1), index2 (corresponding to data channel t2), and index3 (corresponding to data channel t3). After sorting, the three indices in the second buffer are index3, index1, and index2. The computer device first concatenates t3 to the end of index3 and stores the concatenated index3-t3 in the temporary file a. Then, it concatenates t1 to the end of index1 and stores the concatenated index1-t1 in the temporary file a. Finally, it concatenates t2 to the end of index2 and stores the concatenated index2-t2 in the temporary file a. It should be noted that the above description of appending data channels to the end of the index is merely exemplary. In some embodiments, data channels are appended to the beginning of the index, and this application does not limit this practice.

[0090] In the above method, whenever the first buffer is full, the computer device writes the data channels in the first buffer into a temporary file to generate multiple temporary files, without having to divide the data channels to be sorted into multiple blocks in advance, nor needing to determine the data volume of the data channels to be sorted in advance. This can improve the efficiency of seismic data sorting and can be applied to the sorting of seismic data with different data volumes.

[0091] It should be noted that step 102 can be understood as the computer device writing data channels to temporary files in batches, and the premise for writing data channels to temporary files is that the first buffer is full. In some embodiments, if the number of data channels in the last batch of multiple batches is less than a preset number, that is, the first buffer is not full, the computer device sorts the indices corresponding to the remaining data channels in the first buffer. Based on the sorting result, the remaining data channels in the first buffer and the indices of the data channels are concatenated and stored sequentially in a temporary file to obtain multiple temporary files.

[0092] 103. The computer device merges and sorts the indexes in multiple temporary files. Based on the merged and sorted indexes, it sequentially reads the data channels corresponding to each index from the temporary files containing each index. For each data channel read, it divides the read data channel into the corresponding channel based on the preset channel set key and outputs the read data channel to the subsequent processing module. If the read data channel is the last data channel in the channel set corresponding to that data channel, a channel set identifier is added to that data channel. This channel set identifier is used to indicate to the subsequent processing module that the channel set corresponding to that data channel has been sorted.

[0093] Merge sort refers to merging already sorted subsequences together and sorting them to obtain a completely sorted sequence. Since the computer first sorts the indices in the second buffer, and then stores the data channels and their indices in temporary files based on the sorting order, each temporary file is equivalent to an already sorted subsequence. Merge sorting the indices in multiple temporary files is essentially merging and sorting the indices from multiple temporary files together to obtain a completely sorted sequence.

[0094] Among them, the Dao set keyword is used to describe the attribute information of the Dao set. The attribute information of the Dao set refers to the common attribute information of all data channels in the Dao set. For example, if the Dao set keyword is the cannon number, the data channels in the same Dao set selected based on the Dao set keyword correspond to the same cannon number. The computer device classifies the read data channels into the corresponding Dao sets based on the preset Dao set keywords. That is, the computer device determines whether the read data channel belongs to the current Dao set or a new Dao set based on the preset Dao set keywords.

[0095] The subsequent processing module can be any module that further processes the selected trace sets during the seismic data processing process, such as a dynamic correction module and a noise attenuation module, etc. This application embodiment does not limit this. The computer device is directly connected in series with the subsequent processing module. Each time a data trace is read, the data trace is output to the subsequent processing module. If the data trace is the last data trace in the trace set corresponding to the data trace, a trace set identifier is added to the data trace to indicate to the subsequent processing module that the trace set corresponding to the data trace has been sorted. This eliminates the need to first output the selected trace sets as an intermediate file, and then the subsequent processing module reads the selected trace sets from the intermediate file for further processing. This reduces the number of times intermediate files are stored, saves storage resources, and improves the efficiency of seismic data sorting.

[0096] It should be noted that steps 101 to 103 above are illustrated using a single gather partitioning process as an example. In some embodiments, gather partitioning needs to be performed multiple times. After completing the first gather partitioning, the computer device sorts the indexes in each temporary file based on the order of the keywords corresponding to the second partitioning, then merges and sorts the temporary files, and finally reads the data traces and partitions the gathers based on the merge and sort results, without storing the data traces in new temporary files. This simplifies the operation process, reduces the storage of temporary data, and saves storage resources. Furthermore, in some embodiments, the seismic data processing system can connect seismic data sorting modules in series at different stages of the same workflow, according to the needs of the workflow, to meet the gather sorting requirements of different stages in the workflow, simplifying the operation process and improving operational efficiency. Figure 2 As shown, Figure 2 This is a schematic diagram of an earthquake data processing system provided in an embodiment of this application. Figure 2 The system 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, overlay module, static correction module, and disk output module, etc.). The seismic data sorting modules are connected in series at different stages of the same workflow. These modules can form a pipeline operation, simplifying the workflow, reducing the number of intermediate file storage operations, and improving work efficiency. It should be noted that... Figure 2 The modules included in the earthquake data processing system shown, and the connection method between the earthquake data sorting module and other modules in the system, are merely exemplary, and the embodiments of this application do not limit them.

[0097] In the above method, the memory buffer is used as a cache for data tracks. When the buffer is full, the data tracks are written to temporary files, which helps reduce the number of disk accesses and improves the sorting efficiency of the computer equipment. In addition, an index for the data tracks is generated based on the keywords, and the data tracks and the index are stored together in the 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 copy the data tracks to a new temporary file first, and then sort and divide the data tracks into tracks. Instead, the tracks are directly divided based on the new track set keywords and the index in the existing temporary file. This reduces the number of times the data is temporarily stored. In other words, the tracks can be flexibly changed multiple times in one workflow. One computer equipment can complete the sorting, which can save hardware and storage resources. It can directly connect the pre-processing modules and the post-processing modules, simplifying the workflow. It is suitable for on-site processing of seismic data. One workflow can complete the sorting of the seismic data collected on the same day.

[0098] The basic process of the embodiments of this application has been introduced above. The specific process of the embodiments of this application will be described in detail below. Figure 3 This is a flowchart illustrating a seismic data sorting method provided in an embodiment of this application. The method is applied to a seismic data sorting module within a seismic data processing system. The seismic data processing system further includes a pre-processing module and a post-processing module for 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 equipment acquires sorting parameters, which include the keywords to be extracted from the track head, the comparison order of each keyword, the track set keywords, 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's value is compared first when multiple keywords are involved. For example, if the keywords include cannon number and cannon spacing, the comparison order is: cannon number first, then cannon spacing. Therefore, during sorting, the values ​​of the cannon numbers corresponding to each data channel are compared first. If the cannon numbers are the same, the values ​​of the cannon spacing are then compared to complete the sorting. The preset capacity of the first buffer and the storage medium for temporary files can be set according to actual needs; this embodiment does not limit this.

[0101] In the above method, the sorting parameters are set by the user according to actual needs. After the computer equipment 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 up a first buffer and a second buffer from memory.

[0103] In this embodiment, each time the seismic data sorting operation is performed, the computer device temporarily sets up a first buffer and a second buffer from memory based on the preset capacity in the sorting parameters obtained in step 301. In some embodiments, the computer device sets up the first buffer and the second buffer from memory before performing the seismic data sorting operation, without having to reset the first buffer and the second buffer each time the seismic data sorting is performed; this embodiment does not limit this.

[0104] The process of setting up a first buffer from memory by the computer device includes: determining a first quantity based on a preset capacity and the byte length of the data channel, wherein the first quantity is the number of data channels that the preset capacity can accommodate; rounding the first quantity to obtain a preset quantity; and determining a first buffer from memory based on the preset quantity, wherein the capacity of the first buffer is equal to the data volume of the preset quantity of data channels. In some embodiments, the computer device stores a dynamic trace header description table and a trace header buffer. The dynamic trace header description table is used to indicate the meaning and byte length of each field in the trace header, and the trace header buffer is used to store the number of sampling points in the seismic data samples. The process of determining the byte length of the data channel by the computer device includes: obtaining the byte length of the trace header in the data channel from the dynamic trace header description table, obtaining the number of sampling points in the seismic data samples in the data channel from the trace header buffer; and determining the byte length of the data channel based on the byte length of the trace header, the number of sampling points, and the byte length of each sampling point. In the above method, adjusting the capacity of the first buffer to the data volume of an integer number of data channels based on the preset capacity helps to save storage resources.

[0105] The process of setting up a second buffer from memory by the computer device includes: determining the byte length of each key in the sorting parameters from the dynamic track header description table; determining the byte length of the index based on the byte length of each key and the byte length of the sequence number of the data track in the first buffer; and determining a second buffer from memory based on a preset number, the capacity of which is equal to the data volume of the preset number of indexes.

[0106] 303. The computer device receives the data channel to be sorted transmitted by the preprocessing module, stores the data channel to be sorted in the first buffer in memory, extracts the keyword from the head of the data channel, generates the index of the data channel based on the extracted keyword and the sequence number of the data channel in the first buffer, and stores the index in the second buffer in memory.

[0107] Step 303 is the same as step 101 above, and will not be repeated here.

[0108] 304. If the number of data channels stored in the first buffer reaches the preset number, the computer device creates a temporary file and names the temporary file with a string composed of the process ID of the process that created the temporary file, the creation time of the temporary file, and the 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. The fact that the output flag of the temporary file is true indicates that subsequent data channels need to be read from the temporary file.

[0110] In the above method, naming the temporary file with a string composed of the process ID that created the temporary file, the creation time of the temporary file, and the file sequence number of the temporary file can ensure the uniqueness of the temporary file name, thereby avoiding subsequent data reading failures or indexing failures due to duplicate file names.

[0111] It should be noted that the above description of the naming method for temporary files is merely exemplary. Temporary files can be named according to actual needs, and this application embodiment does not limit this.

[0112] In some embodiments, after a temporary file is created, the computer device stores the filename of the temporary file in a vector container to provide file information for subsequent reading of data channels or indexes in the temporary file. The vector container is a dynamically expandable array, that is, the length of the array is variable.

[0113] 305. The computer device sorts the indices in the second buffer, and based on the sorting result, stores a preset number of data channels and their indices in the first buffer into a temporary file.

[0114] The process of sorting the indices in the second buffer by the computer device includes: determining the comparison order of each key in the index; and comparing the values ​​of the keys in each index sequentially based on the comparison order to obtain the sorting result. In some embodiments, multiple threads are used to sort the indices in the second buffer in parallel to improve the efficiency of sorting the indexes.

[0115] In some embodiments, taking a single data channel as an example, the process by which a computer device sequentially stores a preset number of data channels and their indices in a first buffer into a temporary file includes: opening the temporary file in write mode; copying the data channel indices from a second buffer to a third buffer in memory, the capacity of which is equal to the sum of the data volume of one data channel and one index; based on the sequence number of the data channel in the first buffer, copying the data channel corresponding to the index from the first buffer to the end of the index in the third buffer, thereby concatenating the data channel and its index; and storing the data in the third buffer into the temporary file. In this method, the data to be written to the temporary file is first copied to a buffer used for intermediary data transfer, and then data is read from this buffer and written to the temporary file. This divides the process of writing to the temporary file into two steps, which can be processed in parallel by multiple threads, thus 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] Each time a temporary file is generated by the computer device, 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 steps 303 to 306 above. If there are remaining data channels in the first buffer, the computer device sorts the indices of the remaining data channels in the first buffer. Based on the sorting result, the computer device stores the remaining data channels and their indices in the first buffer into temporary files in sequence to obtain multiple temporary files.

[0119] Steps 304 to 307 above are an implementation method in which, whenever the number of data channels stored in the first buffer reaches a preset number, the indices in the second buffer are sorted to obtain a sorting result. Based on the sorting result, the preset number of data channels and the indices of the data channels in the first buffer are sequentially stored into a temporary file to obtain multiple temporary files. In some embodiments, the above process is implemented in other ways, and this application embodiment does not limit this.

[0120] 308. The computer device performs merge sorting on the indexes in multiple temporary files, and based on the merge sorted indexes, reads the data corresponding to each index from the temporary file containing each index in turn.

[0121] The process of merging and sorting 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 their corresponding file numbers in a 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 number corresponding to the first index, reading the data path corresponding to the first index from the target temporary file, and deleting the first index from the first container. Specifically, when the computer device performs the M-th sorting of the indexes in the temporary files, it determines an index from the temporary file corresponding to the data path read in the (M-1)-th sorting and stores this index in the first container. This index is the next index after the first index in the (M-1)-th sorting of the target temporary file, where M is a positive integer greater than 1. For example, there are three temporary files. In temporary file 'a', the data channels are indexed in descending order as index-a1, index-a2, and index-a3; in temporary file 'b', they are index-b1, index-b2, and index-b3; and in temporary file 'c', they are index-c1, index-c2, and index-c3. First sorting: The computer first stores the first index (index-a1, index-b1, and index-c1) from each temporary file into a first container. The three indices in the first container are then sorted. If index-a1 is first, it means it is the largest among all indices. Based on the file sequence number corresponding to index-a1, the data channel corresponding to index-a1 is read from temporary file 'a', and index-a1 is deleted from the first container. Second sorting: The computer stores index-a2 into the first container, and then sorts the three indices (index-a2, index-b1, and index-c1) in the first container. Subsequent processes are similar to the first sorting and will not be repeated.

[0122] In the above method, the data channels are sorted by sorting the index. Since sorting the index is a disk read / write (IO) task with a small computational load, the CPU (Central Processing Unit) utilization of the computer device is low. Therefore, when the computer device sorts the index, it can execute other CPU-intensive tasks simultaneously, which can improve the resource utilization of the computer device.

[0123] In some embodiments, the computer device stores read handles for each temporary file in a vector container. Each read handle is used to open the corresponding temporary file. When reading a temporary file, the computer device reads the handle from the vector container and then opens the temporary file based on the handle, without first requesting the handle based on the filename and then opening the file based on the handle. This method employs data pre-reading technology, preparing the handles of the temporary files to be read for subsequent reading, thus improving the efficiency of temporary file reading.

[0124] In some embodiments, temporary files have a read status attribute, which indicates whether the temporary file has been read completely. If the read status of any temporary file is not read completely, 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 completely, which can improve the reading efficiency of the data track.

[0125] 309. For each data channel read by the computer device, the read data channel is divided into the corresponding channel based on the preset channel set keyword, and the read data channel is output to the subsequent processing module. If the read data channel is the last data channel in the channel set corresponding to that data channel, a channel set identifier is added to that data channel. The channel set identifier is used to indicate to the subsequent processing module that the channel set corresponding to that data channel has been sorted.

[0126] If the values ​​of the set key in the indexes of the (N+1)th data channel and the Nth data channel are the same, the computer device will assign the (N+1)th data channel to the set containing the Nth data channel; if the values ​​of the set key in the indexes of the (N+1)th data channel and the Nth data channel are different, the computer device will assign the (N+1)th data channel to a set different from the set containing the Nth data channel; where N is a positive integer greater than or equal to 1.

[0127] If the values ​​of the channel set key in the index of the (N+1)th data channel and the Nth data channel are different, the computer device adds a channel set identifier to the Nth data channel to indicate to the subsequent processing module that the channel set corresponding to the Nth data channel has been sorted. Here, N is a positive integer greater than or equal to 1.

[0128] It should be noted that the seismic data sorting method described in steps 301 to 309 above can be used for sorting within a gather, that is, further sorting multiple data channels within a gather, or for sorting all data channels, that is, sorting all data channels acquired during seismic exploration, to meet different seismic data sorting needs. Specifically, the sorting process within a gather is as follows: after the computer equipment stores all data channels in a gather, it sorts the data channels in that gather, and then stores the data channels in the next gather and sorts the data channels in that gather. The sorting process for all data channels is as follows: the computer equipment first stores all data channels, and then sorts the stored data channels. The specific sorting process is the same as in steps 301 to 309 above, and will not be repeated here.

[0129] It should be noted that steps 301 to 309 above are described with the example that the total number of data channels to be sorted is greater than the preset number. In some embodiments, the total number of data channels to be sorted is less than or equal to the preset number. In this case, the first buffer can accommodate all data channels to be sorted. The computer device does not need to write the data channels and their indexes to a temporary file. Instead, after sorting the indexes in the second buffer, it reads the data channels from the first buffer in sequence based on the sorting result. For each data channel read, multiple data channels are divided into the corresponding channel sets based on the preset channel set key.

[0130] The following is based on Figures 4 to 6 For example, the process shown in steps 301 to 309 above will be illustrated. Figure 4 This is a schematic diagram of the structural method of a seismic data sorting method provided in an embodiment of this application, as shown below. Figure 4 As shown, the method includes initialization function (corresponding to step 301 above), multi-buffer allocation (corresponding to step 302 above), write data channel (corresponding to step 303 above), read data channel (corresponding to steps 304 to 309 above), index management, and seismic data sorting control. Figure 5 This is a flowchart illustrating a seismic data sorting method provided in an embodiment of this application, as shown below. Figure 5 As shown, the computer device stores the data channels of one or all data channels in the first buffer 501 and the indexes of the data channels 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 channels and their indices into temporary files 503 (temporary files 1 to X, where X is a positive integer greater than 1) in an orderly manner. The computer device reads the indices in each temporary file in sequence, compares the indices in each temporary file, and then reads the data channels in the temporary files in order.

[0131] Figure 6 This is a schematic diagram of an interface for initializing sorting parameters provided in an embodiment of this application. For example... Figure 6 As shown, users can set sorting parameters through the sorting parameter initialization interface. These parameters include sorting type (sorting within the gather and sorting across all data gathers), keyword comparison order (first keyword, second keyword, third keyword in sequence), temporary file storage medium, gather identifier, preset capacity of the first buffer, and sorting method for each keyword (ascending or descending). The settings for each sorting parameter are as follows: Figure 6 As shown, the process will not be repeated here. The following is an example illustrating the specific workflow of seismic data sorting.

[0132] The following describes the process by which the computer equipment allocates the various buffers (first buffer, second buffer, and third buffer) used in the seismic data sorting method based on the sorting parameters after initialization. The second buffer is implemented using a vector container, with the number of indexes in the container matching the number of channels (preset quantity) in the first buffer. By sorting the indices in the second buffer, the ordered data channels in the first buffer are indirectly obtained. The specific steps are as follows: Calculate the byte length of a data channel (a data channel consists of a channel header and seismic data samples; the channel header length HL is obtained through a dynamic channel header description table; the number of sampling points SN in the seismic data samples is obtained from the channel header buffer; the byte length of one sampling point is 4, so the byte length TL of a data channel can be calculated as HL = HL + SN * 4); Allocate the first buffer BufTraces (by using the preset capacity and the byte length of the data channels, calculate the number of data channels TN that the preset capacity can accommodate; recalculate the capacity of the first buffer using this number of channels). (Ensure the first buffer can hold an exact number of data tracks); Calculate the byte length of an index (by sorting the keywords used, searching the dynamic track header description table, obtaining information such as the type, byte length, and byte position of each keyword in the track header buffer, and accumulating the byte length of each keyword and the byte length of the data track's sequence number in the first buffer, the length IL of an index can be calculated); Allocate the third buffer BufTrace (when writing data tracks to a temporary file, the order of data tracks needs to be determined by the index; when reading data tracks from various temporary files, the selection of data tracks needs to be made among multiple temporary files, and the index of the data track is also needed; to avoid repeatedly extracting 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 TBL = IL + TL).

[0133] The following describes the process of storing data tracks in computer equipment. Whether a data track is written to the first buffer or then to a temporary file depends on whether the number of data tracks written to the first buffer is greater than TN. If it is less 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 the 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 that the first buffer can hold, then the data tracks in the first buffer are written to the temporary file; otherwise, the track header and seismic data samples of the current data track are copied to the position corresponding to the track number CT in the first buffer BufTraces. The specific steps for writing data channels from the first buffer to a temporary file are as follows: The output flag of the temporary file is set to True, indicating that the number of data channels stored in the first buffer is greater than the number of channels the first buffer can hold. Subsequent data channels will need to be read from the temporary file. Index sorting (parallel sorting of the indices in the second buffer, using an algorithm that compares the value of each key one by one); writing the temporary file (obtaining the temporary filename with its path and placing it into a vector container TmpFiles; to ensure the uniqueness of the temporary filename, the filename uses a combination of process ID + time + file sequence number, and the temporary filename is placed into the container). The process involves several steps: First, the temporary files are opened in write mode. The first or next index is retrieved from the second buffer. The sequence number of the data trace is extracted from the index. This sequence number represents the position of the corresponding data trace in the first buffer (BufTraces). The index is copied to the third buffer (BufTrace), and the data trace from the first buffer (BufTraces) is appended to the index in the third buffer (BufTrace). The contents of the third buffer (BufTrace) are written to the temporary file. If there are still unprocessed indexes in the second buffer, the steps for writing to the temporary file are repeated. The initial state of each buffer is restored (all indexes in the second buffer are cleared, the trace number CT written to the first buffer is set to 0, and the data trace position nPosInIndex in the second buffer is set to 0). Specifically, the steps for copying the trace header and seismic data sample values ​​of the current data trace to the corresponding position of the trace number CT in the first buffer (BufTraces) are as follows: The values ​​of each keyword are extracted from the trace header, and these values, along with the trace number CT value in the first buffer, are combined into a string and placed in the second buffer. The trace number CT in the first buffer is incremented by 1.

[0134] The following describes the process of storing and pre-reading data tracks in the buffer. When data tracks or all data tracks in a track set have been processed in the first buffer (BufTraces), the buffer may not be full. It is necessary to write the remaining data tracks to temporary files and prepare for reading data tracks from the temporary files. The specific steps are as follows: Sort the indices in the second buffer in parallel; if the output flag of the temporary file is True, write the data tracks from the first buffer to the temporary file; open each temporary file in read mode. Place the read handles of each temporary file into a vector container `vReaderFiles`. For each temporary file, read the first data path index and set the read status (read the index and status of the next data path in the temporary file corresponding to the given file number) using the corresponding file number. The specific steps are as follows: Find the read handle of the corresponding element in the `vReaderFiles` container using the file number, read the index, and obtain the read status `state`. Check if the corresponding element exists in the temporary file read status map container `mReadState` using the file number. If it does not exist, add the temporary file status `state` corresponding to the file number to the container `mReadState`. If it exists, and the temporary file read status indicates that the temporary file has been read completely, update the temporary file read status. If the file read status is not complete, put the read index into the temporary file index map container `mFilesIndex`. Otherwise, it means that all data paths in the temporary file have been read completely.

[0135] The process of reading data channels is described below. The data channels to be read may originate from the first buffer or from a temporary file, requiring separate processing depending on the situation. The specific steps are as follows: Determine if a data channel exists, which also requires separate processing: whether there is still a data channel to be retrieved in the first buffer; whether there is still a data channel to be read in the temporary file (if the output flag of the temporary file is True, it means a data channel is being read from the temporary file; if the element in the temporary file index map container mFilesIndex is greater than 0, it means a data channel exists; otherwise, it means no data channel exists; if the output flag of the temporary file is False, it means a data channel is being read from the first buffer; if the data channel position nPosInIndex in the second buffer is less than the number of elements in the second buffer, it means a data channel exists; otherwise, it means no data channel exists). When data channels are available, the specific steps for reading data channels from temporary files are as follows: Obtain the first element from the container `mFilesIndex` and save it to the vector container `currentFileIndex`. Get the file index of the temporary file from this element. Obtain the read handle corresponding to the file index from the temporary file container `vReaderFiles`. Read the data channel. Clear the first element from the temporary file index map container `mFilesIndex`. Using the read file index of the temporary file, read the index and read status of the next data channel in the temporary file corresponding to the given file index. Reading data channels from the first buffer involves the following steps: Retrieve the index corresponding to the data channel position `nPosInIndex` from the second buffer, and then obtain the data channel index from the index. Obtain the data channel corresponding to the data channel index from the first buffer. Increment the data channel position `nPosInIndex` in the second buffer by 1. Determine if the current channel is the last channel of the channel set. This determination provides a channel set identifier to subsequent processing modules, notifying them that this data channel is the last channel in the current channel set. If there is no data track, it means this data track is the last track in the track set, and this step ends. If there is a data track, if the output flag of the temporary file is True, retrieve the first element in the container mFilesIndex, i.e., the index of the next track, and determine whether the two indices belong to the same track set based on the track set key; if the output flag of the temporary file is False, retrieve the index of the current track and the index of the next track from the data track positions nPosInIndex and nPosInIndex-1 in the index container, respectively, and determine whether the two indices belong to the same track set based on the track set key.

[0136] The process of sorting trace gathers is described below. Seismic data sorting includes: sorting within a trace gather and sorting of all data traces. These are processed separately. The overall process for sorting within a trace gather is as follows: Receive data traces. After receiving all data traces of a trace gather, sort the trace gather to provide sorted data traces for subsequent processing modules, and then sort the data traces of the next trace gather. The initial state of the LastGather identifier in the trace gather and the LastTrace identifier in the entire data volume is False. The specific steps are as follows: If both the LastGather identifier in the trace gather and the LastTrace identifier in the entire data volume are False, it means that data traces are being received. Obtain the LastGather identifier in the trace gather and the LastTrace identifier in the entire data volume. If both the LastGather identifier in the trace gather and the LastTrace identifier in the entire data volume are False, write the current data trace to the buffer or temporary file, and complete the writing of the remaining seismic data traces in the buffer to the temporary file and the pre-reading of data traces. When reading a seismic data trace, if it is the last trace in the trace set, set the last trace identifier for either the trace set or the entire data volume, and restore the LastGather and LastTrace identifiers to False. If it is not the last trace in the entire data volume, set the next data trace identifier and continue receiving data traces. The overall process for sorting all data traces is as follows: receive seismic data traces; after receiving all data traces, sort the trace set to provide sorted data traces for subsequent processing modules; sorting ends. The initial state of the LastTrace identifier for the entire data volume is False. The specific steps are as follows: If the LastTrace identifier for the entire data volume is False, it means that data channels are being received. Obtain the LastTrace identifier for all data channels. If the LastTrace identifier for all data channels is False, write the current data channel to the buffer or temporary file. Complete the writing of the remaining seismic data channels in the buffer to the temporary file and the pre-reading of data channels. Read one seismic data channel. If it is the last channel in the channel set, set the LastTrace identifier for the channel set. If it is the last channel in all data channels, set the LastTrace identifier for all data channels. Otherwise, set the identifier for outputting the next data channel and continue reading data channels until the seismic data sorting is completed.

[0137] In the above method, the in-memory buffer is used as a cache for data tracks. When the buffer is full, the data tracks are written to temporary files, which helps reduce the number of disk accesses and improves the sorting efficiency of computer devices. In addition, an index for the data tracks is generated based on the keywords, and the data tracks and indexes are stored together in the temporary file. When merging and sorting the data tracks, only the keywords in the index need to be sorted, without repeatedly extracting keywords to generate the index. When the track set keywords change, there is no need to copy the data tracks to a new temporary file first, and then sort and divide the data tracks into tracks. Instead, the new track set keywords can be used directly. By dividing the trace sets with the indexes in existing temporary files, it can adapt to different trace set transformation requirements. That is, trace sets can be flexibly transformed multiple times in a single workflow, which simplifies the operation process, saves storage resources, and allows a single computer device to complete the sorting, saving hardware resources. It can directly connect to the pre-processing module and the post-processing module, and is suitable for on-site processing of seismic data. A single workflow can complete the sorting of the seismic data collected on the same day. Furthermore, during the data trace reading process, data pre-reading technology can be used to further improve the data trace reading efficiency, thereby improving the sorting efficiency of the computer device.

[0138] To verify the effectiveness of the seismic data sorting method provided in this application, the method was deployed on a high-performance computer cluster. One computer in the cluster was used for seismic data sorting, while other computers were used to execute pre- or post-processing steps in the seismic data sorting workflow. Multiple experiments were conducted on this cluster. Each computer in the cluster was equipped with two processors (Intel(R) Xeon(R) E5-2660 v3 2.6GHz CPU), each processor containing 10 physical cores, for a total of 20 physical cores per computer, 128GB of memory, and shared storage for temporary files. The operating system of the computers was Red Hat Enterprise LinuxServer release 6.8 (Santiago). The test data scale was the actual data from the acquisition project, and multiple transform gathers could be used in a single workflow. This method can meet the requirements of rapid gather extraction in on-site processing of aliased data and processing transform gathers in workflows of production projects.

[0139] Figure 7 This is a schematic diagram of the structure of a seismic data sorting device provided in an embodiment of this application. The device includes a storage module 701, a temporary file generation module 702, and a gather division module 703.

[0140] The storage module 701 is used to receive the data channel to be sorted transmitted by the preprocessing module, store the data channel to be sorted in the first buffer in memory, extract the keyword from the head of the data channel, generate the index of the data channel based on the extracted keyword and the sequence number of the data channel in the first buffer, and store the index in the second buffer in memory.

[0141] The temporary file generation module 702 is used to sort the indices in the second buffer whenever the number of data channels stored in the first buffer reaches a preset number, obtain a sorting result, and based on the sorting result, store the preset number of data channels and the indices of the data channels in the first buffer into a temporary file in sequence to obtain multiple temporary files;

[0142] The set partitioning module 703 is used to merge and sort the indexes in multiple temporary files. Based on the merged and sorted indexes, it reads the data tracks corresponding to each index from the temporary files where each index is located in turn. For each data track read, it is partitioned into the corresponding set based on the preset set key and the read data track is output to the subsequent processing module. If the read data track is the last data track in the set corresponding to that data track, a set identifier is added to that data track. The set identifier is used to indicate to the subsequent processing module that the set corresponding to that data track has been sorted.

[0143] Optionally, the device further includes a determining module, which is used to:

[0144] Get the preset capacity;

[0145] Based on the preset capacity and the byte length of the data channel, a first quantity is determined, which is the number of data channels that the preset capacity can accommodate;

[0146] Round the first quantity to the nearest integer to obtain the preset quantity;

[0147] Based on a preset number, a first buffer is determined from memory, the capacity of which is equal to the amount of data in the preset number of data channels.

[0148] Optionally, the temporary file generation unit 702 includes a comparison subunit, which is used for:

[0149] Determine the comparison order of each key in the index;

[0150] Based on the comparison order, the values ​​of the keywords in each index are compared sequentially to obtain the sorting result.

[0151] Optionally, the temporary file generation unit 702 includes a storage subunit, which is used for:

[0152] The index of the data track is copied from the second buffer to a third buffer in memory. The capacity of the third buffer is equal to the sum of the data volume of one data track and one index.

[0153] Copy 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 filename of the temporary file includes a file sequence number, and the gather partitioning unit 703 includes a reading subunit, which is used for:

[0156] Based on the sorting results of the indexes in each temporary file, the indexes in multiple temporary files are sorted multiple times.

[0157] During each sorting process, multiple indexes are determined from multiple temporary files. The determined indexes and their corresponding file numbers are stored in the first container. The multiple indexes in the first container are sorted, and the index that ranks first is determined. Based on the file number corresponding to the index that ranks first, the target temporary file is determined. The data channel corresponding to the index that ranks first is read from the target temporary file, and the index that ranks first is deleted from the first container.

[0158] Optionally, the gather partitioning unit 703 includes partitioning sub-units, which are used for:

[0159] If the value of the set key in the index of the (N+1)th data channel and the Nth data channel is the same, then the (N+1)th data channel will be assigned to the set where the Nth data channel is located.

[0160] If the values ​​of the set key in the index of the (N+1)th data channel and the Nth data channel are different, then the (N+1)th data channel will be assigned to a different set than the set in which the Nth data channel is located.

[0161] Where N is a positive integer greater than or equal to 1.

[0162] Optionally, the device further includes:

[0163] The initialization module is used to initialize the first and second buffers by storing a preset number of data channels and their indices in a temporary file in sequence, thereby clearing the first and second buffers.

[0164] It should be noted that the seismic data sorting device provided in the above embodiments is only illustrated by the division of the above functional modules when performing the corresponding steps. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the seismic data sorting device and the seismic data sorting method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.

[0165] In this embodiment of the disclosure, a computer device is also provided, which includes a processor and a memory for storing at least one computer program, which is loaded and executed by the processor to implement the above-described seismic data sorting method.

[0166] Figure 8 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. See also... Figure 8 Computer device 800 can be: a smartphone, tablet computer, MP3 player (Moving Picture Experts Group Audio Layer III), MP4 player (Moving Picture Experts Group Audio Layer IV), laptop computer, or desktop computer. Computer device 800 may also be referred to as user equipment, portable computer device, laptop computer device, desktop computer device, or other names.

[0167] Typically, computer device 800 includes a processor 801 and a memory 802.

[0168] Processor 801 may include one or more processing cores, such as a quad-core processor or an octa-core processor. Processor 801 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 801 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 801 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 801 may also include an AI (Artificial Intelligence) processor, which is used to handle computational 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 high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 802 are used to store at least one program code, which is executed by the processor 801 to implement the process executed by the computer device in the seismic data sorting method provided in the method embodiments of this disclosure.

[0170] In some embodiments, the computer device 800 may also optionally include a peripheral device interface 803 and at least one peripheral device. The processor 801, memory 802, and peripheral device interface 803 can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface 803 via a bus, signal line, or circuit board. Specifically, the peripheral device includes at least one of the following: a radio frequency circuit 804, a display screen 805, a camera assembly 806, an audio circuit 807, and a power supply 808.

[0171] Peripheral device interface 803 can be used to connect at least one I / O (Input / Output) related peripheral device to processor 801 and memory 802. In some embodiments, processor 801, memory 802 and peripheral device interface 803 are integrated on the same chip or circuit board; in some other embodiments, any one or two of processor 801, memory 802 and peripheral device interface 803 can be implemented on separate chips or circuit boards, which is not limited in this disclosure.

[0172] The radio frequency (RF) circuit 804 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 804 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 804 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals back into electrical signals. In some embodiments, the RF 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, etc. The RF circuit 804 can communicate with other computer devices via at least one wireless communication protocol. This wireless communication protocol includes, but is not limited to: metropolitan area networks (MANs), various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks (WLANs), and / or WiFi (Wireless Fidelity) networks. In some embodiments, the RF circuit 804 may also include circuitry related to NFC (Near Field Communication), which is not limited herein.

[0173] Display screen 805 is used to display a UI (User Interface). This UI may include graphics, text, icons, videos, and any combination thereof. When display screen 805 is a touch display screen, it also has the ability to collect touch signals on or above its surface. These touch signals can be input as control signals to processor 801 for processing. In this case, display screen 805 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there may be one display screen 805, disposed on the front panel of computer device 800; in other embodiments, there may be at least two display screens, disposed on different surfaces of computer device 800 or in a folded design; in still other embodiments, display screen 805 may be a flexible display screen, disposed on a curved or folded surface of computer device 800. Furthermore, display screen 805 may be configured as a non-rectangular irregular shape, i.e., a non-rectangular screen. Display screen 805 may be made of materials such as LCD (Liquid Crystal Display) or OLED (Organic Light-Emitting Diode).

[0174] The camera assembly 806 is used to acquire images or videos. In some embodiments, the camera assembly 806 includes a front-facing camera and a rear-facing camera. Typically, the front-facing camera is located on the front panel of the computer device, and the rear-facing camera is located on the back of the computer device. In some embodiments, there are at least two rear-facing cameras, which are any one of a main camera, a depth-sensing camera, a wide-angle camera, and a telephoto camera, to achieve background blurring by fusion of the main camera and the depth-sensing camera, panoramic shooting by fusion of the main camera and the wide-angle camera, VR (Virtual Reality) shooting, or other fusion shooting functions. In some embodiments, the camera assembly 806 may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash is a combination of a warm-light flash and a cool-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, converting the sound waves into electrical signals that are input to the processor 801 for processing, or input to the radio frequency circuit 804 for voice communication. For stereo sound acquisition or noise reduction purposes, multiple microphones may be used, each located in a different part of the computer device 800. The microphone may also be an array microphone or an omnidirectional microphone. The speaker is used to convert electrical signals from the processor 801 or the radio frequency circuit 804 into sound waves. The speaker may be a conventional diaphragm speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can convert electrical signals not only into audible sound waves but also into inaudible sound waves for purposes such as distance measurement. In some embodiments, the audio circuit 807 may also include a headphone jack.

[0176] Power supply 808 is used to supply power to the various components in computer device 800. Power supply 808 can be AC ​​power, DC power, a disposable battery, or a rechargeable battery. When power supply 808 includes a rechargeable battery, the rechargeable battery can support wired 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. The one or more sensors 809 include, but are not limited to, an accelerometer 810, a gyroscope 811, a pressure sensor 812, an optical sensor 813, and a proximity sensor 814.

[0178] Accelerometer 810 can detect the magnitude of acceleration along the three coordinate axes of a coordinate system established by computer device 800. For example, accelerometer 810 can be used to detect the components of gravitational acceleration along the three coordinate axes. Processor 801 can control display screen 805 to display the user page in either a landscape or portrait view based on the gravitational acceleration signal acquired by accelerometer 810. Accelerometer 810 can also be used for collecting game or user motion data.

[0179] The gyroscope sensor 811 can detect the orientation and rotation angle of the computer device 800. The gyroscope sensor 811, in conjunction with the accelerometer sensor 810, can collect 3D motion data from the user on the computer device 800. Based on the data collected by the gyroscope sensor 811, the processor 801 can perform the following functions: motion sensing (e.g., changing the UI based on the user's tilt), image stabilization during shooting, game control, and inertial navigation.

[0180] The pressure sensor 812 can be disposed on the side bezel of the computer device 800 and / or on the lower layer of the display screen 805. When the pressure sensor 812 is disposed on the side bezel of the computer device 800, it can detect the user's grip signal on the computer device 800, and the processor 801 can perform left / right hand recognition or quick operation based on the grip signal collected by the pressure sensor 812. When the pressure sensor 812 is disposed on the lower layer of the display screen 805, the processor 801 can control the operable controls on the UI page based on the user's pressure operation on the display screen 805. The operable controls include at least one of button controls, scroll bar controls, icon controls, and menu controls.

[0181] An optical sensor 813 is used to collect ambient light intensity. In one embodiment, the processor 801 can control the display brightness of the display screen 805 based on 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 decreased. In another embodiment, the processor 801 can also dynamically adjust the shooting parameters of the camera assembly 806 based on the ambient light intensity collected by the optical sensor 813.

[0182] A proximity sensor 814, also known as a distance sensor, is typically located on the front panel of a computer device 800. The proximity sensor 814 is used to detect 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 a screen-on state to a 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 a screen-off state to a screen-on state.

[0183] Those skilled in the art will understand that Figure 8 The structure shown does not constitute a limitation on the computer device 800, and may include more or fewer components than shown, or combine certain components, or use different component arrangements.

[0184] In this embodiment of the application, a computer-readable storage medium including program code is also provided, such as a memory 802 including program code. The program code can be executed by the processor 801 of the computer device 800 to complete the aforementioned seismic data sorting method. Optionally, the computer-readable storage medium may 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 this application embodiment, a computer program product is also provided, including one or more instructions, which are executed by one or more processors of a computer device, enabling the computer device to perform the above-described seismic data sorting method.

[0186] In some embodiments, the computer program involved in the present application embodiments may be deployed and executed on a computer device, or executed on multiple computer devices located in one location, or executed on multiple computer devices distributed in multiple locations and interconnected through a communication network. Multiple computer devices distributed in multiple locations and interconnected through a communication network may constitute a blockchain system.

[0187] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.

[0188] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. A method for sorting seismic data, characterized in that, An earthquake data sorting module is applied in an earthquake data processing system, the earthquake data processing system further including a pre-processing module and a post-processing module for the earthquake data sorting module, the method comprising: The system receives the data channels to be sorted transmitted by the preceding processing module, stores the data channels to be sorted in a first buffer in memory, extracts keywords from the head of the data channels, generates an index of the data channels based on the extracted keywords and the sequence number of the data channels in the first buffer, and stores the index in a second buffer in memory. Whenever the number of data channels stored in the first buffer reaches a preset number, the indices in the second buffer are sorted to obtain a sorting result. Based on the sorting result, the preset number of data channels and the indices of the data channels in the first buffer are stored sequentially into a temporary file to obtain multiple temporary files. The indexes in the multiple temporary files are merged and sorted. Based on the merged and sorted indexes, the data channels corresponding to each index are read sequentially from the temporary files containing each index. For each data channel read, the read data channel is divided into the corresponding channel based on a preset channel set keyword, and the read data channel is output to the 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 indicate to the subsequent processing module that the channel set corresponding to the data channel has been sorted.

2. The method according to claim 1, characterized in that, The method further includes: Get the preset capacity; Based on the preset capacity and the byte length of the data channel, a first quantity is determined, wherein the first quantity is the number of data channels that the preset capacity can accommodate; The first quantity is rounded down 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 amount of data in the preset number of data channels.

3. The method according to claim 1, characterized in that, The step of sorting the indices in the second buffer to obtain the sorting result includes: Determine the comparison order of each keyword in the index; Based on the comparison order, the values ​​of the keywords in each of the indexes are compared sequentially to obtain the sorting result.

4. The method according to claim 1, characterized in that, The step of storing the preset number of data channels and their indices in the first buffer into a temporary file sequentially includes: The index of the data channel is copied from the second buffer to a third buffer in the memory, the capacity of which is equal to the sum of the data volume of one data channel and the data volume of one index. The data track is copied 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, wherein The filename of the temporary file includes a file sequence number. The process of merging and sorting the indices in the multiple temporary files, and then sequentially reading the data corresponding to each index from the temporary file containing that index, based on the merged and sorted indices, includes: Based on the sorting results of the indexes in each of the temporary files, the indexes in the multiple temporary files are sorted multiple times; During each sorting process, multiple indexes are determined from the multiple temporary files, and the determined multiple indexes and the file sequence number corresponding to each index are stored in a first container. The multiple indexes in the first container are sorted, and the index that ranks first among the multiple indexes is determined. Based on the file sequence number corresponding to the index that ranks first, a target temporary file is determined, the data channel corresponding to the index that ranks first is read from the target temporary file, and the index that ranks first is deleted from the first container.

6. The method according to claim 1, characterized in that, For each data channel read, based on a preset channel set keyword, the read data channel is divided into a corresponding channel set, including: If the value of the set key in the index of the (N+1)th data channel and the Nth data channel is the same, then the (N+1)th data channel is assigned to the set where the Nth data channel is located. If the values ​​of the set key in the index of the (N+1)th data channel and the Nth data channel are different, then the (N+1)th data channel is assigned to a set that is different from the set in which the Nth data channel is located. Where 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 channels and their indices 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, An earthquake data sorting module applied in an earthquake data processing system, the earthquake data processing system further including a pre-processing module and a post-processing module for the earthquake data sorting module, the device comprising: The storage unit is used to receive the data channels to be sorted transmitted by the preprocessing module, store the data channels to be sorted in a first buffer in memory, extract keywords from the head of the data channels, generate an index of the data channels based on the extracted keywords and the sequence number of the data channels in the first buffer, and store the index in a second buffer in memory. A temporary file generation unit is used to sort the indices in the second buffer whenever the number of data channels stored in the first buffer reaches a preset number, obtain a sorting result, and based on the sorting result, store the preset number of data channels and the indices of the data channels in the first buffer into a temporary file in sequence to obtain multiple temporary files; The channel set partitioning unit is used to merge and sort the indexes in the multiple temporary files. Based on the merged and sorted indexes, it sequentially reads the data channels corresponding to each index from the temporary files where each index is located. For each data channel read, it partitions the read data channel into the corresponding channel set based on a preset channel set keyword and outputs the read data channel to the subsequent processing module. If the read data channel is the last data channel in the channel set corresponding to the data channel, it adds a channel set identifier to the data channel. The channel set identifier is used to indicate to the subsequent processing module that the channel set corresponding to the data channel has been sorted.

9. A computer device, characterized in that, The computer device includes a processor and a memory, the memory being used to store at least one computer program, which is loaded and executed by the processor to implement the seismic data sorting method as described in any one of claims 1 to 7.

10. A readable storage medium, characterized in that, The readable storage medium stores at least one computer program, which is loaded and executed by the processor of a computer device to implement the seismic data sorting method as described in 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