测井技术2026,Vol.50Issue(1):87-96,10.DOI:10.16489/j.issn.1004-1338.2026.01.008
基于KNN-Transformer算法的密度测井曲线重构方法
Density Logging Curve Reconstruction Method Based on KNN-Transformer Algorithm
摘要
Abstract
Density logging is a key technique for calculating reservoir physical parameters,identifying lithology,and evaluating oil and gas reserves.Due to factors such as borehole conditions and poor tool contact,density curves often suffer from local data gaps,distortion,or noise interference.To address these issues,this paper proposes a density logging curve reconstruction method that integrates the K-nearest neighbors algorithm and the Transformer algorithm(KNN-Transformer).The method first employs KNN to retrieve samples with temporal sedimentary characteristics similar to the target segment within a multi-dimensional logging feature space.By calculating the Euclidean distance between the target segment and historical samples across multi-dimensional features such as acoustic travel time,natural gamma ray,and resistivity,the K most similar neighboring samples are selected to construct an enhanced geological prior input set,thereby improving the geological representativeness of the input data.Subsequently,the multi-head self-attention mechanism of the Transformer algorithm is utilized to establish long-range dependencies between arbitrary positions in the depth sequence,effectively integrating local similarity constraints with global sequential patterns.This achieves a synergistic representation of local features and global structures.Experimental results show that the KNN-Transformer algorithm achieves a mean absolute error(MAE)of 0.017 0 and a coefficient of determination(R2)of 0.953 3 for density curve reconstruction.Compared to typical algorithms such as support vector regression(SVR),linear regression,and long short-term memory(LSTM),the value of MAE is reduced by 30%to 60%.The method demonstrates higher reconstruction accuracy for both the overall trend and local details of the density logging curve,along with better stability and correctness at lithological interfaces and in complex intervals.This approach effectively recovers missing sections,corrects distortions,and suppresses noise,significantly improving both the numerical accuracy and geological plausibility of the reconstructed curves.It provides a reliable technical pathway for high-quality logging data reconstruction under complex reservoir conditions.关键词
密度测井/K近邻/Transformer/曲线重构/深度学习/注意力机制/序列建模Key words
density logging/KNN(K-nearest neighbors)/Transformer/curve reconstruction/deep learning/attention mechanism/sequence modeling分类
天文与地球科学引用本文复制引用
苏俊磊,董旭,曾渝,史文祺,石雪莹,刘沛东,刘坤..基于KNN-Transformer算法的密度测井曲线重构方法[J].测井技术,2026,50(1):87-96,10.基金项目
国家自然科学基金青年基金项目"孔隙流体赋存状态对回注气高效动用页岩油的影响机理研究"(42204131) (42204131)
国家科技重大专项课题"煤岩气富集规律与地质工程甜点评价"(2025ZD1404202) (2025ZD1404202)
黑龙江省优秀青年基金项目"CO2-油-水耦合作用下的古龙页岩油动用规律研究"(YQ2023D004) (YQ2023D004)