An ultra large imaging logging curve data elastic depth correction method and system
By using dynamic memory allocation and point-by-point read/write methods, the memory shortage problem of depth correction software when processing ultra-large data was solved, enabling effective correction of ultra-large imaging logging curve data and improving processing efficiency and system stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA NAT PETROLEUM CORP
- Filing Date
- 2021-08-31
- Publication Date
- 2026-04-28
AI Technical Summary
Existing depth correction software crashes due to insufficient memory when processing ultra-large imaging logging curve data, and cannot be effectively processed.
A dynamic memory allocation method is adopted, which calculates the depth mapping array and reads the curve data to be corrected point by point, writes the correction result curve point by point, and uses interpolation to process invalid data to implement data caching technology to ensure processing efficiency.
The problem of insufficient memory was solved, and effective correction of ultra-large imaging logging curve data was achieved, improving processing efficiency and system stability.
Smart Images

Figure CN115731154B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of petroleum development and engineering, and specifically relates to a method and system for elastic depth correction of ultra-large imaging logging curve data. Background Technology
[0002] With the development and widespread application of imaging logging technology, the accuracy and depth range of measured data are increasing, resulting in a correspondingly larger volume of imaging logging curve data. In particular, the imaging data from microresistivity scanning imaging logging and array acoustic logging are extremely large, with a single curve reaching 1GB. Subsequent processing requires depth correction based on conventional gamma curves. However, the depth correction software currently in use crashes when handling such massive amounts of data because it reads all the data into memory at once, leading to insufficient memory and processing failure. Summary of the Invention
[0003] The purpose of this invention is to provide an elastic depth correction method and system for ultra-large imaging logging curve data, so as to solve the problem that existing depth correction software crashes and cannot process ultra-large data.
[0004] To achieve the above objectives, the present invention adopts the following technical solution:
[0005] An elastic depth correction method for ultra-large imaging logging curve data includes the following steps:
[0006] Step 1: Dynamically allocate memory. If allocation fails, it indicates a very large data set. Proceed to Step 2.
[0007] Step 2: The depth mapping array in the depth mapping curve is pDepthMapping, with a size of nSourcePointNum integers, where nSourcePointNum is the number of data points in the curve to be calibrated; set all initial values of the depth mapping array to 0, and calculate the target depth position corresponding to the data of the curve to be calibrated.
[0008] Step 3: Set all data of the calibration result curve to invalid values. Based on the depth mapping data pDepthMapping, copy the data of the curve to be calibrated obtained in Step 2 to the corresponding position of the calibration result curve to obtain the calibration result curve.
[0009] Furthermore, after obtaining the correction result curve, the invalid values in the correction result curve are processed by interpolation using the valid values above and below; the final correction result curve is then output.
[0010] Furthermore, the method for determining the dynamically allocated memory size is as follows: Let nSourcePointNum and nTargetPointNum be the depth points of the curve to be calibrated and the calibration result curve, respectively, and nNpw be the number of columns of the array data; the memory size to be allocated is: (nTargetPointNum + nSourcePointNum) * m_nNpw floating-point data.
[0011] Furthermore, for each depth position of the curve to be corrected, the corrected curve value is calculated using the following steps:
[0012] (1) Define the structure of the calibration line as DepthCorLine, which includes two floating-point numbers: fBaseDepth and fCorDepth; fBaseDepth is the depth of the baseline curve, and fCorDepth is the depth of the curve to be calibrated.
[0013] (2) Define an array variable Lines of type QVector as follows:
[0014] QVector <depthcorline>Lines
[0015] Among them, Lines contains DepthN DepthCorLine variables;
[0016] (3) If the depth fCurdep of the current curve to be corrected is less than or equal to Lines[0].m_CorDepth,
[0017] Target depth location:
[0018] fCurProcessdep=fCurdep+Lines[0].fBaseDepth-Lines[0].fCorDepth
[0019] Wherein, Lines[0].m_CorDepth is the depth to be corrected for the first correction line;
[0020] (4) If fCurdep is greater than or equal to Lines[Lines.count()-1].fCorDepth, then
[0021] fCurProcessdep=fCurdep+Lines[DepthN-1].fBaseDepth-Lines[DepthN-1].fCorDepth;
[0022] (5) Other cases: In Lines, start searching from 0 up to DepthN-1, where DepthN-1 represents the last correction line;
[0023] (6) Calculate the location of the corrected depth data.
[0024] Furthermore, for each depth position of the curve to be corrected, fCurdep = m f +i*fsdep, i=0....N-1, assign values, the specific method for copying the curve data to be corrected is as follows:
[0025] (1) When i = 0, read the data of the i-th depth position of the curve to be corrected and assign it to the pDepthMapping[i]-th depth position of the result curve;
[0026] (2) When i>0, read the data of depth position i-1,i of the curve to be corrected and assign it to the depth positions pDepthMapping[i-1],pDepthMapping[i] of the result curve.
[0027] Furthermore, after obtaining the correction result curve, invalid values in the correction result curve are assigned values using the data of the curve i-1 to be corrected; and the final correction result curve is output.
[0028] Another aspect of the present invention provides a system for the elastic depth correction method for ultra-large imaging logging curve data, comprising:
[0029] The memory allocation module is used for dynamically allocating memory.
[0030] The target depth calculation module is used to set all the initial values of the depth mapping array to 0 and calculate the target depth position corresponding to the curve data to be corrected.
[0031] The calibration result curve module is used to set all the data of the calibration result curve to invalid values, and copy the obtained curve data to be calibrated to the corresponding position of the calibration result curve according to the depth mapping data pDepthMapping, so as to obtain the calibration result curve.
[0032] Furthermore, it also includes:
[0033] The interpolation module is used to interpolate invalid values in the correction result curve using valid values above and below.
[0034] The output module is used to output the final correction result curve.
[0035] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0036] (1) The method of the present invention adopts a completely new idea. First, based on the depth pair of the reference curve and the curve to be corrected, the depth mapping curve of the curve to be corrected is calculated. Then, based on the calculated depth mapping curve and the curve to be corrected, the correction result curve value is calculated and written point by point. Finally, the invalid data that has not been written is interpolated using the adjacent upper and lower data.
[0037] (2) The method of the present invention reads the curve to be corrected and writes the correction result curve. It adopts a point-by-point reading method and uses data caching technology to ensure processing timeliness. Attached Figure Description
[0038] The accompanying drawings, which form part of this application, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings:
[0039] Figure 1 This is a schematic diagram of the elastic depth correction method for ultra-large imaging logging curve data according to an embodiment of the present invention. Detailed Implementation
[0040] The present invention will now be described in detail with reference to the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other.
[0041] The following detailed description is exemplary and intended to provide further detailed explanation of the invention. Unless otherwise specified, all technical terms used in this invention have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. The terminology used in this invention is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention.
[0042] like Figure 1 As shown, this embodiment of the invention provides an elastic depth correction method for ultra-large imaging logging curve data, including the following steps:
[0043] Step 1: Dynamically allocate memory. If allocation is successful, use the traditional depth correction method; if allocation fails, it is considered a very large dataset, proceed to Step 2.
[0044] Specifically, the method for determining the dynamic memory allocation size is as follows: Let nSourcePointNum and nTargetPointNum be the depth points of the curve to be calibrated and the calibration result curve, respectively, and nNpw be the number of columns of the array data; the memory size to be allocated is: (nTargetPointNum + nSourcePointNum) * m_nNpw floating-point data.
[0045] Specifically, to handle the flag iFlagProcess=1, the following C statement is used to attempt to allocate content:
[0046]
[0047]
[0048] Then, check iFlagProcess. If it equals 0, it belongs to ultra-large data and proceeds to step 2. If it is 1, the traditional method is applied for correction.
[0049] Step 2: The depth mapping array in the depth mapping curve is pDepthMapping, with a size of nSourcePointNum integers, where nSourcePointNum is the number of data points in the curve to be calibrated; set all initial values of the depth mapping array to 0, and calculate the target depth position corresponding to the data of the curve to be calibrated.
[0050] Specifically, for each depth position fCurdep of the curve to be corrected, fCurdep = m f +i*fsdep,i=0....N-1,m f Let fsdep be the starting depth of the curve to be corrected, N be the depth sampling interval, and N be the number of depth positions. The corrected curve value is calculated using the following steps:
[0051] (1) Define the structure of the calibration line as DepthCorLine, which includes two floating-point numbers: fBaseDepth and fCorDepth; fBaseDepth is the depth of the baseline curve, and fCorDepth is the depth of the curve to be calibrated.
[0052] (2) Define an array variable Lines of type QVector as follows:
[0053] QVector <depthcorline>Lines
[0054] Among them, Lines contains DepthN DepthCorLine variables;
[0055] (3) If the depth fCurdep of the current curve to be corrected is less than or equal to Lines[0].m_CorDepth,
[0056] Target depth location:
[0057] fCurProcessdep=fCurdep+Lines[0].fBaseDepth-Lines[0].fCorDepth
[0058] Wherein, Lines[0].m_CorDepth is the depth to be corrected for the first correction line;
[0059] (4) If fCurdep is greater than or equal to Lines[Lines.count()-1].fCorDepth, then
[0060] fCurProcessdep=fCurdep+Lines[DepthN-1].fBaseDepth-Lines[DepthN-1].fCorDepth;
[0061] (5) Other cases: In Lines, start searching from 0 up to DepthN-1, where DepthN-1 represents the last correction line;
[0062] If fCurdep ≥ Lines.at(k).fCorDepth and fCurdep ≤ + Lines.at(k+1).fCorDepth
[0063] but:
[0064] fCurProcessdep=Lines[k+1].fBaseDepth+(fCurdep-Lines[k+1].fCorDepth)*(Lines[k].fBaseDepth-Lines[k+1].fBaseDepth) / (Lines[k].fCorDepth-Lines[k+1].fCorDepth);
[0065] (6) Calculate the location of the corrected depth data:
[0066] pDepthMapping[i]=int((fCurProcessdep-fSourceDepthStart) / fDepthLevel+0.5)
[0067] Where fSourceDepthStart is the starting depth of the baseline curve, fDepthLevel is the depth interval of the baseline curve, i is the depth position of the baseline curve, and int() represents rounding.
[0068] Step 3: Set all data of the calibration result curve to invalid values. Based on the depth mapping data pDepthMapping, copy the data of the curve to be calibrated obtained in Step 2 to the corresponding position of the calibration result curve to obtain the calibration result curve.
[0069] Specifically, for each depth position of the curve to be corrected, fCurdep = m f +i*fsdep, i=0..N-1, are assigned values. The specific method for copying the data of the curve to be corrected is as follows:
[0070] (1) When i = 0, read the data of the i-th depth position of the curve to be corrected and assign it to the pDepthMapping[i]-th depth position of the result curve;
[0071] pSourceCurveData->GetCurveData(i, 1, pSourceData); / / Read data
[0072] pOutCurveData->SetCurveData(pDepthPos[i], 1, pSourceData) / / Write the result data.
[0073] (2) When i > 0, read the data of depth position i-1 and i of the curve to be corrected, and assign it to the depth positions pDepthMapping[i-1] and pDepthMapping[i] of the result curve.
[0074] Step 4: For the processing of blank data between pDepthPos[i-1] and pDepthPos[i] in the resulting curve, two methods are provided: one is to assign values using the data of the curve to be corrected (i-1). The other is to use the data at both ends for linear interpolation. Let the data of the curve to be corrected (i-1) be pSourceData[i-1] and pSourceData[i], then:
[0075] pSourceDataNew[j][z]
[0076] =pSourceData[i-1][z]+(j-pDepthPos[i-1])*(pSourceData[i][z]-pSourceData[i-1][z]) / (pDepthPos[i]-pDepthPos[i-1]);
[0077] z = 0...nNpw-1, j = pDepthPos[i-1]+1, ..., pDepthPos[i]-1, where z represents the lateral position of the curve to be corrected, nNpw represents the number of lateral points of the curve to be corrected, i.e., the dimension, and j represents the depth index position.
[0078] Then, the pSourceDataNew data is assigned to the j-th depth position of the result curve. It should be noted that, for ease of processing, data is written point by point, and to ensure speed, a cached interface is used for reading and writing. The processing speed can meet the needs of engineering production.
[0079] Step 5: Output the final correction result curve.
[0080] Another aspect of the present invention provides a system for the elastic depth correction method for ultra-large imaging logging curve data, comprising:
[0081] The memory allocation module is used for dynamically allocating memory.
[0082] The target depth calculation module is used to calculate the target depth position corresponding to the data in the depth mapping curve. The depth mapping array in the depth mapping curve is pDepthMapping, which is nSourcePointNum integers in size, where nSourcePointNum is the number of data in the curve to be calibrated. The initial values of the depth mapping array are all set to 0, and the target depth position corresponding to the data in the curve to be calibrated is calculated.
[0083] The calibration result curve module is used to set all the data of the calibration result curve to invalid values, and copy the obtained curve data to be calibrated to the corresponding position of the calibration result curve according to the depth mapping data pDepthMapping to obtain the calibration result curve.
[0084] The interpolation module is used to interpolate invalid values in the correction result curve using valid values above and below.
[0085] The output module is used to output the final correction result curve.
[0086] As is known from common technical knowledge, this invention can be implemented through other embodiments that do not depart from its spirit or essential characteristics. Therefore, the disclosed embodiments described above are merely illustrative in all respects and are not the only ones. All modifications within the scope of this invention or equivalent to the scope of this invention are included in this invention.< / depthcorline> < / depthcorline>
Claims
1. A method for elastic depth correction of ultra-large imaging logging curve data, characterized in that, Includes the following steps: Step 1: Dynamically allocate memory. If allocation fails, it indicates a very large data set. Proceed to Step 2. Step 2, the depth mapping array in the depth mapping curve is Size is integers, The number of data points in the curve to be corrected; set all initial values of the depth mapping array to 0, and calculate the target depth position corresponding to the data of the curve to be corrected; For each depth position of the curve to be corrected, the corrected curve value is calculated using the following steps: (1) Define the structure of the correction line as follows This includes two floating-point numbers: and ; The depth of the baseline curve. The depth of the curve to be corrected; (2) Definition array variables of type The definition is as follows: in, contain indivual variable; (3) If the depth of the current curve to be corrected is Less than or equal to , Target depth location: in, The depth to be corrected for the first correction line; The reference curve depth for the first correction line; (4) If Greater than or equal to ,but ; in, The reference curve depth for the last calibration line; The depth of the curve to be corrected for the last correction line; (5) Other cases: In In the middle, start searching from 0 until... , This represents the last correction line; if and but: ; (6) Calculate the location of the corrected depth data; in, This represents the starting depth of the baseline curve. Depth interval of the baseline curve The depth position of the baseline curve, Indicates rounding down; Step 3: Set all data in the correction result curve to invalid values, and then apply the data based on the depth mapping array. Copy the data of the curve to be corrected obtained in step 2 to the corresponding position of the correction result curve to obtain the correction result curve; For each depth position of the curve to be corrected Assign values. This represents the initial depth of the curve to be corrected. The depth sampling interval is N, where N is the number of depth locations; the specific method for assigning the data of the curve to be corrected is as follows: (1) When At that time, read the first curve to be corrected. The data at the depth position is assigned to the value of the result curve. At a depth location; ); ; (2) When At that time, read the curve to be corrected. Depth location data is assigned to the result curve. At a depth location.
2. The method for elastic depth correction of ultra-large imaging logging curve data according to claim 1, characterized in that, After obtaining the correction result curve, invalid values in the correction result curve are interpolated using the valid values above and below; the final correction result curve is then output.
3. The method for elastic depth correction of ultra-large imaging logging curve data according to claim 2, characterized in that, The method for determining the dynamically allocated memory size is as follows: Let... , These represent the depth points of the curve to be calibrated and the calibrated result curve, respectively. The number of columns in the array data; the amount of memory required: A floating-point number of data.
4. The method for elastic depth correction of ultra-large imaging logging curve data according to claim 1, characterized in that, After obtaining the correction result curve, invalid values in the correction result curve will be used with the curve to be corrected. Assign values to the data; output the final correction result curve.
5. A system for the elastic depth correction method of ultra-large imaging logging curve data as described in claim 1, characterized in that, include: The memory allocation module is used for dynamically allocating memory. The target depth calculation module is used to set all the initial values of the depth mapping array to 0 and calculate the target depth position corresponding to the curve data to be corrected. The calibration result curve module is used to set all data of the calibration result curve to invalid values, based on the depth mapping array. The obtained curve data to be corrected is copied to the corresponding position of the correction result curve to obtain the correction result curve.
6. The system for the elastic depth correction method for ultra-large imaging logging curve data according to claim 5, characterized in that, Also includes: The interpolation module is used to interpolate invalid values in the correction result curve using valid values above and below. The output module is used to output the final correction result curve.
Citation Information
Patent Citations
Logging frequency matching thin-layer correction method and equipment
CN101915091A
Gamma correction system and method
CN111402163A