Rapid shale formation lithologic section construction method based on handheld element analyzer

Through the neural network model optimized by using handheld element analyzer and sparrow search algorithm, the problems of lithologic profile recognition efficiency and accuracy in the existing technology are solved, and efficient and accurate construction of lithologic profiles of mud shale formations are achieved.

CN119943216AActive Publication Date: 2025-05-06CHINA UNIV OF GEOSCIENCES (WUHAN)
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202510049905.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-13
Publication Date
2025-05-06
Estimated Expiration
2045-01-13

AI Technical Summary

Technical Problem

The existing stratigraphic lithologic profile methods cannot take into account both identification efficiency and accuracy, and it is particularly difficult to analyze lithologic changes in shale.

Method used

Using a handheld element analyzer method, the data set is constructed for pre-processing by obtaining the element composition data of the core samples of each measurement point of the mud shale formation and combining the analysis results of the X-ray diffractometer. Then, a backpropagation neural network model optimized by the sparrow search algorithm is used to predict the element composition data of the target well, divide the lithology and establish the lithology profile.

Benefits of technology

It realizes efficient and accurate lithologic profile construction, which can solve complex lithologic problems, is easy to operate, is low cost, and has high prediction accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119943216A_ABST
    Figure CN119943216A_ABST
Patent Text Reader

Abstract

The invention provides a mud shale stratum lithologic section rapid construction method based on a handheld element analyzer, and relates to the field of oil-gas exploration, the method comprises the following steps: using the handheld element analyzer to obtain element composition data of rock core samples of all measuring points, and obtaining a scanning result; analyzing the total rock mineral composition of the preset low-proportion rock core sample by using an X-ray diffractometer to obtain an analysis result; constructing a data set through a scanning result and an analysis result, and performing preprocessing; constructing a back propagation neural network model based on a sparrow search algorithm, and training through the data set to obtain an SSA-BP model; obtaining element composition data of the target well; and predicting the element composition data of the target well by using the SSA-BP model to obtain mineral composition data of the target well, and establishing a lithologic section. According to the technical scheme, the time cost and experimental resource consumption required for measuring the mineral composition in a traditional laboratory are greatly reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of oil and gas exploration, and in particular to a method for quickly constructing a lithology profile of a shale formation based on a handheld element analyzer. Background Art

[0002] In the field of oil and gas exploration, lithology is not only a basic means to reveal the rock type of underground reservoirs, but also an important basis for evaluating the potential and distribution of oil and gas resources.

[0003] At present, the commonly used methods for lithology identification include geophysical methods and experimental test analysis methods: Geophysical methods mainly include well logging and seismic. Conventional well logging includes natural gamma logging, resistivity logging, sonic logging, density logging, etc. Well logging data contains rich stratigraphic lithology information, and the lithology type can be determined by the combined analysis of these curves. The identification of lithology by seismic methods is reflected in the differences in the physical properties of different minerals. Since the propagation laws of seismic waves in different rock formations are different, seismic inversion technology can be used to obtain information such as the velocity and density of the formation, and then determine the lithology of the formation. The shortcomings of this method are: ① Geophysical methods are easily affected by multiple 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 changes of shale. Compared with the lithology of interlayers of sandstone, mudstone, and carbonate rocks, the changes in shale lithology are very weak, and usually require further judgment with the help of geochemical parameters. Experimental testing and analysis usually uses X-ray diffractometers to directly obtain information about the mineral composition of rocks and provide direct evidence for lithology identification. However, experimental analysis and testing not only requires instrument support, but also requires the cooperation of multiple parties such as experimental consumables and technicians, which requires a lot of costs. In addition, establishing a lithology profile requires a large number of samples, and sometimes the number of cores available is far from enough. Summary of the invention

[0004] The purpose of the present invention is to provide a method for quickly constructing a shale stratum lithology profile based on a handheld element analyzer in order to solve the problem that the existing stratum lithology profile method cannot take into account both identification efficiency and accuracy.

[0005] The above-mentioned purpose of the present application is achieved through the following technical solutions: S1: Obtain core samples from each measuring point of the shale formation; S2: Use a handheld element analyzer to obtain the element composition data of the core samples at each measuring point and obtain the scanning results; S3: Use an X-ray diffractometer to analyze the whole-rock mineral composition of the core sample with a preset low ratio to obtain the analysis results; S4: Build and preprocess the data set by scanning and analyzing the results; S5: Construct a back propagation neural network model based on the sparrow search algorithm; S6: Train the back propagation neural network model using the preprocessed data set to obtain the SSA-BP model; S7: Obtain elemental composition data of the target well; predict the elemental composition data of the target well using the SSA-BP model to obtain the mineral composition data of the target well; classify lithology according to the mineral composition data and establish a lithology profile.

