Viscous medium offset calculation method, device and equipment and readable medium
By adopting CPU, GPU collaborative computing and multi-level dynamic scheduling methods in viscous media offset calculation, the problems of large amount of offset calculation and high storage demand are solved, and the computing efficiency is improved and the resource utilization is fully utilized.
Patent Information
- Application Number
- CN202311800121.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-25
- Publication Date
- 2025-06-27
AI Technical Summary
The calculation of viscous media offset is huge, time-consuming, and requires a lot of storage space, which limits the utilization of computing resources and the improvement of computing efficiency.
The offset tasks are adaptively divided by the video memory of the CPU and GPU, and the multi-level dynamic scheduling collaborative calculation method is adopted to dynamically distribute offset tasks and seismic data to realize collaborative calculations between the CPU and GPU.
It improves the computing efficiency of viscous media offset, makes full use of computing resources, shortens processing time, and adapts to the video memory limitations of most GPU devices on the market.
Smart Images

Figure CN120214875A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical fields of petroleum geophysical exploration and high-performance computing, and particularly to a method, device, equipment and readable medium for calculating viscous medium migration. Background Art
[0002] In order to solve the problems of weak seismic signal energy, low frequency, and wavelet shape distortion caused by the absorption attenuation of viscous media, it is necessary to calculate the compensation travel time and compensate seismic trace data according to the propagation path of the wave field during the prestack depth migration process. The main process of the commonly used viscous medium migration method in production at present is as follows: obtaining the prestack seismic data in the time domain of the target work area, and determining the travel time information and compensation travel time information of each imaging point position in the target work area; performing compensation preprocessing on the first seismic trace data in the prestack seismic data to obtain the initial compensated seismic trace data corresponding to the first seismic trace data; determining the total travel time and total compensation travel time, and performing interpolation processing on the initial compensated seismic trace data to obtain the target compensated seismic trace data corresponding to the first seismic trace data. This method can effectively improve the operation efficiency of viscous medium migration. However, the calculation amount of viscous medium migration is still very large, and the time consumption is several times that of conventional migration. It is necessary to make full use of computing resources to shorten the processing period.
[0003] At the same time, viscous medium migration needs to store the travel time and compensation travel time, and the storage amount is twice that of conventional migration, resulting in huge memory requirements. Although the GPU can provide strong floating-point computing power, its video memory is very limited, and there is a bandwidth limitation between the CPU and the GPU, which is not suitable for frequent data transmission, restricting the development of CPU-GPU collaborative computing for viscous medium migration. Currently, the efficiency of viscous medium migration calculated only by the CPU is low and insufficient to meet the actual production requirements.
[0004] The information disclosed in the background art part of this application is only intended to deepen the understanding of the general background art of this application, and should not be regarded as an admission or any form of suggestion that this information constitutes the prior art known to those skilled in the art. Summary of the Invention
[0005] In view of this, the purpose of the embodiments of the present invention is to propose a method, device, equipment and readable medium for calculating viscous medium migration, adaptively divide the migration tasks according to the video memory of the CPU and GPU, and improve the migration efficiency through multi-level dynamic scheduling of CPU-GPU collaborative computing.
[0006] For the above purposes, one aspect of the embodiments of the present invention provides a method for calculating viscous medium migration, including the following steps: dividing the imaging space into a first number of imaging blocks and dividing the pre-stack seismic data into a second number of data blocks based on migration parameters and hardware parameters, and taking any one of the imaging blocks and any one of the data blocks as a migration task; dynamically distributing the migration tasks to computing nodes based on the producer-consumer pattern to achieve the first-level dynamic scheduling of the migration tasks; calling the CPU and GPU inside the computing node to calculate the same imaging block, and dynamically distributing the seismic data of the data block corresponding to the current migration task between the CPU and the GPU to achieve the second-level dynamic scheduling of the seismic data; in response to all the seismic data of the data block being distributed and calculated, merging the imaging results of the GPU computing threads and adding them to the results of all the CPU computing threads to obtain the migration result of the migration task; and in response to all the migration tasks being completed, merging the results of each computing node to obtain the final migration result.
[0007] In some embodiments, dividing the imaging space into a first number of imaging blocks and dividing the pre-stack seismic data into a second number of data blocks based on migration parameters and hardware parameters includes: calculating the travel time, the size of the compensated travel time file, and the size of the migration result file according to the migration parameters, and dividing the imaging space into a first number of imaging blocks based on the travel time, the size of the compensated travel time file, the size of the migration result file, the CPU memory, and the total GPU video memory, and dividing the travel time and compensated travel time files and the migration result file into the first number based on the imaging space; dividing the pre-stack seismic data into a second number of data blocks according to the migration parameters and the CPU memory.
[0008] In some embodiments, the first number is calculated by the formula N=(A1+A2+B) / F, F=min(C,D)-E, where A1 is the size of the travel time file, A2 is the size of the compensated travel time file, B is the size of the migration result file, C is the CPU memory, D is the total GPU video memory, and E is the memory occupied by intermediate variables during the migration process; wherein, the size of the travel time file is obtained according to the imaging range, migration aperture, and source-receiver distance information in the migration parameters, the size of the compensated travel time file is the same as the size of the travel time file, and the size of the migration result file is calculated according to the imaging range and source-receiver distance grouping information in the migration parameters.
[0009] In some embodiments, dividing the pre-stack seismic data into a second number of data blocks according to the offset parameter and the CPU memory includes: dividing the pre-stack seismic data into several parts based on the source-receiver offset grouping information in the offset parameter, determining whether the size of each part of the pre-stack data exceeds a preset threshold, and if it exceeds, further splitting the part of the pre-stack data according to the preset threshold to obtain the second number of data blocks; wherein, the preset threshold is the remaining CPU memory size or the defined memory value.
[0010] In some embodiments, the number of the offset tasks is the product of the first number and the second number. Taking any one of the imaging blocks and any one of the data blocks as an offset task includes: determining whether the data block in each task is within the aperture of the imaging block, and if not, it is an empty task and no offset calculation is performed.
[0011] In some embodiments, dynamically distributing the offset tasks to the computing nodes based on the producer-consumer mode to implement the first-level dynamic scheduling of the offset tasks includes: each computing node obtains one offset task each time, and reads the corresponding data block, the travel time and the compensated travel time corresponding to the imaging block into the memory; in response to the completion of the current offset task, a new offset task is requested.
[0012] In some embodiments, calling the CPU and the GPU inside the computing node to calculate the same imaging block includes: opening CPU computing threads based on the number of CPU cores, and opening the same imaging space in each CPU computing thread to calculate different seismic data to implement the three-level dynamic scheduling of the offset data; each CPU computing thread loads the compensated travel time calculation function, the frequency-domain amplitude compensation function, the compensated seismic trace time-domain interpolation function, and the offset calculation kernel function.
[0013] In some embodiments, calling the CPU and the GPU inside the computing node to calculate the same imaging block includes: before calling the GPU, transferring the travel time and the compensated travel time corresponding to the imaging block from the memory to the video memory of the GPU through the PCIE bus; obtaining the number of GPUs, dividing the imaging space equally in each GPU, and all the GPUs share the seismic data; loading the frequency-domain amplitude compensation function to perform parallel compensation calculation on the seismic data, and putting the calculation results into a queue; in response to the presence of data in the queue, using the thread group method to cooperate to complete the calculation of one imaging bin, and further dividing the imaging bin into GPU threads according to the depth grid; each GPU loads the compensated travel time calculation function, the compensated seismic trace time-domain interpolation function, and the offset calculation kernel function.
[0014] In some embodiments, the seismic data is seismic trace data.
[0015] On the other hand, an embodiment of the present invention further provides a calculation device for viscous medium migration, including: an offset task construction module configured to divide an imaging space into a first number of imaging blocks and divide pre-stack seismic data into a second number of data blocks based on offset parameters and hardware parameters, and use any one of the imaging blocks and any one of the data blocks as an offset task; a first-level dynamic scheduling module configured to dynamically distribute offset tasks to computing nodes based on the producer-consumer mode to achieve the first-level dynamic scheduling of the offset tasks; a second-level dynamic scheduling module configured to call the CPU and GPU inside the computing node to calculate the same imaging block, and dynamically distribute the seismic data of the data block corresponding to the current offset task between the CPU and the GPU to achieve the second-level dynamic scheduling of the seismic data; a first merging module configured to, in response to all the seismic data being distributed and calculated, merge the imaging results of the GPU calculation threads and accumulate them with the results of all the CPU calculation threads to obtain the offset result of the offset task; and a second merging module configured to, in response to all the offset tasks being completed, merge the results of each computing node to obtain the final offset result.
[0016] On yet another aspect, an embodiment of the present invention further provides a computer device, including: at least one processor; and a memory storing computer instructions that can be run on the processor, and when the instructions are executed by the processor, the steps of the above method are implemented.
[0017] On yet another aspect, an embodiment of the present invention further provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above method steps.
[0018] The present invention at least has the following beneficial technical effects: adaptively dividing offset tasks according to the video memory of the CPU and GPU can adapt to the huge travel-time files of viscous medium migration, compensate for the storage requirements of travel-time files, and can adapt to the vast majority of GPU devices on the market; using a multi-level dynamic scheduling method to distribute offset tasks and seismic data can enable nodes or devices with strong computing capabilities to receive more computing tasks and make full use of computing resources; implementing a CPU-GPU collaborative computing parallel algorithm can give full play to the powerful computing capabilities of the GPU, ensure the independence between tasks, and significantly shorten the running time of viscous medium migration. Description of the Drawings
[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other embodiments can be obtained based on these drawings.
[0020] Figure 1 Schematic diagram of an embodiment of a method for calculating the offset of a viscous medium provided by the present invention;
[0021] Figure 2 Schematic diagram of imaging block division provided by the present invention;
[0022] Figure 3 Flowchart of CPU and GPU collaborative computing provided by the present invention;
[0023] Figure 4 Comparison chart of CPU and GPU collaborative computing and CPU computing efficiency provided by the present invention;
[0024] Figure 5 Schematic diagram of an embodiment of a device for calculating the offset of a viscous medium provided by the present invention;
[0025] Figure 6 Schematic diagram of an embodiment of a computer device provided by the present invention;
[0026] Figure 7 Schematic diagram of an embodiment of a computing device for calculating the offset of a viscous medium provided by the present invention. Detailed implementation manners
[0027] To make the objectives, technical solutions, and advantages of the present invention clearer and more understandable, the following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in specific embodiments. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all of them. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.
[0028] All "first", "second", "third", "fourth", etc. (if any) used in the embodiments of the present invention are used to distinguish entities or parameters with the same name but different. It can be seen that "first", "second", "third", "fourth", etc. (if any) are only for the convenience of expression and should not be construed as describing a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention described here can be implemented in an order other than those illustrated or described here.
[0029] It should be noted that in various embodiments of the present invention, the magnitudes of the sequence numbers of the respective processes do not imply the order of execution, and the order of execution of the respective processes should be determined according to their functions and internal logics, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
[0030] It should be noted that in the present invention, "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0031] It should be noted that in the present invention, "a plurality of" means two or more. " / or" is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally represents that the associated objects before and after are in an "or" relationship. "Including A, B and C" and "including A, B, C" mean that all of A, B and C are included. "Including A, B or C" means including any one of A, B and C. "Including A, B and / or C" means including any one or any two or all three of A, B and C.
[0032] It should be noted that in the present invention, "B corresponding to A", "B corresponding to A relatively", "A corresponding to B relatively" or "B corresponding to A relatively" means that B is associated with A, and B can be determined according to A. Determining B according to A does not mean determining B only according to A, and B can also be determined according to A and / or other information. The matching of A and B means that the similarity between A and B is greater than or equal to a preset threshold.
[0033] Depending on the context, as used herein, "if" can be interpreted as "when...", "when...", "in response to determining" or "in response to detecting".
[0034] The technical solution of the present invention will be described in detail below with specific embodiments. These several specific embodiments below can be combined with each other, and for the same or similar concepts or processes, they may not be repeated in some embodiments.
[0035] Based on the above purposes, in the first aspect of the embodiments of the present invention, an embodiment of a method for calculating the offset of a viscous medium is proposed. Figure 1 Shown is a schematic diagram of an embodiment of a method for calculating the offset of a viscous medium provided by the present invention. As Figure 1 shown, an embodiment of a method for calculating the offset of a viscous medium in the embodiments of the present invention includes the following steps:
[0036] 001. Divide the imaging space into a first number of imaging blocks and divide the pre-stack seismic data into a second number of data blocks based on offset parameters and hardware parameters, and use any imaging block and any data block as an offset task;
[0037] In this embodiment, the management node divides offset tasks according to offset parameters and hardware parameters. Calculate the travel time, the size of the compensated travel time file, and the size of the offset result file according to the offset parameters. Divide the imaging space into N parts according to the travel time, the size of the compensated travel time file, the size of the offset result file, the CPU memory, and the total GPU video memory, and divide the travel time and compensated travel time files and the offset result files into N parts according to the imaging space; divide the pre-stack seismic data into M parts according to the offset parameters and the CPU memory size; construct an offset task by combining a certain pre-stack seismic data block Mi and a certain imaging block Nj, and a total of M×N offset tasks are constructed.
[0038] 002. Dynamically distribute offset tasks to computing nodes based on the producer-consumer model to achieve the first-level dynamic scheduling of offset tasks;
[0039] In this embodiment, the management node and the computing nodes dynamically distribute offset tasks according to the producer-consumer model to achieve the first-level dynamic scheduling of offset tasks. For a certain computing node, obtain an offset task each time, such as the offset task corresponding to the data block Mi and the imaging block Nj; request a new offset task from the management node after the current offset task is completed. The stronger the computing power of the node, the higher the frequency of obtaining tasks.
[0040] 003. Inside the computing node, call the CPU and GPU to calculate the same imaging block, and dynamically distribute the seismic data of the data block corresponding to the current offset task between the CPU and the GPU to achieve the second-level dynamic scheduling of seismic data;
[0041] In this embodiment, inside the computing node, the CPU and the GPU calculate the same imaging block Nj, and dynamically distribute the seismic traces of the data block Mi corresponding to the current offset task between the CPU and the GPU to achieve the second-level dynamic scheduling of seismic data.
[0042] 004. In response to all the seismic data of the data block being distributed and calculated, merge the imaging results of the GPU computing threads and accumulate them with the results of all the CPU computing threads to obtain the offset result of the offset task; and
[0043] In this embodiment, after all the seismic traces of the data block Mi are distributed and calculated, merge the imaging results Nj of the GPU computing threads. And accumulate them with the results of all the CPU computing threads to obtain the offset result of the offset task.
[0044] 005. In response to the completion of all offset tasks, the results of each computing node are merged to obtain the final offset result.
[0045] In this embodiment, after all offset tasks are completed, the results of each computing node are merged to obtain the offset result of the entire offset job.
[0046] Figure 2 Shown is a schematic diagram of imaging block division provided by the present invention. Figure 3 Shown is a flowchart of CPU and GPU collaborative computing provided by the present invention. Figure 4 Shown is a comparison chart of the CPU and GPU collaborative computing and the CPU computing efficiency provided by the present invention. As Figures 2-4 shown, offset tasks are adaptively divided according to the video memory of the CPU and GPU, and the offset efficiency is improved through multi-level dynamic scheduling of CPU and GPU collaborative computing.
[0047] In some embodiments of the present invention, dividing the imaging space into a first number of imaging blocks and dividing the pre-stack seismic data into a second number of data blocks according to offset parameters and hardware parameters includes: calculating the travel time, compensating the travel time file size, and the offset result file size according to the offset parameters, dividing the imaging space into a first number of imaging blocks evenly according to the CPU memory and the total GPU video memory, and dividing the travel time and compensated travel time files and the offset result files into a first number based on the imaging space; dividing the pre-stack seismic data into a second number of data blocks according to the offset parameters and the CPU memory.
[0048] In some embodiments of the present invention, the first number is calculated by the formula N=(A1 + A2 + B) / F, F = min(C, D)-E, where A1 is the travel time file size, A2 is the compensated travel time file size, B is the offset result file size, C is the CPU memory, D is the total GPU video memory, and E is the memory occupied by intermediate variables during the offset process; among them, the travel time file size is obtained according to the imaging range, offset aperture, and shot-receiver distance information in the offset parameters, the compensated travel time file size is the same as the travel time file size, and the offset result file size is calculated according to the imaging range and shot-receiver distance grouping information in the offset parameters.
[0049] In this embodiment, the travel-time file size A1 and the compensation file size A2 are obtained based on the imaging range, offset aperture, source-receiver distance information, etc. in the offset parameters. Generally, the compensation travel-time file size is the same as the travel-time size. The offset result file size B is calculated according to the imaging range, source-receiver distance grouping and other information in the offset parameters. The CPU memory is C, the total GPU video memory is D, and the smaller value of C and D minus the memory E occupied by some intermediate variables during the offset process gives F, that is, F = min(C, D) - E. According to the CPU memory and the total GPU video memory size, the travel-time, compensated travel-time, and offset result files are divided into N parts, where N = (A1 + A2 + B) / F, and the imaging space is correspondingly divided into N imaging blocks.
[0050] In some embodiments of the present invention, dividing the pre-stack seismic data into a second number of data blocks according to the offset parameters and the CPU memory includes: dividing the pre-stack seismic data into several parts based on the source-receiver distance grouping information in the offset parameters, and determining whether the size of each part of the pre-stack data exceeds a preset threshold. If it does, the part of the pre-stack data is further segmented according to the preset threshold to obtain a second number of data blocks; wherein, the preset threshold is the remaining CPU memory size or the defined memory value.
[0051] In this embodiment, according to the source-receiver distance grouping information in the offset parameters, the pre-stack seismic data is divided into several parts according to the source-receiver distance. If the size of a part of the pre-stack data exceeds the remaining CPU memory size or the defined memory value, the part of the pre-stack data is further segmented according to the remaining CPU memory size or the defined memory value, and finally the pre-stack seismic data is divided into M data blocks.
[0052] In some embodiments of the present invention, the number of offset tasks is the product of the first number and the second number. Taking any imaging block and any data block as an offset task includes: determining whether the data block in each task is the data within the imaging block aperture. If not, it is an empty task and no offset calculation is performed.
[0053] In this embodiment, an offset task is composed of one of the data blocks and one of the imaging blocks. The number of offset tasks is less than or equal to M×N. Each task needs to determine whether the data block is the data within the imaging block aperture. If not, it is an empty task and no offset calculation is performed.
[0054] In some embodiments of the present invention, based on the producer-consumer mode, the offset tasks are dynamically distributed to the computing nodes to achieve the first-level dynamic scheduling of the offset tasks, including: each computing node obtains one offset task each time, and reads the corresponding data block, the travel-time and the compensated travel-time corresponding to the imaging block into the memory; in response to the completion of the current offset task, a new offset task is requested.
[0055] In this embodiment, the management node and the computing nodes dynamically distribute offset tasks according to the producer-consumer model to achieve the first-level dynamic scheduling of offset tasks. For a certain computing node, it obtains one offset task each time, such as the offset tasks corresponding to data block Mi and imaging block Nj; after the current offset task is completed, it requests a new offset task from the management node. The stronger the computing power of a node, the higher the frequency of task acquisition. After obtaining the offset task, the computing node reads the corresponding data block, as well as the travel time and compensated travel time corresponding to the imaging block, into the memory.
[0056] In some embodiments of the present invention, calling the CPU and the GPU inside the computing node to calculate the same imaging block includes: opening CPU computing threads based on the number of CPU cores, and opening the same imaging space in each CPU computing thread to calculate different seismic data, so as to achieve the three-level dynamic scheduling of offset data; each CPU computing thread loads the compensated travel time calculation function, frequency-domain amplitude compensation function, compensated seismic trace time-domain interpolation function, and offset calculation kernel function.
[0057] In this embodiment, CPU computing threads are opened according to the number of CPU cores, and each computing thread opens the same imaging block space Nj to calculate different seismic traces. The seismic traces belong to data block Mi, so as to achieve the three-level dynamic scheduling of offset data. Each thread loads the compensated travel time calculation function, frequency-domain amplitude compensation function, compensated seismic trace time-domain interpolation function, offset calculation kernel function, etc. After calculation, each thread obtains the offset result M1 of a single seismic trace in the imaging block. The seismic traces dynamically distributed in the offset task are obtained, and the offset result of this seismic trace in the imaging block is accumulated on M1. This process continues until all seismic traces of this task are distributed.
[0058] In some embodiments of the present invention, calling the CPU and the GPU inside the computing node to calculate the same imaging block includes: before calling the GPU, transmitting the travel time and compensated travel time corresponding to the imaging block from the memory to the video memory of the GPU through the PCIE bus; obtaining the number of GPUs, dividing the imaging space equally among each GPU, and all GPUs share the seismic data; loading the frequency-domain amplitude compensation function to perform parallel compensation calculation on the seismic data, and putting the calculated result into a queue; in response to the presence of data in the queue, using the thread group method to cooperate to complete the calculation of an imaging pixel, and further dividing the imaging pixel into GPU threads according to the depth grid; each GPU loads the compensated travel time calculation function, compensated seismic trace time-domain interpolation function, and offset calculation kernel function.
[0059] In this embodiment, before GPU calculation, the travel time and compensated travel time corresponding to the imaging block Nj need to be transferred from the memory to the video memory of the GPU through the PCIE bus; the GPU has stronger computing power, higher frequency of obtaining seismic data, and more seismic data is calculated. Obtain the number of GPUs. Since the total video memory of the GPUs is limited, each GPU divides the imaging block Nj space equally. All GPUs share the seismic trace data, and the seismic trace data all belongs to the data block Mi. Load the frequency-domain amplitude compensation function to perform compensation calculation on the seismic trace data. Loading the frequency-domain amplitude compensation function into the GPU can increase the GPU computing volume, give play to the GPU computing advantage, and at the same time, the compensated seismic trace size is several times that of the original seismic trace, and loading it into the GPU can reduce data transmission; the frequency-domain amplitude compensation function is calculated in parallel according to the seismic traces. After the calculation is completed, the compensated seismic traces are put into a certain queue. Once there is data in the queue, a thread group is used to cooperate to complete the calculation of an imaging bin. The imaging bin is further divided according to the depth grid. For each thread, calculate a certain depth grid of a certain imaging point, and further load the compensated travel time calculation function, the compensated seismic trace time-domain interpolation function, and the migration calculation kernel function. The compensated travel time calculation function, the compensated seismic trace time-domain interpolation function, and the migration calculation kernel function are calculated in parallel according to the imaging points. After calculation, the migration result M2 of a single seismic trace at the imaging point is obtained. Obtain the seismic traces dynamically distributed in the migration task, and accumulate the migration results at the imaging points obtained by calculating the seismic traces through the frequency-domain amplitude compensation, the compensated travel time calculation function, the compensated seismic trace time-domain interpolation function, and the migration calculation kernel function to M2. Until all the seismic traces of this task are distributed.
[0060] In some embodiments of the present invention, the seismic data is seismic trace data.
[0061] It should be particularly noted that each step in each embodiment of the above calculation method for viscous medium migration can be crossed, replaced, added, or deleted with each other. Therefore, these reasonable permutation and combination transformations for a calculation method for viscous medium migration should also fall within the protection scope of the present invention, and the protection scope of the present invention should not be limited to the embodiments.
[0062] Based on the above purpose, the second aspect of the embodiments of the present invention proposes a calculation device for viscous medium migration. Figure 4 The figure shows a schematic diagram of an embodiment of a calculation device for viscous medium migration provided by the present invention. As Figure 4As shown in the figure, a calculation device for viscous medium migration according to an embodiment of the present invention includes the following modules: an offset task construction module 011, configured to divide an imaging space into a first number of imaging blocks and divide pre-stack seismic data into a second number of data blocks based on offset parameters and hardware parameters, and use any imaging block and any data block as an offset task; a first-level dynamic scheduling module 012, configured to dynamically distribute offset tasks to computing nodes based on the producer-consumer mode to achieve the first-level dynamic scheduling of offset tasks; a second-level dynamic scheduling module 013, configured to call a CPU and a GPU within a computing node to calculate the same imaging block, and dynamically distribute seismic data of a data block corresponding to the current offset task between the CPU and the GPU to achieve the second-level dynamic scheduling of seismic data; a first merging module 014, configured to, in response to all seismic data being distributed and calculated for a data block, merge the imaging results of GPU computing threads and accumulate them with the results of all CPU computing threads to obtain the offset result of the offset task; and a second merging module 015, configured to, in response to all offset tasks being completed, merge the results of each computing node to obtain the final offset result.
[0063] In some embodiments, the functions or modules included in the device provided by the embodiments of the present invention can be used to execute the methods described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments. For the sake of brevity, it will not be repeated here.
[0064] Based on the above objectives, a third aspect of the embodiments of the present invention proposes a computer device. Figure 5 The figure shows a schematic diagram of an embodiment of a computer device provided by the present invention. As Figure 5 shown, the computer device according to the embodiment of the present invention includes the following devices: at least one processor 820; and a memory 804, where the memory 804 stores computer instructions that can be run on the processor, and when the instructions are executed by the processor, the steps of the above methods are implemented.
[0065] In this embodiment, the device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, or other terminal devices. The device 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an input / output interface 812, a sensor component 814, and a communication component 816.
[0066] The processing component 802 generally controls the overall operation of the device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-described methods. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
[0067] The memory 804 is configured to store various types of data to support the operation of the device 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phone book data, messages, pictures, videos, and the like. The memory 804 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, a magnetic disk, or an optical disk.
[0068] The power component 806 provides power to the various components of the device 800. The power component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 800.
[0069] The multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the edges of the touch or swipe actions but also detect the duration and pressure associated with the touch or swipe operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each of the front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capabilities.
[0070] The input / output interface 812 provides an interface between the processing component 802 and a peripheral interface module, which may be a keyboard, click wheel, buttons, and the like. These buttons may include, but are not limited to: a home button, volume buttons, a power-on button, and a lock button.
[0071] The sensor assembly 814 includes one or more sensors for providing an assessment of the status of various aspects of the device 800. For example, the sensor assembly 814 can detect the on / off state of the device 800, the relative positioning of components, such as the display and keypad of the device 800. The sensor assembly 814 can also detect a change in the position of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration / deceleration of the device 800, and a change in the temperature of the device 800. The sensor assembly 814 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 can also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 can also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0072] The communication component 816 is configured to facilitate communication between the device 800 and other devices in a wired or wireless manner. The device 800 can access a wireless network based on communication standards, such as WiFi, 2G, or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0073] In an exemplary embodiment, the device 800 can be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the above-described methods.
[0074] The present invention also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program that, when executed by a processor, performs the above method.
[0075] Figure 6 A schematic diagram showing a computing device for viscous medium offset according to an embodiment of the present disclosure. For example, the electronic device 1900 can be provided as a server or a terminal. Referring to Figure 6, the electronic device 1900 includes a processing unit 1922, which further includes one or more processors, and memory resources represented by a storage unit 1932 for storing instructions executable by the processing unit 1922, such as application programs. The application programs stored in the storage unit 1932 may include one or more modules each corresponding to a set of instructions. In addition, the processing unit 1922 is configured to execute instructions to perform the above-described method.
[0076] The electronic device 1900 may further include a power supply unit 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input / output interface 1958. The electronic device 1900 may operate based on an operating system stored in the storage unit 1932, such as WindowsServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or the like.
[0077] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as the storage unit 1932 including computer program instructions, and the above computer program instructions can be executed by the processing unit 1922 of the electronic device 1900 to complete the above method.
[0078] Finally, it should be noted that those of ordinary skill in the art can understand that all or part of the processes of implementing the methods in the above embodiments can be completed by instructing relevant hardware through a computer program. A program for a method of calculating viscous medium offset can be stored in a computer-readable storage medium. When the program is executed, it may include the processes of the embodiments of the above methods. Among them, the storage medium of the program may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc. The embodiments of the above computer program can achieve the same or similar effects as the corresponding foregoing method embodiments.
[0079] In addition, the method disclosed according to the embodiments of the present invention can also be implemented as a computer program executed by a processor, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the above functions defined in the method disclosed in the embodiments of the present invention are performed.
[0080] In addition, the above method steps and system units can also be implemented by using a controller and a computer-readable storage medium for storing a computer program that enables the controller to implement the above step or unit functions.
[0081] Those skilled in the art will also understand that the various exemplary logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein can be implemented as electronic hardware, computer software, or a combination of both. To clearly illustrate this interchangeability of hardware and software, the functions have been generally described in terms of the functions of various illustrative components, blocks, modules, circuits, and steps. Whether this function is implemented as software or hardware depends on the particular application and the design constraints imposed on the overall system. The functions that can be implemented by those skilled in the art in various ways for each particular application, but such implementation decisions should not be construed as causing a departure from the scope of the disclosure of the embodiments of the present invention.
[0082] In one or more exemplary designs, the functions can be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions can be stored on or transmitted via a computer-readable medium as one or more instructions or code. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one location to another. The storage media can be any available media that can be accessed by a general or special purpose computer. By way of example and not limitation, the computer-readable media can include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and that can be accessed by a general or special purpose computer or a general or special purpose processor. In addition, any connection can be properly termed a computer-readable medium. For example, if software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of the medium. As used herein, disk and disc include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk, and Blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
[0083] The above are exemplary embodiments of the present invention disclosure, but it should be noted that various changes and modifications can be made without departing from the scope of the disclosure of the embodiments of the present invention as defined by the claims. The functions, steps, and / or actions of the method claims according to the disclosed embodiments herein need not be performed in any particular order. In addition, although the elements of the embodiments of the present invention disclosure may be described or claimed in individual form, they can also be understood as plural unless explicitly limited to the singular.
[0084] It should be understood that, as used herein, unless the context clearly supports the exception, the singular form "a" is intended to also include the plural form. It should also be understood that the "and / or" used herein refers to any and all possible combinations of one or more of the associated listed items.
[0085] The serial numbers of the disclosed embodiments of the present invention above are only for description and do not represent the advantages or disadvantages of the embodiments.
[0086] Those of ordinary skill in the art can understand that all or part of the steps to implement the above embodiments can be completed by hardware, or can be completed by instructing relevant hardware through a program, and the program can be stored in a computer-readable storage medium. The above-mentioned storage medium can be a read-only memory, a magnetic disk or an optical disc, etc.
[0087] Those of ordinary skill in the art should understand that: the discussion of any of the above embodiments is only exemplary and is not intended to imply that the scope of the disclosure of the embodiments of the present invention (including the claims) is limited to these examples; under the concept of the embodiments of the present invention, the technical features in the above embodiments or different embodiments can also be combined, and there are many other variations in different aspects of the above embodiments of the present invention, which are not provided in detail for the sake of brevity. Therefore, any omission, modification, equivalent replacement, improvement, etc. made within the spirit and principle of the embodiments of the present invention shall be included within the protection scope of the embodiments of the present invention.
Claims
1. A method for calculating the offset of a viscous medium, characterized in that Including the following steps: Dividing the imaging space into a first number of imaging blocks based on offset parameters and hardware parameters, dividing the pre-stack seismic data into a second number of data blocks, and taking any one of the imaging blocks and any one of the data blocks as an offset task; Dynamically distributing the offset tasks to computing nodes based on the producer-consumer model to achieve the first-level dynamic scheduling of the offset tasks; Invoking the CPU and GPU inside the computing node to calculate the same imaging block, and dynamically distributing the seismic data of the data block corresponding to the current offset task between the CPU and the GPU to achieve the second-level dynamic scheduling of the seismic data; In response to all the seismic data of the data block being distributed and calculated, merging the imaging results of the GPU computing threads and accumulating them with the results of all the CPU computing threads to obtain the offset result of the offset task; And In response to all the offset tasks being completed, merging the results of each computing node to obtain the final offset result.
2. The calculation method of viscous medium offset according to claim 1, characterized in that Dividing the imaging space into a first number of imaging blocks based on offset parameters and hardware parameters, and dividing the pre-stack seismic data into a second number of data blocks includes: Calculating the travel time, the size of the compensation travel time file, and the size of the offset result file according to the offset parameters, and dividing the imaging space into a first number of imaging blocks based on the travel time, the size of the compensation travel time file, the size of the offset result file, the CPU memory, and the total GPU video memory, and dividing the travel time and compensation travel time files, and the offset result file into the first number based on the imaging space; Dividing the pre-stack seismic data into a second number of data blocks according to the offset parameters and the CPU memory.
3. The calculation method of viscous medium offset according to claim 2, characterized in that The first number is calculated by the formula N=(A1+A2+B) / F, F=min(C,D)-E, where A1 is the size of the travel time file, A2 is the size of the compensation travel time file, B is the size of the offset result file, C is the CPU memory, D is the total GPU video memory, and E is the memory occupied by intermediate variables during the offset process; Among them, the size of the travel time file is obtained according to the imaging range, offset aperture, and shot-receiver distance information in the offset parameters, the size of the compensation travel time file is the same as the size of the travel time file, and the size of the offset result file is calculated according to the imaging range and shot-receiver distance grouping information in the offset parameters.
4. The calculation method of viscous medium offset according to claim 2, characterized in that Dividing the pre-stack seismic data into a second number of data blocks according to the offset parameters and the CPU memory includes: Dividing the pre-stack seismic data into several parts based on the shot-receiver distance grouping information in the offset parameters, and determining whether the size of each part of the pre-stack data exceeds a preset threshold. If it exceeds, further dividing the part of the pre-stack data according to the preset threshold to obtain a second number of data blocks; Among them, the preset threshold is the remaining CPU memory size or the defined memory value.
5. The calculation method of viscous medium offset according to claim 1, characterized in that, The number of the offset tasks is the product of the first number and the second number. Taking any one of the imaging blocks and any one of the data blocks as an offset task includes: Determining whether the data block in each task is the data within the imaging block aperture. If not, it is an empty task and no offset calculation is performed.
6. The calculation method of viscous medium offset according to claim 1, characterized in that Dynamically distributing offset tasks to computing nodes based on the producer-consumer model, and implementing the first-level dynamic scheduling of the offset tasks includes: Each computing node obtains an offset task each time, and reads the corresponding travel times and compensated travel times of the data blocks and imaging blocks into the memory; In response to the completion of the current offset task, a request for a new offset task is made.
7. A method for calculating the offset of a viscous medium according to claim 1, characterized in that Invoking the CPU and GPU within the computing node to compute the same imaging block includes: Opening CPU computing threads based on the number of CPU cores, and opening the same imaging space in each of the CPU computing threads to compute different seismic data, so as to implement the three-level dynamic scheduling of the offset data; Each of the CPU computing threads loads a compensated travel time calculation function, a frequency-domain amplitude compensation function, a compensated seismic trace time-domain interpolation function, and an offset calculation kernel function.
8. A method for calculating the offset of a viscous medium according to claim 1, wherein Invoking the CPU and GPU within the computing node to compute the same imaging block includes: Before invoking the GPU, transferring the travel times and compensated travel times corresponding to the imaging block from the memory to the video memory of the GPU via the PCIE bus; Obtaining the number of GPUs, evenly dividing the imaging space among each of the GPUs, and sharing the seismic data among all the GPUs; Loading a frequency-domain amplitude compensation function to perform parallel compensation calculations on the seismic data, and putting the computed results into a queue; In response to there being data in the queue, cooperating in a thread group manner to complete the calculation of one imaging bin, and further dividing the imaging bin into GPU threads according to a depth grid; Each of the GPUs loads a compensated travel time calculation function, a compensated seismic trace time-domain interpolation function, and an offset calculation kernel function.
9. A method for calculating the offset of a viscous medium according to claim 1, characterized in that, The seismic data is seismic trace data.
10. A calculation device for the offset of a viscous medium, characterized in that, Includes: An offset task construction module configured to divide the imaging space into a first number of imaging blocks and divide the pre-stack seismic data into a second number of data blocks based on offset parameters and hardware parameters, and use any one of the imaging blocks and any one of the data blocks as an offset task; A first-level dynamic scheduling module configured to dynamically distribute offset tasks to computing nodes based on the producer-consumer model to implement the first-level dynamic scheduling of the offset tasks; A second-level dynamic scheduling module configured to invoke the CPU and GPU within the computing node to compute the same imaging block, and dynamically distribute the seismic data of the data block corresponding to the current offset task between the CPU and the GPU to implement the second-level dynamic scheduling of the seismic data; A first merging module configured to, in response to all the seismic data of the data block being distributed and computed, merge the imaging results of the GPU computing threads and accumulate them with the results of all the CPU computing threads to obtain the offset result of the offset task; And A second merging module configured to, in response to the completion of all the offset tasks, merge the results of each computing node to obtain the final offset result.
11. A computer device, characterized in that, Includes: At least one processor; And A memory storing computer instructions executable on the processor, and when the instructions are executed by the processor, implementing the steps of the method according to any one of claims 1-9.
12. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-9.
Citation Information
Patent Citations
Pre-stack multiple reverse time migration earthquake data processing method and system
CN105445792A
Multi-component anisotropy pre-stack time migration acceleration method based on multi-GPU parallelism
CN107728199A
GPU reverse time migration method and system based on multi-flow optimization
CN107783184A
Reverse time migration imaging method based on MapReduce parallel framework and storage medium
CN112444851A
Self-adaptive high-performance computing scheduling system and method based on reverse time migration algorithm
CN114265700A