A terrain processing method, device, equipment and medium based on genetic algorithm
By using a terrain processing method based on genetic algorithms and dynamically adjusting the inversion parameters, the problems of inaccurate inversion results and low computational efficiency are solved, and a more efficient Moho depth inversion is achieved.
Patent Information
- Application Number
- CN202411093649.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-09
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2044-08-09
AI Technical Summary
When inverting the Moho depth, existing technologies use fixed inversion parameters, resulting in inaccurate results. This ignores the complexity and variability of underground geological conditions, leads to low computational efficiency, and makes it difficult to process large-scale data sets.
A terrain processing method based on genetic algorithm is adopted. By initializing the inversion parameter population, fitness evaluation and genetic operation are performed, the inversion parameters are dynamically adjusted, the calculation process is optimized, and the degree of automation is improved.
The accuracy of the inversion results and the computational efficiency have been improved, which can better reflect the complexity of underground geological conditions and is suitable for terrain structure research and resource exploration.
Smart Images

Figure CN119622169B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a terrain processing method, device, equipment and medium based on genetic algorithm. Background Art
[0002] With the deepening of Earth science research and the development of resource exploration technology, the precise inversion of Earth's crustal structure, particularly the depth of the Moho discontinuity, has become a core requirement in geology and geophysics. As the interface between the crust and mantle, accurate determination of the depth of the Moho is crucial for understanding Earth's internal structure, the mechanisms of plate tectonics, and mineral resource exploration.
[0003] In interface inversion technology, the Parker-Oldenburg method is highly favored due to its efficient computational performance based on the Fast Fourier Transform (FFT), becoming one of the classic methods in this field. This method inverts the shape and depth of the interface by utilizing ground-observed gravity anomaly data combined with an assumption about the density distribution of the underground medium. However, existing technical solutions, when applying the Parker-Oldenburg method, generally treat inversion parameters (such as density difference and depth) as fixed constants. This simplified treatment ignores the complexity and variability of underground geological conditions.
[0004] The relationship between density differences and depth in underground media is not a simple linear relationship, but is influenced by a combination of geological factors, including lithology, structure, and magmatic activity. Therefore, fixing inversion parameters will result in inversion results that fail to accurately reflect the actual underground conditions, thereby reducing the accuracy and reliability of the inversion results.
[0005] Furthermore, existing solutions face numerous challenges in terms of computational efficiency and automation. As the volume of exploration data continues to grow, the overall computational workload significantly increases, and the demand for computing resources also increases accordingly. Furthermore, due to the lack of a unified execution framework and efficient algorithm optimization, existing solutions are often inefficient when processing large datasets, making them difficult to meet the needs of practical applications. Summary of the Invention
[0006] The present invention aims to at least partially address the limitations of the related art. To this end, the present invention provides a terrain processing method, apparatus, device and medium based on a genetic algorithm, which can efficiently and accurately process terrain.
[0007] In one aspect, an embodiment of the present invention provides a terrain processing method based on a genetic algorithm, comprising:
[0008] Initialize the inversion parameters of the target number, obtain the first population based on the initialization of the inversion parameters; and use the first population as the target population;
[0009] Among them, the inversion parameters correspond to individuals in the target population; the inversion parameters include density difference and average seabed depth;
[0010] Based on the inversion parameters corresponding to each individual in the target population, the inversion operation and fitness evaluation of the target area are performed to obtain the root mean square value corresponding to each individual in the target population;
[0011] The root mean square value represents the adaptability of the inversion parameters corresponding to the individual to participate in the inversion operation of the target area; the result of the inversion operation is the terrain data of the target area;
[0012] When there is a root mean square value in the target population that meets the preset threshold condition, the individual corresponding to the root mean square value is output as the adapted individual; otherwise,
[0013] Perform genetic operations on the target population based on a preset genetic algorithm to obtain a second population; use the second population as the target population and increase the number of population iterations by 1;
[0014] Return to the step of performing the inversion operation and fitness evaluation of the target area based on the inversion parameters corresponding to each individual in the target population until a suitable individual is output, or the number of population iterations reaches the preset maximum number of population iterations;
[0015] The terrain data obtained by the inversion operation of the inversion parameters corresponding to the adaptation individual is used as the terrain processing result of the target area.
[0016] Optionally, initializing a target number of inversion parameters includes the following steps:
[0017] In response to a first input instruction of the target object, a center point is obtained, a first value is assigned to the center point by a first random number, and a second number of inversion parameters are randomly generated near the center point; and a second value is assigned to the center point by multiplying the first random number by a difference between the first interval and the interval range, and a third number of inversion parameters are randomly generated near the center point;
[0018] Wherein, the first random number represents a random number of a normal distribution with a mean of 0 and a standard deviation of 1; the first random number is updated before each generation of the inversion parameter; the first interval represents the value range of the inversion parameter; the sum of the second number and the third number is equal to the target number;
[0019] Alternatively, based on a second random number, a target number of inversion parameters are randomly generated within the first interval; the second random number represents a random value within the second interval;
[0020] Alternatively, a target number of inversion parameters is obtained in response to a second input instruction of the target object.
[0021] Optionally, performing an inversion operation and fitness evaluation on the target region based on the inversion parameters corresponding to each individual in the target population to obtain a root mean square value corresponding to each individual in the target population includes the following steps:
[0022] Based on the inversion parameters corresponding to the individuals in the target population, the terrain data of the target area corresponding to each individual is obtained by processing with the Parker-Oldenburg inversion method;
[0023] Obtain the seismic depth matrix of the target area;
[0024] Traverse the first data values of all location points of the terrain data corresponding to the individual, and collect the second data value of the corresponding location point from the seismic depth matrix; obtain the third data value of the corresponding location point based on the square of the difference between the first data value and the second data value; perform square root processing based on the average value of the third data values of all location points to obtain the root mean square value corresponding to the corresponding individual.
[0025] Optionally, performing a genetic operation on the target population based on a preset genetic algorithm to obtain a second population includes at least one of the following steps:
[0026] Based on the excellence of each individual in the target population, a target number of individuals are selected from the target population using a first probability rule combined with a first probability threshold to obtain a second population; wherein the excellence is determined based on the inverse of the root mean square value;
[0027] Perform a crossover operation on a random pair of individuals in the target population using the second probability rule to obtain a second population;
[0028] The second population is obtained by performing mutation operation on random individuals in the target population through the second probability rule.
[0029] Optionally, based on the excellence of each individual in the target population, a target number of individuals are selected from the target population by combining a first probability rule with a first probability threshold to obtain a second population, comprising the following steps:
[0030] The reciprocal of the root mean square value is used as the excellence level of each individual in the target population;
[0031] Normalize all excellence levels to obtain the normalized excellence value corresponding to each individual;
[0032] Initialize the identification number to 0 and initialize the excellent array to empty;
[0033] The first individual of the target population is used as the data individual, and the excellent value corresponding to the data individual is used as the output value;
[0034] The output value is used as the array element of the position corresponding to the identification number in the excellent array; the identification number is increased by 1; the next individual after the data individual in the target population is used as the data individual;
[0035] Accumulate the excellent values corresponding to the data individuals to the output value, return to the step of using the output value as the array element of the position corresponding to the identification number in the excellent array, until the identification number equals the total number of all individuals in the target population, and output the excellent array;
[0036] generating a random value within a third interval as a first probability threshold;
[0037] Sequentially traverse the excellent array and obtain the first array element that is greater than the first probability threshold as the target element;
[0038] According to the element number corresponding to the target element, the corresponding individuals are selected from the target population and sorted into the second population;
[0039] Return to the step of generating a random value within the third interval as the first probability threshold, until a target number of individuals are selected from the target population to obtain a second population.
[0040] Optionally, performing a crossover operation on a random pair of individuals in the target population using a second probability rule to obtain a second population includes the following steps:
[0041] Based on all RMS values corresponding to the target population, the minimum RMS value is obtained as the target RMS value;
[0042] The ratio of the target RMS value to the preset iterative optimal threshold is rounded up, and the result of the rounding up operation multiplied by the target number is used as the number of crossovers;
[0043] Randomly obtain two different individuals from the target population as crossover individuals; the crossover individuals include the first individual and the second individual;
[0044] generating a random value within a fourth interval as a second probability threshold;
[0045] When the second probability threshold is less than the preset crossover operator probability, weighted crossover is performed on the inversion parameters corresponding to the first individual and the second individual in the crossover individual based on the preset crossover operator ratio; otherwise, weighted crossover is not performed on the crossover individual;
[0046] Increase the number of the first loop by 1, and return to the step of randomly obtaining two different individuals from the target population as crossover individuals until the number of the first loop is equal to the number of crossovers, and the second population is obtained;
[0047] The first cycle number is initialized to 0.
[0048] Optionally, performing a mutation operation on random individuals in the target population using a second probability rule to obtain a second population includes the following steps:
[0049] Randomly obtain an individual from the target population as a mutant individual;
[0050] generating a random value within a fifth interval as a third probability threshold;
[0051] When the third probability threshold is less than the preset mutation operator probability, the inversion parameters corresponding to the mutated individual are assigned based on the number of population iterations, the maximum number of population iterations, and the value range of the inversion parameter; otherwise, the inversion parameters of the mutated individual are not assigned.
[0052] Among them, the expression of assignment processing is:
[0053] A1=A1+(max-mix)*normal(0,1)*(1-random() (1-curIndex / maxGenCnt) );
[0054] Where A1 represents the inversion parameter of the mutant individual; max represents the maximum value of the inversion parameter interval; min represents the minimum value of the inversion parameter interval; normal(0,1) represents a random value with a normal distribution with a mean of 0 and a standard deviation of 1; random() represents a random value generated in the sixth interval; curIndex represents the number of population iterations; maxGenCnt represents the maximum number of population iterations;
[0055] Increase the second loop count by 1 and return to the step of randomly obtaining an individual from the target population as a mutant individual until the second loop count equals the target number, thus obtaining the second population.
[0056] The second cycle number is initialized to 0.
[0057] Optionally, the method further comprises the following steps:
[0058] When the number of population iterations is equal to the maximum number of population iterations, the adapted individuals are output according to the target population obtained in the last cycle.
[0059] On the other hand, an embodiment of the present invention provides a terrain processing device based on a genetic algorithm, comprising:
[0060] The first module is used to initialize the inversion parameters of the target number, obtain the first population based on the initialization of the inversion parameters; and use the first population as the target population;
[0061] Among them, the inversion parameters correspond to individuals in the target population; the inversion parameters include density difference and average seabed depth;
[0062] The second module is used to perform inversion calculation and fitness evaluation of the target area based on the inversion parameters corresponding to each individual in the target population, and obtain the root mean square value corresponding to each individual in the target population;
[0063] The root mean square value represents the adaptability of the inversion parameters corresponding to the individual to participate in the inversion operation of the target area; the result of the inversion operation is the terrain data of the target area;
[0064] The third module is used to output the individual corresponding to the root mean square value as the adaptation individual when the root mean square value of the target population meets the preset threshold condition; otherwise,
[0065] The fourth module is used to perform genetic operations on the target population based on a preset genetic algorithm to obtain a second population; the second population is used as the target population, and the number of population iterations is increased by 1;
[0066] The fifth module is used to return to the steps of performing the inversion operation and fitness evaluation of the target area based on the inversion parameters corresponding to each individual in the target population, until an adapted individual is output, or the number of population iterations reaches a preset maximum number of population iterations;
[0067] The sixth module is used to use the terrain data obtained by the inversion operation corresponding to the inversion parameters corresponding to the adaptation individual as the terrain processing result of the target area.
[0068] Optionally, the device further comprises:
[0069] The seventh module is used to output the adapted individuals according to the target population obtained in the last cycle when the number of population iterations is equal to the maximum number of population iterations.
[0070] On the other hand, an embodiment of the present invention provides an electronic device, including: a processor and a memory; the memory is used to store programs; the processor executes the program to implement the above-mentioned terrain processing method based on genetic algorithm.
[0071] On the other hand, an embodiment of the present invention provides a computer storage medium storing a program executable by a processor. When the program is executed by the processor, it is used to implement the terrain processing method based on the genetic algorithm.
[0072] The embodiment of the present invention initializes the inversion parameters of the target number, obtains the first population based on the inversion parameter initialization; takes the first population as the target population; wherein the inversion parameters correspond to individuals in the target population; the inversion parameters include density difference and average seabed depth; performs inversion operation and fitness evaluation of the target area based on the inversion parameters corresponding to each individual in the target population, and obtains the root mean square value corresponding to each individual in the target population; wherein the root mean square value represents the adaptability of the inversion parameters corresponding to the individual to participate in the inversion operation of the target area; the result of the inversion operation is the terrain data of the target area; when there is a root mean square in the target population If the root value meets the preset threshold condition, the individual corresponding to the corresponding root mean square value is output as the adaptive individual; otherwise, a genetic operation is performed on the target population based on the preset genetic algorithm to obtain a second population; the second population is used as the target population, and the number of population iterations is increased by 1; the step of performing the inversion operation and fitness evaluation of the target area based on the inversion parameters corresponding to each individual in the target population is returned until an adaptive individual is output, or the number of population iterations reaches the preset maximum number of population iterations; the terrain data corresponding to the inversion parameters corresponding to the adaptive individual in the inversion operation is used as the terrain processing result of the target area. The embodiment of the present invention realizes the dynamic adjustment and optimization of the inversion parameters by introducing a genetic algorithm, thereby more accurately reflecting the complexity and variability of underground geological conditions. In addition, by optimizing the process architecture and improving the degree of automation, the present invention also significantly improves the computing efficiency and practicality, providing strong support for terrain structure research and resource exploration. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] The accompanying drawings are used to provide a further understanding of the technical solution of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the technical solution of the present invention and do not constitute a limitation to the technical solution of the present invention.
[0074] Figure 1 A schematic diagram of an implementation environment for performing terrain processing based on a genetic algorithm provided by an embodiment of the present invention;
[0075] Figure 2 A schematic flow chart of a terrain processing method based on a genetic algorithm provided in an embodiment of the present invention;
[0076] Figure 3 A schematic diagram of the expanded flow of inversion calculation and fitness evaluation provided in an embodiment of the present invention;
[0077] Figure 4 A schematic diagram of the expansion process of the genetic operation provided by an embodiment of the present invention;
[0078] Figure 5 A schematic diagram of the expansion flow of the selection operation provided in an embodiment of the present invention;
[0079] Figure 6 A schematic diagram of the expansion process of the crossover operation provided in an embodiment of the present invention;
[0080] Figure 7 A schematic diagram of the expansion process of the mutation operation provided in an embodiment of the present invention;
[0081] Figure 8 A schematic diagram of the overall process of a terrain processing method based on a genetic algorithm provided in an embodiment of the present invention;
[0082] Figure 9 A schematic structural diagram of a terrain processing device based on a genetic algorithm provided by an embodiment of the present invention;
[0083] Figure 10 A schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0084] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0085] It should be noted that although the system diagrams illustrate functional module divisions and the flowcharts illustrate a logical sequence, in certain circumstances, the steps shown or described may be performed in a sequence that differs from the module divisions in the system or the sequence in the flowcharts. The terms "first / S100," "second / S200," and the like in the specification, claims, and drawings are used to distinguish similar objects and are not necessarily intended to describe a specific sequence or precedence.
[0086] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present invention. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute a separate or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0087] It is understandable that the terrain processing method based on genetic algorithm provided in the embodiment of the present invention can be applied to any computer device with data processing and computing capabilities, and this computer device can be various terminals or servers. When the computer device in the embodiment is a server, the server is an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. Optionally, the terminal is a smart phone, tablet computer, laptop computer, desktop computer, etc., but is not limited to this.
[0088] To facilitate understanding of the technical solutions of the present invention, the following are the technical terms that may appear in the embodiments of the present invention:
[0089] Seafloor topography refers to the shape of the solid Earth's surface beneath water. Due to the obscuration of seawater, the undulations of seafloor topography are difficult to observe directly. Early plumb bob depth sounding methods were time-consuming and inaccurate. Since the 1920s, ships have used echo sounders during navigation, enabling rapid measurements of seafloor depth. Combined with precise positioning, these echo sounders reveal the true nature of seafloor topography. In this context, seafloor topography refers to the depth of water at various latitudes and longitudes of the ocean.
[0090] Heuristic search, also known as informed search, uses heuristic information about a problem to guide the search, reducing the search scope and complexity. This process of using heuristic information is called heuristic search. For example, the genetic algorithm is a classic heuristic search algorithm.
[0091] A genetic algorithm (GA) is a computational model that simulates biological evolution, leveraging mechanisms such as natural selection and genetic recombination to search and optimize complex problems. It is a heuristic search algorithm whose fundamental concept is to create a population of artificial individuals by simulating the mechanisms of genetics and evolution in nature to optimize the solution. In a GA, each individual represents a potential solution and has its own fitness evaluation criteria. By performing operations such as selection, crossover, and mutation on these individuals, the fitness of the current population is gradually improved and the potential solution space is explored in the hope of finding the optimal solution. GAs have the characteristics of a wide range of applications, strong global search capabilities, and ease of parallel computing. They are suitable for solving optimization problems of various types, including combinatorial optimization, continuous optimization, and multi-objective optimization. Compared to other algorithms, GAs are highly efficient in finding the global optimal solution and are widely used in various fields, including but not limited to engineering optimization design, artificial intelligence tasks, and financial analysis and forecasting.
[0092] Decimal coding: This is a counting method that rounds to 10. The first digit has a weight of 10^0, the second digit has a weight of 10^1, and the Nth digit has a weight of 10^(N-1). The value of the number is equal to the sum of (value x bit weight) of each digit. Everyday numbers are encoded in decimal.
[0093] The Parker-Oldenburg inversion method is a frequency domain density interface iterative inversion method proposed by Oldenburg based on the Parker formula. Since this method has the advantage of fast calculation, its application has been rapidly developed. However, there is a downward extension factor in the formula, which causes the formula to have an oscillation phenomenon of high-frequency signals during the inversion iteration process, and as the inversion depth increases, this phenomenon becomes more obvious, seriously affecting the convergence of the inversion result. To solve this situation, a low-pass filter is usually applied in the inversion process to eliminate the high-frequency oscillation phenomenon. The Parker-Oldenburg inversion method is one of the important methods for calculating seabed topography and is also the starting point of the core of the present invention. At present, the input parameters of the method (filter-related parameters, density difference, depth) and the like are designed according to constants based on experience, but in fact there is still room for optimization and excavation of these parameters.
[0094] RMS: The abbreviation of Root Mean Square. The result of taking the square root of the sum of the squares of N items divided by N is the root mean square result.
[0095] like Figure 1 FIG. 1 is a schematic diagram of an implementation environment provided by an embodiment of the invention. Figure 1, the implementation environment includes at least one terminal 102 and a server 101. The terminal 102 and the server 101 can be connected to the network in a wireless or wired manner to complete data transmission and exchange.
[0096] Server 101 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), as well as big data and artificial intelligence platforms.
[0097] In addition, server 101 can also be a node server in a blockchain network. Blockchain is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithm.
[0098] The terminal 102 may be a smart phone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, etc., but is not limited thereto. The terminal 102 and the server 101 may be connected directly or indirectly via wired or wireless communication, which is not limited in this embodiment of the present invention.
[0099] Based on the example Figure 1 In the implementation environment shown, an embodiment of the present invention provides a terrain processing method based on a genetic algorithm. The following is an example of the terrain processing method based on a genetic algorithm being applied to the server 101. It can be understood that the terrain processing method based on a genetic algorithm can also be applied to the terminal 102.
[0100] Reference Figure 2 , Figure 2 The flowchart of the terrain processing method based on genetic algorithm applied to the server provided by the embodiment of the present invention, the execution subject of the terrain processing method based on genetic algorithm can be any of the aforementioned computer devices (including servers or terminals). Figure 2 , the method comprises the following steps:
[0101] S100, initializing inversion parameters of a target number, obtaining a first population based on the initialization of the inversion parameters; and using the first population as a target population;
[0102] Among them, the inversion parameters correspond to individuals in the target population; the inversion parameters include density difference and average seabed depth;
[0103] It should be noted that the present invention may also include a data preparation step to initialize various variables, parameters and thresholds that may be applied. Specifically, the parameters that may be involved in the present invention are explained as follows:
[0104] The parameters mainly include two parts: the parameters of the improved genetic algorithm based on real number coding and the parameters of the Parker-Oldenburg inversion method, etc.
[0105] There are a total of 2 variables searched by the improved genetic algorithm based on real number coding, namely contrast (the physical meaning is: density difference, unit g / cm 3 ), and depth (the physical meaning is depth, unit km). Then, the parameters of the improved genetic algorithm are respectively:
[0106] The maximum density difference maxContrast: the maximum value of contrast, which is determined by the average value of the target search area, generally obtained according to experience, and satisfies minContrast < maxContrast. In most cases, it is sufficient to satisfy maxContrast - minContrast >= 0.4, and it can be set according to the actual situation.
[0107] The minimum density difference minContrast: the minimum value of contrast, which is determined by the average value of the target search area, generally obtained according to experience, and satisfies minContrast < maxContrast. In most cases, it is sufficient to satisfy maxContrast - minContrast >= 0.4, and it can be set according to the actual situation.
[0108] The maximum depth maxDepth: the maximum value of depth, which is determined by the average value of the target search area, generally obtained according to experience, and satisfies maxDepth < minDepth. In most cases, it is sufficient to satisfy maxDepth - minDepth >= 10, and it can be set according to the actual situation.
[0109] The minimum depth minDepth: the minimum value of depth, which is determined by the average value of the target search area, generally obtained according to experience, and satisfies maxDepth < minDepth. In most cases, it is sufficient to satisfy maxDepth - minDepth >= 10, and it can be set according to the actual situation.
[0110] The number of individuals in the population sizePop, the individual scale of the genetic algorithm, is taken according to requirements, and the default is 100.
[0111] The maximum number of population iterations maxGenCnt, the number of population reproduction times of the genetic algorithm, that is, the number of iterations of the genetic algorithm, is determined according to requirements and the default value is 200.
[0112] CrossoverRate is a parameter used by the crossover operator. Its value range is [0,1]. It is determined based on the requirements. The default value is 0.9.
[0113] Mutation operator probability mutationRate, a parameter used by the mutation operator, has a value range of [0,1] and is determined based on demand. The default value is 0.1.
[0114] CrossoverAlpha is a parameter used by the crossover operator. Its value range is [0,1]. It is determined based on the requirements. The default value is 0.5.
[0115] Iterate the optimal threshold minIterDelt. If an individual less than or equal to minIterDelt is found, it means that the optimal solution has been found and the entire search process ends directly.
[0116] The main parameters of the Parker-Oldenburg inversion method are as follows:
[0117] Density difference contrast, unit g / cm 3 , which is one of the variables searched with the help of the improved genetic algorithm, that is, the variable is obtained by searching with the improved genetic algorithm, and is one of the two search directions mentioned in the present invention.
[0118] Depth: unit is km. This is one of the variables searched by means of the improved genetic algorithm, that is, this variable is obtained by searching the improved genetic algorithm and is one of the two search directions mentioned in the present invention.
[0119] GravityMat: It is a matrix composed of triplets of (longitude, latitude, gravity outlier), which is generally data observed by seismic measurement, satellite measurement or other means, and is a constant in the present invention.
[0120] Seismic depth matrix SemisMat: It is a matrix composed of (longitude, latitude, depth) triplets, generally obtained from seismic measurements, satellite measurements or other observations, and is a constant in the present invention.
[0121] The iteration threshold criterio, i.e., the iteration rms threshold of the Parker-Oldenburg inversion method, is generally a constant, with a default value of 0.1, and is a constant in the present invention.
[0122] Frequency threshold WH: low-pass filter threshold, the initial value is obtained based on experience, the default value is 0.1, and it is a constant in the present invention.
[0123] Frequency threshold SH: high-pass filter threshold, the initial value is obtained based on experience, the default value is 0.12, and it is a constant in the present invention.
[0124] Window function threshold truncation: It is a signal sampling weighting function in signal processing. The initial value is obtained based on experience and is 0.1 by default. It is a constant in the present invention.
[0125] It should be noted that, in some embodiments, initializing the target number of inversion parameters may include the following steps:
[0126] In response to a first input instruction of the target object, a center point is obtained, a first value is assigned to the center point by a first random number, and a second number of inversion parameters are randomly generated near the center point; and a second value is assigned to the center point by multiplying the first random number by a difference between the first interval and the interval range, and a third number of inversion parameters are randomly generated near the center point;
[0127] Wherein, the first random number represents a random number of a normal distribution with a mean of 0 and a standard deviation of 1; the first random number is updated before each generation of the inversion parameter; the first interval represents the value range of the inversion parameter; the sum of the second number and the third number is equal to the target number;
[0128] It should be noted that the first interval includes a density difference interval (determined based on a preset maximum density difference value and a preset minimum density difference value) and a seabed average depth interval (determined based on a preset maximum depth value and a preset minimum depth value);
[0129] For example, in some specific implementations, based on the center point generation, the following can be implemented:
[0130] If the center point is given, the contrast and depth are generated as follows:
[0131] The generation formula of the first individual gene is as follows, which is mainly generated near the center point.
[0132] contrast=initContrast+normal(0,1)*0.01;
[0133] depth=initDepth+normal(0,1)*0.1;
[0134] Other ways in which individual genes are generated are:
[0135] contrast=initContrast+(maxContrast-minContrast)*normal(0,1);
[0136] depth=initDepth+(maxDepth-minDepth)*normal(0,1);
[0137] Alternatively, based on a second random number, a target number of inversion parameters are randomly generated within the first interval; the second random number represents a random value within the second interval;
[0138] For example, in some specific implementations, random generation can be implemented as follows:
[0139] If no center point is given, it is randomly generated within the search interval. The contrast and depth are generated as follows:
[0140] contrast=minContrast+(maxContrast-minContrast)*random();
[0141] depth=minDepth+(maxDepth-minDepth)*random();
[0142] Alternatively, the target quantity inversion parameter is obtained in response to the second input instruction of the target object.
[0143] For example, in some specific implementations, it can also be specified manually. In this case, the initialization genes of all individuals need to be specified manually.
[0144] Among them, initContrast and initDepth represent the center point (corresponding to the center point of the density difference and the center point of the average seabed depth); random() represents the random value generated in [0,1]; normal(0,1) represents a normal distribution with a mean of 0 and a standard deviation of 1. The resulting random number satisfies the normal distribution, thus ensuring the fairness of gene generation. This invention uses decimal real number encoding, and the entire calculation is based on decimal, so no additional encoding and decoding operations are required.
[0145] Specifically, population initialization involves: a population is composed of a large number of individuals, each of which has two genes representing density contrast and average seafloor depth. This invention uses decimal real numbers to represent gene encodings. The core of population initialization is to generate sizePop individuals and initialize the corresponding genes for each individual. Population generation can be achieved using the aforementioned strategy.
[0146] S200, performing an inversion operation and fitness evaluation on the target region based on the inversion parameters corresponding to each individual in the target population, and obtaining a root mean square value corresponding to each individual in the target population;
[0147] The root mean square value represents the adaptability of the inversion parameters corresponding to the individual to participate in the inversion operation of the target area; the result of the inversion operation is the terrain data of the target area;
[0148] It should be noted that, in some embodiments, Figure 3 As shown, step S200 may include the following steps: S201, based on the inversion parameters corresponding to the individuals in the target population, obtain the terrain data of the target area corresponding to each individual through the Parker-Oldenburg inversion method; S202, obtain the seismic depth matrix of the target area; S203, traverse the first data values of all position points of the terrain data corresponding to the individual, and collect the second data value of the corresponding position point from the seismic depth matrix; S204, based on the square of the difference between the first data value and the second data value, obtain the third data value of the corresponding position point; S205, perform square root processing based on the average value of the third data values of all position points to obtain the root mean square value corresponding to the corresponding individual.
[0149] For example, in some specific implementations, first, the seabed topography is calculated based on the current population: for the current population, the gene contrast and depth of each individual are traversed one by one, and then the corresponding seabed topography data is calculated based on the Parker-Oldenburg inversion method. Because it is a decimal real number encoding, the gene does not require additional encoding and decoding operations before being applied to the Parker-Oldenburg inversion method. Then, the fitness function value of each individual is evaluated: at this point, each individual in the population has calculated the corresponding seabed topography data, and then combined with the seismic depth matrix SemisMat, the corresponding RMS is calculated. Each individual will calculate its own RMS, and finally an array of sizePop is obtained.
[0150] S300: When there is a target population with a root mean square value that meets the preset threshold condition, output the individual corresponding to the root mean square value as the adapted individual, and jump to step S600; otherwise, execute the subsequent steps;
[0151] Among them, when there are multiple root mean square values that meet the preset threshold conditions at the same time, all the root mean square values that meet the preset threshold conditions are sorted from small to large, and the individual corresponding to the first root mean square value after sorting is output as the adapted individual;
[0152] For example, in some specific implementations, by judging whether there are individuals whose value is smaller than a threshold, all individuals in the population are traversed to judge whether there are individuals whose RMS is smaller than the iterative optimal threshold minIterDelt. If so, go to step S600, indicating that the optimal individual (optimal solution) has been found, otherwise execute the next step.
[0153] S400, performing a genetic operation on the target population based on a preset genetic algorithm to obtain a second population; using the second population as the target population, and increasing the number of population iterations by 1;
[0154] It should be noted that, in some embodiments, Figure 4 As shown, a genetic operation is performed on the target population based on a preset genetic algorithm to obtain a second population, including at least one of the following steps: S41, based on the excellence of each individual in the target population, a target number of individuals are selected from the target population through a first probability rule combined with a first probability threshold to obtain a second population; wherein the excellence is determined based on the inverse of the root mean square value; S42, a crossover operation is performed on a random pair of individuals in the target population through a second probability rule to obtain a second population; S43, a mutation operation is performed on random individuals in the target population through the second probability rule to obtain a second population.
[0155] The target population executed by any of the above genetic operations may be the result of a second population obtained by other genetic operations.
[0156] Among them, in some embodiments, such as Figure 5 As shown, based on the excellence of each individual in the target population, selecting a target number of individuals from the target population by combining a first probability rule with a first probability threshold to obtain a second population may include the following steps:
[0157] S411. The reciprocal of the root mean square value is used as the excellence level corresponding to each individual in the target population;
[0158] S412. Normalize all excellence levels to obtain a normalized excellence value corresponding to each individual.
[0159] S413, initialize the identification number to 0, and initialize the excellent array to empty;
[0160] S414: The first individual of the target population is used as a data individual, and the excellent value corresponding to the data individual is used as the output value;
[0161] S415: Use the output value as the array element at the position corresponding to the identification number in the excellent array; increase the identification number by 1; and use the next individual after the data individual in the target population as the data individual;
[0162] S416, adding the excellent values corresponding to the data individuals to the output value, returning to the step of using the output value as the array element at the position corresponding to the identification number in the excellent array, until the identification number equals the total number of all individuals in the target population, and outputting the excellent array;
[0163] S417. Generate a random value within the third interval as a first probability threshold;
[0164] S418. Sequentially traverse the excellent array and obtain the first array element that is greater than the first probability threshold as the target element;
[0165] S419, selecting corresponding individuals from the target population according to the element number corresponding to the target element and arranging them into the second population;
[0166] S420: Return to the step of generating a random value as the first probability threshold within the third interval, until a target number of individuals are selected from the target population to obtain a second population.
[0167] For example, in some specific implementations, a selection operator may be applied to individuals based on probability, which may be implemented as follows:
[0168] The selection operator is mainly based on probability to select more outstanding individuals. The smaller the RMS, the better the individual, and the larger the RMS, the worse the individual. The present invention uses 1 / RMS to represent the degree of individual excellence. The larger the 1 / RMS, the better the individual. Formula (1) is used to solve the sum of the priorities of all individuals; formula (2) is used to calculate the normalized individual priority; referring to formula (3), the sum of all individual priorities is 1; formula (4) is used to calculate the array of cumulative priority sums. How to select outstanding individuals? Calculate a random number R0 in the range of [0,1], traverse the accRMS array to find the first individual greater than R0, and the individual will be selected.
[0169] With this selection operator, individuals with a higher averRMS score have a higher probability of being selected, while individuals with a lower averRMS score still have a chance of being selected. This design is based on the fact that currently, excellent individuals have excellent gene expression and are therefore worthy of selection. However, individuals with a lower averRMS score may be due to slower gene expression, so they are still selected with a certain probability.
[0170]
[0171]
[0172] Among them, in some embodiments, such as Figure 6 As shown, performing a crossover operation on a random pair of individuals in the target population using the second probability rule to obtain a second population may include the following steps:
[0173] S421. Based on all RMS values corresponding to the target population, obtain the minimum RMS value as the target RMS value;
[0174] S422: performing an upward rounding operation on the ratio of the target RMS value to the preset iterative optimal threshold, and multiplying the result of the upward rounding operation by the target number as the number of crossovers;
[0175] S423. Randomly obtain two different individuals from the target population as crossover individuals; the crossover individuals include the first individual and the second individual;
[0176] S424. Generate a random value within the fourth interval as a second probability threshold;
[0177] S425. When the second probability threshold is less than a preset crossover operator probability, weighted crossover is performed on the inversion parameters corresponding to the first individual and the second individual in the crossover individuals based on a preset crossover operator ratio; otherwise, weighted crossover is not performed on the crossover individuals.
[0178] S426. Add 1 to the first loop count, and return to the step of randomly obtaining two different individuals from the target population as crossover individuals until the first loop count equals the crossover count, thereby obtaining a second population; wherein the first loop count is initialized to 0.
[0179] For example, in some specific implementations, a crossover operator may be applied to individuals based on probability, which may be implemented as follows:
[0180] The crossover operator selects two individuals and then performs a genetic crossover. Referring to formula (5), minRMS is the minimum RMS value of the current population, round() indicates rounding up, and crossCnt indicates the number of crossovers. The advantage of this design is that a larger minRMS indicates a greater distance from the global optimal solution, and the crossover operator performs more operations. A smaller minRMS indicates a closer distance from the global optimal solution, and the crossover operator can guarantee at least sizePop operations.
[0181]
[0182] For a single crossover operation, based on the excellent individuals obtained by the selection operator, two individuals A1 and A2 are randomly selected; then the random number R2 in [0,1] is calculated. If R2 is less than crossoverRate, it is determined that a crossover is performed on these two individuals A1 and A2; then one is randomly selected from Case1, Case2 and Case3 for the crossover operator operation; then a single crossover operator operation is completed; this is repeated, and crossCnt crossover operations are performed, and finally the crossover operation of the entire population is completed.
[0183] Case 1: Density difference crossover, only density difference crossover is performed. The crossover formula is as follows:
[0184] t1=A1[contrast];
[0185] t2=A2[contrast];
[0186] A1[contrast]=t1*crossoverAlpha+t2*(1-crossoverAlpha);
[0187] A2[contrast]=t2*crossoverAlpha+t1*(1-crossoverAlpha);
[0188] Case 2: Depth crossover, only depth crossover is performed. The crossover formula is as follows:
[0189] t1=A1[depth];
[0190] t2=A2[depth];
[0191] A1[depth]=t1*crossoverAlpha+t2*(1-crossoverAlpha);
[0192] A2[depth]=t2*crossoverAlpha+t1*(1-crossoverAlpha);
[0193] Case 3: Density difference crossover and depth crossover, all genes are crossovered, the operation formula is as above.
[0194] To summarize, the total number of crossovers is calculated using minRMS, and then individuals are randomly selected to determine whether to participate in the crossover based on probability; individuals participating in the crossover select which genes to participate in the crossover based on probability.
[0195] Among them, in some embodiments, such as Figure 7 As shown, performing a mutation operation on random individuals in the target population using the second probability rule to obtain a second population may include the following steps:
[0196] S431. Randomly obtain an individual from the target population as a mutant individual;
[0197] S432. Generate a random value within the fifth interval as a third probability threshold;
[0198] S433: When the third probability threshold is less than the preset mutation operator probability, assigning a value to the inversion parameter corresponding to the mutated individual based on the population iteration number, the maximum population iteration number, and the value range of the inversion parameter; otherwise, not assigning a value to the inversion parameter of the mutated individual;
[0199] Among them, the expression of assignment processing is:
[0200] A1=A1+(max-mix)*normal(0,1)*(1-random() (1-curIndex / maxGenCnt) );
[0201] Where A1 represents the inversion parameter of the mutant individual; max represents the maximum value of the inversion parameter interval; min represents the minimum value of the inversion parameter interval; normal(0,1) represents a random value with a normal distribution with a mean of 0 and a standard deviation of 1; random() represents a random value generated in the sixth interval; curIndex represents the number of population iterations; maxGenCnt represents the maximum number of population iterations;
[0202] S434: Increase the second cycle count by 1, and return to the step of randomly obtaining an individual from the target population as a mutant individual until the second cycle count equals the target number, thereby obtaining a second population;
[0203] The second cycle number is initialized to 0.
[0204] For example, in some specific implementations, a mutation operator is applied to individuals based on probability. The mutation operator selects a single individual and then selects genes for mutation. The maximum number of mutations is fixed at sizePop. A random number R3 in the range [0, 1] is calculated. If R3 is less than mutationRate, an individual is selected for mutation. The mutation operator then randomly selects one individual from Case 1 and Case 2 for the mutation operation.
[0205] Case 1: Density difference mutation, only density difference mutation operation is performed. The mutation formula is as follows:
[0206]
[0207] Case 2: Deep mutation, only deep mutation operation is performed. The mutation formula is as follows:
[0208]
[0209] Among them, random() represents a random value generated in [0,1]; normal(0,1) represents a normal distribution with a mean of 0 and a standard deviation of 1; curIndex represents the current generation of the population.
[0210] In general, the maximum number of mutations is sizePop, and then the need for mutation is determined based on the mutationRate probability; if a mutation is required, individuals are randomly selected, and then which gene is selected for mutation.
[0211] S500, returning to the step of performing an inversion operation and fitness evaluation on the target region based on the inversion parameters corresponding to each individual in the target population, until a suitable individual is output, or the number of population iterations reaches a preset maximum number of population iterations;
[0212] For example, in some specific implementations, the operation of step S400 indicates the completion of a population reproduction cycle, resulting in a new population. Through natural selection based on the survival of the fittest, a determination is made based on the new population as to whether a global optimal solution has been found. Steps S200 to S500 are executed in an iterative loop, with each iteration representing one population reproduction iteration, until the maximum number of population iterations, maxGenCnt, is reached.
[0213] In some embodiments, the method may further include the following steps: when the number of population iterations is equal to the maximum number of population iterations, outputting the adapted individuals according to the target population obtained in the last cycle.
[0214] For example, in some specific implementations, the minimum value among the root mean square values corresponding to all individuals in the target population obtained in the last cycle can be obtained, and the individual corresponding to the minimum value is output as the adapted individual.
[0215] S600: Using the inversion parameters corresponding to the adapted individual in the inversion operation to obtain the corresponding terrain data as the terrain processing result of the target area.
[0216] For example, in some specific implementations, when searching for the optimal solution of a population, there are only two possible solutions: the optimal vector that satisfies the iterative optimal threshold minIterDelt, or the optimal vector obtained by searching the entire space (i.e., the individual confirmed by the minimum root mean square value of the last iteration). At this point, the entire search process ends, and not only the optimal solution is obtained, but also the corresponding seabed topography data.
[0217] In order to explain the principle of the technical solution of the present invention in detail, the overall process of the present invention is described below in combination with some specific embodiments. It is easy to understand that the following is an explanation of the technical principle of the present invention and cannot be regarded as a limitation of the present invention.
[0218] First, it's important to note that while the Parker-Oldenburg inversion method currently holds a significant position in crustal structure research, its widespread technical limitations cannot be ignored. The primary issue is that traditional approaches simply treat the key parameters in the inversion process—density difference and depth—as fixed constants. This linearization assumption ignores the complex nonlinear relationships in the subsurface medium, resulting in limited accuracy in the inverted seafloor topography and an inability to accurately reflect the true geological structure.
[0219] Secondly, existing methods for finding optimal parameters for Parker-Oldenburg inversion often use genetic algorithms. However, practice has shown that the crossover and mutation operators in these algorithms are not fully adapted to the characteristics of the inversion problem, resulting in inefficient solutions and large fluctuations in average solution accuracy, making it difficult to consistently produce high-quality inversion results.
[0220] Furthermore, existing technical solutions face significant challenges from the perspectives of computational efficiency and automation. The massive computational workload and the lack of an efficient, unified execution framework to integrate and optimize the computational process make automated terrain inversion extremely difficult. This not only increases the cost of manual intervention but also limits the accuracy and practicality of the inversion results, making the final calculations rougher than the actual terrain and difficult to meet the needs of high-precision exploration and research.
[0221] In view of this, the present invention proposes a method for solving seabed topography based on an improved genetic algorithm and Parker-Oldenburg inversion based on real number coding. By finding the optimal parameters through the improved genetic algorithm and using the Parker-Oldenburg inversion method, a more accurate seabed topography is obtained. Figure 8 , the present invention may include the following process steps:
[0222] Step 1: Parameter initialization. The parameters mainly include the parameters of the improved genetic algorithm based on real number coding and the parameters of the Parker-Oldenburg inversion method (for details, please refer to the parameter description above and will not be repeated here).
[0223] Step 2: Initialize the population. A population is composed of a large number of individuals, each of which has two genes, representing the density difference contrast and the average depth of the seabed depth. This invention uses decimal real numbers to represent gene encoding. The core of population initialization is to generate sizePop individuals and initialize the corresponding genes for each individual. There are three strategies for population generation:
[0224] Case 1: Generate based on the center point. If the center point is given, the generation of contrast and depth is as follows:
[0225] The generation formula of the first individual gene is as follows, which is mainly generated near the center point.
[0226] contrast=initContrast+normal(0,1)*0.01;
[0227] depth=initDepth+normal(0,1)*0.1;
[0228] Other ways in which individual genes are generated are:
[0229] contrast=initContrast+(maxContrast-minContrast)*normal(0,1);
[0230] depth=initDepth+(maxDepth-minDepth)*normal(0,1);
[0231] Case 2: Random generation. If no center point is given, it is randomly generated within the search interval. The generation methods of contrast and depth are as follows:
[0232] contrast=minContrast+(maxContrast-minContrast)*random();
[0233] depth=minDepth+(maxDepth-minDepth)*random();
[0234] Case 3: Manually specified. In this case, the initial genes of all individuals need to be manually specified.
[0235] Here, initContrast and initDepth represent the center point; random() generates a random value in the range [0, 1]; and normal(0, 1) represents a normal distribution with a mean of 0 and a standard deviation of 1. The resulting random numbers adhere to a normal distribution, thus ensuring fairness in gene generation. This invention uses decimal real number encoding, and the entire calculation is performed based on decimal, so no additional encoding and decoding operations are required. Go to step 3.
[0236] Step 3: Calculate the seafloor topography for each individual in the current population. For the current population, iterate through the gene contrast and depth data for each individual, then calculate the corresponding seafloor topography using the Parker-Oldenburg inversion method. Because the genes are encoded as decimal real numbers, no additional encoding and decoding is required before applying the Parker-Oldenburg inversion method. Proceed to Step 4.
[0237] Step 4: Evaluate the fitness function for each individual. At this point, each individual in the population has calculated the corresponding seafloor topography data. Combined with the seismic depth matrix SemisMat, the corresponding RMS is calculated. Each individual calculates its own RMS, ultimately resulting in an array of sizePop. Go to step 4.
[0238] Step 5: Determine whether there are individuals with RMS values less than the threshold. Traverse all individuals in the population and determine whether there are individuals with RMS values less than the iterative optimal threshold minIterDelt. If so, go to step 11, indicating that the optimal individual (optimal solution) has been found. Otherwise, go to step 6.
[0239] Step 6: Apply the selection operator to the individual based on probability. The selection operator mainly selects better individuals based on probability. The smaller the RMS, the better the individual, and the larger the RMS, the worse the individual. The present invention uses 1 / RMS to represent the degree of excellence of an individual. The larger the 1 / RMS, the better the individual. Formula (1) is used to solve the sum of the priorities of all individuals; formula (2) is to calculate the normalized individual priority; referring to formula (3), the sum of all individual priorities is 1; formula (4) is used to calculate the array of cumulative priority sums. How to select excellent individuals? Calculate a random number R0 in the range of [0,1], traverse the accRMS array to find the first individual greater than R0, and the individual will be selected.
[0240] With this selection operator, individuals with a higher averRMS score have a higher probability of being selected, while individuals with a lower averRMS score still have a chance of being selected. This design is based on the fact that currently, excellent individuals have excellent gene expression and are therefore worthy of selection. However, individuals with a lower averRMS score may be due to slower gene expression, so they are still selected with a certain probability.
[0241]
[0242]
[0243] For example, if the array of the original RMS is [3,7,1,9], there are four individual RMSs of 3, 7, 1, and 9 respectively.
[0244] According to formula (1), sum = 1 / 3 + 1 / 7 + 1 / 1 + 1 / 9 = 1.5873;
[0245] Using formula (2), we get the averRMS array as [1 / 3 / 1.5873, 1 / 7 / 1.5873, 1 / 1 / 1.5873, 1 / 9 / 1.5873], and calculate averRMS = [0.21, 0.09, 0.63, 0.07]. Using formula (3), we can verify that the sum of the averRMS array is 1.
[0246] Calculate the accRMS array using formula (4),
[0247] accRMS[0]=0.21;
[0248] accRMS[1] = 0.21 + 0.09 = 0.3;
[0249] accRMS[2] = 0.21 + 0.09 + 0.63 = 0.93;
[0250] accRMS[3] = 0.21 + 0.09 + 0.63 + 0.07 = 1;
[0251] Then calculate the random value R1. If R1 < accRMS[0], then accRMS[0] is selected; if R1 >= accRMS[0] and R1 < accRMS[1], then accRMS[1] is selected; if R1 >= accRMS[1] and R1 < accRMS[2], then accRMS[2] is selected; if R1 >= accRMS[2] and R1 < accRMS[3], then accRMS[3] is selected; if R1 >= accRMS[3], then accRMS[3] is selected, which is the critical case.
[0252] In this way, through sizePop runs of the selection operator, finally sizePop excellent individuals are obtained. Note that the same individual may be selected multiple times. Go to step 7.
[0253] Step 7: Apply the crossover operator to the individuals based on probability. The crossover operator is to select two individuals and then perform gene crossover. Referring to formula (5), minRMS is the minimum value of the RMS of the current population, round() means rounding up, and crossCnt represents the number of crossover times. The advantage of this design is that when minRMS is larger, it means the distance from the global optimal solution is farther, and at this time the crossover operator operates more; when minRMS is smaller, it means the distance from the global optimal solution is closer, and the crossover operator can ensure at least sizePop times.
[0254]
[0255] For a single crossover operation, based on the excellent individuals obtained by the selection operator, randomly select two individuals A1 and A2; then calculate the random number R2 in [0, 1]. If R2 is less than crossoverRate, then it is determined to perform crossover on these two individuals A1 and A2; then randomly select one from Case1, Case2, and Case3 to perform the crossover operator operation; then the single crossover operator operation is completed; repeat this process, perform crossCnt crossover operations, and finally complete the crossover operation of the entire population.
[0256] Case1: Density difference crossover, only perform the crossover operation of density difference. The crossover formula is as follows:
[0257] t1 = A1[contrast];
[0258] t2=A2[contrast];
[0259] A1[contrast]=t1*crossoverAlpha+t2*(1-crossoverAlpha);
[0260] A2[contrast]=t2*crossoverAlpha+t1*(1-crossoverAlpha);
[0261] Case 2: Depth crossover, only depth crossover is performed. The crossover formula is as follows:
[0262] t1=A1[depth];
[0263] t2=A2[depth];
[0264] A1[depth]=t1*crossoverAlpha+t2*(1-crossoverAlpha);
[0265] A2[depth]=t2*crossoverAlpha+t1*(1-crossoverAlpha);
[0266] Case 3: Density difference crossover and depth crossover, all genes are crossovered, the operation formula is as above.
[0267] To summarize, the total number of crossovers is calculated using minRMS, and then individuals are randomly selected to determine whether to participate in the crossover based on probability; individuals participating in the crossover select which genes to participate in the crossover based on probability.
[0268] Here's a specific example: if minRMS is 1.2, minIterDelt is 1, sizePop is 4, and crossoverAlpha is 0.8, then corssCnt = round(1.2 / 1)*4 = 8, meaning a maximum of 8 pairs of individuals can participate in the crossover operation. Here, we use the crossover of a pair of individuals as an example. Assume that the density difference of individual A1 is A1[contrast] = 0.5, and the depth of individual A1 is A1[depth] = 20; the density difference of individual A2 is A2[contrast] = 0.3, and the depth of individual A2 is A2[depth] = 10. If the random number R2 is less than the crossoverRate, then A1 and A2 are definitely crossed.
[0269] If we only do density intersection:
[0270] A1[contrast]=0.5*0.8+(1-0.8)*0.3=0.46,
[0271] A2[contrast]=0.3*0.8+(1-0.8)*0.5=0.34;
[0272] If only depth intersection is done, then:
[0273] A1[depth]=20*0.8+(1-0.8)*10=18,
[0274] A2[depth]=10*0.8+(1-0.8)*20=12;
[0275] If you do the intersection of density difference and depth at the same time:
[0276] A1[contrast]=0.5*0.8+(1-0.8)*0.3=0.46,
[0277] A2[contrast]=0.3*0.8+(1-0.8)*0.5=0.34;
[0278] A1[depth]=20*0.8+(1-0.8)*10=18,
[0279] A2[depth]=10*0.8+(1-0.8)*20=12;
[0280] Go to step 8.
[0281] Step 8: Apply the mutation operator to the individual based on probability. The mutation operator selects a single individual and then selects genes for mutation. The maximum number of mutations is fixed at sizePop. A random number R3 in the range [0, 1] is calculated. If R3 is less than mutationRate, an individual is selected for mutation. The mutation operator then randomly selects one individual from Case 1 and Case 2 for the mutation operation.
[0282] Case 1: Density difference mutation, only density difference mutation operation is performed. The mutation formula is as follows:
[0283]
[0284] Case 2: Deep mutation, only deep mutation operation is performed. The mutation formula is as follows:
[0285]
[0286] Among them, random() represents a random value generated in [0,1]; normal(0,1) represents a normal distribution with a mean of 0 and a standard deviation of 1; curIndex represents the current generation of the population.
[0287] In general, the maximum number of mutations is sizePop, and then the need for mutation is determined based on the mutationRate probability; if a mutation is required, individuals are randomly selected, and then which gene is selected for mutation.
[0288] Step 9: Obtain the next generation of the population. After steps 6 through 8, a population reproduction cycle is complete, resulting in a new population. Through natural selection, determine whether the global optimal solution has been found based on this new population. Go to step 10.
[0289] Step 10: Determine whether the maximum number of population iterations has been met. Steps 3 through 9 are executed in an iterative loop, with each iteration representing one population iteration, until the maximum number of population iterations, maxGenCnt, is reached. If not, proceed to step 3; otherwise, proceed to step 11.
[0290] Step 11: Find the optimal solution. This step yields the optimal solution for the entire search process. There are only two possible solutions: the optimal vector that satisfies the iterative optimal threshold minIterDelt, or the optimal vector obtained by searching the entire space. At this point, the entire search process ends, and not only is the optimal solution obtained, but the corresponding seabed topography data is also obtained.
[0291] In summary, the present invention proposes a method for solving seabed topography based on an improved genetic algorithm using real-number coding and Parker-Oldenburg inversion. By finding optimal parameters using the improved genetic algorithm based on real-number coding and then using the Parker-Oldenburg inversion method, a more accurate seabed topography is obtained. Compared to the prior art, the present invention has at least the following advantages:
[0292] Improved Genetic Algorithm with Real Number Coding: To address the shortcomings of traditional methods for optimizing Parker-Oldenburg inversion parameters (density difference and depth), this solution innovatively proposes an improved genetic algorithm based on real number coding. This real number coding strategy demonstrates superiority in continuous parameter optimization and continuous gradient problems, enabling more detailed exploration of the parameter space to precisely locate the optimal density difference and depth combination, significantly improving the accuracy of terrain inversion.
[0293] Optimizing the design of crossover and mutation operators: To further enhance algorithm performance, we carefully designed crossover and mutation operators suitable for real-number encoding. These optimized operators not only enhance the algorithm's search capabilities across a wide parameter space, but also effectively reduce the genetic algorithm's computational complexity, making the search process more efficient and robust. This improvement ensures a dual improvement in solution accuracy and efficiency, providing strong technical support for terrain inversion.
[0294] Fusion Strategy Improves Overall Performance: This solution cleverly combines an improved genetic algorithm based on real-number coding with the Parker-Oldenburg inversion method to form an efficient and accurate topography inversion framework. This fusion strategy not only retains the advantages of the Parker-Oldenburg method in processing gravity anomaly data, but also leverages the genetic algorithm's parameter optimization capabilities to significantly improve the accuracy and computational efficiency of the inversion results. Ultimately, this solution provides a powerful foundation for high-precision and efficient seafloor topography exploration and research.
[0295] On the other hand, Figure 9 As shown, an embodiment of the present invention provides a terrain processing device 900 based on a genetic algorithm, which may include:
[0296] The first module 901 is used to initialize the inversion parameters of the target number, obtain a first population based on the initialization of the inversion parameters, and use the first population as the target population;
[0297] Among them, the inversion parameters correspond to individuals in the target population; the inversion parameters include density difference and average seabed depth;
[0298] The second module 902 is used to perform inversion calculation and fitness evaluation of the target area based on the inversion parameters corresponding to each individual in the target population, and obtain the root mean square value corresponding to each individual in the target population;
[0299] The root mean square value represents the adaptability of the inversion parameters corresponding to the individual to participate in the inversion operation of the target area; the result of the inversion operation is the terrain data of the target area;
[0300] The third module 903 is used to output the individual corresponding to the root mean square value as the adapted individual when the root mean square value of the target population meets the preset threshold condition; otherwise,
[0301] The fourth module 904 is configured to perform a genetic operation on the target population based on a preset genetic algorithm to obtain a second population; the second population is used as the target population, and the number of population iterations is increased by 1;
[0302] The fifth module 905 is used to return to the step of performing the inversion operation and fitness evaluation of the target area based on the inversion parameters corresponding to each individual in the target population until an adapted individual is output or the number of population iterations reaches a preset maximum number of population iterations;
[0303] The sixth module 906 is configured to use the terrain data obtained by the inversion operation corresponding to the inversion parameters corresponding to the adaptation individual as the terrain processing result of the target area.
[0304] In some embodiments, the apparatus may further include:
[0305] The seventh module is used to output the adapted individuals according to the target population obtained in the last cycle when the number of population iterations is equal to the maximum number of population iterations.
[0306] The contents of the method embodiments of the present invention are all applicable to the device embodiments. The functions specifically implemented by the device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0307] In another aspect, an embodiment of the present invention further provides an electronic device comprising a memory and a processor. The memory stores a computer program, and the processor implements the above-described method for predicting the bottom boundary of the hydrate stability region when executing the computer program. The electronic device can be any smart terminal, including a tablet computer and an in-vehicle computer.
[0308] It can be understood that the contents of the above method embodiments are applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0309] like Figure 10 As shown, Figure 10 The hardware structure of an electronic device 1000 according to another embodiment is shown. The electronic device 1000 includes:
[0310] The processor 1001 may be implemented as a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is configured to execute relevant programs to implement the technical solutions provided by the embodiments of the present invention.
[0311] The memory 1002 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1002 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1002 and is called by the processor 1001 to execute the network node population optimization method of the embodiment of the present invention.
[0312] Input / output interface 1003, used to implement information input and output;
[0313] Communication interface 1004, used to implement communication interaction between this device and other devices, which can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WiFi, Bluetooth, etc.);
[0314] Bus 1005 , which transmits information between various components of the device (e.g., processor 1001 , memory 1002 , input / output interface 1003 , and communication interface 1004 );
[0315] The processor 1001 , the memory 1002 , the input / output interface 1003 and the communication interface 1004 are connected to each other in communication within the device via the bus 1005 .
[0316] The electronic device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, i.e., they may be located in one location or distributed across multiple network units. Some or all of these modules may be selected based on actual needs to achieve the objectives of this embodiment.
[0317] The contents of the method embodiments of the present invention are all applicable to the electronic device embodiments. The functions specifically implemented by the electronic device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0318] Another aspect of an embodiment of the present invention further provides a computer-readable storage medium, wherein the storage medium stores a program, and the program is executed by a processor to implement the above method.
[0319] The contents of the method embodiments of the present invention are all applicable to the computer-readable storage medium embodiments. The functions specifically implemented by the computer-readable storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0320] The present invention also discloses a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions, causing the computer device to perform the above method.
[0321] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to the embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the claims and their equivalents.
[0322] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present invention.
Claims
1. A terrain processing method based on genetic algorithm, characterized in that: The following steps are involved: Initializing a target number of inversion parameters, obtaining a first population based on the initialization of the inversion parameters; and using the first population as a target population; Wherein, the inversion parameters correspond to individuals in the target population; the inversion parameters include density difference and average seabed depth; performing an inversion operation and fitness evaluation of a target area based on the inversion parameters corresponding to each individual in the target population, to obtain a root mean square value corresponding to each individual in the target population; The root mean square value represents the adaptability of the inversion parameter corresponding to the individual to participate in the inversion operation of the target area; the result of the inversion operation is the topographic data of the target area; When the root mean square value in the target population meets the preset threshold condition, the individual corresponding to the root mean square value is output as the adapted individual; otherwise, Performing a genetic operation on the target population based on a preset genetic algorithm to obtain a second population; using the second population as the target population, and increasing the number of population iterations by 1; Returning to the step of performing the inversion operation and fitness evaluation of the target area based on the inversion parameters corresponding to each individual in the target population, until the adapted individual is output, or the number of population iterations reaches a preset maximum number of population iterations; The terrain data obtained from the inversion operation using the inversion parameters corresponding to the adapted individual is used as the terrain processing result of the target area.
2. The terrain processing method based on genetic algorithm according to claim 1, characterized in that: Initializing the target number of inversion parameters comprises the following steps: In response to a first input instruction of the target object, a center point is obtained, a first value is assigned to the center point by a first random number, and a second number of inversion parameters are randomly generated near the center point; and a second value is assigned to the center point by multiplying the first random number by a difference between the first interval and the interval range, and a third number of inversion parameters are randomly generated near the center point; Wherein, the first random number represents a random number of a normal distribution with a mean of 0 and a standard deviation of 1; the first random number is updated before each generation of the inversion parameter; the first interval represents a value range of the inversion parameter; the sum of the second number and the third number is equal to the target number; Alternatively, based on a second random number, the target number of inversion parameters is randomly generated within the first interval; the second random number represents a random value within the second interval; Alternatively, the target number of inversion parameters is obtained in response to a second input instruction of the target object.
3. The terrain processing method based on genetic algorithm according to claim 1, characterized in that: The inversion operation and fitness evaluation of the target area are performed based on the inversion parameters corresponding to each individual in the target population to obtain the root mean square value corresponding to each individual in the target population, comprising the following steps: Based on the inversion parameters corresponding to the individuals in the target population, the terrain data of the target area corresponding to each individual is obtained by processing using the Parker-Oldenburg inversion method; Obtaining a seismic depth matrix of the target area; Traversing the first data values of all location points of the terrain data corresponding to the individual, collecting the second data value of the corresponding location point from the seismic depth matrix; obtaining the third data value of the corresponding location point based on the square of the difference between the first data value and the second data value; performing square root processing on the average value of the third data values of all the location points to obtain the root mean square value corresponding to the corresponding individual.
4. The terrain processing method based on genetic algorithm according to claim 1, characterized in that: The performing of a genetic operation on the target population based on a preset genetic algorithm to obtain a second population comprises at least one of the following steps: Based on the excellence of each of the individuals in the target population, selecting the target number of individuals from the target population by a first probability rule combined with a first probability threshold to obtain the second population; wherein the excellence is determined based on the inverse of the root mean square value; Performing a crossover operation on a random pair of individuals in the target population using a second probability rule to obtain the second population; The second population is obtained by performing a mutation operation on the random individuals in the target population using a second probability rule.
5. The terrain processing method based on genetic algorithm according to claim 4, characterized in that: The step of selecting the target number of individuals from the target population based on the excellence of each individual in the target population by combining a first probability rule with a first probability threshold to obtain the second population comprises the following steps: Taking the reciprocal of the root mean square value as the excellence level corresponding to each individual in the target population; Normalizing all the excellence levels to obtain a normalized excellence value corresponding to each individual; Initialize the identification number to 0 and initialize the excellent array to empty; Taking the first individual of the target population as a data individual and taking the excellent value corresponding to the data individual as an output value; Using the output value as the array element at the position corresponding to the identification number in the excellent array; increasing the identification number by 1; and using the next individual after the data individual in the target population as the data individual; Accumulating the excellent values corresponding to the data individuals to the output value, returning to the step of using the output value as the array element at the position corresponding to the identification number in the excellent array, until the identification number is equal to the total number of all the individuals in the target population, and outputting the excellent array; generating a random value within a third interval as a first probability threshold; Sequentially traverse the excellent array and obtain the first array element that is greater than the first probability threshold as the target element; Selecting the corresponding individuals from the target population according to the element number corresponding to the target element and arranging them into the second population; Return to the step of generating a random value within the third interval as the first probability threshold until the target number of individuals are selected from the target population to obtain the second population.
6. The terrain processing method based on genetic algorithm according to claim 4, characterized in that: The step of performing a crossover operation on a random pair of individuals in the target population using a second probability rule to obtain the second population comprises the following steps: Based on all the root mean square values corresponding to the target population, obtaining the minimum root mean square value as a target root mean square value; performing an upward rounding operation on the ratio of the target RMS value to a preset iterative optimal threshold, and multiplying a result of the upward rounding operation by the target number as the number of crossovers; Randomly obtaining two different individuals from the target population as crossover individuals; the crossover individuals include a first individual and a second individual; generating a random value within a fourth interval as a second probability threshold; When the second probability threshold is less than a preset crossover operator probability, weighted crossover is performed on the inversion parameters corresponding to the first individual and the second individual in the crossover individuals based on a preset crossover operator ratio; otherwise, the weighted crossover is not performed on the crossover individuals; Increment the first cycle number by 1, and return to the step of randomly obtaining two different individuals from the target population as crossover individuals until the first cycle number equals the crossover number, thereby obtaining the second population; The first cycle number is initialized to 0.
7. The terrain processing method based on genetic algorithm according to claim 4, characterized in that: The step of performing a mutation operation on the random individuals in the target population using a second probability rule to obtain the second population comprises the following steps: Randomly obtaining one of the individuals from the target population as a mutant individual; generating a random value within a fifth interval as a third probability threshold; When the third probability threshold is less than a preset mutation operator probability, the inversion parameter corresponding to the mutant individual is assigned a value based on the population iteration number, the population maximum iteration number, and the value range of the inversion parameter; otherwise, the inversion parameter of the mutant individual is not assigned a value; The expression of the assignment process is: A1=A1+(max-mix)*normal(0,1)*(1-random() (1-curIndex / maxGenCnt) ); Where A1 represents the inversion parameter of the mutant individual; max represents the maximum value of the inversion parameter interval; min represents the minimum value of the inversion parameter interval; normal(0,1) represents a random value with a normal distribution with a mean of 0 and a standard deviation of 1; random() represents a random value generated in the sixth interval; curIndex represents the number of population iterations; maxGenCnt represents the maximum number of population iterations; Increment the second cycle number by 1, and return to the step of randomly obtaining one of the individuals from the target population as a mutant individual, until the second cycle number equals the target number, thereby obtaining the second population; The second cycle number is initialized to 0.
8. A terrain processing device based on genetic algorithm, characterized in that: include: A first module is used to initialize a target number of inversion parameters, and obtain a first population based on the initialization of the inversion parameters; taking the first population as the target population; Wherein, the inversion parameters correspond to individuals in the target population; the inversion parameters include density difference and average seabed depth; The second module is used to perform inversion operation and fitness evaluation of the target area based on the inversion parameters corresponding to each individual in the target population, and obtain the root mean square value corresponding to each individual in the target population; The root mean square value represents the adaptability of the inversion parameter corresponding to the individual to participate in the inversion operation of the target area; the result of the inversion operation is the topographic data of the target area; The third module is configured to output the individual corresponding to the root mean square value as the adapted individual when the root mean square value in the target population meets the preset threshold condition; otherwise, The fourth module is configured to perform a genetic operation on the target population based on a preset genetic algorithm to obtain a second population; use the second population as the target population, and increase the number of population iterations by 1; A fifth module is configured to return to the step of performing the inversion operation and fitness evaluation of the target area based on the inversion parameters corresponding to each individual in the target population until the adapted individual is output, or the number of population iterations reaches a preset maximum number of population iterations; The sixth module is configured to use the terrain data obtained from the inversion operation corresponding to the inversion parameters corresponding to the adapted individual as a terrain processing result of the target area.
9. An electronic device, characterized in that: including a processor and a memory; The memory is used to store programs; The processor executes the program to implement the method according to any one of claims 1 to 7.
10. A computer storage medium storing a program executable by a processor, characterized in that: The program executable by the processor is used to implement the method according to any one of claims 1 to 7 when executed by the processor.
Citation Information
Patent Citations
Low-frequency-band earth conductivity rapid inversion method under irregular terrain
CN105740204A
Optimal retention strategy-based genetic algorithm wave impedance inversion method
CN108333626A