[0006] Optionally, step S1 includes: The location selection of the measuring points does not include obvious fracture areas and flat parts of the vein body.

[0007] Optionally, step S4 includes: The preprocessing is to perform minimum-maximum normalization on the data set, and the normalization formula is:

[0008] In the formula, , is the maximum and minimum value of each element content, is the element content of the target sample.

[0009] Optionally, step S5 includes: Determine the weights and thresholds of the pre-built back-propagation neural network model through the sparrow search algorithm; Calculate the fitness value of the sparrow group and sort them, and take individuals with fitness values ​​greater than the preset threshold as discoverers, individuals with fitness values ​​within the preset threshold range as followers, and individuals with fitness values ​​less than the preset threshold as sentinels; 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. The fitness value calculation formula is:

[0010] In the formula, is the i-th characteristic parameter, is the true value corresponding to the i-th feature parameter, Substitute the i-th characteristic parameter into the model to calculate the predicted value; n represents the total number of characteristic parameters; In each iteration, the finder's position update formula is:

[0011] In the formula, 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 Represents the warning value Below and above safety thresholds ; is a parameter that follows a normal distribution and is used to simulate the randomness of sparrows in the process of foraging; Represents a 1×d matrix, where all elements in the matrix are 1, used to compare with random numbers Perform mathematical operations to update the position of the sparrow, where d represents the dimension of the sparrow's position vector, i.e., the sparrow's degrees of freedom in multidimensional space; when When the environment is safe, the discoverer performs a search operation; when When , it means that it is in a dangerous environment. The discoverer escapes and alerts the followers, and the followers quickly fly to other safe places to search. The follower position update formula is:

[0012] In the formula, and Respectively represent that for the discoverer, The best position of the iteration The worst position of the iteration; represents a constant; Indicates Followers only have low fitness values ​​and need to move to the worst position to find better food sources; represents a positive number or a positive vector; The guard position update formula is:

[0013] In the formula, represents the current global optimal position, is the step size parameter, usually a random number that follows a normal distribution, used to control the distance the sentinel moves; , , They are the current sparrow’s fitness value, the current optimal fitness value, and the current worst fitness value; is a constant; when When , the sentinel realizes the danger and moves closer to the global optimal position.

[0014] Optionally, step S6 includes: In addition, the BP neural network uses the Tanh function as the activation function, and the function expression is:

[0015] In the formula, the value range of x is R, The value range of is [-1,1].

[0016] Optionally, step S6 further includes: The mean square error (MSE) is used as the loss function to judge the convergence of the model. The calculation formula is:

[0017] In the formula, is the i-th characteristic parameter, is the true value corresponding to the i-th feature parameter, Substitute the i-th characteristic parameter into the model to obtain the predicted value.

[0018] An electronic device comprises a processor, a memory, a user interface and a network interface, wherein 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 lithology profile of a shale formation based on a handheld element analyzer.

[0019] A computer-readable storage medium stores instructions. When the instructions are executed, a method for quickly constructing a lithology profile of a shale formation based on a handheld element analyzer is performed.

[0020] The beneficial effects of the technical solution provided by this application are: 1. The SSA-BP algorithm of this application combines the global optimization capability of the sparrow search algorithm (SSA) and the nonlinear mapping capability of the back propagation neural network (BP). It has the advantages of high prediction accuracy, strong global optimization capability, wide applicability, and good algorithm stability. It is particularly suitable for complex data regression prediction problems and can solve complex lithology problems that are difficult to handle with existing prediction technologies.

