OVT data coverage frequency extraction method and storage medium
By constructing a resilient distributed dataset (RDD) and utilizing the Spark parallel computing framework, the problem of uneven coverage of earthquake data in the OVT domain was solved, and a coverage attribute map was generated, which improved the accuracy and uniformity of data processing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA PETROLEUM & CHEMICAL CORP
- Filing Date
- 2024-11-04
- Publication Date
- 2026-05-08
AI Technical Summary
In existing technologies, the uneven coverage of OVT domain seismic data leads to difficulties in quality control and affects the effectiveness of subsequent processing.
Using the Spark parallel computing framework, we construct an elastic distributed dataset RDD, utilize the HDFS distributed file system for data sharding, and combine the ReduceByKey and map() functions to count the number of times the same location is covered, generating a coverage attribute graph.
It enables convenient understanding of the coverage count of OVT domain data, effectively solves the quality control problem of coverage count, and improves the accuracy and uniformity of data processing.
Smart Images

Figure CN121995488A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of seismic data processing in seismic exploration, and specifically relates to a method for extracting OVT data coverage times and a storage medium. Background Technology
[0002] As oil and gas exploration deepens, the accuracy requirements for seismic data processing are increasing, gradually moving towards broadband and full-field processing. OVT domain processing has become the preferred method for processing wide-azimuth seismic data, and OVT panelization has become the primary task in OVT domain data processing. After panelization, gathers are extracted to obtain OVT domain data. Ideally, a complete OVT dataset represents a single-coverage profile. However, due to factors such as the construction environment, technical capabilities, and surface acquisition conditions, seismic data may not meet the standards for regular sampling, resulting in uneven coverage. Therefore, quality control of the coverage count in OVT domain data is crucial for subsequent OVT domain data processing. Summary of the Invention
[0003] The purpose of this invention is to solve the problems existing in the prior art. In view of the shortcomings of the prior art, an OVT data coverage number extraction method is proposed to better understand the coverage number of OVT domain data.
[0004] This invention is achieved through the following technical solution:
[0005] A first aspect of the present invention provides a method for extracting OVT data coverage counts, the method comprising:
[0006] Step 1: Import the OVT domain seismic data into the distributed file system HDFS;
[0007] Step 2: Perform fragmentation processing on the seismic data in the distributed file system HDFS;
[0008] Step 3: Construct the first resilient distributed dataset RDD;
[0009] Step 4: Construct the second resilient distributed dataset RDD;
[0010] Step 5: Perform data aggregation and construct the third elastic distributed dataset RDD;
[0011] Step 6: Count the number of times the same position is reached to obtain the coverage count;
[0012] Step 7: Generate a coverage count attribute graph.
[0013] Furthermore, the first resilient distributed dataset RDD in step 3 is composed of (Key, Value)Record, where Key represents the OVT number OVT_NUM of the seismic data, and Value represents one seismic record.
[0014] Furthermore, the seismic data consists of track head data and track data.
[0015] Furthermore, step 3 also includes setting the number of partitions using rdd.repartition.
[0016] Furthermore, step 4 includes: using the flatMap() function to split each data record into one or more key-value pairs in the form of (OVT_NUM, (Inline_Num, Crossline_Num, X_coor, Y_coor, Fold)); saving the Inline_Num, Crossline_Num, X_coor, Y_coor, and Fold information into a list List; using OVT_NUM as the key and the information saved in the list List as the value, constructing a second resilient distributed dataset RDD to obtain a collection Record of fields OVT_NUM, (Inline_Num, Crossline_Num, X_coor, Y_coor, Fold).
[0017] Furthermore, obtaining the Record set of fields OVT_NUM, (Inline_Num, Crossline_Num, X_coor, Y_coor, Fold) includes the following steps:
[0018] S41. Create a ListBuffer;
[0019] S42. Use buff.iterator to add all the information of all paths together;
[0020] S43. Using ReduceByKey, combine the channels (OVT_NUM, (Inline_Num, Crossline_Num, X_coor, Y_coor, Fold)) of the same OVT_NUM together to get (OVT_NUM, List((Inline_Num, Crossline_Num, X_coor, Y_coor, Fold)), (Inline_Num, Crossline_Num, X_coor, Y_coor, Fold)...).
[0021] Furthermore, step 4 also includes setting the initial value of the coverage count to 1, where the coverage count refers to the number of channels under the same Inline_Num and Crossline_Num.
[0022] Furthermore, in step 5, data aggregation is performed by using the ReduceByKey() function to reduce the records in the first elastic distributed dataset RDD and the second elastic distributed dataset RDD, merging the values with the same key together.
[0023] Furthermore, step 6 uses the map() function to aggregate every two identical Inline_Num and Crossline_Num traces with the same key in the second elastic distributed dataset RDD, and counts the number of coverages.
[0024] A second aspect of the present invention provides a computer-readable storage medium storing at least one computer-executable program, wherein when executed by the computer, the at least one program causes the computer to perform the steps of the OVT data coverage extraction method as described in any one of claims 1-9.
[0025] Compared with the prior art, the beneficial effects of the present invention are:
[0026] This invention calculates the coverage count using Spark parallel processing, enabling a more convenient understanding of the coverage count of OVT domain data and effectively solving the quality control problem of OVT domain data coverage count. Attached Figure Description
[0027] Figure 1 This is a schematic diagram of the RDD construction and transfer process of this invention;
[0028] Figure 2 This is an example of the aggregation implementation of two paths with the same inline number and crossline number;
[0029] Figure 3 This is an attribute graph showing the number of times data is covered in the OVT domain. Detailed Implementation
[0030] like Figure 1 As shown, the construction of each elastic distributed dataset RDD in this invention is a unique step, including:
[0031] The first step is to import the OVT domain seismic data that needs to be extracted into the distributed file system HDFS.
[0032] The second step is to process the seismic data loaded into the HDFS distributed file into fragments.
[0033] The third step is to construct the first Resilient Distributed Dataset (RDD).
[0034] The fourth step is to use the flatMap() function to construct the second resilient distributed dataset RDD.
[0035] The fifth step is to use the ReduceByKey() function to aggregate data and build a third elastic distributed dataset (RDD).
[0036] The sixth step is to use the map() function to count the number of times the same track appears at the same location.
[0037] Step 7: Summarize the coverage count information for each data point to obtain a coverage count attribute graph.
[0038] The present invention will now be described in detail with reference to the embodiments.
[0039] Example 1:
[0040] Step 1: Import OVT domain seismic data. Obtain the OVT domain seismic data for attribute extraction from the seismic data processing software via an interface and import it into the distributed file system HDFS.
[0041] Example 2:
[0042] Step 2: Perform data partitioning on the seismic data. Use Spark parallel technology to partition the seismic data loaded into the HDFS distributed file system. Specifically, select an appropriate partitioning strategy based on the characteristics of the data to be processed and the processing requirements. Partitioning strategies include: based on the physical location of the seismic data, data size, or intrinsic characteristics of the data (such as seismic data timestamps); and determine the size of each partition based on the cluster resources and data characteristics. In this invention, each partition is typically a 128MB data block. In Spark, this invention controls the partition size by configuring the `spark.sql.files.maxPartitionBytes` parameter.
[0043] Furthermore, during the sharding process, it is necessary to ensure that the integrity of each data segment is not compromised. Therefore, in this invention, each data segment is the smallest unit and cannot be divided.
[0044] This step relies on the interfaces and methods in the company's seismic data processing software. The interface for reading in data is: `valseisData = this.getInputRDD()`.
[0045] Example 3:
[0046] Step 3: Construct the first resilient distributed dataset RDD. The first resilient distributed dataset RDD is constructed, consisting of (Key, Value)Records, where Key represents the OVT number (OVT_NUM) of the seismic data, and Value represents a single seismic track; a single seismic track consists of the track header and track data.
[0047] Seismic data is converted into (Key, Value) pairs using the flatMap function. Specifically, the data for each line is iterated to obtain each trace, and the OVT_NUM and seismic trace information for that trace are obtained to form an RDD(OVT_NUM, Value).
[0048] This invention uses Spark's textFile, wholeTextFiles, or other data reading methods to load data into a first resilient distributed dataset RDD; then, it uses the rdd.repartition method to adjust the number of partitions in the resilient distributed dataset RDD.
[0049] This invention sets the number of partitions: a default number of partitions can be used, or the number of partitions can be set to the number of the first elastic distributed dataset RDDs. Specifically, `rdd.repartition` is used for this setting; in this invention, `numPartitions` can also be set to the number of the first elastic distributed dataset RDDs.
[0050] Example 4:
[0051] Step 4: Construct the second distributed dataset RDD. Using the `flatMap()` function, split each data record in the first resilient distributed dataset RDD into one or more key-value pairs in the form of (OVT_NUM, (Inline_Num, Crossline_Num, X_coor, Y_coor, Fold)). Specifically, collect the coordinates, Inline number, and Crossline number for each data track; where the coordinates include: X_CMP coordinates and Y_CMP coordinates; the Inline number (Inline_Num) is the label of a data line; the Crossline number (Crossline_Num) is the label of the track on a data line; X_CMP and Crossline numbers correspond one-to-one, and Y_CMP and Inline numbers correspond one-to-one. This information for each data track can be obtained from the track header in the Vulnerability table. Set the coverage count to 1, that is, initialize Fold to 1. (The coverage count refers to how many data points are under the same Inline_Num, Crossline_Num. The current Inline_Num, Crossline_Num corresponds to this data point, so it is set to 1).
[0052] Save the Inline_Num, Crossline_Num, X_coor, Y_coor, and Fold information to a list.
[0053] Using OVT_NUM as the key and the information stored in the aforementioned List as the value, a second resilient distributed dataset RDD is constructed, resulting in a Record containing the fields OVT_NUM and (Inline_Num, Crossline_Num, X_coor, Y_coor, Fold). The data types of the coordinates (X_coor, Y_coor), Inline number (Inline_Num), and Crossline number (Crossline_Num) are Int, Double, Double, and Int, respectively.
[0054] The specific steps are as follows:
[0055] S41. First, create a ListBuffer, using the following formula:
[0056] vau buff=newListBuffer[(Int, List[(Int, Int, Doubue, Doubue, Int)])]()
[0057] S42. Then, use buff.iterator to add all the information from all the paths together, using the following formula:
[0058] buff.+=((OVTNum,List((InuineNum,CrossuineNum,CoorxCMP,CooryCMP,1))))
[0059] S43. Using ReduceByKey, combine the channels (OVT_NUM, (Inline_Num, Crossline_Num, X_coor, Y_coor, Fold)) of the same OVT_NUM to get (OVT_NUM, List((Inline_Num, Crossline_Num, X_coor, Y_coor, Fold)), (Inline_Num, Crossline_Num, X_coor, Y_coor, Fold)...).
[0060] In this invention, steps 3 and 4 use flatMap. flatMap is a commonly used high-order function in Scala functional programming, especially when dealing with collections or streams. Its function is to map each element in a collection to another collection through a specified function, and then "flatten" these collections into a single collection. In other words, it unfolds a multi-layered nested collection structure into a single layer.
[0061] First, the first elastic distributed dataset RDD (OVT_NUM, Value) is obtained from each loop of the input data. At this time, the first elastic distributed dataset RDD obtained from each data is parallel (the parallel granularity is one data (OVT_NUM, Value)). Then, the (parallel) Inline_Num, Crossline_Num, X_coor, Y_coor information is obtained from the Value of the first elastic distributed dataset RDD, and Fold is set to 1 to obtain the second elastic distributed dataset RDD (OVT_NUM, (Inline_Num, Crossline_Num, X_coor, Y_coor, Fold)).
[0062] Example 5:
[0063] Step 5: Data aggregation to construct the third resilient distributed dataset RDD. Using the ReduceByKey() function, values with the same key (OVT_NUM) are aggregated together to obtain the third resilient distributed dataset RDD.
[0064] Specifically, for the second resilient distributed dataset RDD obtained in step 4, reduceByKe y The `()` function, `ReduceByKey()`, is a transformation operation used to reduce records in a Resilient Distributed Dataset (RDD). Its function is to merge values with the same key when two RDDs (i.e., the first RDD and the second RDD) have the same key, facilitating subsequent calculations of the coverage count. The operation is as follows:
[0065] RDD3.reduceByKey((key1,key2)=>vl++v2)
[0066] The definition of the aggregate function here is:
[0067] (key1,key2) => vl++v2
[0068] Aggregate the values of two distributed datasets (RDDs) with the same key.
[0069] Specifically, in the first and second resilient distributed datasets RDD, the key is OVT_NUM, and the value is a tuple containing seismic data ((Inline_Num, Crossline_Num, X_coor, Y_coor, Fold)). The ReduceByKey function can be used to merge all seismic data records with the same OVT_NUM. That is, using the ReduceByKey() function, we obtain (OVT_NUM, List((Inline_Num, Crossline_Num, X_coor, Y_coor, Fold), (Inline_Num, Crossline_Num, X_coor, Y_coor, Fold), ...).
[0070] Example 6:
[0071] By obtaining the line number, coordinates, and other relevant information for each data point through steps 3, 4, and 5, we can count how many times the same line appears at the same location, i.e., count the number of times it is covered.
[0072] Step 6: Data grouping and coverage count: Using the `map()` and `groupBy()` functions, aggregate every pair of paths with the same inline and crossline numbers for the same key in the second resilient distributed dataset RDD, and increment the coverage count by 1. The specific implementation is as follows... Figure 2 The code shown is for updating the coverage count. Its basic principle is: for every two elements in List((Inline_Num,Crossline_Num,X_coor,Y_coor,Fold), (Inline_Num,Crossline_Num,X_coor,Y_coor,Fold)……), check if Inline_Num and Crossline_Num are the same; if they are the same, merge the two elements into one and add 1 to Fold in the corresponding Inline_Num and Crossline_Num.
[0073] The steps include:
[0074] S61. Create new key-value pairs: Use the map function to create a new key-value pair for each record. The key can be a new composite key consisting of OVT_NUM, Inline_Num, and Crossline_Num, which ensures that records with the same Inline and Crossline are grouped together; the value is still the original seismic data, but a field is added to track the number of coverages.
[0075] S62. Aggregate Records: Group records with the same composite key. Then, apply an aggregation function to each group, which merges the records and updates the coverage count.
[0076] S63. Define an aggregate function: Define the groupBy() function to process each group after the operation. The function will iterate through the records in each group, merge the data, and increment the coverage count for each record by one.
[0077] Preferably, logic is added to the aggregate function to handle null or outlier values, ensuring that they do not affect the final result.
[0078] Example 7:
[0079] Step 7: Generate Coverage Count Attribute Map. Through steps 3, 4, 5, and 6, the coordinates and coverage count information corresponding to each data point in each OVT domain are obtained, thus yielding the following... Figure 3 The coverage count attribute graph is shown.
[0080] The attribute graph displays coordinates and attribute values, and can be displayed using either (Inline_Num, Crossline_Num, Fold) or (Inline_Num, Crossline_Num, Fold). Both methods display different values. Figure 1 Similarly, the information on the coordinate axes is different.
[0081] The above technical solution is only one embodiment of the present invention. For those skilled in the art, based on the principles disclosed in the present invention, it is easy to make various types of improvements or modifications, and not limited to the technical solutions described in the specific embodiments of the present invention. Therefore, the foregoing description is only a preferred option and is not restrictive.
Claims
1. A method for extracting OVT data coverage times, characterized in that: The method includes: Step 1: Import the OVT domain seismic data into the distributed file system HDFS; Step 2: Perform fragmentation processing on the seismic data in the distributed file system HDFS; Step 3: Construct the first resilient distributed dataset RDD; Step 4: Construct the second resilient distributed dataset RDD; Step 5: Perform data aggregation and construct the third elastic distributed dataset RDD; Step 6: Count the number of times the same position is reached to obtain the coverage count; Step 7: Generate a coverage count attribute graph.
2. The OVT data coverage extraction method according to claim 1, characterized in that: The first resilient distributed dataset RDD in step 3 is composed of (Key, Value)Record, where Key represents the OVT number OVT_NUM of the seismic data, and Value represents one seismic record.
3. The OVT data coverage extraction method according to claim 2, characterized in that: The earthquake data consists of track head data and track data.
4. The OVT data coverage extraction method according to claim 2, characterized in that: Step 3 also includes setting the number of partitions using rdd.repartition.
5. The OVT data coverage extraction method according to claim 1, characterized in that: Step 4 includes: using the flatMap() function to split each data record into one or more key-value pairs in the form of (OVT_NUM, (Inline_Num, Crossline_Num, X_coor, Y_coor, Fold)); saving the Inline_Num, Crossline_Num, X_coor, Y_coor, and Fold information into a list List; using OVT_NUM as the key and the information saved in the list List as the value, constructing a second elastic distributed dataset RDD to obtain a collection Record of fields OVT_NUM, (Inline_Num, Crossline_Num, X_coor, Y_coor, Fold).
6. The OVT data coverage extraction method according to claim 5, characterized in that: The process of obtaining the Record set of fields OVT_NUM, (Inline_Num, Crossline_Num, X_coor, Y_coor, Fold) includes the following steps: S41. Create a ListBuffer; S42. Use buff.iterator to add all the information of all paths together; S43. Using ReduceByKey, combine the channels (OVT_NUM, (Inline_Num, Crossline_Num, X_coor, Y_coor, Fold)) of the same OVT_NUM together to get (OVT_NUM, List((Inline_Num, Crossline_Num, X_coor, Y_coor, Fold)), (Inline_Num, Crossline_Num, X_coor, Y_coor, Fold)...).
7. The OVT data coverage extraction method according to claim 1, characterized in that: Step 4 also includes setting the initial value of the coverage count to 1, where the coverage count refers to the number of channels under the same Inline_Num and Crossline_Num.
8. The method for extracting OVT data coverage times according to claim 1, characterized in that: In step 5, data aggregation is performed by using the ReduceByKey() function to reduce the records in the first elastic distributed dataset RDD and the second elastic distributed dataset RDD, merging the values with the same key together.
9. The method for extracting OVT data coverage times according to claim 1, characterized in that: Step 6 uses the map() function to aggregate every two identical Inline_Num and Crossline_Num traces with the same key in the second elastic distributed dataset RDD, and counts the number of coverages.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one computer-executable program, which, when executed by the computer, causes the computer to perform the steps of the OVT data coverage extraction method as described in any one of claims 1-9.