Method for quickly constructing lithology profile of shale formation based on handheld elemental analyzer
By combining a handheld elemental analyzer with a sparrow search algorithm and a backpropagation neural network model, the problem of insufficient efficiency and accuracy in lithology identification in existing technologies has been solved, enabling efficient and economical construction of lithological profiles for mudstone and shale formations, which is particularly suitable for complex lithology identification.
Patent Information
- Application Number
- CN202510049905.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-13
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2045-01-13
AI Technical Summary
Existing stratigraphic lithology profiling methods cannot simultaneously achieve both identification efficiency and accuracy, especially when shale lithology changes are subtle and difficult to identify accurately. Furthermore, experimental analysis is costly and highly dependent on equipment.
Elemental composition data of mudstone and shale strata were obtained using a handheld elemental analyzer. By combining the sparrow search algorithm and the backpropagation neural network (SSA-BP) model, a backpropagation neural network model based on the sparrow search algorithm was constructed. Through data preprocessing and training, accurate prediction of mineral composition was achieved, and lithological profiles were established.
It enables the efficient and economical construction of lithological profiles for mudstone and shale formations, improves identification efficiency and accuracy, reduces costs, and is suitable for predicting complex lithology.
Smart Images

Figure CN119943216B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of oil and gas exploration, and particularly relates to a method for quickly constructing a lithology profile of a shale formation based on a handheld element analyzer. BACKGROUND
[0002] In the field of oil and gas exploration, lithology is not only a basic means for revealing the rock type of a subsurface reservoir, but also an important basis for evaluating the potential and distribution of oil and gas resources.
[0003] At present, in the aspect of lithology identification, commonly used methods include geophysical methods and experimental test analysis methods:
[0004] The geophysical methods mainly include well logging and seismic. The conventional well logging includes natural gamma ray logging, resistivity logging, acoustic logging, density logging, etc. The well logging data contain rich lithology information of the formation, and the lithology type can be determined through the combination analysis of these curves. The seismic method reflects the differences in the identification of lithology in terms of the physical properties of different minerals. Since the propagation law of seismic waves in different rock layers is different, the velocity, density and other information of the formation can be obtained through seismic inversion technology, and then the lithology of the formation can be determined. The disadvantages of this method are: ① the geophysical method is easily affected by many factors such as geological conditions, detection depth and instrument accuracy, which can easily lead to uncertainty in the interpretation results; ② it is difficult to analyze the lithology change of shale. Compared with the lithology of sandstone, mudstone and carbonate rock interbedded rock, the change of shale lithology is very weak, and usually needs to be further judged by using geochemical parameters.
[0005] Experimental test analysis usually uses an X-ray diffractometer for testing, which can directly obtain the mineral composition information of the rock and provide direct evidence for lithology identification. However, experimental analysis and testing not only need instrument equipment support, but also need the cooperation of many parties such as experimental consumables and technical personnel, and a large amount of cost. In addition, a large number of samples are needed to establish a lithology profile, and sometimes the amount of rock core available is far from enough. SUMMARY
[0006] The purpose of the present application is to solve the problem that the existing method for establishing a lithology profile of a formation cannot simultaneously consider identification efficiency and accuracy, and to provide a method for quickly constructing a lithology profile of a shale formation based on a handheld element analyzer.
[0007] The above purpose of the present application is achieved by the following technical solution:
[0008] S1: obtaining core samples of each measuring point of a shale formation;
[0009] S2: using a handheld element analyzer to obtain the element composition data of the core samples of each measuring point, and obtaining a scanning result;
[0010] S3: analyze the whole-rock mineral composition of the preset low proportion of core samples using an X-ray diffractometer to obtain an analysis result;
[0011] S4: construct a data set and perform preprocessing through the scanning result and the analysis result;
[0012] S5: construct a back propagation neural network model based on a sparrow search algorithm;
[0013] S6: train the back propagation neural network model through the preprocessed data set to obtain an SSA-BP model;
[0014] S7: obtain element composition data of a target well; predict the element composition data of the target well using the SSA-BP model to obtain mineral composition data of the target well; and divide the lithology according to the mineral composition data and establish a lithology profile.
[0015] Optionally, step S1 comprises:
[0016] The position of the measuring point does not include an obvious crack area and a flat part of a vein.
[0017] Optionally, step S4 comprises:
[0018] The preprocessing is minimum-maximum standardization processing of the data set, and the standardization formula is:
[0019] In the formula, , is the maximum and minimum of the element content, is the element content of the target sample.
[0020] Optionally, step S5 comprises:
[0021] The weight and threshold of the pre-constructed back propagation neural network model are determined through the sparrow search algorithm;
[0022] The fitness value of the sparrow population is calculated and sorted, and the individual with a fitness value greater than a preset threshold is regarded as a discoverer, the individual with a fitness value in the preset threshold interval is regarded as a follower, and the individual with a fitness value less than the preset threshold is regarded as a guard;
[0023] The fitness value is realized through the root mean square error between the predicted value and the actual value obtained through BP neural network training, and the fitness value calculation formula is:
[0024]
[0025] In the formula, is the i-th feature parameter, is the true value of the ith feature parameter, is the predicted value of the ith feature parameter calculated by the model with the ith feature parameter as input; n represents the total number of feature parameters;
[0026] In each iteration process, the position update formula of the discoverer is:
[0027]
[0028] wherein, and represent the current iteration number and the next iteration number respectively, represents the position of the sparrow, represents the maximum number of iterations, and respectively represent the pre-warning value lower than and higher than the safety threshold ; is a parameter subject to normal distribution, used to simulate the randomness of the sparrow in the foraging process; represents a 1×d matrix, wherein each element in the matrix is 1, used for mathematical operation with random number to update the position of the sparrow, and d represents the dimension of the sparrow position vector, i.e. the degree of freedom of the sparrow in the multi-dimensional space;
[0029] When , it means that the environment is safe at this time, and the discoverer performs a search operation; when , it means that the environment is dangerous at this time, and the discoverer escapes and sends an alarm to the follower, who quickly flies to other safe places to perform a search operation; the position update formula of the follower is:
[0030]
[0031] wherein, and respectively represent the best position of the discoverer in the th iteration and the worst position of the discoverer in the th iteration; represents a constant; represents the th follower fitness value is low, and needs to move to the worst position to find a better food source; represents a positive number or a positive vector;
[0032] The position update formula of the guard is:
[0033]
[0034] wherein, represents the current global optimal position, is a step parameter, usually a random number subject to normal distribution, used to control the distance of the sentry movement; 、 、 are the fitness value of the current sparrow, the current optimal fitness value and the current worst fitness value, respectively; is a constant; when , the sentry realizes the danger and approaches the global optimal position.
[0035] Optionally, step S6 comprises:
[0036] In addition, the BP neural network uses a Tanh function as an activation function, and the function expression is:
[0037]
[0038] In the formula, the value range of x is R, and the value range of is [-1, 1].
[0039] Optionally, step S6 further comprises:
[0040] The mean square error (MSE) is used as a loss function to judge the convergence of the model, and the calculation formula is:
[0041]
[0042] In the formula, is the i th feature parameter, is the true value corresponding to the i th feature parameter, is the predicted value obtained by inputting the i th feature parameter into the model.
[0043] An electronic device comprises a processor, a memory, a user interface and a network interface, the memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory, so that the electronic device executes a method for quickly constructing a shale formation lithology profile based on a handheld element analyzer.
[0044] A computer readable storage medium stores instructions, when the instructions are executed, a method for quickly constructing a shale formation lithology profile based on a handheld element analyzer is executed.
[0045] The technical scheme provided by the application has the beneficial effects that:
[0046] 1.The SSA-BP algorithm of the application combines the global optimization ability of sparrow search algorithm (SSA) and the nonlinear mapping ability of back propagation neural network (BP), has the advantages of high prediction accuracy, strong global optimization ability, wide applicability, good algorithm stability, etc., is especially suitable for complex data regression prediction problems, and can solve the complex lithology problems that the existing prediction technology cannot handle.
[0047] 2.The application provides an efficient and economical technical solution, which is simple to operate and low in cost.The element content data of the measurement point obtained by using the handheld element analyzer has a good correlation with the mineral composition of the rock sample at the measurement point, and the neural network model can realize accurate prediction of the mineral composition.The technology only needs to collect element information and a small amount of mineral composition data of the drilling core for training, optimizes the training model by strictly constraining a plurality of parameters, thereby obtaining a prediction result, and realizes accurate prediction of the mineral composition of the whole well section. BRIEF DESCRIPTION OF DRAWINGS
[0048] The application will be further described below with reference to the drawings and examples, and the drawings are as follows:
[0049] Figure 1 is a step diagram in the embodiment of the application;
[0050] Figure 2 is a first correlation analysis result diagram in the embodiment of the application;
[0051] Figure 3 is a second correlation analysis result diagram in the embodiment of the application;
[0052] Figure 4 is a lithology division diagram in the embodiment of the application;
[0053] Figure 5 is a lithology profile diagram in the embodiment of the application;
[0054] Figure 6 is an electronic device structure schematic diagram in the embodiment of the application. DETAILED DESCRIPTION
[0055] In order to have a clearer understanding of the technical features, objects and effects of the application, the specific implementation modes of the application will be described in detail with reference to the drawings.
[0056] The embodiment of the application provides a shale formation lithology profile rapid construction method based on a handheld element analyzer.
[0057] Please refer to Figure 1 , Figure 1 is a step diagram of a shale formation lithology profile rapid construction method based on a handheld element analyzer in the embodiment of the application, comprising:
[0058] S1: Obtain core samples of each measuring point in a shale formation;
[0059] S2: Obtain element composition data of the core samples of each measuring point using a handheld element analyzer to obtain a scanning result;
[0060] S3: Analyze the whole-rock mineral composition of a preset low proportion of core samples using an X-ray diffractometer to obtain an analysis result;
[0061] S4: Construct a data set and perform preprocessing through the scanning result and the analysis result;
[0062] S5: Construct a back propagation neural network model based on a sparrow search algorithm;
[0063] S6: Train the back propagation neural network model through the preprocessed data set to obtain an SSA-BP model;
[0064] S7: Obtain element composition data of a target well; predict the element composition data of the target well using the SSA-BP model to obtain mineral composition data of the target well; divide the lithology according to the mineral composition data, and establish a lithology profile.
[0065] Step S1 includes:
[0066] The positions of the measuring points do not include obvious crack areas and flat parts of veins.
[0067] Select appropriate measuring point positions, measuring point densities, and detection times according to coring conditions and research purposes. The measuring point positions should be selected to avoid obvious cracks and flat parts of veins. The measuring points should be sparsely selected at lithology continuous places and densely selected at lithology mutation places. Generally, the measuring point density is about 4 / m, and the detection time of a single measuring point is generally set to 15 seconds.
[0068] As an embodiment, a handheld XRF element analyzer is used to test the element composition data of each measuring point, including three beams, each of which tests different elements. Among them, beam 1 (40kV): Ti, V, Cr, Mn, Fe, Co, Ni, Cu, Zn, As, Se, Rb, Sr, Y, Zr, Nb, Mo, Ag, Cd, Sn, Sb, B, W, Au, Hg, Pb, Bi, Th, U; beam 2 (10kV): Mg, Al, Si, P, S, Cl, Ca, Ti, Mn; beam 3 (50kV): Ag, Cd, Sn, Sb, Ba, La, Ce, Pr, Nd. Each beam is set to test for 5 seconds.
[0069] As an embodiment, partial measuring points are selected for sampling, and the sampling position is kept consistent with the measuring point position. In addition, the sampled sample should include all lithological characteristics to ensure the accuracy of lithological prediction. The whole rock mineral composition of the sampled sample is analyzed by using an X-ray diffractometer, and the analysis result is corresponded to the scanning result of the element analyzer one by one, and is arranged into an excel table format readable by the neural network model.
[0070] Step S4 comprises:
[0071] The preprocessing is a minimum-maximum standardization processing on the data set, and the standardization formula is:
[0072] In the formula, , is the maximum and minimum value of the content of each element, is the element content of the target sample.
[0073] Step S5 comprises:
[0074] The weight and threshold of the pre-constructed back propagation neural network model are determined by the sparrow search algorithm;
[0075] The fitness value of the sparrow population is calculated and sorted, and the individual with a fitness value greater than a preset threshold is regarded as a discoverer, the individual with a fitness value in the preset threshold interval is regarded as a follower, and the individual with a fitness value less than the preset threshold is regarded as a sentry;
[0076] The fitness value is realized by the root mean square error between the predicted value and the actual value obtained by BP neural network training, and the fitness value calculation formula is:
[0077]
[0078] In the formula, is the i th characteristic parameter, is the true value corresponding to the i th characteristic parameter, is the predicted value obtained by inputting the i th characteristic parameter into the model; n represents the total number of characteristic parameters;
[0079] As an embodiment, the discoverer has a higher fitness value, can preferentially discover food, and the follower follows to forage. When the overall fitness value is lower than the warning value or the algorithm falls into local optimization, the sentry can issue an alarm to trigger the position update of the sparrow population. After each position update, the fitness of the sparrow population is re-evaluated to determine whether the current position is better. If the fitness is improved, the current position is kept; if the fitness is reduced, the position is updated again according to the warning mechanism.
[0080] In each iteration process, the position update formula of the discoverer is:
[0081]
[0082] wherein, and represent the current iteration number and the next iteration number, respectively, represents the position of the sparrow, denotes the maximum iteration number, and represent the pre-alarm values lower and higher than the safety threshold , respectively; is a parameter subject to normal distribution, used to simulate the randomness of the sparrow in the foraging process; denotes a 1xd matrix, wherein each element in the matrix is 1, used for mathematical operation with the random number to update the position of the sparrow, and d represents the dimension of the sparrow position vector, i.e. the degree of freedom of the sparrow in the multi-dimensional space;
[0083] When , it means that the environment is safe at this time, and the discoverer performs the search operation; when , it means that the environment is dangerous at this time, and the discoverer escapes and sends an alarm to the follower, who quickly flies to other safe places to perform the search operation; the position update formula of the follower is:
[0084]
[0085] wherein, and represent the best position of the discoverer in the th iteration and the worst position of the discoverer in the th iteration, respectively; denotes a constant; denotes the th follower fitness value is low, and needs to move to the worst position to find a better food source; denotes a positive number or a positive vector;
[0086] The position update formula of the sentry is:
[0087]
[0088] wherein, denotes the current global optimal position, is a step parameter, usually a random number subject to normal distribution, used to control the moving distance of the sentry; , , The current sparrow fitness value, the current optimal fitness value, and the current worst fitness value, respectively; is a constant; when The guard realizes the danger and approaches the global optimal position.
[0089] Step S6 includes:
[0090] In addition, the BP neural network uses a Tanh function as an activation function, and the function expression is:
[0091]
[0092] In the formula, the value range of x is R, The value range of is [-1, 1].
[0093] Step S6 also includes:
[0094] The mean square error (MSE) is used as a loss function to judge the convergence of the model, and the calculation formula is:
[0095]
[0096] In the formula, is the i-th characteristic parameter, is the true value corresponding to the i-th characteristic parameter, is the predicted value obtained by inputting the i-th characteristic parameter into the model.
[0097] In order to more clearly introduce the embodiments of the mud shale formation lithology profile construction provided by the present application, and the accuracy and reliability of mud shale formation lithology identification, a specific application case is described below.
[0098] Lithology profile establishment of Wujiaping Formation Wu 2 Member of Permian in Well HY1 of Hongxing area, Sichuan Basin
[0099] (1) Under the principle of avoiding obvious fractures and veins, 4 / m measuring points are selected at the lithology continuity, and one measuring point is added above and below the lithology mutation interface, respectively. The detection time of a single measuring point is set to 15 seconds.
[0100] (2) The element analyzer is used to test the element composition data of each measuring point to obtain the Si, Al, Ca and Fe element content data.
[0101] (3) Some measuring points are selected for sampling, the sampling position is kept consistent with the measuring point position, and the sampled sample is ensured to include all lithology characteristics. The X-ray diffractometer is used to analyze the whole rock mineral composition of the sampled sample, and the analysis results are one-to-one corresponding to the scanning results of the element analyzer, and are arranged into an excel table format readable by the neural network model. The format of the data after arrangement is shown in Table 1.
[0102] (4) Correlation analysis was performed on each mineral component and characteristic elements composing these minerals, and the correlation coefficient calculation formula was:
[0103]
[0104] In the formula, is the correlation coefficient, , is the average value of , . For example, Figure 2 , the correlation coefficient between Si content and siliceous mineral content is 0.76; the correlation coefficient between Ca content and carbonate mineral content is 0.66; the correlation coefficient between Al content and clay mineral content is 0.73; the correlation coefficient between Fe content and pyrite content is 0.69. The correlation analysis results show that Si, Ca, Al, Fe and the main mineral components in shale, such as quartz, feldspar, calcite, dolomite, clay mineral and pyrite, have a certain correlation, and can be predicted using a neural network model.
[0105] Table 1 Training data set
[0106]
[0107] (5) The element composition data was processed by minimum-maximum standardization, and the standardization formula was:
[0108]
[0109] In the formula, , is the maximum and minimum value of the element content, is the element content of the target sample.
[0110] (6) The sparrow search algorithm optimized back propagation neural network (SSA-BP) was built using Matlab software as the training model, the processed data was substituted into the model, and the data was divided into training set and test set according to the ratio of 7:3.
[0111] The fitness value of sparrow population was calculated and sorted, and the individuals with high fitness value were used as discoverers, the individuals with medium fitness value were used as followers, and the individuals with low fitness value were used as sentinels. The fitness value was realized by the root mean square error between the predicted value and the actual value obtained by BP neural network training, and the calculation formula was:
[0112]
[0113] In the formula, is the i-th characteristic parameter, is the true value corresponding to the i-th characteristic parameter, The predicted value is calculated by putting the ith feature parameter into the model. In addition, the BP neural network uses the Tanh function as the activation function, and the function expression is:
[0114]
[0115] where the value range of x is R, and the value range of tanh is [-1, 1].
[0116] The discoverer has a higher fitness and can discover food first, and the follower follows and forages. When the overall fitness is lower than the warning value or the algorithm falls into local optimum, the sentry can send an alarm to trigger the position update of the sparrow population. After each position update, the fitness of the sparrow population is re-evaluated to determine whether the current position is better. If the fitness is improved, the current position is retained; if the fitness is reduced, the position is updated again according to the warning mechanism.
[0117] In each iteration process, the position update formula of the discoverer is:
[0118]
[0119] where, and represent the current iteration number and the next iteration number, respectively, represents the position of the sparrow, denotes the maximum number of iterations, and represent the warning value lower and higher than the safety threshold, respectively; is a random number subject to normal distribution, used to simulate the randomness of the sparrow in the foraging process; represents a 1×d matrix, where all elements in the matrix are 1. It is used for mathematical operation with the random number to update the position of the sparrow. Where d represents the dimension of the sparrow position vector, i.e. the degree of freedom of the sparrow in the multi-dimensional space.
[0120] When , the discoverer can perform extensive search operations in a safe environment; when , it means that the discoverer escapes and sends an alarm to the follower in a dangerous environment, and the follower quickly flies to other safe places for search operations. The position update formula of the follower is:
[0121]
[0122] where, and represent the optimal position of the discoverer for the th iteration and the optimal position of the follower for the th iteration, respectively. worst position of the sub iteration, represents a random number or constant, used to introduce randomness, simulate the uncertainty of the follower in the foraging process; represents the lower fitness of the i-th follower, which needs to move to the worst position to find better food sources, and is used to distinguish between followers with lower fitness and followers with higher fitness; represents a positive number or positive vector, used to adjust the step size or direction of the follower moving to the optimal position.
[0123] The guard position update formula is:
[0124]
[0125] In the formula, represents the current global optimal position, is a step size parameter, usually a random number obeying normal distribution, used to control the distance of the guard moving; , , are the fitness value of the current sparrow, the current optimal fitness value and the current worst fitness value, respectively; is a constant. When , the guard realizes the danger and approaches the global optimal position.
[0126] (7) Use mean square error MSE as the loss function to judge the convergence of the model, and the calculation formula is:
[0127]
[0128] In the formula, is the i-th characteristic parameter, is the true value corresponding to the i-th characteristic parameter, is the predicted value obtained by inputting the i-th characteristic parameter into the model.
[0129] (8) Substitute the element composition data of the whole well section into the trained SSA-BP model to obtain the mineral composition data of the whole well section. Correlation analysis is performed on the predicted mineral composition data and the measured mineral composition data, such as Figure 3 The correlation coefficient between the measured value and the predicted value of the content of siliceous minerals is 0.98; the correlation coefficient between the measured value and the predicted value of the content of clay minerals is 0.95; the correlation coefficient between the measured value and the predicted value of the content of carbonate minerals is 0.96; and the correlation coefficient between the measured value and the predicted value of the content of pyrite is 0.97. The correlation analysis results show that the SSA-BP neural network model used in the present application has excellent performance in predicting the mineral composition content of shale, indicating that using a handheld XRF element analyzer to predict the mineral composition of shale is scientific and effective.
[0130] (9) Using shale lithology division triangle to divide the predicted mineral composition data, the result is shown in Figure 4 The Permian Wujiaping Formation in Hongxing area mainly develops siliceous shale and mixed shale, and a small amount of calcareous shale.
[0131] (10) Statistics of top depth, bottom depth and lithology name, and arrangement into excel table format, import into Resform to automatically establish lithology profile, such as Figure 5 .
[0132] The above experimental verification results show that the SSA-BP model of the present application is highly consistent with the laboratory measured data, can accurately quantify the mineral composition of shale, and greatly saves the time cost and experimental resource consumption required by the traditional laboratory determination of mineral composition.
[0133] The present application also discloses an electronic device. Referring to Figure 6 , Figure 6 is a structural schematic diagram of an electronic device disclosed by the present application. The electronic device 500 comprises at least one processor 501, at least one network interface 504, a user interface 503, a memory 505, and at least one communication bus 502.
[0134] The communication bus 502 is used to realize the connection and communication between the components.
[0135] The user interface 503 comprises a display screen, and the optional user interface 503 further comprises a standard wired interface and a wireless interface.
[0136] The network interface 504 optionally comprises a standard wired interface and a wireless interface (such as a WI-FI interface).
[0137] The present application also discloses a computer readable storage medium, which stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the above-mentioned shale lithology profile rapid construction method based on a handheld element analyzer.
[0138] The above are only exemplary embodiments of the present disclosure, and cannot limit the scope of the present disclosure. That is, any equivalent changes and modifications made in accordance with the teachings of the present disclosure are still within the scope of the present disclosure.
[0139] The present application is intended to cover any variations, uses, or adaptive changes of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or conventional technical means in the technical field not recorded in the present disclosure. The scope and spirit of the present disclosure are defined by the claims. The specification and examples are only considered as exemplary, and the scope and spirit of the present disclosure are defined by the claims.
Claims
1. A method for rapid construction of shale formation lithology profile based on handheld elemental analyzer, characterized in that, The method comprises the following steps: S1: obtaining core samples of each measuring point of a shale formation; S2: obtaining element composition data of the core samples of each measuring point using a handheld element analyzer to obtain a scanning result; S3: analyzing the whole-rock mineral composition of a preset low proportion of core samples using an X-ray diffractometer to obtain an analysis result; S4: constructing a data set and performing preprocessing through the scanning result and the analysis result; S5: constructing a back propagation neural network model based on a sparrow search algorithm; S6: training the back propagation neural network model through the preprocessed data set to obtain an SSA-BP model; S7: obtaining element composition data of a target well; predicting the element composition data of the target well using the SSA-BP model to obtain mineral composition data of the target well; dividing lithology according to the mineral composition data and establishing a lithology profile.
2. A method for building a shale formation lithology profile rapidly based on a hand-held elemental analyzer according to claim 1, characterized in that, Step S1 comprises: The positions of the measuring points do not include obvious crack areas and flat parts of veins.
3. A method for building a shale formation lithology profile rapidly based on a hand-held elemental analyzer as claimed in claim 1, characterized in that, Step S4 comprises: The preprocessing is minimum-maximum standardization processing of the data set, and the standardization formula is: wherein, , is the maximum and minimum value of the elemental content of each element, is the elemental content of the target sample.
4. The method for rapidly constructing a lithologic profile of a shale formation based on a handheld element analyzer according to claim 1, wherein: Step S5 comprises: The weights and thresholds of the pre-constructed back propagation neural network model are determined through the sparrow search algorithm; The fitness values of the sparrow groups are calculated and sorted, and individuals with fitness values greater than a preset threshold are regarded as discoverers, individuals with fitness values in a preset threshold interval are regarded as followers, and individuals with fitness values less than the preset threshold are regarded as sentries; The fitness value is realized by the root mean square error between the predicted value and the actual value obtained through BP neural network training, and the fitness value calculation formula is: In the formula, is the i-th feature parameter, is the true value corresponding to the i-th feature parameter, is the predicted value calculated by the model with the i-th feature parameter; n represents the total number of feature parameters. In each iteration process, the position updating formula of the discoverer is: wherein, and represent the current and next iteration number, respectively, represents the position of the sparrow, represents the maximum number of iterations, and represent the pre-alarm values below and above the safety threshold , respectively; is a parameter subject to a normal distribution, used to simulate the randomness of the sparrow in the foraging process; represents a 1 x d matrix, where each element in the matrix is 1, used to perform mathematical operations with the random number to update the position of the sparrow, d represents the dimension of the sparrow position vector, i.e. the degree of freedom of the sparrow in the multi-dimensional space. When , the discoverer performs the search operation at this time; when , it indicates that the environment is dangerous at this time, the discoverer escapes and sends an alarm to the follower, and the follower quickly flies to other safe places to perform the search operation; the follower position update formula is: wherein and denote the best position for the finder and the worst position for the second iteration, respectively; second iteration, respectively; denotes a constant; denotes the worst position for the finder; the follower has a lower fitness value and needs to move towards the worst position to find a better food source; denotes a positive number or positive vector; The position updating formula of the sentry is: In the formula, represents the current global optimal position, is a step parameter, usually a random number subject to normal distribution, used to control the distance of the alarm's movement; , , are the fitness value of the current sparrow, the current optimal fitness value, and the current worst fitness value, respectively; is a constant; when , the alarm realizes the danger and approaches the global optimal position.
5. A method for building a shale formation lithology profile rapidly based on a hand-held elemental analyzer as claimed in claim 1, characterized in that, Step S6 comprises: In addition, the BP neural network adopts a Tanh function as an activation function, and the function expression is: In the formula, the value range of x is R, the value range of x is [-1, 1].
6. A method for building a shale formation lithology profile rapidly based on a hand-held elemental analyzer as claimed in claim 1, characterized in that, Step S6 further comprises: The mean square error MSE is used as a loss function to judge model convergence, and the calculation formula is: In the formula, is the i-th feature parameter, is the real value corresponding to the i-th feature parameter, is the predicted value calculated by the model with the i-th feature parameter.
7. An electronic device, comprising: The electronic device comprises a processor, a memory, a user interface, and a network interface, the memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory to enable the electronic device to perform the method of any one of claims 1-6.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions, and when the instructions are executed by a computer, the method of any one of claims 1-6 is performed.
Citation Information
Patent Citations
Method for analyzing x-ray fluorescence shale content in petroleum well drilling
CN101354362A
Method for predicting drillability of limestone stratum based on element component multiple regression
CN114626014A