[0021] 2. The present invention proposes an efficient and economical technical solution, which is easy to operate and low in cost. The element content data of the measuring point obtained by using a handheld element analyzer has a good correlation with the mineral composition of the rock sample at the measuring point, and the neural network model can be used to accurately predict the mineral composition. This technology only needs to collect element information of the drilling core and a small amount of mineral composition data for training. By integrating the strict constraints of multiple parameters, the training model is optimized to obtain the prediction results and realize the accurate prediction of the mineral composition of the entire well section. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The present application will be further described below with reference to the accompanying drawings and embodiments, in which: Figure 1is a step diagram in an embodiment of the present application; Figure 2 is a first correlation analysis result diagram in an embodiment of the present application; Figure 3 is a second correlation analysis result diagram in an embodiment of the present application; Figure 4 is the lithology division map in the embodiment of the present application; Figure 5 is a lithology profile in the embodiment of the present application; Figure 6 It is a schematic diagram of the structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION

[0023] In order to have a clearer understanding of the technical features, purposes and effects of the present application, the specific implementation methods of the present application are now described in detail with reference to the accompanying drawings.

[0024] The embodiments of the present application provide a method for quickly constructing a lithology profile of a shale formation based on a handheld element analyzer.

[0025] Please refer to Figure 1 , Figure 1 This is a step diagram of a method for quickly constructing a lithology profile of a shale formation based on a handheld element analyzer in an embodiment of the present application, comprising: S1: Obtain core samples from each measuring point of the shale formation; S2: Use a handheld element analyzer to obtain the element composition data of the core samples at each measuring point and obtain the scanning results; S3: Use an X-ray diffractometer to analyze the whole-rock mineral composition of the core sample with a preset low ratio to obtain the analysis results; S4: Build and preprocess the data set by scanning and analyzing the results; S5: Construct a back propagation neural network model based on the sparrow search algorithm; S6: Train the back propagation neural network model using the preprocessed data set to obtain the SSA-BP model; S7: Obtain elemental composition data of the target well; predict the elemental composition data of the target well using the SSA-BP model to obtain the mineral composition data of the target well; classify lithology according to the mineral composition data and establish a lithology profile.

[0026] Step S1 includes: The location selection of the measuring points does not include obvious fracture areas and flat parts of the vein body.

[0027] According to the coring situation and research purpose, select appropriate measuring point location, measuring point density and detection time. The measuring point location should be selected to avoid obvious cracks and flat parts of the vein body. The measuring points are sparsely selected in the place where the lithology is continuous, and densely selected in the place where the lithology changes suddenly. Under normal circumstances, the measuring point density is about 4 / m, and the detection time of a single measuring point is generally set to 15 seconds.

[0028] As an embodiment, a handheld XRF element analyzer is used to test the elemental composition data of each measuring point, including three beams, each beam tests different elements, wherein 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. The test time of each beam is set to 5 seconds.

[0029] As an example, some measuring points are selected for sampling, and the sampling position is kept consistent with the measuring point position. In addition, the samples taken should include all lithological characteristics to ensure the accuracy of lithological prediction. The whole rock mineral composition of the sample is analyzed using an X-ray diffractometer, and the analysis results are matched one by one with the scanning results of the element analyzer at that location, and organized into an Excel table format that can be read by the neural network model.

[0030] Step S4 includes: The preprocessing is to perform minimum-maximum normalization on the data set, and the normalization formula is:

[0031] In the formula, , is the maximum and minimum value of each element content, is the element content of the target sample.

[0032] Step S5 includes: Determine the weights and thresholds of the pre-built back-propagation neural network model through the sparrow search algorithm; Calculate the fitness value of the sparrow group and sort them, and take individuals with fitness values ​​greater than the preset threshold as discoverers, individuals with fitness values ​​within the preset threshold range as followers, and individuals with fitness values ​​less than the preset threshold as sentinels; 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. The fitness value calculation formula is:

[0033] In the formula, is the i-th characteristic parameter, is the true value corresponding to the i-th feature parameter, Substitute the i-th characteristic parameter into the model to calculate the predicted value; n represents the total number of characteristic parameters; As an example, the finder has a higher fitness and can find food first, and the follower follows closely to forage. When the overall fitness is lower than the warning value or the algorithm falls into a local optimum, the sentinel can sound an alarm to trigger the position update of the sparrow population. After each position update, the fitness of the sparrow population will be re-evaluated to determine whether the current position is better. If the fitness improves, the current position is retained; if the fitness decreases, the position is updated again according to the warning mechanism.

[0034] In each iteration, the finder's position update formula is:

