A kind of method for processing flow of seismic prospecting data control
Technical field
The present invention relates to processing flow of seismic prospecting data control technology field, the flow control method when exactly relating to a kind of seismic data processing operation operation that is applicable to cluster computing system.
Background technology
In the seismic prospecting data processing procedure in modern times, the seismic data that collects by ground observation need to pass through a series of processing procedures such as static correction, denoising, deconvolution, moving calibration and stack, finally just can be met the data content of need of production for explaining librarian use.And the processing procedure of stages relates to the multiple technology that realizes, every kind of Technology Need software realizes that a functional module supplies software systems to call.In actual data processing production process, normally generate the processing operation description document of a definitim flow topological structure, this flow process is by the above-mentioned functions module composition.After task description file is resolved, functional module is wherein described be loaded as the functional module object, and explain according to the topological structure in task description file and carry out described functional module object, thereby obtain through the data result after a series of processing procedures.
The present age computer hardware technological development is rapid, and in recent years, computer processor manufacturer had carried out multinomial research for improving the computing machine processing speed, and wherein many CPU multinuclear becomes the mainstream development direction that the cluster computing node improves processing speed.But traditional software development mode can not be given full play to the characteristic of many CPU of computing node multinuclear, and in order to adapt to the development of hardware, the software development scheme also needs to adjust thereupon.As mentioned above, a plurality of processing modules have been comprised in a processing operation description document, these modules all need often processing together in geological data, for the data of tens G easily in actual production, the time of operation consumption can seem very long, the result of bringing is not only to have taken for a long time computational resource, and has affected production efficiency.
Be 101630018 as publication number, open day is that the Chinese patent literature of on 01 20th, 2010 discloses a kind of method for processing seismic exploration data of controlling full acoustic wave equation refutation process, gather the theoretical model geological data, obtain Depth Domain bulk modulus and density initial model; With seismic wave field in pseudo-spectrometry simulation acoustic medium; Theory of computation model and initial model simulated data poor; Given δ=1.0e-6, error of calculation ENERGY E as E≤δ, stops inverting, and the output recover result is if E>δ continues the following step; Calculate residual error data; The conjugation index word of volume calculated modulus and density model; Calculate and revise step-length, obtain gradient; Initial model is modified; Amended model data as new initial model, by refutation process is controlled automatically, is made that Inversion of acoustic wave equation is stable, Fast Convergent, and the inverting speed of convergence has improved nearly 5 times than conventional method.But above-mentioned prior art does not still make software configuration have the feature of multithreading, still there is no to solve the technical matters of " for the data of tens G easily in actual production, the time of operation consumption is long; take for a long time computational resource, affect production efficiency ".
Summary of the invention
For solving the problems of the technologies described above, the present invention proposes a kind of by improving the functional module development structure, make it the method that processing flow of seismic prospecting data is controlled that is used for that characteristic with many CPU of modern trunked computing node multinuclear adapts, the present invention is by resolving the module in task description file and topological structure thereof, the load function module object is also controlled its execution, the data of the flow process that fulfils assignment are processed, utilized fully computational resource, shorten the job run time, improved the extensibility of geological data process for producing efficient and software.
The present invention is by adopting following technical proposals to realize:
A kind of method for processing flow of seismic prospecting data control is characterized in that: comprise the steps:
1) standard function Development of Module scheme and interface;
2) improve the development structure of functional module, realize multithreading in functional module;
3) work flow is controlled: by the module in task description file and topological structure thereof are resolved, the load function module object is also controlled it and is carried out, and the data of the flow process that fulfils assignment are processed.
described standard function Development of Module scheme interface can adopt prior art, also can be as an example of functional module base class development structure example in the following way: functional module base class development structure outwards exposes constructed fuction, initialization function Initialize(), parameter testing function CheckPara(), pre-service function PreRun(), data are processed function Run(), post-processed function PostRun() and seven member functions of destructor function call for target programs, concrete functional module class is inherited this functional module base class development structure and these seven functions that member function specifically will be realized to complete it of heavy duty.
The development structure of described improvement functional module, realize that in functional module multithreading can adopt prior art, also can be specifically in the following way: the data at the functional module base class be processed function Run() realized the code development work of multithreading in interface, when the target program calling data is processed function Run() during interface function, this function will create a thread automatically, and in thread the MainLoop(of calling functional modules) member function carries out data and processes.
Described MainLoop() function is to carry out the processing of geological data, is the core of functional module, is shielded member function, is not exposed to outside calling program, but revises the function of its specific implementation after being used for being inherited by subclass.
Described work flow is controlled can adopt prior art, also can be specially: target program generates and load function module and port object (po) and topological connecting object after the functional module in work flow and topological structure thereof are resolved; Then the initialization function Initialize(of calling functional modules in carry out controlling main thread), parameter testing function CheckPara() and pre-service function PreRun() interface, the front preparation work of operation fulfils assignment; Next process function Run(by carrying out the data of controlling the main thread calling functional modules) interface, thus the data processing threads that starts each functional module is completed the geological data processing; After the data processing work of all functions module is completed, carry out the control main thread and call post-processed function PostRun() interface, complete resource release work; Call at last the destructor function of each functional module in carrying out the control main thread, complete the offloading functions of functional module.
Described 3) after also have shared drive data interaction step: shared drive is to be based upon on the output port of functional module, the corresponding shared drive district of the input port of each output port and connection thereof, the functional module under input/output port is by to the data transmission between the implementing reading and writing functional module of this piece shared drive.
Compared with prior art, the technique effect that reaches of the present invention is as follows:
1, adopt of the present invention 1), 2) and 3) step is processed, and the technical scheme that forms after processing successively, even step 1), 2) and 3) all adopt the conventional processing mode, but the technical scheme that these three steps is organically combined formation, just can realize by improving the functional module development structure, make it to have the feature of thread on software configuration, thereby make it to adapt with the characteristic of many CPU of modern trunked computing node multinuclear, utilized fully computational resource, shortened the job run time, improved the extensibility of geological data process for producing efficient and software.
2, adopt be different from as described in the present invention prior art 1), 2) technical scheme that concrete steps and 3) form, utilize the multithreading transformation functional module in develop computer software, make it to have the feature of thread, and the application job flow process is controlled the multithreading solution of carrying out on this basis: " by the module in task description file and topological structure thereof are resolved, the load function module object is also controlled its execution, the data of the flow process that fulfils assignment are processed " can access more excellent technique effect: further shorten the job run time, further improve the extensibility of geological data process for producing efficient and software.
Description of drawings
The present invention is described in further detail below in conjunction with specification drawings and specific embodiments, wherein:
Fig. 1 is functional module base class structural drawing
Fig. 2 is work flow control system structural drawing
Fig. 3 controls main thread to the call flow chart of functional module for carrying out
Fig. 4 controls the main thread workflow diagram for carrying out
Fig. 5 is the functional module topological diagram
Fig. 6 is functional module shared drive structural representation.
Embodiment
Embodiment 1
as the present invention's one better embodiment, the present invention proposes a kind of method for processing flow of seismic prospecting data control, theoretical according to computer software, use multithreading and can improve the processing speed of target program in many CPU polycaryon processor in software development, therefore, the starting point of the present invention's design is exactly to control in operation to use multithreading when carrying out, functional module in work flow is carried out as the different threads in process, in order to realize this conception plans, need to improve the development structure of functional module, make it to have the feature of thread on software configuration, specifically can adopt following three steps: 1) standard function Development of Module scheme and interface, can adopt conventional method of the prior art to realize, 2) improve the development structure of functional module, realize multithreading in functional module, can adopt conventional method of the prior art to realize, 3) work flow is controlled: by the module in task description file and topological structure thereof are resolved, the load function module object is also controlled its execution, the data of the flow process that fulfils assignment are processed, also can adopt conventional method of the prior art to realize, although these three steps all adopt respectively existing techniques in realizing, but these three steps are organically combined, realized by improving the functional module development structure, make it to have the feature of thread on software configuration, thereby make it to adapt with the characteristic of many CPU of modern trunked computing node multinuclear, utilized fully computational resource, shortened the job run time, improved the extensibility of geological data process for producing efficient and software.
Embodiment 2
As preferred forms of the present invention be:
1, standard function Development of Module scheme and interface.
By standard function Development of Module scheme and interface, can improve the extensibility of software.Be illustrated in figure 1 as functional module base class development structure, such outwards exposes seven interfaces such as constructed fuction, initialization function and calls for target program.Concrete functional module class can be inherited this base class and these seven functions that member function specifically will be realized to complete it of heavy duty, can guarantee that so all functional modules provide unified interface to target program.Simultaneously, target program load and calling functional modules in, do not need to be concerned about yet it calls be which functional module and realization be what function.Like this when need to add new functional module, after perhaps the function of existing module being changed, needn't the modifying target program, improved greatly the extensibility of software.The below describes in detail to the interface function function that functional module provides:
(1), constructed fuction, be responsible for establishment, resource acquisition and the initial work of functional module object self.
(2), initialization function Initialize(), complete the functional module object operational parameter, control the initial work of parameter and message parameter.
(3), parameter testing function CheckPara(), complete the inspection work of some static parameters of functional module object in this interface function, judge that whether they satisfy predefined restriction on the parameters condition, carry out the safeguard work at initial stage for the trouble-free operation of processing operation.
(4), pre-service function PreRun(), the dry running inspection of countless certificates is carried out in the inspection work before completing data process in this interface function, during the judgement operation, whether dynamic parameter satisfies the restriction on the parameters condition, guarantees that processing operation can trouble-free operation.
(5), data process function Run(), the work for the treatment of of practical function module to data in this interface function, by calling of this function, the result that the input data will obtain expecting.
(6), post-processed function PostRun(), carry out abnormality processing and part resource release work in this interface function.
(7), destructor function, that is responsible for the functional module object analyses structure and some resource release work.
2, realize multithreading in functional module
Data processing function Run(at the functional module base class) realized the code development work of multithreading in interface, when target program calls Run() during interface function, this function will create a thread automatically, and in thread the MainLoop(of calling functional modules) member function carries out data and processes.MainLoop() function is to carry out the processing of geological data; it is the core of functional module; it can not be exposed to outside calling program as a shielded member function, but revises the function of its specific implementation after can being inherited by subclass again simultaneously.For the functional module developer, they needn't be concerned about Run() interface function, only need to rewrite MainLoop(on the basis of heavily loaded base class) function gets final product.
3, work flow is controlled
As shown in Figure 2, after target program is resolved the functional module in work flow and topological structure thereof, generate and load function module and other object (port object (po) and topological connecting object); Then initialization, parameter testing and the pre-service interface of calling functional modules in target program main thread (carry out control main thread), the front preparation work of operation that fulfils assignment guarantees that as much as possible processing operation can complete data processing work smoothly; Next by carrying out the data-processing interface Run(that controls the main thread calling functional modules), thus the data processing threads that starts each functional module is completed the geological data processing; After the data processing work of all functions module is completed, carry out the control main thread and will call PostRun() function interface, complete the work such as resource release; Call at last the destructor function of each functional module in carrying out the control main thread, complete the offloading functions of functional module.Carry out the call relation of control main thread and functional module interface function as shown in Figure 3.
As shown in Figure 4, may interrupt because a variety of causes causes job run in implementation after job initiation, interruption may be to have extremely to cause, may be also the forced interruption that external message causes, analytical information is processed and exported in extremely withdrawing from of at this moment needing to unify.
4, shared drive data interaction
In the operational process of work flow, need to carry out the data transmission between the functional module that has topology to connect, the design proposal of employing shared drive can realize the data transmission between thread.Shared drive is to be based upon on the output port of functional module, that is to say, the corresponding shared drive district of the input port of each output port and connection thereof, the functional module under input/output port is come the data transmission of practical function intermodule by the read-write to this piece shared drive.Fig. 5 has showed that the data after a functional module is processed give the situation that two other functional module is carried out subsequent treatment, and this three functions module needs a shared drive district to carry out the data transmission, and the design of its shared drive is as shown in Figure 6.