[0035] In the formula, 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 Represents the warning value Below and above safety thresholds ; is a parameter that follows a normal distribution and is used to simulate the randomness of sparrows in the process of foraging; Represents a 1×d matrix, where all elements in the matrix are 1, used to compare with random numbers Perform mathematical operations to update the position of the sparrow, where d represents the dimension of the sparrow's position vector, i.e., the sparrow's degrees of freedom in multidimensional space; when When the environment is safe, the discoverer performs a search operation; when When , it means that it is in a dangerous environment. The discoverer escapes and alerts the follower, and the follower quickly flies to other safe places to search. The follower position update formula is:

[0036] In the formula, and Respectively, for the discoverer, The best position of the iteration The worst position of the iteration; represents a constant; Indicates Followers only have low fitness values ​​and need to move to the worst position to find better food sources; represents a positive number or a positive vector; The guard position update formula is:

[0037] In the formula, represents the current global optimal position, is the step size parameter, usually a random number that follows a normal distribution, used to control the distance the sentinel moves; , , They are the current sparrow’s fitness value, the current optimal fitness value, and the current worst fitness value; is a constant; when When , the sentinel realizes the danger and moves closer to the global optimal position.

[0038] Step S6 includes: In addition, the BP neural network uses the Tanh function as the activation function, and the function expression is:

[0039] In the formula, the value range of x is R, The value range of is [-1,1].

[0040] Step S6 also includes: The mean square error (MSE) is used as the loss function to judge the convergence of the model. The calculation formula is:

[0041] In the formula, is the i-th characteristic parameter, is the true value corresponding to the i-th feature parameter, Substitute the i-th characteristic parameter into the model to obtain the predicted value.

[0042] In order to more clearly introduce the implementation method of constructing the lithology profile of the shale formation provided by the present invention, as well as the accuracy and reliability of the lithology identification of the shale formation, a specific application case is described below.

[0043] Establishment of the lithologic profile of the Wu2 Member of the Wujiaping Formation in the Permian Well HY1 in the Hongxing area of ​​the Sichuan Basin (1) On the principle of avoiding obvious cracks and veins, four measuring points of 1.3 m / m were selected at the lithology continuity point, and one more measuring point was added above and below the lithology mutation interface. The detection time of a single measuring point was set to 15 seconds.

[0044] (2) Use an element analyzer to test the element composition data of each measuring point and obtain the Si, Al, Ca, and Fe element content data.

[0045] (3) Select some measuring points for sampling, keep the sampling position consistent with the measuring point position, and ensure that the samples taken include all lithological characteristics. Use X-ray diffractometer to analyze the whole rock mineral composition of the sample, and correspond the analysis results with the scanning results of the element analyzer at that location one by one, and organize them into an Excel table format that can be read by the neural network model. The format of the data after organization is shown in Table 1.

[0046] (4) The correlation analysis was performed on each mineral component and the characteristic elements that constituted these minerals. The correlation coefficient calculation formula is:

[0047] In the formula, is the correlation coefficient, , They are , The average of 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 results of correlation analysis show that Si, Ca, Al, Fe have a certain correlation with the main mineral components of shale, quartz, feldspar, calcite, dolomite, clay minerals, and pyrite, and can be predicted using a neural network model.

[0048] Table 1 Dataset to be trained

[0049] (5) Perform minimum-maximum normalization on the element composition data. The normalization formula is:

[0050] In the formula, , is the maximum and minimum value of each element content, is the element content of the target sample.

[0051] (6) Use Matlab software to build a sparrow search algorithm optimized back propagation neural network (SSA-BP) as the training model. Substitute the processed data into the model and divide it into training set and test set in a ratio of 7:3.

[0052] The fitness value of the sparrow group is calculated and sorted, with individuals with high fitness as discoverers, individuals with medium fitness as followers, and individuals with poor fitness as guards. 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. The calculation formula is:

[0053] In the formula, is the i-th characteristic parameter, is the true value corresponding to the i-th feature parameter, The predicted value is obtained by bringing the i-th feature parameter into the model. In addition, the BP neural network uses the Tanh function as the activation function, and the function expression is:

[0054] In the formula, the value range of x is R, and the value range of tanh is [-1,1].

[0055] The discoverer has a higher fitness and can find food first, and the follower follows closely to forage. When the overall fitness is lower than the warning value or the algorithm falls into a local optimum, the sentinel can sound an alarm to trigger the position update of the sparrow population. After each position update, the fitness of the sparrow population will be re-evaluated to determine whether the current position is better. If the fitness improves, the current position is retained; if the fitness decreases, the position is updated again according to the warning mechanism.

[0056] In each iteration, the finder's position update formula is:

[0057] In the formula, 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 Represents that the warning value is lower than and higher than the safety threshold, respectively; is a random number that follows a normal distribution and is used to simulate the randomness of sparrows in the process of foraging; Represents a 1×d matrix where all elements are 1. Used with random numbers Perform mathematical operations to update the position of the sparrow. Where d represents the dimension of the sparrow's position vector, that is, the sparrow's degree of freedom in multidimensional space.

[0058] when When the environment is safe, the discoverer can perform extensive search operations; when When , it means that it is in a dangerous environment. The discoverer escapes and alerts the followers, and the followers quickly fly to other safe places to search. The follower position update formula is:

[0059] In the formula, and Respectively represent the first The best position of the iteration The worst position of the iteration, represents a random number or constant, which is used to introduce randomness and simulate the uncertainty of followers in the foraging process; Indicates that the fitness of the i-th follower is low and needs to move to the worst position to find a better food source. It is used to distinguish followers with lower fitness from followers with higher fitness. Represents a positive number or positive vector used to adjust the step size or direction of the follower's movement towards the optimal position.

[0060] The guard position update formula is:

[0061] In the formula, represents the current global optimal position, is the step size parameter, usually a random number that follows a normal distribution, used to control the distance the sentinel moves; , , They are the current sparrow’s fitness value, the current optimal fitness value, and the current worst fitness value; is a constant. When , the sentinel realizes the danger and moves closer to the global optimal position.

[0062] (7) Use mean square error (MSE) as the loss function to judge model convergence. The calculation formula is:

[0063] In the formula, is the i-th characteristic parameter, is the true value corresponding to the i-th feature parameter, Substitute the i-th characteristic parameter into the model to obtain the predicted value.

[0064] (8) Substitute the elemental composition data of the entire well section into the trained SSA-BP model to obtain the mineral composition data of the entire well section. Perform correlation analysis on the predicted mineral composition data and the measured mineral composition data, such as Figure 3The correlation coefficient between the measured value and the predicted value of siliceous mineral content is 0.98; the correlation coefficient between the measured value and the predicted value of clay mineral content is 0.95; the correlation coefficient between the measured value and the predicted value of carbonate mineral content is 0.96; the correlation coefficient between the measured value and the predicted value of pyrite content is 0.97. The correlation analysis results show that the present invention has excellent performance in predicting the mineral composition content of shale using the SSA-BP neural network model, indicating that the use of a handheld XRF element analyzer to predict the mineral composition of shale is scientific and effective.

[0065] (9) The predicted mineral composition data were divided into different lithologies using the shale lithology triangle diagram. The results are shown in Figure 4 The Permian Wujiaping Formation in the Hongxing area mainly develops siliceous shale and mixed shale, with a small amount of calcareous shale.

[0066] (10) Count the top depth, bottom depth and lithology name, organize them into Excel format, and import them into Resform to automatically create a lithology profile, such as Figure 5 .

[0067] The above experimental verification results show that the SSA-BP model prediction results of this application are highly consistent with the laboratory measured data, and can accurately quantify the mineral composition of shale, greatly saving the time cost and experimental resource consumption required for traditional laboratory determination of mineral composition.

[0068] The present application also discloses an electronic device. Figure 6 , Figure 6 The electronic device 500 includes: 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 .

[0069] The communication bus 502 is used to realize the connection and communication between these components.

[0070] The user interface 503 includes a display screen, and the optional user interface 503 also includes a standard wired interface and a wireless interface.

[0071] The network interface 504 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).

[0072] The present application also discloses a computer-readable storage medium storing a plurality of instructions suitable for loading by a processor to execute the above-mentioned method for quickly constructing a lithology profile of a shale formation based on a handheld element analyzer.

[0073] The above are only exemplary embodiments of the present disclosure and cannot be used to limit the scope of the present disclosure. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure.

[0074] This application is intended to cover any variation, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the art not described in the present disclosure. The description and examples are to be regarded as exemplary only, and the scope and spirit of the present disclosure are defined by the claims.

Claims

1. A method for quickly constructing a lithology profile of a shale formation based on a handheld element analyzer, characterized in that: The method comprises the following steps: S1: Obtain core samples from each measuring point of the shale formation; S2: Use a handheld element analyzer to obtain the element composition data of the core samples at each measuring point and obtain the scanning results; S3: Use an X-ray diffractometer to analyze the whole-rock mineral composition of the core sample with a preset low ratio to obtain the analysis results; S4: Build and preprocess the data set by scanning and analyzing the results; S5: Construct a back propagation neural network model based on the sparrow search algorithm; S6: Train the back propagation neural network model using the preprocessed data set to obtain the SSA-BP model; S7: Obtain element composition data of the target well; use the SSA-BP model to predict the element composition data of the target well to obtain the mineral composition data of the target well; Lithology is divided according to mineral composition data and lithology profiles are established.

2. A method for quickly constructing a lithology profile of a shale formation based on a handheld element analyzer according to claim 1, characterized in that: Step S1 includes: The location selection of the measuring points does not include obvious fracture areas and flat parts of the vein body.

3. The method for quickly constructing a lithology profile of a shale formation based on a handheld element analyzer according to claim 1, characterized in that: Step S4 includes: The preprocessing is to perform minimum-maximum normalization on the data set, and the normalization formula is: In the formula, , is the maximum and minimum value of each element content, is the element content of the target sample.

4. The method for quickly constructing a lithology profile of a shale formation based on a handheld element analyzer according to claim 1, characterized in that: Step S5 includes: Determine the weights and thresholds of the pre-built back-propagation neural network model through the sparrow search algorithm; Calculate the fitness value of the sparrow group and sort them. The individuals with fitness values ​​greater than the preset threshold are regarded as discoverers, the individuals with fitness values ​​within the preset threshold range are regarded as followers, and the individuals with fitness values ​​less than the preset threshold are regarded as sentinels. 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. The fitness value calculation formula is: In the formula, is the i-th characteristic parameter, is the true value corresponding to the i-th feature parameter, Substitute the i-th characteristic parameter into the model to calculate the predicted value; n represents the total number of characteristic parameters; In each iteration, the finder's position update formula is: In the formula, 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 Represents the warning value Below and above safety thresholds ; is a parameter that follows a normal distribution and is used to simulate the randomness of sparrows in the process of foraging; Represents a 1×d matrix, where all elements in the matrix are 1, used to compare with random numbers Perform mathematical operations to update the position of the sparrow, where d represents the dimension of the sparrow's position vector, i.e., the sparrow's degrees of freedom in multidimensional space; when When the environment is safe, the discoverer performs a search operation; when When , it means that it is in a dangerous environment. The discoverer escapes and alerts the follower, and the follower quickly flies to other safe places to search. The follower position update formula is: In the formula, and Respectively represent that for the discoverer, The best position of the iteration The worst position of the iteration; represents a constant; Indicates Followers only have low fitness values ​​and need to move to the worst position to find better food sources; represents a positive number or a positive vector; The guard position update formula is: In the formula, represents the current global optimal position, is the step size parameter, usually a random number that follows a normal distribution, used to control the distance the sentinel moves; , , They are the current sparrow’s fitness value, the current optimal fitness value, and the current worst fitness value; is a constant; when When , the sentinel realizes the danger and moves closer to the global optimal position.

5. The method for quickly constructing a lithology profile of a shale formation based on a handheld element analyzer according to claim 1, characterized in that: Step S6 includes: In addition, the BP neural network uses the Tanh function as the activation function, and the function expression is: In the formula, the value range of x is R, The value range of is [-1,1].

6. The method for quickly constructing a lithology profile of a shale formation based on a handheld element analyzer according to claim 1, characterized in that: Step S6 also includes: The mean square error (MSE) is used as the loss function to judge the convergence of the model. The calculation formula is: In the formula, is the i-th characteristic parameter, is the true value corresponding to the i-th feature parameter, Substitute the i-th characteristic parameter into the model to obtain the predicted value.

7. An electronic device, characterized in that: It includes 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 the method as described in 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 according to any one of claims 1 to 6 is executed.

Citation Information

Patent Citations

  • Method for analyzing x-ray fluorescence shale content in petroleum well drilling

    CN101354362A

  • Air target potential threat degree prediction method and system based on SSA-BP

    CN112801403A

  • Method for predicting drillability of limestone stratum based on element component multiple regression

    CN114626014A

  • XRF element quantitative analysis method based on SSA-BP neural network

    CN114839210A

  • X-ray diffraction mineral quantitative analysis reference intensity calculation method

    CN116952998A